gno-docs/refs.aug96/section1234-95.doc

3270 lines
348 KiB
Plaintext
Raw Permalink Blame History

{\rtf1\ansi\ansicpg1252\uc1 \deff0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;}{\f2\fmodern\fcharset0\fprq1{\*\panose 02070309020205020404}Courier New;}{\f3\froman\fcharset2\fprq2{\*\panose 05050102010706020507}Symbol;}{\f4\froman\fcharset0\fprq2{\*\panose 00000000000000000000}Times;}{\f5\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Helvetica;}{\f6\fmodern\fcharset0\fprq1{\*\panose 00000000000000000000}Courier;}{\f7\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Geneva;}{\f8\froman\fcharset0\fprq2{\*\panose 00000000000000000000}Tms Rmn;}{\f9\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Helv;}{\f10\froman\fcharset0\fprq2{\*\panose 00000000000000000000}MS Serif;}{\f11\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}MS Sans Serif;}{\f12\froman\fcharset0\fprq2{\*\panose 00000000000000000000}New York;}{\f13\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}System;}{\f14\fnil\fcharset2\fprq2{\*\panose 05000000000000000000}Wingdings;}{\f15\fswiss\fcharset0\fprq3{\*\panose 020b0604030504040204}Tahoma;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\nowidctlpar\widctlpar\adjustright \fs20\cgrid \snext0 Normal;}{\*\cs10 \additive Default Paragraph Font;}{\s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright \fs20\cgrid \sbasedon0 \snext15 header;}{\s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright \fs20\cgrid \sbasedon0 \snext16 footer;}{\s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid \sbasedon0 \snext17 Indented;}{\*\cs18 \additive \sbasedon10 page number;}{\s19\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid \sbasedon0 \snext19 Section Header;}{\s20\qj\li1440\nowidctlpar\widctlpar\adjustright \f4\cgrid \sbasedon0 \snext20 Indented-2;}{\s21\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid \sbasedon0 \snext21 Heading;}{\s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid \sbasedon0 \snext22 Sub-body;}{\s23\fi-1260\li1980\nowidctlpar\widctlpar\adjustright \f4\cgrid \sbasedon0 \snext23 Big Bullet;}}{\*\revtbl {Unknown;}}{\info{\title NAME}{\author Lisa K Holsberg}{\operator Lisa K Holsberg}{\creatim\yr1997\mo8\dy27\hr16\min5}{\revtim\yr1997\mo8\dy27\hr16\min5}{\printim\yr1996\mo8\dy7\hr11\min3}{\version2}{\edmins1}{\nofpages41}{\nofwords22335}{\nofchars127314}{\*\company Promethean Enterprises}{\nofcharsws156350}{\vern71}}\margl1440\margr1440\margb720 \facingp\widowctrl\ftnbj\aenddoc\lytprtmet\formshade\viewkind1\viewscale83\viewzk2\pgbrdrhead\pgbrdrfoot \fet0\sectd \psz1\linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx9360\adjustright \fs20\cgrid {\fs24 BINPRINT(1)\tab Commands and Applications\tab BINPRINT(1)}{
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 INTRO(}{\fs24 1)\tab Commands and Applications\tab }{\fs24 INTRO}{\fs24 (1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerr \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx8640\adjustright \fs20\cgrid {
\par }\pard \s16\qr\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 5}}}{
\par }}{\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 intro}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 intro}}}{\f0 - introduction to commands and application programs
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 This section describes, in alphabetical order, commands available for GNO. Certain distinctions of purpose are made in the headings. For example, BUILT-IN UTILITIES are those commands which are part of the GNO shell and not contained in stand-alone files.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 Manual Page Command Syntax
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Unless otherwise noted, commands described in the }{\b\f0 SYNOPSIS}{\f0 section of a manual page accept options and other arguments according to the following syntax and should be interpreted as explained below:
\par }\pard\plain \fi-720\li1440\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 name}{\fs24 [- }{\b\fs24 option }{\fs24 ...] [ }{\i\fs24 cmdarg}{\fs24 ...]
\par
\par where:
\par
\par }{\b\fs24 []}{\fs24 \tab Surround an option or cmdarg that is not required.
\par
\par }{\b\fs24 ...}{\fs24 \tab Indicates multiple occurrences of the option or cmdarg.
\par
\par }{\b\fs24 name}{\fs24 \tab The name of an executable file.
\par
\par }{\b\fs24 option}{\fs24
\par \tab (Almost always preceded by a "-".)
\par \tab }{\b\fs24 noargletter ...}{\fs24 or,
\par \tab }{\b\fs24 argletter}{\fs24 }{\b\fs24 optarg}{\fs24 }{\b\fs24 [,...]}{\fs24
\par
\par }{\b\fs24 noargletter}{\fs24
\par \tab A single letter representing an option without an option-argument. Note that more than one noargletter option can be grouped after one "-".
\par
\par }{\b\fs24 argletter}{\fs24
\par \tab A single letter representing an option requiring an option-argument.
\par
\par }{\b\fs24 optarg}{\fs24 An option-argument (character string) satisfying a preceding argletter. Note that groups of optargs following an argletter must be separated by white space and quoted.
\par
\par }{\b\fs24 cmdarg
\par }{\fs24 \tab Path name (or other command argument) not beginning with a "-", or "-" by itself indicating the standard input.
\par }\pard \nowidctlpar\widctlpar\adjustright {\fs24
\par }{\b\fs24 SEE ALSO}{\fs24
\par }\pard \fi720\nowidctlpar\widctlpar\adjustright {\i\fs24 GNO Shell User's Manual}{\b\fs24 \sect }\sectd \psz1\linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx9360\adjustright \fs20\cgrid {\fs24 BINPRINT(1)\tab Commands and Applications\tab BINPRINT(1)}{
\par }}\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 binprint - dump binary files in ascii/hex format
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 binprint}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 binprint}}}{\f0 [-}{\i\f0 c}{\f0 columns] [}{\i\f0 filename}{\f0 ]
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard \nowidctlpar\widctlpar\adjustright {\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 binprint}{\f0 takes binary data and formats it as a sequence of ascii data and hex values that represent the binary data. The format of the output is very similar to that produced by the IIGS Monitor and the NiftyList utility.
\par
\par Two columns of output are produced. The first column is the hex representation of the data. The second column is the ascii representation of the data. If the particular byte being printed is a non-printable ASCII character, it is printed as a '.'.
\par
\par If the -c option is specified, the number following it is used to determine the number of columns (of bytes) per line. The default is 16.
\par
\par If the filename is not specified, input is taken from standard input.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 BUGS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 binprint}{\f0 is slow.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 AUTHOR}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 binprint}{\f0 was written by Derek Taubert for GNO/ME.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\sect }\sectd \psz1\linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 CAL(1)\tab Commands and Applications\tab CAL(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {\f4
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 CA}{\fs24 L}{\fs24 (1)\tab Commands and Applications\tab CA}{\fs24 L}{\fs24 (1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright {
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 4}}}{
\par }}\pard\plain \s19\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {\f0 NAME
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 cal - display a calendar
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s19\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {\f0 SYNOPSIS
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 cal}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 cal}}}{\f0 [ [ }{\i\f0 month}{\f0 ] }{\i\f0 year}{\f0 ]
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s19\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {\f0 DESCRIPTION
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 cal}{\f0 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.
\par
\par }{\i\f0 year}{\f0 can be between 1 and 9999. Be aware that `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.
\par
\par month is a number between 1 and 12.
\par
\par The calendar produced is that for England and her colonies.
\par
\par Try September 1752.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24 \sect }\sectd \psz1\linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 CA}{\fs24 T}{\fs24 (1)\tab Commands and Applications\tab CA}{\fs24 T}{\fs24 (1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {\f4
\par }}\pard\plain \s19\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {\f0 NAME
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 cat - concatenate and print files
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 cat}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 cat}}}{\f0 [ -}{\i\f0 benstuv}{\f0 ] [ file ...]
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 The }{\b\f0 cat}{\f0 utility reads files sequentially, writing them to the standard output. The file operands are processed in command line order. A single dash represents standard input.
\par
\par The options are as follows:
\par
\par }\pard \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright {\f0 -}{\i\f0 b}{\f0 \tab Implies the -}{\i\f0 n}{\f0 option but doesn't number blank lines.
\par }\pard \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright {\f0 -}{\i\f0 e}{\f0 \tab Implies the -}{\i\f0 v}{\f0 option, and displays a dollar sign ($) at the end of each line as well.
\par -}{\i\f0 n}{\f0 \tab Number the output lines, starting at 1.
\par -}{\i\f0 s}{\f0 \tab Squeeze multiple adjacent empty lines, causing the output to be single spaced.
\par -}{\i\f0 t}{\f0 \tab Implies the -}{\i\f0 v}{\f0 option, and displays tab characters as [^I] as well.
\par -}{\i\f0 u}{\f0 \tab The -u option guarantees that the output is unbuffered.
\par -}{\i\f0 v}{\f0 \tab Displays non-printing characters so they are visible. Control characters print line [^X] for control-X; the delete character (octal 0177) prints as [^?] Non-ascii characters (with the high bit set) are printed as [M-] (for meta) followed by the character for the low 7 bits.
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\adjustright {\f0
\par The }{\b\f0 cat}{\f0 utility exits 0 on success, and >0 if an error occurs.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s19\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {\f0 BUGS
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Because of the shell language mechanism used to perform output redirection, the command "}{\f2 cat file1 file 2 > file1}{\f0 " will cause the original data in file1 to be destroyed! Use "}{\f2 cat file2 >> file1}{\f0 " instead.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s19\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {\f0 SEE ALSO
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 head}{\f0 (1), }{\b\f0 more}{\f0 (1), }{\b\f0 tail}{\f0 (1), Rob Pike "}{\i\f0 UNIX Style, or cat -v Considered Harmful}{\f0 ", "}{\i\f0 USENIX Summer Conference Proceedings}{\f0 " (1983)
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s19\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {\f0 HISTORY
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 A }{\b\f0 cat}{\f0 command appeared in Version 6 AT&T UNIX.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\fs24 \sect }\sectd \psz1\linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 CENTER(1)\tab Commands and Applications\tab CENTER(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqc\tx5220\tqr\tx8640\tqr\tx10260\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4320\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 CENTER(1)\tab Commands and Applications\tab CENTER(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqc\tx5220\tqr\tx8640\tqr\tx10260\adjustright {
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 4}}}{
\par }}\pard\plain \s21\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {NAME
\par }\pard\plain \s17\qj\fi720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b center}{\pard\plain \s17\qj\fi720\nowidctlpar\widctlpar\adjustright \v\f4\cgrid {\xe {\v }{\b center}}}{ - Center text on terminal
\par }\pard \s17\qj\nowidctlpar\widctlpar\adjustright {
\par }\pard\plain \s21\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {SYNOPSIS
\par }\pard\plain \s17\qj\fi720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b center}{\pard\plain \s17\qj\fi720\nowidctlpar\widctlpar\adjustright \v\f4\cgrid {\xe {\v }{\b center}}}{ [columns] [file]
\par }\pard \s17\qj\nowidctlpar\widctlpar\adjustright {
\par }\pard\plain \s21\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {DESCRIPTION
\par }\pard\plain \s17\qj\fi720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b Center}{ is used to center lines of text either fed from stdin, or from the specified file.
\par }\pard \s17\qj\nowidctlpar\widctlpar\adjustright {
\par }\pard \s17\qj\fi720\nowidctlpar\widctlpar\adjustright {One may pipe input in to it from the command line, or launch it by itself.
\par }\pard \s17\qj\nowidctlpar\widctlpar\adjustright {
\par }\pard \s17\qj\fi720\nowidctlpar\widctlpar\adjustright {The commands are as follows:
\par }\pard \s17\qj\nowidctlpar\widctlpar\adjustright {
\par }\pard\plain \s20\qj\li1440\nowidctlpar\widctlpar\adjustright \f4\cgrid {columns\tab How many columns should be considered when centering the text.}{
\par }\pard \s20\qj\fi720\li2160\nowidctlpar\widctlpar\adjustright {Defaults to 80 columns.
\par }\pard \s20\qj\li1440\nowidctlpar\widctlpar\adjustright {
\par file\tab }{\tab S}{pecifies the file to open for centering. Defaults to stdin.
\par }\pard\plain \s17\qj\nowidctlpar\widctlpar\adjustright \f4\cgrid {
\par }\pard\plain \s21\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {FILES
\par }\pard\plain \s17\qj\fi720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b center}{
\par }\pard \s17\qj\nowidctlpar\widctlpar\adjustright {
\par }\pard\plain \s21\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {AUTHOR
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {Written by Marek Pawlowski. Source code in Public Domain. Contact author for redistribution rights, or inclusion in a software package. Munge at will. Credit to Marek Pawlowski must be retained in modified source code. Preview of modifications appreciated. Contact Marek Pawlowski at marekp@pnet91.cts.com, marekp@cerf.net.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {
\par }{\fs24 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 CHMOD}{\fs24 (1)\tab Commands and Applications\tab CH}{\fs24 MOD}{\fs24 (1)}{
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx5040\tqr\tx10080\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 CHMOD(1)\tab Commands and Applications\tab CHMOD(1)}{
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx5040\tqr\tx10080\adjustright {
\par
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx9360\adjustright \fs20\cgrid {
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx9360\adjustright {\b \chpgn
\par }}{\footerr \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx9360\tqr\tx10080\adjustright \fs20\cgrid {
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx9360\tqr\tx10080\adjustright {\tab \tab }{\b \chpgn }{
\par }}\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 chmod - Modify file permission flags.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 chmod}{\f0 }{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 chmod }}}{\f0 [}{\i\f0 vV}{\f0 ] [octnum]|[+-=][}{\i\f0 rwdnbi}{\f0 ] }{\i\f0 file}{\f0 ...
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 chmod}{\f0 is a program which modifies the permission flags of a series of files. It will modify the read, write, destroy, rename, backup, and invisible flags of the files selected.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 OPTIONS}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 -}{\i\f0 v}{\f0 \tab verbose. Provides debugging information.
\par -}{\i\f0 V}{\f0 \tab version. Prints out the version number.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 USAGE}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 -\tab remove a permission flag.
\par +\tab add a permission flag.
\par =\tab add permission flag, and clear all other flags.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 PERMISSIONS}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\i\f0 r}{\f0 \tab read permssion.
\par }{\i\f0 w}{\f0 \tab write permission.
\par }{\i\f0 d}{\f0 \tab destroy permission.
\par }{\i\f0 n}{\f0 \tab rename permission.
\par }{\i\f0 b}{\f0 \tab backup needed flag.
\par }{\i\f0 i}{\f0 \tab invisible flag.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 EXAMPLES}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 `Lock' a file: }{\f2 % chmod -wdn foo}{\f0
\par `Unlock' a file: }{\f2 % chmod +wdn foo}{\f0
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 BUGS}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Currently octal mode is only guarenteed to work with the ProDOS filesystem, as the chmod() call supplied with Orca/C doesn't seem to work well with other FSTs. Many of the standard Unix permission flags are not implemented, as the ProDOS filesystem does not support these permissions. Among unsupported permissions are seperate sets of flags for user, group, and world. As well, the -x flag is not supported - if you wish to create an executable shell script, use chtyp instead.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SEE ALSO}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 ls(1), chtyp(1)
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 AUTHOR}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 James Brookes
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {\f0 bb252@cleveland.freenet.edu
\par jamesb@cscihp.ecst.csuchico.edu
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 CHTYP}{\fs24 (1)\tab Commands and Applications\tab CH}{\fs24 TYP}{\fs24 (1)}{
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx5040\tqr\tx10080\adjustright {
\par
\par }}\pard\plain \s19\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {\f0 NAME
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 chtyp - change file and aux types
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s19\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {\f0 SYNOPSIS
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 chtyp}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 chtyp}}}{\f0 \{ [-t filetype] [-a auxtype] \} | \{ -l lang \} file...
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s19\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {\f0 DESCRIPTION
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 chtyp}{\f0 is used to change the file types and aux types of the specified file(s).
\par
\par type is one of:
\par }\pard\plain \s20\qj\li1440\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 a decimal number [66]
\par a hexidecimal number preceeded by a $ [$42]
\par an official Apple mnemonic [FTD]
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 and auxtype is either:
\par }\pard\plain \s20\qj\li1440\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 a decimal number [64222]
\par a hexidecimal number preceeded by a $ [$FADE]
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 lang is one of:
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\tx1440\tx3600\adjustright {\f0 \tab CC\tab ORCA/C
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\tx1440\tx3600\adjustright {\f0 \tab ASM65816\tab ORCA/M or APW Assembler
\par \tab IBASIC\tab ORCA/Integer Basic
\par \tab LINK\tab ZapLink
\par \tab APWC\tab APW C
\par \tab PASCAL\tab ORCA/Pascal
\par \tab REZ\tab Apple Resource Tool
\par \tab EXEC\tab Shell Script file
\par \tab TMLPASCAL\tab TML Pascal
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 If the -l is used, the -t and -a options cannot be used.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s19\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {\f0 ERRORS
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 If }{\b\f0 chtyp}{\f0 is interrupted with a signal (SIGINT}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGINT}}}{\f0 , SIGTERM}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGTERM}}}{\f0 , etc.) the program aborts with a message telling what signal caused the termination.
\par
\par If some other error occurs, }{\b\f0 chtyp}{\f0 aborts with an error message.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 BUGS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Note that when giving hexadecimal arguments to }{\b\f0 chtyp}{\f0 , you must quote any '$' characters with a \\. For example,
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\adjustright {\f2 chtyp -t \\$50 -a \\$8002 teach.file}{\f0
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par \tab Additional language stamps can only be added by modifying the source code.
\par
\par }\pard\plain \s19\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {\f0 AUTHOR
\par }\pard\plain \fi720\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24 Original version by Greg Thompson.}{\fs24
\par \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx9360\adjustright \fs20\cgrid {\fs24 CMP(1)\tab Commands and Applications\tab CMP(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqc\tx5220\tqr\tx9360\tqr\tx10260\adjustright \fs20\cgrid {\fs24 CMP}{\fs24 (1)\tab Commands and Applications\tab }{\fs24 CMP}{\fs24 (1)}{\f4
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {\f4
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx9360\adjustright \fs20\cgrid {\ul
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx9360\adjustright {\b \chpgn
\par }}{\footerr \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx9360\tqr\tx10080\adjustright \fs20\cgrid {
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx9360\tqr\tx10080\adjustright {\tab \tab }{\b \chpgn }{
\par }}\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 cmp - perform a byte-by-byte comparison of two files
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24
\par SYNOPSIS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 cmp}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 cmp}}}{\f0 [ -}{\b\f0 ls}{\f0 ] }{\i\f0 filename1}{\f0 }{\i\f0 filename2}{\f0 [ }{\i\f0 skip1}{\f0 ] [ }{\i\f0 skip2}{\f0 ]
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 cmp}{\f0 compares }{\i\f0 filename1}{\f0 and }{\i\f0 filename2}{\f0 . If }{\i\f0 filename1}{\f0 is `-', the standard input is used. With no options, }{\b\f0 cmp}{\f0 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.
\par
\par }{\i\f0 skip1}{\f0 and }{\i\f0 skip2}{\f0 are initial byte offsets into }{\i\f0 filename1}{\f0 and }{\i\f0 filename2}{\f0 respectively, and may be either octal or decimal; a leading }{\b\f0 0}{\f0 denotes octal.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 OPTIONS}{\fs24
\par }\pard\plain \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 -}{\b\f0 l}{\f0 \tab Print the byte number (in decimal) and the differing bytes (in octal) for all differences between the two files.
\par -}{\b\f0 s}{\f0 \tab Silent. Print nothing for differing files; set exit codes only.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SEE ALSO}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 diff}{\f0 (1)
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DIAGNOSTICS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Exit code }{\b\f0 0}{\f0 is returned for identical files, }{\b\f0 1}{\f0 for different files, and }{\b\f0 2}{\f0 for an inaccessible or missing argument, or a system error.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard \fi720\nowidctlpar\widctlpar\adjustright {\fs24 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 COMPRESS(1)\tab Commands and Applications\tab COMPRESS(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {\f4
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4320\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 COMPRESS(1)\tab Commands and Applications\tab COMPRESS(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard \li720\nowidctlpar\widctlpar\adjustright {\fs24 compress, uncompress, zcat - compress and expand data
\par }\pard \nowidctlpar\widctlpar\adjustright {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard \li720\nowidctlpar\widctlpar\adjustright {\b\fs24 compress}{\pard\plain \li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\fs24 }{\b\fs24 compress}}}{\fs24 [-cCdDf?hkKvV][-b maxbits][-Iinpath][-Ooutpath][filenames...]
\par }\pard \li720\nowidctlpar\widctlpar\adjustright {\b\fs24 uncompress}{\pard\plain \li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\fs24 }{\b\fs24 uncompress}}}{\fs24 [-fCcvVkK?h][-Iinpath][-Ooutpath][filenames...]
\par }{\b\fs24 zcat }{\pard\plain \li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\fs24 }{\b\fs24 zcat }}}{\fs24 [-CvV?h][-Iinpath][-Ooutpath][filenames...]
\par }\pard \li720\nowidctlpar\widctlpar\tqc\tx2880\adjustright {\fs24
\par -}{\i\fs24 V}{\fs24 \tab \tab print Version
\par -}{\i\fs24 d}{\fs24 \tab \tab decompress input (default is compress)
\par -}{\i\fs24 v}{\fs24 \tab \tab verbose
\par -}{\i\fs24 f}{\fs24 \tab \tab force overwrite of output file (default = off)
\par }\pard \li720\nowidctlpar\widctlpar\tqc\tx2880\adjustright {\fs24 -}{\i\fs24 n}{\fs24 \tab \tab no header: useful to uncompress old files
\par }\pard \li720\nowidctlpar\widctlpar\tqc\tx2880\adjustright {\fs24 -}{\i\fs24 c}{\fs24 \tab \tab write all output to stdout (default = off)
\par -}{\i\fs24 C}{\fs24 \tab \tab generate output compatible with compress 2.0
\par -}{\i\fs24 k}{\fs24 \tab \tab %s input file (default = keep)
\par -}{\i\fs24 K}{\fs24 \tab \tab %s output file on error (default = kill)
\par -}{\i\fs24 b maxbits}{\fs24 \tab \tab default = 16 bits
\par -}{\i\fs24 I pathname}{\fs24 \tab \tab infile path = none
\par -}{\i\fs24 O pathname}{\fs24 \tab \tab outfile path = none
\par -}{\i\fs24 ?}{\fs24 -}{\i\fs24 h}{\fs24 \tab \tab help, print full usage message
\par }\pard \nowidctlpar\widctlpar\adjustright {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard \li720\nowidctlpar\widctlpar\adjustright {\b\fs24 Compress}{\fs24 reduces the size of the named files using adaptive Lempel-Ziv coding. Whenever possible, each file is replaced by one with the extension .Z, while keep\-ing the same ownership modes, access and modification times. If no files are spec\-ified, the standard input is compressed to the standard output.Compressed files can be restored to their original form using }{\b\fs24 uncompress}{\fs24 or }{\b\fs24 zcat}{\fs24 .
\par }\pard \li720\nowidctlpar\widctlpar\adjustright {\fs24
\par The -f option will force compression of }{\i\fs24 name}{\fs24 . This is useful for compressing an entire directory, even if some of the files do not actually shrink. If -f is not given and compress is run in the foreground, the user is prompted as to whether an exist\-ing file should be overwritten.
\par
\par The -c option makes }{\b\fs24 compress}{\fs24 /}{\b\fs24 uncompress}{\fs24 write to the standard output; no files are changed. The nondestructive behavior of zcat is identical to that of }{\b\fs24 uncompress}{\fs24 -c.
\par
\par }{\b\fs24 Compress}{\fs24 uses the modified Lempel-Ziv algorithm popularized in "}{\i\fs24 A Technique for High Performance Data Compression}{\fs24 ", Terry A. Welch, "}{\i\fs24 IEEE Computer}{\fs24 ," vol. 17, no. 6 (June 1984), pp. 8-19. Common substrings in the file are first replaced by 9-bit codes 257 and up. When code 512 is reached, the algorithm switches to 10-bit codes and continues to use more bits until the limit specified by the -b flag is reached (default 16). Bits must be between 9 and 16. The default can be changed in the source to allow compress to be run on a smaller machine.
\par
\par After the bits limit is attained, compress periodically checks the compression ratio. If it is increasing, }{\b\fs24 compress}{\fs24 continues to use the existing code dictionary. However, if the compression ratio decreases, }{\b\fs24 compress}{\fs24 discards the table of sub\-strings and rebuilds it from scratch. This allows the algorithm to adapt to the next "block" of the file.
\par
\par Note that the -b flag is omitted for }{\b\fs24 uncompress}{\fs24 , since the bits parameter specified during compression is encoded within the output, along with a magic number to en\-sure that neither decompression of random data nor recompres\-sion of compressed data is attempted.
\par
\par The amount of compression obtained depends on the size of the input, the number of bits per code, and the distri\-bution of common substrings. Typically, text such as source code or English is reduced by 50-60%. Compression is generally much faster compressing, but the output is not as small as freeze.
\par
\par Under the -v option, a message is printed yielding the percentage of reduction for each file compressed.
\par
\par If the -V option is specified, the current version and compile options are printed on stderr.
\par
\par }\pard\plain \s19\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {\f0 RETURN VALUE
\par }\pard\plain \li720\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24 Exit status is normally 0; if the last file is larger after (attempted) compression, the status is 2; if an error occurs, exit status is 1.
\par
\par }\pard\plain \s19\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {\f0 SEE ALSO
\par }\pard\plain \li720\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 freeze}{\fs24 (1)
\par
\par }\pard\plain \s19\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {\f0 DIAGNOSTICS
\par }\pard\plain \li720\ri2520\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24 Usage: compress [\\-dfvcV] [\\-b maxbits] [file ...]
\par }\pard\plain \s20\qj\li1440\ri2520\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Invalid options were specified on the command line.
\par }\pard\plain \li720\ri2520\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24 Missing maxbits
\par }\pard\plain \s20\qj\li1440\ri2520\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Maxbits must follow -b.
\par }\pard\plain \li720\ri2520\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24 file : not in compressed format
\par }\pard\plain \s20\qj\li1440\ri2520\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 The file specified to uncompress has not been compressed.
\par }\pard\plain \li720\ri2520\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24 file : compressed with bits, can only handle yy bits
\par }\pard\plain \s20\qj\li1440\ri2520\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 File was compressed by a program that could deal with more bits than the compress code on this machine. Recompress the file with smaller bits.
\par }\pard\plain \s17\qj\li720\ri2520\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 file : already has .Z suffix -- no change
\par }\pard\plain \s20\qj\li1440\ri2520\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 The file is assumed to be already compressed. Rename the file and try again.
\par }\pard\plain \s17\qj\li720\ri2520\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 file : filename too long to tack on .Z
\par }\pard\plain \s20\qj\li1440\ri2520\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 The file cannot be compressed because its name is longer than 12 charac\-ters. Rename and try again. This message does not occur on BSD systems.
\par }\pard\plain \s17\qj\li720\ri2520\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 file already exists; do you wish to overwrite (y or n)?
\par }\pard\plain \s20\qj\li1440\ri2520\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Respond "y" if you want the output file to be replaced; "n" if not.
\par }\pard\plain \s17\qj\li720\ri2520\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Compression: "xx.xx%"
\par }\pard\plain \s20\qj\li1440\ri2520\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Percentage of the input saved by compression. (Relevant only for -v.)
\par }\pard\plain \s17\qj\li720\ri2520\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 -- not a regular file: unchanged
\par }\pard\plain \s20\qj\li1440\ri2520\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 When the input file is not a regular file,(e.g. a directory), it is left unaltered.
\par }\pard\plain \s17\qj\li720\ri2520\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 -- file unchanged
\par }\pard\plain \s20\qj\li1440\ri2520\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 No savings is achieved by compression. The input remains virgin.
\par }\pard\plain \li720\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard \nowidctlpar\widctlpar\adjustright {\b\fs24 BUGS
\par }\pard \li720\nowidctlpar\widctlpar\adjustright {\fs24 Although compressed files are compatible between machines with large memory, -b 12 should be used for file transfer to architectures with a small process data space (64KB or less, as exhibited by the DEC PDP series, the Intel 80286, etc.)
\par }\pard \nowidctlpar\widctlpar\adjustright {\fs24
\par }\pard \fi720\nowidctlpar\widctlpar\adjustright {\fs24 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 CONV(1}{\fs24 )\tab Commands and Applications\tab }{\fs24 CONV}{\fs24 (1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 DU}{\fs24 (1)\tab Commands and Applications\tab }{\fs24 DU}{\fs24 (1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx9360\adjustright \fs20\cgrid {\ul
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx9360\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 12}}}{
\par }}\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 conv - convert file formats
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 conv}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 conv}}}{\f0 -}{\i\f0 convspec}{\f0 }{\i\f0 file1}{\f0 ...
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 conv}{\f0 converts files between various formats. }{\i\f0 convspec}{\f0 is a specification detailing the type of file1 and the type to convert it to.
\par
\par }{\i\f0 -crlf}{\f0 \tab convert line terminators from CR (Apple) to LF (Unix).
\par
\par }{\i\f0 -lfcr}{\f0 \tab convert line terminators from LF (Unix) to CR (Apple).
\par
\par }{\i\f0 -detab spacing}{\f0 \tab translate tabs to spaces, using tabs every }{\i\f0 spacing}{\f0 characters. A smart algorithm is used which only inserts enough spaces to move to the next tab stop. }{\i\f0 spacing}{\f0 is an integer less than 20.
\par
\par }{\i\f0 -0001}{\f0 \tab converts all 0x00 bytes to 0x01 for using Macintosh sound files on the IIgs.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 NOTES}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 conv}{\f0 is very quick on all the conversions except -detab (speed approaches 30K/sec). }{\b\f0 conv}{\f0 works under the Orca shell also, and supports the Orca method of wildcards. Look at the code to see how nasty this makes programs.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SEE ALSO}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 cat}{\f0 (1), }{\b\f0 more}{\f0 (1), }{\b\f0 tr}{\f0 (1)
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 AUTHOR}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 conv}{\f0 was written by Greg Thompson for GNO/ME.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard \fi720\nowidctlpar\widctlpar\adjustright {\fs24 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 DU}{\fs24 (1)\tab Commands and Applications\tab }{\fs24 DU}{\fs24 (1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b NAME}{
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {du - Display disk usage statistics
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {
\par }{\b SYNOPSIS}{
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b du}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\f4\cgrid {\xe {\v }{\b du}}}{ [ -}{\i aksx}{ ] }{\i pathname}{ ...
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {
\par }{\b DESCRIPTION}{
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {The }{\b du}{ utility displays the block usage of files in the current directory or for the entire tree of a given pathname.
\par
\par The options are as follows:
\par
\par }\pard \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright {-}{\i a}{\tab Generate an entry for each file.
\par }\pard \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright {-}{\i k}{\tab By default, }{\b du}{ displays the number of blocks as returned by the }{\b stat}{\pard\plain \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright \v\f4\cgrid {\xe {\v }{\b stat}}}{(2) system call, i.e. 512-byte blocks. If the -}{\i k}{ flag is specified, the number displayed is the number of 1024-byte blocks with partial blocks rounded up.
\par -}{\i s}{\tab Generate only the grand total. If neither -}{\i a}{ or -}{\i s}{ are specified, an entry is generated for each directory only.
\par -}{\i x}{\tab Don't traverse any mount points.
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\adjustright {
\par Files having multiple hard links are counted (and displayed) a single time per }{\b du}{ execution.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {
\par }{\b SEE ALSO}{
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b df}{(1)
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {
\par }{\b BUGS}{
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {The Apple IIGS does not have the concept of mount points, and thus the -}{\i x}{ option is useless.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {
\par }{\b HISTORY}{
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {A }{\b du}{ command appeared in Version 6 AT&T Unix.
\par }\pard\plain \fi720\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx5040\tqr\tx9360\adjustright \fs20\cgrid {\fs24 EPS(1)\tab Commands and Applications\tab EPS(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx5040\tqr\tx10080\adjustright {
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx5040\tqr\tx10080\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 EPS(1)\tab Commands and Applications\tab EPS(1)}{
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {\b \chpgn
\par }}\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 eps - display extended process status information.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard \li720\nowidctlpar\widctlpar\adjustright {\b\fs24 eps}{\fs24 }{\pard\plain \li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\fs24 }{\b\fs24 eps }}}{\fs24 [-}{\i\fs24 anlw}{\fs24 ] [-}{\i\fs24 t tty}{\fs24 ] [-}{\i\fs24 u user}{\fs24 ]
\par }\pard \nowidctlpar\widctlpar\adjustright {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 eps}{\f0 is an extended }{\b\f0 ps}{\f0 command which displays more information than the }{\b\f0 gsh}{\f0 builtin }{\b\f0 ps}{\f0 .
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard \nowidctlpar\widctlpar\adjustright {\b\fs24 USAGE}{\fs24
\par }\pard \fi-900\li1620\nowidctlpar\widctlpar\adjustright {\fs24 -}{\i\fs24 a}{\fs24 \tab Show all processes; normally eps limits the processes displayed to those that are owned by the current user.
\par
\par -}{\i\fs24 n}{\fs24 \tab Show username instead of userID, which is default.
\par -}{\i\fs24 l}{\fs24 \tab Long list. This includes PPID (parent's PID), MMID (Memory Manager ID) and a longer time field.
\par -}{\i\fs24 w}{\fs24 \tab Wider list. A single }{\i\fs24 w}{\fs24 results in a 132 column wide listing, and two results in the whole command line being displayed. Normally the command line will be truncated to either 80 (default) or 132 (-w) columns.
\par -}{\i\fs24 t tty}{\fs24 \tab Display only those processes that are owned by }{\i\fs24 tty}{\fs24 .
\par -}{\i\fs24 u user}{\fs24 \tab Display only those processes that are owned by }{\i\fs24 user}{\fs24 .
\par }\pard \nowidctlpar\widctlpar\adjustright {\fs24
\par }{\b\fs24 SEE ALSO}{\fs24
\par }\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\i\f0 GNO Shell Reference Manual}{\f0 , }{\b\f0 parent}{\f0 (1)
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 AUTHOR}{\fs24
\par }\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 James Brookes
\par bb252@cleveland.freenet.edu
\par jamesb@cscihp.ecst.csuchico.edu
\par }\pard\plain \fi720\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par \sect }\sectd \psz1\linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 FOLD(1)\tab Commands and Applications\tab FOLD(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {\f4
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx9360\adjustright \fs20\cgrid {\fs24 FOLD(1)\tab Commands and Applications\tab FOLD(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerr \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\qr\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 29}}}{
\par }}\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 fold - fold long lines for finite width output device
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 fold}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 fold}}}{\f0 [ -}{\b\f0 w}{\f0 }{\i\f0 width}{\f0 ]
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 Fold}{\f0 is a filter which folds the contents of the specified files, or the standard input if no files are specified, breaking the lines to have maximum of 80 characters.
\par
\par The options are as follows:
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 -}{\b\f0 w}{\f0 }{\i\f0 width}{\f0
\par }\pard\plain \s20\qj\li1440\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Specifies a line width to use instead of the default 80 characters.}{\i\f0 Width }{\f0 should be a multiple of 8 if tabs are present, or the tabs should be expanded using }{\b\f0 conv}{\pard\plain \s20\qj\li1440\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 conv}}}{\f0 (1) before using }{\b\f0 fold}{\f0 .
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SEE ALSO}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 conv}{\f0 (1)
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 BUGS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 If underlining is present it may be messed up by folding.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard \fi720\nowidctlpar\widctlpar\adjustright {\fs24 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 GETVERS(1)\tab Commands and Applications\tab GETVERS(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {\f4
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 GETVERS(1)\tab Commands and Applications\tab GETVERS(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 getvers,setvers - manipulate rVersion resources in executable files
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 getvers}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 getvers}}}{\f0 }{\i\f0 filename}{\f0
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\adjustright {\b\f0 setvers}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 setvers}}}{\f0 }{\i\f0 file}{\f0 ' }{\i\f0 string1}{\f0 ~ }{\i\f0 string2}{\f0 ' [ }{\i\f0 country}{\f0 ] }{\b\f0 v}{\i\f0 majrev.minrev.bugrev}{\f0
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 getvers}{\f0 accepts as input the name of an executable file, and prints the version information stored in the rVersion resource of the file. If no rVersion resource is present it will abort with the error `This file has no rVersion resource'.
\par
\par To add information to the rVersion resource, }{\b\f0 setvers}{\f0 is used. The rVersion format allows for two stirngs of up to 255 characters, although it is suggested that for this use you keep each field shorter than 80 characters.
\par
\par }{\i\f0 string1}{\f0 is separated from }{\i\f0 string2}{\f0 by a ~ (tilde) character, and both strings should be enclosed in single quotes. }{\i\f0 string1}{\f0 is required to be the name of the program. Any `_' character in }{\i\f0 string2}{\f0 will be interpreted as a carriage return. When using GNO, make sure to quote the single quotes and the tilde with backslashes.
\par
\par The optional field }{\i\f0 country}{\f0 (no spaces allowed) allows you to set the country field of the rVersion resource. The last parameter is the current revision number of the program in the format }{\b\f0 majrev . minrev . bugrev}{\f0 , where
\par }{\b\f0 majrev}{\f0 is a single or double digit number from 00 to 99, and }{\b\f0 minrev}{\f0 and }{\b\f0 bugrev}{\f0 are single digit numbers from zero to nine.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 COUNTRIES}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Valid Countries/Regions (case IS sensitive)
\par }\pard \s17\qj\li1440\nowidctlpar\widctlpar\tx4320\adjustright {\f0 Arabia\tab Iceland
\par }\pard \s17\qj\li1440\nowidctlpar\widctlpar\tx4320\adjustright {\f0 Australia\tab Israel
\par Belgium/Luxembourg\tab Italy
\par Bosnia/Herzegovena\tab Japan
\par Britian\tab Korea
\par China\tab Malta
\par Cyprus\tab Netherlands
\par Denmark\tab Norway
\par Finland\tab Portugal
\par France\tab Spain
\par FrenchCanadian\tab Sweden
\par FrenchSwiss\tab Taiwan
\par GermanSwiss\tab Thailand
\par Germany\tab Turkey
\par Greece\tab UnitedStates
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\fs24
\par }{\b\fs24 EXAMPLES}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Set the version of program `chmod' to read:
\par
\par chmod v01.0.0
\par James Brookes
\par jamesb@cscihp.ecst.csuchico.edu
\par Country: United States
\par
\par in Orca:
\par
\par }\pard \s17\li720\nowidctlpar\widctlpar\adjustright {\f2 # setvers chmod 'chmod~James Brookes_jamesb@cscihp.ecst.csuchico.edu' v01.0.0}{\f0
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\adjustright {\f0
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\adjustright {\f0 in GNO:
\par
\par }\pard \s17\li720\nowidctlpar\widctlpar\adjustright {\f2 % setvers chmod \\'chmod\\\\~James Brookes_jamesb@cscihp.ecst.csuchico.edu\\' v01.0.0
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 CAVEATS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 If an rVersion resource already exists, it will be overwritten and replaced with the new one. Other resources will be unaffected.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 BUGS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Little crawly things, also known as insects.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 AUTHOR}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Ian Schmidt - Two Meg Software (irsman@iastate.edu)
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard \fi720\nowidctlpar\widctlpar\adjustright {\fs24 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 GREP(1)\tab Commands and Applications\tab GREP(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 GREP(1)\tab Commands and Applications\tab GREP(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 grep, egrep, fgrep - search a file for a string or regular expression
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 grep}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 grep}}}{\f0 [ -}{\b\f0 bchilnsvw}{\f0 ] [ -}{\b\f0 e}{\f0 }{\i\f0 expression}{\f0 ] [ }{\i\f0 filename}{\f0 ... ]
\par }{\b\f0 egrep}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 egrep}}}{\f0 [ -}{\b\f0 bchilnsv}{\f0 ] [ -}{\b\f0 e}{\f0 }{\i\f0 expression}{\f0 ] [ -}{\b\f0 f}{\f0 }{\i\f0 filename}{\f0 ] [ }{\i\f0 expression}{\f0 ] [ }{\i\f0 filename}{\f0 ... ]
\par }{\b\f0 fgrep}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 fgrep}}}{\f0 [ -}{\b\f0 bchilnsvx}{\f0 ] [ -}{\b\f0 e}{\f0 }{\i\f0 string}{\f0 ] [ -}{\b\f0 f}{\f0 }{\i\f0 filename}{\f0 ] [ }{\i\f0 string}{\f0 ] [ }{\i\f0 filename}{\f0 ... ]
\par
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Commands of the }{\b\f0 grep}{\f0 family search the input filenames (the standard input default) for lines matching a pattern. Normally, each line found is copied to the standard output. }{\b\f0 grep}{\f0 patterns are limited regular expresions in the style of }{\b\f0 ed}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 ed}}}{\f0 (1). }{\b\f0 egrep}{\f0 patterns are full regular expressions including alternation. }{\b\f0 fgrep}{\f0 patterns are fixed strings - no regular expression metacharacters are supported, and as a result }{\b\f0 fgrep}{\f0 is generally an order of magnitude faster than the other versions of }{\b\f0 grep}{\f0 .
\par
\par Take care when using the characters `$', `*', [, `^', `|', `(', `)', and `\\' in the }{\i\f0 expression}{\f0 , as these characters are also meaningful to the shell. It is safest to enclose the entire }{\i\f0 expression}{\f0 argument in single quotes `...'
\par
\par When any of the }{\b\f0 grep}{\f0 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\f0 .null}{\f0 as a second file in the list.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 OPTIONS}{\fs24
\par }\pard\plain \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 -}{\b\f0 b}{\f0 \tab Precede each line by the block number on which it was found. This is sometimes useful in locating disk block numbers by context.
\par
\par -}{\b\f0 c}{\f0 \tab Display a count of matching lines rather than displaying the lines which match.
\par
\par -}{\b\f0 h}{\f0 \tab Do not display filenames.
\par
\par -}{\b\f0 i}{\f0 \tab Ignore the case of letters in making comparisons - that is, upper and lower case are considered identical.
\par
\par -}{\b\f0 l}{\f0 \tab List only the names of files with matching lines (once) separated by NEWLINE characters.
\par
\par -}{\b\f0 n}{\f0 \tab Precede each line by its relative line number in the file.
\par
\par }\pard \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright {\f0 -}{\b\f0 s}{\f0 \tab Work silently, that is, display nothing except error messages. This is useful for checking the error status.
\par }\pard \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright {\f0
\par -}{\b\f0 v}{\f0 \tab Invert the search to only display lines that do not match.
\par
\par -}{\b\f0 w}{\f0 \tab Search for the expression as a word as if surrounded by \\< and \\>. This applies to grep only.
\par
\par -}{\b\f0 x}{\f0 \tab Display only those lines which match exactly - that is, only lines which match in their entirety. This applies to fgrep only.
\par
\par -}{\b\f0 e}{\f0 }{\i\f0 expression}{\f0
\par \tab Same as a simple }{\i\f0 expression}{\f0 argument, but useful when the }{\i\f0 expression}{\f0 begins with a `-'.
\par
\par -}{\b\f0 e}{\f0 }{\i\f0 string}{\f0
\par \tab For }{\b\f0 fgrep}{\f0 the argument is a literal character }{\i\f0 string }{\f0 .
\par
\par -}{\b\f0 f}{\f0 }{\i\f0 filename}{\f0
\par \tab Take the regular expression (}{\b\f0 egrep}{\f0 ) or a list of strings separated by NEWLINE (}{\b\f0 fgrep}{\f0 ) from }{\i\f0 filename}{\f0 .
\par
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 REGULAR EXPRESSIONS}{\fs24
\par }\pard\plain \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 The following one-character regular expressions match a single character:
\par
\par }{\b\f0 c}{\f0 \tab An ordinary character ( not one of the special characters discussed below) is a one-character regular expression that matches that character.
\par
\par }{\b\f0 \\ c}{\f0 \tab A backslash (\\) followed by any special character is a one-character regular expression that matches the special character itself. The special characters are:
\par
\par }\pard \s17\qj\fi-720\li2160\nowidctlpar\widctlpar\adjustright {\f0 \bullet \tab `.', `*', `[', and `\\' (period, asterisk, left square bracket, and backslash, respectively), which are always special, except when they appear within square brackets ([]).
\par
\par \bullet \tab `^' (caret or circumflex), which is special at the beginning of an entire regular expression, or when it immediately follows the left of a pair of square brackets ([]).
\par
\par \bullet \tab $ (currency symbol), which is special at the end of an entire regular expression.
\par }\pard \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright {\f0
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\adjustright {\f0 A backslash followed by one of `<', `>', `(', `)', `\{', or `\}', represents a special operator in the regular expression; see below.
\par }\pard \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright {\f0
\par }\pard \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright {\b\f0 .}{\f0 \tab A `}{\b\f0 .}{\f0 ' (period) is a one-character regular expression that matches any character except NEWLINE.
\par
\par [ }{\i\f0 string}{\f0 ]
\par \tab A non-empty string of characters enclosed in square brackets is a one-character regular expression that matches any one character in that string. If, however, the first character of the string is a `^' (a circumflex or caret), the one-character regular expression matches any character except NEWLINE and the remaining characters in the string. The `^' has this special meaning only if it occurs first in the string. The `-' (minus) may be used to indicate a range of consecutive ASCII characters; for example, [}{\b\f0 0-9}{\f0 ] is equivalent to [}{\b\f0 0123456789}{\f0 ]. The `-' loses this special meaning if it occurs first (after an initial `^', if any) or last in the string. The `]' (right square bracket) does not terminate such a string when it is the first character within it (after an initial `^', if any); that is, []}{\b\f0 a-f}{\f0 ] matches either `]' (a right square bracket ) or one of the letters a through f inclusive. The four characters `.', `*', `[', and `\\' stand for themselves within such a string of characters.
\par
\par The following rules may be used to construct regular expressions:
\par
\par }{\b\f0 *}{\f0 \tab A one-character regular expression followed by `*' (an asterisk) is a regular expression that matches 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.
\par
\par }{\b\f0 \\(and\\)}{\f0
\par \tab A regular expression enclosed between the character sequences \\( and \\) matches whatever the unadorned regular expression matches. This applies only to }{\b\f0 grep}{\f0 .
\par
\par }{\b\f0 \\ }{\b\i\f0 n}{\f0 \tab The expression \\ }{\i\f0 n}{\f0 matches the same string of characters as was matched by an expression enclosed between }{\b\f0 \\(}{\f0 and }{\b\f0 \\)}{\f0 earlier in the same regular expression. Here }{\i\f0 n}{\f0 is a digit; the sub-expression specified is that beginning with the n th occurrence of }{\b\f0 \\(}{\f0 counting from the left. For example, the expression }{\b\f0 ^\\(.*\\)\\1$}{\f0 matches a line consisting of two repeated appearances of the same string.
\par }\pard \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright {\f0
\par }{\b\f0 Concatenation}{\f0
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\adjustright {\f0 The concatenation of regular expressions is a regular expression that matches the concatenation of the strings matched by each component of the regular expression.
\par }\pard \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright {\f0
\par }\pard \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright {\b\f0 \\<}{\f0 \tab The sequence }{\b\f0 \\<}{\f0 in a regular expression constrains the one-character regular expression immediately following it only to match something at the beginning of a word; 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.
\par
\par }{\b\f0 \\>}{\f0 \tab The sequence }{\b\f0 \\>}{\f0 in a regular expression constrains the one-character regular expression immediately following it only to match something at the end of a word; that is, either at the end of a line, or just before a character which is neither a letter, digit, nor underline.
\par
\par }{\b\f0 \\\{ m \\\}
\par \\\{ m ,\\\}
\par \\\{ m , n \\\}}{\f0
\par \tab A regular expression followed by }{\b\f0 \\\{ m \\\}}{\f0 , }{\b\f0 \\\{ m , \\ \}}{\f0 , or }{\b\f0 \\\{ m , n \\\}}{\f0 matches a range of occurrences of the regular expression. The values of m and n must be non-negative integers less than 256; \\\{ m \\\} matches exactly m occurrences; \\\{ m ,\\\} matches at least m occurrences; \\\{ m , n \\\} matches any number of occurrences between m and n inclusive. Whenever a choice exists, the regular expression matches as many occurrences as possible.
\par
\par }{\b\f0 ^}{\f0 \tab A circumflex or caret (^) at the beginning of an entire regular expression constrains that regular expression to match an initial segment of a line.
\par
\par }{\b\f0 $}{\f0 \tab A currency symbol ($) at the end of an entire regular expression constrains that regular expression to match a final segment of a line.
\par
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\adjustright {\f0 The construction
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s20\qj\li1440\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f2 example% ^ }{\f2 entire regular expression $}{\f0
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 constrains the entire regular expression to match the entire line.
\par
\par egrep accepts regular expressions of the same sort grep does, except for \\(, \\), \\ n, \\<, \\>, \\\{, and \\\}, with the addition of:
\par
\par }\pard \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright {\f0 *\tab A regular expression (not just a one-character regular expression) followed by `*' (an asterisk) is a regular expression that matches 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.
\par }\pard \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright {\f0
\par +\tab A regular expression followed by `+' (a plus sign) is a regular expression that matches 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.
\par
\par ?\tab A regular expression followed by `?' (a question mark) is a regular expression that matches zero or one occurrences of the one-character regular expression. If there is any choice, the longest leftmost string that permits a match is chosen.
\par
\par |\tab Alternation: two regular expressions separated by `|' or NEWLINE match either a match for the first or a match for the second.
\par
\par ()\tab A regular expression enclosed in parentheses matches a match for the regular expression.
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\adjustright {\f0
\par The order of precedence of operators at the same parenthesis level is `[ ]' (character classes), then `*' `+' `?' (}{\b\f0 closures}{\f0 ),then concatenation, then `|' (}{\b\f0 alternation}{\f0 ) and NEWLINE.
\par }{\f0 \page }{\f0
\par }\pard\plain \s19\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {\f0 EXAMPLES}{\f0
\par }{\f0
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Search a file for a fixed string using }{\b\f0 fgrep}{\f0 :
\par
\par }{\b\f0 \tab }{\b\f2 example% fgrep intro /usr/share/man/man3/*.3*
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\adjustright {\f0
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\adjustright {\f0 Look for character classes using }{\b\f0 grep}{\f0 :
\par
\par }{\b\f0 \tab }{\b\f2 example% grep '[1-8]([CJMSNX])' /usr/share/man/man1/*.1
\par }{\f0
\par Look for alternative patterns using }{\b\f0 egrep}{\f0 :
\par
\par }\pard \s17\li720\nowidctlpar\widctlpar\adjustright {\b\f0 \tab }{\b\f2 example% egrep '(Sally|Fred) (Smith|Jones|Parker)' telephone.list}{\b\f0
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\adjustright {\f0
\par To get the filename displayed when only processing a single file, use }{\b\f0 .null}{\f0 as the second file in the list:
\par
\par }{\b\f0 \tab }{\b\f2 example% grep 'Sally Parker' telephone.list /dev/null
\par }{\f0
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 FILES}{\fs24
\par \tab .null
\par
\par }{\b\fs24 SEE ALSO}{\fs24
\par \tab }{\b\fs24 awk}{\fs24 (1), }{\b\fs24 gsh}{\fs24 (1), }{\b\fs24 vi}{\fs24 (1), }{\b\fs24 sed}{\fs24 (1)
\par
\par }{\b\fs24 BUGS}{\fs24
\par \tab Lines are limited to 1024 characters by }{\b\fs24 grep}{\fs24 ; longer lines are truncated.
\par
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 The combination of -}{\b\f0 l}{\f0 and -}{\b\f0 v}{\f0 options does not produce a list of files in which a regular expression is not found. To get such a list, use the C shell construct (Note: this is NOT the same as gsh, which does not support such programming).
\par
\par }\pard \s17\li720\nowidctlpar\widctlpar\adjustright {\f0 \tab }{\f2\fs20 foreach filename (*)
\par }\pard \s17\li720\nowidctlpar\widctlpar\adjustright {\f2\fs20 \tab \tab if (`grep " re " $ filename | wc -l` == 0) echo $ filename
\par \tab end
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\adjustright {\f0
\par Ideally there should be only one }{\b\f0 grep}{\f0 .
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DIAGNOSTICS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Exit status is 0 if any matches are found, 1 if none, 2 for syntax errors or inaccessible files.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard \fi720\nowidctlpar\widctlpar\adjustright {\fs24 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright \fs20\cgrid {INTRO(1)\tab Commands and Applications\tab INTRO(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 HEAD}{\fs24 (1)\tab Commands and Applications\tab }{\fs24 HEAD}{\fs24 (1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 26}}}{
\par }}\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 head - give first few lines
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 head}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 head}}}{\f0 [-}{\i\f0 count}{\f0 ] [}{\i\f0 file}{\f0 ...]
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24
\par DESCRIPTION}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 This filter gives the first }{\i\f0 count}{\f0 lines of each of the specified files, or of the standard input. If }{\i\f0 count}{\f0 is omitted it defaults to 10.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SEE ALSO}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 tail}{\f0 (1)
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 HISTORY}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 head}{\f0 appeared in 3 BSD.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s17\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\i\f0 \sect }\sectd \psz1\linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 LS(1)\tab Commands and Applications\tab LS(1)}{\fs24
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 LS(1)\tab Commands and Applications\tab LS(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 ls - list contents of directory
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 ls}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 ls}}}{\f0 [ -}{\b\f0 acdfilqrstu1ACLFR}{\f0 ] }{\i\f0 name}{\f0 ...
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 For each directory argument, }{\b\f0 ls}{\f0 lists the contents of the directory; for each file argument, }{\b\f0 ls}{\f0 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.
\par
\par There are a large number of options:
\par
\par }\pard \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright {\f0 -}{\b\f0 l}{\f0 \tab 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 file is a symbolic link the pathname of the linked-to file is printed preceded by ``->''.
\par }\pard \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright {\f0
\par -}{\b\f0 t}{\f0 \tab Sort by time modified (latest first) instead of by name.
\par
\par -}{\b\f0 a}{\f0 \tab List all entries; in the absence of this option, entries whose names begin with a period (.) or whose GS/OS 'invisible' flag is set are not listed.
\par
\par -}{\b\f0 A}{\f0 \tab List all entries except for the current directory (.) and the parent directory (..).
\par
\par -}{\b\f0 s}{\f0 \tab Give size in kilobytes of each file.
\par
\par -}{\b\f0 d}{\f0 \tab If argument is a directory, list only its name; often used with -}{\b\f0 l}{\f0 to get the status of a directory.
\par
\par -}{\b\f0 L}{\f0 \tab If argument is a symbolic link, list the file or directory the link references rather than the link itself. Note that if the link references a directory the link is always followed, unless the -}{\b\f0 l}{\f0 option is used.
\par
\par -}{\b\f0 r}{\f0 \tab Reverse the order of sort to get reverse alphabetic or oldest first as appropriate.
\par
\par -}{\b\f0 u}{\f0 \tab Use time of last access instead of last modification for sorting (with the -}{\b\f0 t }{\f0 option) and/or printing (with the -}{\b\f0 l}{\f0 option).
\par
\par -}{\b\f0 c}{\f0 \tab Use time of file creation for sorting or printing.
\par
\par -}{\b\f0 i}{\f0 \tab For each file, print the i-number in the first column of the report.
\par
\par -}{\b\f0 f}{\f0 \tab Force each argument to be interpreted as a directory and list the name found in each slot. This option turns off -}{\b\f0 l}{\f0 , -}{\b\f0 t}{\f0 , -}{\b\f0 s}{\f0 , and -}{\b\f0 r}{\f0 , and turns on -}{\b\f0 a}{\f0 ; the order is the order in which entries appear in the directory.
\par
\par -}{\b\f0 F}{\f0 \tab Cause directories to be marked with a trailing `/', sockets with a trailing `=', executable files with a trailing `*', and symbolic links to files with a trailing `@'. Symbolic links to directories are marked with a trailing `/', unless the -l option is also used.
\par
\par -}{\b\f0 R}{\f0 \tab recursively list subdirectories encountered.
\par }\pard \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright {\f0
\par }\pard \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright {\f0 -}{\b\f0 1}{\f0 \tab force one entry per line output format; this is the default when output is not to a terminal.
\par
\par -}{\b\f0 C}{\f0 \tab force multi-column output; this is the default when output is to a terminal.
\par
\par -}{\b\f0 q}{\f0 \tab force printing of non-graphic characters in file names as the character `?'; this is the default when output is to a terminal.
\par
\par -}{\b\f0 n}{\f0 \tab Causes }{\b\f0 ls}{\f0 to not sort files; this is useful when organizing libraries in alphabetical order for ORCA languages.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 The mode printed under the -l option contains 11 characters which are interpreted as follows: the first character is
\par
\par }\pard \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright {\b\f0 e}{\f0 \tab if the entry has a resource fork,
\par }\pard \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright {\b\f0 d}{\f0 \tab if the entry is a directory;
\par }{\b\f0 b}{\f0 \tab if the entry is a block-type special file;
\par }{\b\f0 c}{\f0 \tab if the entry is a character-type special file;
\par }{\b\f0 l}{\f0 \tab if the entry is a symbolic link;
\par }{\b\f0 s}{\f0 \tab if the entry is a socket, or
\par }{\b\f0 -}{\f0 \tab if the entry is a plain file.
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\adjustright {\f0
\par 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 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, `execute' permission is interpreted to mean permission to search the directory. The permissions are indicated as follows:
\par
\par }{\b\f0 i}{\f0 \tab if the file is invisible
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\adjustright {\b\f0 d}{\f0 \tab if the file can be deleted
\par }{\b\f0 r}{\f0 \tab if the file is readable;
\par }{\b\f0 w}{\f0 \tab if the file is writable;
\par }{\b\f0 x}{\f0 \tab if the file is executable;
\par }{\b\f0 -}{\f0 \tab if the indicated permission is not granted.
\par
\par The group-execute permission character is given as }{\b\f0 s}{\f0 if the file has the set-group-id bit set; likewise the user-execute permission character is given as }{\b\f0 s}{\f0 if the file has the set-user-id bit set.
\par
\par When the sizes of the files in a directory are listed, a total count of blocks, including indirect blocks is printed.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 BUGS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 The output device is assumed to be 80 columns wide.
\par GNO and GS/OS do not currently support links, user/group permissions, the concept of 'i-numbers', or 'special' files; thus, ls options that deal with these are ignored.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 \sect }\sectd \psz1\linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright \fs20\cgrid {LSEG(1)\tab Commands and Applications\tab LSEG(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {\f4
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 LSEG(1)\tab Commands and Applications\tab LSEG(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx8640\adjustright \fs20\cgrid {
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 30}}}{
\par }}\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 lseg - list segments in an OMF file
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 lseg}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 lseg}}}{\f0 file
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard \nowidctlpar\widctlpar\adjustright {\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 lseg}{\f0 lists the segments of an OMF executable file. While it can list the segments in an intermediate object file, the information isn't as useful.
\par
\par }{\b\f0 lseg}{\f0 is intended for discovering the location of stack segments in existing applications (for editing to smaller sizes), as an aid in determining how to segment large C files whose segments exceed the bank size, and for deciding which segments to recombine after excessive segmentation.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 AUTHOR}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Jawaid Bazyar for GNO/ME.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 BUGS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Doesn't detect non-OMF files, and thus can get very confused if you do "lseg *" and one of the files chosen isn't an OMF file. Usually the only way to terminate is to interrupt the program with ^C.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 MAKE(1)\tab Commands and Applications\tab MAKE(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {\f4
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 MAKE(1)\tab Commands and Applications\tab MAKE(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {\f4
\par }}\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 make - build a program according to a program definition file
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 make}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 make}}}{\f0 [-d] [-p] [-s] inputFile
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 make}{\f0 is a program maintenance utility that aids in creating programs from multiple source files.
\par
\par inputFile is the name of the Program Description File. If absent, make defaults to using 'makefile' as the PDF. make's options are as follows:
\par }\pard\plain \s20\qj\li1440\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0
\par -d Display the modification date and time as each file is checked.
\par -p Operate in programmer/debug mode.
\par -s Operate in silent mode.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 The logical definition of each of the PDF parameters follows:
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s20\li1440\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f2 # Comments begin with a pound sign "#".
\par #
\par TargetFile: DependentFile1 }{\f2 \\ #
\par }\pard \s20\fi720\li1440\nowidctlpar\widctlpar\adjustright {\f2 DependentFile2 }{\f2 D}{\f2 ependentFilen
\par }\pard \s20\li1440\nowidctlpar\widctlpar\adjustright {\f2 ShellCommand1
\par ShellCommand2
\par \tab .
\par \tab .
\par ShellCommandn
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 MAKE PARAMETERS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Comments can be placed anywhere in the PDF file. If a pound sign is in column one, the entire line is treated as a comment. Anything following the pound is ignored by make. Comments may also be placed on parameter lines containing Target/Dependent file parameters.
\par
\par The TargetFile parameter must start in column one and ends with a colon ":". It can be a full path name, partial path name or file in the current directory. This file is usually an object type file created by a compiler. Dependent file parameter(s) follow the semicolon and are separated by a space, a comma or both. Dependent file parameters are usually CC, PAS, ASM or some type of included SRC file. Essentially, TargetFile is the result of compiling the dependent source files.
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\adjustright {\f0
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\adjustright {\b\f0 make}{\f0 obtains the modfication date and time of the Target file and then compares it to each of the dependent file(s) moving left to right. If one of the dependent files has a date and time later than the Target file, the subsequent ShellCommands are executed. Target/Dependent parameters may be continued by placing a reverse slash "\\" on the line following a dependent file parameter. make will interpret the next line as dependent file parameters which may also be continued and so on. There should not be any blank lines between the continued line and next line.
\par
\par ShellCommands must contain a space in column one to differentiate them from Target/Dependent file parameters. If make determines that a Target file needs to be recreated, the ShellCommands following the Target/Dependent file parameters are passed, as is, to the shell interpreter. The commands must be valid shell commands. ShellCommands are executed until a blank line is encountered or an error occurs during the execution of the last command. If an error occurs, make terminates without reading the remaining PDF parameters. If a blank line is read, make returns to Target/Dependent search mode.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 MAKE Example
\par
\par }\pard\plain \s20\li1440\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f2\fs20 #
\par # File: Example.Make - A MAKE example PDF #
\par
\par Menu.Root: Menu.CC # Contains menu related routines
\par compile menu.cc keep=menu
\par
\par Window.Root: Window.CC # Contains window handling routines
\par compile window.cc keep=window
\par
\par Misc.Root: Misc.CC Misc.h # Contains miscellaneous program routines
\par compile misc.cc keep=misc
\par
\par Main.Root: Main.CC Include/Main.h Include/Misc.h # Main program
\par compile main.cc keep=main
\par
\par MyProg: Menu.Root Window.Root Misc.Root \\ # re-link required?
\par \tab Main.Root\tab \tab \tab \tab # check all dependent files
\par link main misc menu window keep=myprog\tab # Shell comment
\par chtyp -t s16 myprog\tab \tab \tab # change type to S16
\par
\par # End of PDF
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 The example PDF shows a program that is made up of 4 source files. The Main and Misc routines are also de\-pendent on include files containing information that if changed would force a re-compile of that module.
\par
\par One thing to keep in mind is the order of Target/Dependent parameters can be important. make examines the PDF from the top down. If a file is modified due to a command later in the PDF, make will not return to a previous Target/Dependent parameter in which that file was a dependent file.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 AUTHOR}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Original make util written by Larry Agle for ORCA; modifications made to make it look more like UNIX make, and misc. }{\f0 B}{\f0 ug fixes by Jawaid Bazyar.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 MAKEMAKE(1)\tab Commands and Applications\tab MAKEMAKE(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 MAKEMAKE(1)\tab Commands and Applications\tab MAKEMAKE(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerr \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\qr\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 31}}}{
\par }}\pard\plain \s21\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {\f0 NAME
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 makemake - scan C source files for dependencies and create a makefile
\par
\par }\pard\plain \s21\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {\f0 SYNOPSIS
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 makemake}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 makemake}}}{\f0 source.c
\par
\par }\pard\plain \s21\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {\f0 DESCRIPTION
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 makemake}{\f0 takes the C source file(s) as input, and scans them for dependencies (#includes). It does not count standard headers (#includes with the filename surrounded by < >).
\par
\par The dependency information for all the source files specified is then written to a file 'makefile' in the current directory.
\par
\par }{\b\f0 makemake}{\f0 does not create link scripts nor does it put an executable dependendcy into the file, as these require link information not available from the }{\b\f0 makemake}{\f0 command line.
\par
\par }\pard\plain \s21\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {\f0 AUTHOR
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Jawaid Bazyar for GNO/ME's 'make' utility. He got tired of writing them by hand.
\par
\par }\pard\plain \s21\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {\f0 BUGS
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 makemake}{\f0 does not properly handle recursive or multiple includes of the same file. If the same file is included more than once, }{\b\f0 makemake}{\f0 will list it that many times in the output makefile. While multiple includes don't hurt anything, it can take more time to process the makefile. Recursive includes will, of course, hang }{\b\f0 makemake}{\f0 .
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 MAN(1)\tab Commands and Applications\tab MAN(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {\f4
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 MAN(1)\tab Commands and Applications\tab MAN(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 32}}}{
\par }}\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 man - online manual system (Version 1.6)
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 man}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 man}}}{\f0 [ }{\i\f0 section}{\f0 ] }{\i\f0 manpagename}{\f0
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 man}{\f0 is the access point to the online manual system. }{\b\f0 man}{\f0 works as a shell that calls an appropriate text formatter to format a manual page. There are currently three text formatters available for the GNO/ME system.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 nroff}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 nroff}}}{\f0 \tab Unix standard typesetting package
\par }{\b\f0 aroff}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 aroff}}}{\f0 \tab formats AppleWorks GS(tm) documents
\par }{\b\f0 cat}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 cat}}}{\f0 \tab used to display preformatted documents
\par
\par If the option section argument is specified, }{\b\f0 man}{\f0 looks specifically in that section of the manual for the manpage. This is needed in situations where there are manpages with the same name in different sections (for example, }{\b\f0 sleep}{\f0 (1) and }{\b\f0 sleep}{\f0 (3).
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 ENVIRONMENT}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 man}{\f0 recognizes the following variables from the shell.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 USRMAN}{\f0
\par \tab This variable is required . It points to the manual system root directory.
\par }{\b\f0 PAGER}{\f0
\par \tab }{\b\f0 man}{\f0 uses }{\b\f0 more}{\pard\plain \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 more}}}{\f0 as the default pager. If you wish to use a different pager, }{\b\f0 less}{\pard\plain \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 less}}}{\f0 perhaps, then you must set this variable to point to that pager.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 Compressed Manual Pages and Links}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 If }{\b\f0 man}{\f0 finds a file in the manual that ends in a '}{\b\f0 .l}{\f0 ' suffix, it takes the contents of that file as a 'link' to the actual manpage. This is useful for manpages that describe multiple commands, and prevents having multiple copies of the manpage.
\par
\par Manual pages may be compressed with }{\b\f0 compress}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 compress}}}{\f0 or }{\b\f0 freeze}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 freeze}}}{\f0 , in which case the appropriate program is called to uncompress the manual file.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SEE ALSO
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 more}{\f0 (1), }{\b\f0 less}{\f0 (1), }{\b\f0 compress}{\f0 (1), }{\b\f0 freeze}{\f0 (1).
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 MKDIR(1)\tab Commands and Applications\tab MKDIR(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 MKDIR(1)\tab Commands and Applications\tab MKDIR(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerr \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\qr\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 33}}}{
\par }}\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 mkdir - Makes directories
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 mkdir}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 mkdir}}}{\f0 }{\i\f0 dirname}{\f0 ...
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 The }{\b\f0 mkdir}{\f0 command creates subdirectories with the }{\i\f0 dirname}{\f0 s specified. If a file with that }{\i\f0 dirname}{\f0 exists, an error is returned. dirname may be a full pathname, or a partial pathname, in which case the directory is created as a subdirectory of the current directory.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 mkdir}{\f0 only creates the filename portion of the specified path. If, for instance, you do
\par }\pard\plain \s20\qj\li1440\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f2 mkdir /usr/local/bbs/foo}{\b\f0
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 directory foo will only be created if all of }{\b\f0 /usr}{\f0 , }{\b\f0 local}{\f0 , and }{\b\f0 bbs}{\f0 exist.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 AUTHOR}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 mkdir}{\f0 was written by James Brookes for GNO/ME.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 MORE(1)\tab Commands and Applications\tab MORE(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 MORE(1)\tab Commands and Applications\tab MORE(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 34}}}{
\par }}\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 more - text pager
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 more}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 more}}}{\f0 [ }{\i\f0 file}{\f0 ...]
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 more}{\f0 allows the user to view the specified }{\i\f0 file}{\f0 (s) screen by screen or line by line. If no }{\i\f0 file}{\f0 s are specified, standard input is used.
\par
\par Every time }{\b\f0 more}{\f0 has displayed a screen of text, it displays a prompt
\par }\pard\plain \s20\li1440\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f2 - filename (xx%) -
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 indicating the percentage of the file that has been viewed and its filename. If standard input is used,
\par }\pard\plain \s20\li1440\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f2 '\~-\~more\~-\~'
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 is used as the prompt instead.
\par
\par A number of key commands are available at the prompt.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 q}{\f0 \tab quit viewing the current file, and move to the next file (if any)
\par
\par }{\b\f0 [RETURN]}{\f0
\par \tab display the next line of the file
\par
\par }{\b\f0 [ESC]}{\f0 \tab abort }{\b\f0 more}{\f0 , including any more files that may have been specified
\par
\par }{\b\f0 [SPACE]}{\f0
\par }\pard \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright {\f0 \tab display the next page of the file
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 AUTHOR}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 This version of more was written by Jawaid Bazyar and Derek Taubert.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 PASSWD(1)\tab Commands and Applications\tab PASSWD(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 PASSWD(1)\tab Commands and Applications\tab PASSWD(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {\f4
\par }}{\footerr \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\qr\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 35}}}{
\par }}\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 passwd - set a user's login password
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24
\par SYNOPSIS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 passwd}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 passwd}}}{\f0 [ -}{\b\f0 ?}{\f0 | -}{\b\f0 v}{\f0 ] [ }{\i\f0 username}{\f0 ]
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 passwd}{\f0 changes the specified user's password. Only root is allowed to alter passwords other than his own. If the}{\i\f0 username}{\f0 is not given, the user's own login name is assumed. Users other than root must then enter the old password to verify permission to change the password. Finally, the user must type the desired new password twice to insure that no mistakes are made.
\par
\par To cancel }{\b\f0 passwd}{\f0 , type CTRL-@ when asked to enter the new password.
\par
\par The -}{\b\f0 ?}{\f0 flag causes }{\b\f0 passwd}{\f0 to display a brief usage message, and the -}{\b\f0 v}{\f0 flag causes }{\b\f0 passwd}{\f0 to display version information.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SEE ALSO}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 login}{\f0 (1)
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 FILES}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 /etc/passwd}{\f0 - contains the password information
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 AUTHOR}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Eric Shepherd
\par Internet uerics@mcl.mcl.ucsb
\par AOL Sheppy
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 PURGE(1)\tab Commands and Applications\tab PURGE(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 PURGE(1)\tab Commands and Applications\tab PURGE(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 36}}}{
\par }}\pard\plain \s21\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {\f0 NAME
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 purge - deallocate purgeable memory handles
\par
\par }\pard\plain \s21\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {\f0 SYNOPSIS
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 purge}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 purge}}}{\f0 [-v]
\par
\par }\pard\plain \s21\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {\f0 DESCRIPTION
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 This program purges all memory blocks marked purgable. This is very important when using the Orca compilers and shells since certain blocks get left lying around and can (and have!) caused compiler errors. By purging memory before compiles a large percentage of strange compiler errors can be eliminated. After purging, all memory possible is then freed for usage.
\par
\par }\pard\plain \s20\qj\li1440\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 -v gives a verbose listing of each handle being purged and before and after free memory statistics.
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0
\par The problems mentioned above usually occur when a program has over-written one of the ORCA FastFile system's memory handles. Purging clears these handles and forces a reload from disk.
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\adjustright {\f0
\par }\pard\plain \s21\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {\f0 BUGS
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Purging memory when non-shell applications are running could be dangerous.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 RZ(1)\tab Commands and Applications\tab RZ(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 RZ(1)\tab Commands and Applications\tab RZ(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {\f4
\par }}\pard\plain \s19\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {\f0 NAME
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 rx, rc, rb, rz - Receive Files and Commands with X/Y/ZMODEM
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 rz}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 rz}}}{\f0 -tv
\par }{\b\f0 rb}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 rb}}}{\f0 -tv
\par }{\b\f0 rc}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 rc}}}{\f0 -tv file
\par }{\b\f0 rx}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 rx}}}{\f0 -tv file
\par }{\b\f0 gz}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 gz}}}{\f0 file ... [-v]
\par }{\b\f0 rzCOMMAND}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \b\v\cgrid {\xe {\b\f0 rzCOMMAND}}}{\f0
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s19\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {\f0 DESCRIPTION
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 This program uses error correcting protocols to receive files over a dial-in serial port from a variety of programs running under many operating systems. It is invoked from a shell prompt manually, or automatically as a result of an "}{\b\f0 sz}{\f0 file ..." command given to the calling program.
\par
\par This is a shareware program copyrighted by Omen Technology INC.
\par
\par }{\b\f0 Rz}{\f0 (Receive ZMODEM}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 ZMODEM}}}{\f0 ) receives one or more files with the ZMODEM protocol. Pathnames are supplied by the sending program, and directories are made if necessary (and possible). Normally, the "}{\b\f0 rz}{\f0 " command is automatically issued by the calling ZMODEM program, but defective ZMODEM implementations may require starting }{\b\f0 rz}{\f0 manually.
\par
\par }{\b\f0 Rb}{\f0 receives file(s) with YMODEM}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 YMODEM}}}{\f0 , accepting either standard128 byte sectors or 1024 byte sectors (sb }{\b\f0 -k}{\f0 option). The user should determine when the 1024 byte block length actually improves throughput.
\par
\par If True YMODEM<45> (Omen Technology trademark) file information (file length, etc.) is received, the file length controls the number of bytes written to the output dataset, and the modify time and file mode (iff non zero) are set accordingly.
\par
\par If True YMODEM file information is not received, slashes in the pathname are changed to underscore, and any trailing period in the pathname is eliminated. This conversion is useful for files received from CP/M and other historical systems.
\par
\par }{\b\f0 Rc}{\f0 receives a single }{\f0\ul file}{\f0 with XMODEM-CRC or XMODEM-1k-CRC protocol. The user should determine when the 1024 byte block length actually improves throughput without causing problems. The user must supply the file name to both sending and receiving programs. Up to 1023 garbage characters may be added to the received file.
\par
\par }{\b\f0 Rx}{\f0 receives a single }{\f0\ul file}{\f0 with XMODEM}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 XMODEM}}}{\f0 or XMODEM-1k protocol. The user should determine when the 1024 byte block length actually improves throughput without causing problems. The user must supply the file name to both sending and receiving programs. Up to 1023 garbage characters may be added to the received file.
\par
\par }{\b\f0 Rz}{\f0 may be invoked as }{\b\f0 rzCOMMAND}{\f0 (with an optional leading - as generated by login(1)). For each received file, }{\f0\ul rz}{\f0 will pipe the file to ``COMMAND filename'' where filename is the name of the transmitted file with the file contents as standard input.
\par
\par Each file transfer is acknowledged when COMMAND exits with 0 status. A non zero exit status terminates transfers.
\par
\par A typical use for this form is }{\f0\ul rzmail}{\f0 which calls rmail(1) to post mail to the user specified by the transmitted file name. For example, sending the file "caf" from a PC-DOS system to }{\f0\ul rzmail}{\f0 on a Unix system would result in the contents of the DOS file "caf" being mailed to user "caf".
\par
\par The meanings of the available options are:
\par
\par }\pard \s17\qj\fi-540\li1260\nowidctlpar\widctlpar\adjustright {\b\f0 tim}{\f0 \tab Change timeout to }{\f0\ul tim}{\f0 tenths of seconds.
\par }\pard \s17\qj\fi-540\li1260\nowidctlpar\widctlpar\adjustright {\b\f0 v\tab }{\f0 Verbose causes a list of file names to be appended to /tmp/rzlog . More v's generate more detailed debugging output.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s19\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {\f0 DIAGNOSTICS
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Exit status is as follows: 0 for successful transfers. 1 if unrecoverable errors are detected. 2 if syntax errors or file access problems are detected. 3 if the program was terminated by a caught interrupt.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s19\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {\f0 SEE ALSO
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 sz}{\f0 (1).
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s19\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {\f0 NOTES
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 ZMODEM's support of XOFF/XON flow control allows proper operation in many environments that do not support XMODEM uploads. Unfortunately, not all Unix versions support input flow control. The TTY input buffering on some systems may not adequately buffer long blocks or streaming input at high speed. You should suspect this problem when you can't send data to the Unix system at high speeds using ZMODEM, YMODEM-1k or XMODEM-1k, but YMODEM with 128 byte blocks works properly.
\par
\par If a program that does not properly implement the specified file transfer protocol causes }{\b\f0 rz}{\f0 to "hang" the port after a failed transfer, either wait for }{\b\f0 rz}{\f0 to time out or keyboard a dozen Ctrl-X characters.
\par
\par Many programs claiming to support YMODEM only support XMODEM with 1k blocks, and they often don't get that quite right.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 BUGS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 This version of }{\b\f0 rz}{\f0 does not support some ZMODEM features.
\par The ASCII option's CR/LF to NL translation merely deletes CR's.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 ZMODEM CAPABILITIES}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 Rz}{\f0 supports ZMODEM command execution (zcommand), incoming ZMODEM binary (-b), ASCII (-a), newer(-n), newer+longer(-N), protect (-p), Crash Recovery(-r), clobber (-y), match+clobber (-Y), compression(-Z), and append (-+) requests. Other options sent by the sender are ignored. The default is protect (-p) and binary (-b).
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 FILES}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 /tmp/rzlog stores debugging output generated with -vv option
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 SCRIPT(1)\tab Commands and Applications\tab SCRIPT(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 SCRIPT(1)\tab Commands and Applications\tab SCRIPT(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {\f4
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 40}}}{
\par }}\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 script - make typescript of a terminal session
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard \nowidctlpar\widctlpar\adjustright {\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 script}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 script}}}{\f0 [ -}{\b\f0 a}{\f0 ] [ }{\i\f0 filename}{\f0 ]
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 script}{\f0 makes a typescript of everything printed on your terminal. The typescript is written to }{\i\f0 filename}{\f0 , or appended to }{\i\f0 filename}{\f0 if the -}{\b\f0 a}{\f0 option is given. It can be sent to the line printer later with }{\b\f0 lpr}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 lpr}}}{\f0 (1). If no file name is given, the typescript is saved in the file typescript .
\par
\par The script ends when the forked shell exits.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 OPTIONS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 -}{\b\f0 a}{\f0 \tab Append the script to the specified file instead of writing over it.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SEE ALSO}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 lpr}{\f0 (1), }{\b\f0 pty}{\f0 (4)
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 BUGS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 script places}{\f0 }{\i\f0 everything}{\f0 in the log file. This is not what the naive user expects.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 SLEEP(1)\tab Commands and Applications\tab SLEEP(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 SLEEP(1)\tab Commands and Applications\tab SLEEP(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {\f4
\par }}{\footerr \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\qr\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 41}}}{
\par }}\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 sleep - suspend execution for an interval
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 sleep}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 sleep}}}{\f0 }{\i\f0 time}{\f0
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24
\par DESCRIPTION}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 Sleep}{\f0 suspends execution for }{\i\f0 time}{\f0 seconds. It is used to execute a command after a certain amount of time as in a script:
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s20\qj\li1440\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 sleep 105
\par command
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SEE ALSO}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 alarm}{\f0 (3C), }{\b\f0 sleep}{\f0 (3)
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 BUGS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\i\f0 Time}{\f0 must be less than 2,147,483,647 seconds.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\f4\fs24 SPLIT(1)\tab Commands and Applications\tab SPLIT(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\tqr\tx10080\adjustright {\f4
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\f4\fs24 SPLIT(1)\tab Commands and Applications\tab SPLIT(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {\f4
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4500\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4500\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 42}}}{\ul
\par }}\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 split - split a file into pieces
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 split}{\f0 }{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 split }}}{\f0 [ - }{\i\f0 number}{\f0 ] [ }{\i\f0 infile}{\f0 [ }{\i\f0 outfile}{\f0 ] ]
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 split}{\f0 reads }{\i\f0 infile}{\f0 and writes it in }{\i\f0 number}{\f0 -line pieces (default 1000) onto a set of output files (as many files as necessary). The name of the first output file is }{\i\f0 outfile}{\f0 with }{\b\f0 aa}{\f0 appended, the second file is }{\b\f0 outfile}{\f0 ab , and so on lexicographically.
\par
\par If no }{\i\f0 outfile}{\f0 is given, }{\b\f0 x}{\f0 is used as default (output files will be called }{\b\f0 xaa}{\f0 , }{\b\f0 xab}{\f0 , etc.).
\par
\par If no }{\i\f0 infile}{\f0 is given, or if `}{\b\f0 -}{\f0 ' is given in its stead, then the standard input file is used.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 OPTIONS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 - number\tab Number of lines in each piece.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24 \tab
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 STTY(1)\tab Commands and Applications\tab STTY(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 STTY(1)\tab Commands and Applications\tab STTY(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerr \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\qr\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 47}}}{
\par }}\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 stty - set and view terminal options and parameters
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 stty}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 stty}}}{\f0 [ }{\i\f0 option}{\f0 ... ] [ }{\i\f0 charoption c}{\b\f0 }{\f0 ... ]
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 If no options are specified, }{\b\f0 stty}{\f0 prints out all the current terminal option settings. }{\i\f0 options}{\f0 represent boolean flags in the terminal parameters, and are as follows:
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\adjustright {\f0
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\tx2160\adjustright {\b\f0 raw}{\f0 \tab turns on RAW mode (no character or line processing)
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\tx2160\adjustright {\b\f0 -raw}{\f0 \tab turns off RAW mode
\par }{\b\f0 ehco}{\f0 \tab if in CBREAK or COOKED mode, echoes input characters
\par }{\b\f0 -echo}{\f0 \tab echo mode off
\par }{\b\f0 cbreak\tab }{\f0 turns on CBREAK mode (single character processing)
\par }{\b\f0 -cbreak\tab }{\f0 turns off CBREAK mode (line-at-a-time processing)
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\adjustright {\f0
\par }{\i\f0 Charoptions}{\f0 represent variables in the terminal interface, and are as follows:
\par
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\tx2160\adjustright {\b\f0 intr c}{\f0 \tab sets the interrupt character (normally ^C)
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\tx2160\adjustright {\b\f0 start c}{\f0 \tab sets the start character (normally ^Q)
\par }{\b\f0 stop c}{\f0 \tab sets the stop character (normally ^S)
\par }{\b\f0 eof c}{\f0 \tab sets the eof character (normally ^D)
\par }{\b\f0 susp c}{\f0 \tab sets the suspend character (normally ^Z)}{\b\f0
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\adjustright {\f0
\par }{\b\f0 c}{\f0 may be defined either as an octal number such as 003, or in control character format (^C).
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SEE ALSO
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 tty}{\f0 (4)
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 SUM(1)\tab Commands and Applications\tab SUM(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 SUM(1)\tab Commands and Applications\tab SUM(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 48}}}{
\par }}\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b NAME}{
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {sum - print checksum and block count of a file
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {
\par }{\b SYNOPSIS}{
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b sum}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\f4\cgrid {\xe {\v }{\b sum}}}{ [ }{\i file}{ ]
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {
\par }{\b DESCRIPTION}{
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b Sum}{ calculates and prints a 16-bit checksum for the named file, and also prints the number of blocks in the file. Stdin is used if no file names are given. }{\b Sum}{ is typically used to look for corrupted files, or to validate a file communicated over some transmission line.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {
\par }{\b DIAGNOSTICS}{
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {``Read error'' is indistinguishable from end of file on most devices; check the block count.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {
\par }{\b SEE ALSO}{
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b wc}{(1).
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {
\par }{\b NOTE}{
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b Sum}{ is pretty slow on large files when running on the GS. If anyone has a faster algorithm for computing the 16-bit checksum, I'd really appreciate seeing it.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {
\par }{\b AUTHOR}{
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {Marek Pawlowski - marekp@pnet91.cts.com
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 SZ(1)\tab Commands and Applications\tab SZ(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {\f4
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 SZ(1)\tab Commands and Applications\tab SZ(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 sx, sb, sz - Send Files with ZMODEM, YMODEM, or XMODEM
\par zcommand, zcommandi - Send COmmands with ZMODEM
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 sz}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 sz}}}{\f0 [-+abdefkLlNnopTtuvyYZ] file ...
\par }{\b\f0 sb}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 sb}}}{\f0 [-dfktuv] file ...
\par }{\b\f0 sx}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 sx}}}{\f0 [-ktuv] file
\par }{\b\f0 zcommand}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 zcommand}}}{\f0 [-otv] COMMAND
\par }{\b\f0 zcommandi}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 zcommandi}}}{\f0 [-otv] COMMAND
\par }{\b\f0 sz}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 sz}}}{\f0 -TT
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 Sz}{\f0 (send ZMODEM}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 ZMODEM}}}{\f0 ) uses the ZMODEM, YMODEM}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 YMODEM}}}{\f0 or XMODEM}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 XMODEM}}}{\f0 error correcting protocol to send one or more files over a dial-in serial port to a variety of programs running under PC-DOS, CP/M, Unix, VMS, and other op\-erating systems.
\par
\par This is a shareware program copyrighted by Omen Technology INC.
\par
\par }{\b\f0 Sz}{\f0 sends one or more files with ZMODEM protocol.
\par
\par ZMODEM greatly simplifies file transfers compared to XMODEM. In addition to a friendly user interface, ZMODEM provides Personal Computer and other users an efficient, accurate, and robust file transfer method.
\par
\par ZMODEM provides complete END-TO-END data integrity between application programs. ZMODEM's 32 bit CRC catches errors that sneak into even the most advanced networks.
\par
\par Advanced file management features include AutoDownload (Automatic file Download initiated without user inter\-vention), Display of individual and total file lengths and transmission time estimates, Crash Recovery, selective file transfers, and preservation of exact file date and length.
\par
\par The -y option instructs the receiver to open the file for writing unconditionally. The -a option causes the receiver to convert Unix newlines to PC-DOS carriage returns and linefeeds.
\par
\par
\par }{\b\f0 Sb}{\f0 sends one or more files with YMODEM or ZMODEM protocol. The initial ZMODEM initialization is not sent. When requested by the receiver, }{\b\f0 sb}{\f0 supports YMODEM-g with "cbreak" tty mode, XON/XOFF flow control, and interrupt character set to CAN (^X). YMODEM-g increases YMODEM throughput over error free channels (direct connection, X.PC, etc.) by disabling error recovery.
\par
\par On Unix systems, additional information about the file is transmitted. If the receiving program uses this informa\-tion, the transmitted file length controls the exact number of bytes written to the output dataset, and the modify time and file mode are set accordingly.
\par
\par
\par }{\b\f0 Sx}{\f0 sends a single file with XMODEM or XMODEM-1k protocol (sometimes incorrectly called "ymodem"). The user must supply the file name to both sending and receiving programs.
\par
\par If }{\b\f0 sz}{\f0 is invoked with $SHELL set and if that variable contains the string rsh or rksh (restricted shell), sz operates in restricted mode. Restricted mode restricts pathnames to the current directory and PUBDIR (usually /usr/spool/uucppublic) and/or subdirectories thereof.
\par
\par
\par The fourth form sends a single COMMAND to a ZMODEM receiver for execution. Zcommand exits with the COMMAND return value. If COMMAND includes spaces or characters special to the shell, it must be quoted.
\par
\par
\par The fifth form sends a single COMMAND to a ZMODEM receiver for execution. Zcommandi exits as soon as the receiver has correctly received the command, before it is executed.
\par
\par
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\adjustright {\f0 The sixth form (sz -TT) attempts to output all 256 code combinations to the terminal. If you are having difficulty sending files, this command lets you see which character codes are being eaten by the operating system.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 The meanings of the available options are:
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard \qj\fi-1260\li1980\nowidctlpar\widctlpar\adjustright {\i\fs24 +}{\fs24 \tab Instruct the receiver to append transmitted data to an existing file (ZMODEM only).
\par }{\i\fs24 a}{\fs24 \tab Instruct the ZMODEM receiver to convert text file format as appropriate for the receiving system. Valid only for ZMODEM.
\par }{\i\fs24 b}{\fs24 (Zmodem)\tab Binary override: transfer file without any translation.
\par }{\i\fs24 c}{\fs24 \tab Instruct the receiver to change the pathname if the destination file exists.
\par }{\i\fs24 d}{\fs24 \tab Change all instances of "." to "/" in the transmitted pathname. Thus, C.omenB0000 (which is unacceptable to MSDOS or CP/M) is transmitted as C/omenB0000. If the resultant filename has more than 8 characters in the stem, a "." is inserted to allow a total of eleven.
\par }{\i\fs24 e}{\fs24 \tab Escape all control characters; normally only XON, XOFF, DLE, CR-@-CR, and Ctrl-X are escaped.
\par }{\i\fs24 f}{\fs24 \tab Send Full pathname. Normally directory prefixes are stripped from the transmitted filename.
\par }{\i\fs24 k}{\fs24 (X/Ymodem)\tab Send files using 1024 byte blocks rather than the default 128 byte blocks. 1024 byte packets speed file transfers at high bit rates. (ZMODEM streams the data for the best possible throughput.)
\par }{\i\fs24 L N}{\fs24 \tab Use ZMODEM sub-packets of length N. A larger N (32 <= N <= 1024) gives slightly higher hroughput, a smaller N speeds error recovery. The default is 128 below 300 baud, 256 above 300 baud, or 1024 above 2400 baud.
\par }{\i\fs24 l N}{\fs24 \tab Wait for\tab the receiver to acknowledge correct data every N (32 <= N <= 1024) characters. This may be used to avoid network overrun when XOFF flow control is lacking.
\par }{\i\fs24 n}{\fs24 (Zmodem)\tab Send each file if destination file does not exist. Overwrite destination file if source file is newer than the destination file.
\par }{\i\fs24 N}{\fs24 (Zmodem)\tab Send each file if destination file does not exist. Overwrite destination file if source file is newer or longer than the destination file.
\par }{\i\fs24 o}{\fs24 (Zmodem)\tab Disable automatic selection of 32 bit CRC.
\par }\pard \qj\fi-1260\li1980\nowidctlpar\widctlpar\adjustright {\i\fs24 p}{\fs24 (Zmodem)\tab Protect existing destination files by skipping transfer if the destination file exists.
\par }{\i\fs24 r}{\fs24 (Zmodem)\tab Resume interrupted file transfer. If the source file is longer than the destination file, the transfer commences at the offset in the source file that equals the length of the destination file.
\par }{\i\fs24 rr }{\fs24 \tab As above, but compares the files (the portion common to sender and reciever) before resuming the transfer.
\par }{\i\fs24 t}{\fs24 tim\tab Change timeout to tim tenths of seconds.
\par }{\i\fs24 u}{\fs24 \tab Unlink the file after successful transmission.
\par }{\i\fs24 w}{\fs24 N \tab Limit the transmit window size to N bytes (ZMODEM).
\par }\pard\plain \s23\qj\fi-1260\li1980\nowidctlpar\widctlpar\adjustright \f4\cgrid {\i\f0 v}{\f0 \tab Verbose causes a list of file names to be appended to /tmp/szlog. More v's generate more output.
\par }{\i\f0 y}{\f0 \tab Instruct a ZMODEM receiving program to overwrite any existing file with the same name.
\par }{\i\f0 Y}{\f0 \tab Instruct a ZMODEM receiving program to overwrite any existing file with the same name, and to skip any source files that do have a file with the same pathname on the destination system.
\par }{\i\f0 Z}{\f0 \tab Use ZMODEM file compression to speed file transfer.
\par
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 DIAGNOSTICS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Exit status is as follows: 0 for successful transfers. 1 if unrecoverable errors are detected. 2 if syntax errors or file access problems are detected. 3 if the program was terminated by a caught interrupt.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 EXAMPLE}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0\ul ZMODEM File Transfer (GNO to remote system)
\par }{\f2 % sz -a *.c}{\f0
\par This single command transfers all .c files in the current directory with conversion (-a) to end of line conventions appropriate to the receiving environment. With ZMODEM AutoDownload enabled, will automatically recieve the files after performing a security check.
\par
\par }{\f2 % sz -Yan *.c *.h
\par }{\f0 Send only the .c and .h files that exist on both systems, and are newer on the sending system than the correspond\-ing version on the receiving system, converting Apple to UNIX text format.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SEE ALSO}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 rz(1).
\par
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\adjustright {\f0 Compile time options required for various operating systems are described in the source file.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 FILES}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 32 bit CRC code courtesy Gary\tab S. Brown.
\par
\par sz.c, crctab.c, rbsb.c, zm.c, zmr.c, zmodem.h Unix source files
\par
\par /tmp/szlog stores debugging output (sz -vv)
\par
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 TESTING FEATURE}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 The command "sz -T file" exercises the Attn sequence error recovery by commanding errors with unterminated packets. The receiving program should complain five times about binary data packets being too long. Each time sz is interrupted, it should send a ZDATA header followed by another defective packet. If the receiver does not detect five long data packets, the Attn sequence is not interrupting the sender, and the Myattn string in sz.c must be modified.
\par
\par After 5 packets, sz stops the "transfer" and prints the total number of characters "sent" (Tcount). The difference between Tcount and 5120 represents the number of characters stored in various buffers when the Attn sequence is generated.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 NOTES}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 When using buffered modems at high speed, particular attention must be paid to flow control. The modem and Unix must agree on the flow control method. Sz on USG (SYS III/V) systems uses XON/XOFF flow control. If flow control cannot be properly set up, Try a "-w 2048" option to enforce protocol level flow control. Experiment with different window sizes for best results.
\par
\par If a program that does not properly implement the specified file transfer protocol causes sb to "hang" the port after a failed transfer, either wait for sb to time out or type a dozen Ctrl-X characters.
\par
\par Many programs claiming to support YMODEM only support XMODEM with 1k blocks, and they often don't get that quite right. XMODEM transfers add up to 127 garbage bytes per file. XMODEM-1k and YMODEM-1k trans\-fers use 128 byte blocks to avoid extra padding.
\par
\par YMODEM programs use the file length transmitted at the beginning of the transfer to prune the file to the correct length; this may cause problems with source files that grow during the course of the transfer. This problem does not pertain to ZMODEM transfers, which preserve the exact file length unconditionally.
\par
\par Most ZMODEM options are merely passed to the receiving program; some programs do not implement all of these options.
\par
\par Circular buffering and a ZMODEM sliding window should be used when input is from pipes instead of acknowl\-edging frames each 1024 bytes. If no files can be opened, sz sends a ZMODEM command to echo a suitable complaint; perhaps it should check for the presence of at least one accessible file before getting hot and bothered.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 BUGS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 On at least one BSD system, sz would abnormally end if it got within a few kilobytes of the end of file. Using the "-w 8192" flag fixed the problem. The real cause is unknown, perhaps a bug in the kernel TTY output routines.
\par
\par The test mode leaves a zero length file on the receiving system.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 GNO/ME}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 The usual manner of invoking sz to send files from a IIgs is as follows:
\par
\par Connect to the other computer with a term program such as TelCom GS
\par
\par Start the X/Y/Zmodem receive on the other side
\par
\par Get/Quit back to the GNO Shell
\par
\par Type:
\par }\pard \s17\li720\nowidctlpar\widctlpar\adjustright {\f2 sz -v -v -b filename1 filename2 .. <.ttya >.ttyb}{\f0
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\adjustright {\f0
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\adjustright {\f0 You may put this operation in the background of course. Tests have shown no data loss up to 9600 baud in back\-ground operation.
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\adjustright {\f0
\par The -b option ensures binary mode. You must use this if you're sending a ShrinkIt archive or other binary file. For plain text files you can leave off the -b.
\par
\par }{\f0 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\f4\fs24 TAR}{\f4\fs24 (1)\tab Commands and Applications\tab T}{\f4\fs24 AR}{\f4\fs24 (1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\tqr\tx10080\adjustright {\f4
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\f4\fs24 TAR}{\f4\fs24 (1)\tab Commands and Applications\tab T}{\f4\fs24 AR}{\f4\fs24 (1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {\f4
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\tqc\tx4500\tqr\tx10080\adjustright \fs20\cgrid {\ul \tab \tab }{
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4500\tqr\tx10080\adjustright {\chpgn }{\ul
\par }}{\footerr \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx5220\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\qr\nowidctlpar\widctlpar\tqc\tx5220\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 49}}}{
\par }}\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 tar - extract and view tape archives
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 tar}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 tar}}}{\f0 [-]\{}{\i\f0 x}{\f0 |}{\i\f0 t}{\f0 \}f[}{\i\f0 v}{\f0 ] }{\i\f0 archive}{\f0
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 tar}{\f0 lists the contents of and extracts files from UNIX tape archives (*.tar files).
\par
\par Traditionally, }{\b\f0 tar}{\f0 does not require the normal '-' character to denote its arguments. The option flags are as follows:
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 -}{\i\f0 x}{\f0 \tab Extract files from the archive
\par -}{\i\f0 v}{\f0 \tab Verbose mode (tell what tar is doing)
\par -}{\i\f0 t}{\f0 \tab Tell mode (list files in archive)
\par -}{\i\f0 f}{\f0 \tab Use a file on disk instead of a tape
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Since the standard IIGS filesystem is not as flexible, filename-wise, as UNIX filesystems, some pre-processing is performed on filenames created when an archive is extracted.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard \qj\li720\nowidctlpar\widctlpar\adjustright {\fs24 \bullet If a tar filename contains a double-/ (possible under UNIX if an archive was created by specifying a directory with a trailing slash), tar converts it to a single /.
\par }\pard \qj\li720\ri1800\nowidctlpar\widctlpar\adjustright {\fs24
\par \bullet If a filename contains non-alpha numeric characters, they are converted to periods ('.').
\par }\pard \qj\li720\nowidctlpar\widctlpar\adjustright {\fs24
\par }{\b\fs24 tar}{\fs24 does not maintain the file protection bits from UNIX, nor does it maintain the creation and modification dates.
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\b\fs24
\par }\pard \nowidctlpar\widctlpar\adjustright {\b\fs24 BUGS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Does not create .tar archives
\par Does not work with raw devices, only files
\par Does not allow user to specify which files to extract from archive
\par tar should use the GS/OS JudgeName call.
\par The -x and -t options should be exclusive, but are not.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\f4
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\f4\fs24 TEE(1)\tab Commands and Applications\tab TEE(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\tqr\tx10080\adjustright {\f4
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 TEE(1)\tab Commands and Applications\tab TEE(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {\f4
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4500\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4500\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 50}}}{\ul
\par }}{\footerr \pard\plain \s16\nowidctlpar\widctlpar\tqc\tx4500\tqr\tx10080\adjustright \fs20\cgrid {\ul \tab \tab }{
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx5220\tqr\tx10080\adjustright {\tab \tab \chpgn
\par }}\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 tee - Pipe }{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 Pipe }}}{\f0 fitting.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 tee}{\f0 }{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 tee }}}{\f0 [ -}{\b\f0 ai}{\f0 ] [ }{\i\f0 file}{\f0 ...]
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 The }{\b\f0 tee}{\f0 utility copies standard input to standard output, making a copy in zero or more files. The output is unbuffered.
\par
\par The following options are available:
\par
\par }\pard \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright {\f0 -}{\b\f0 a}{\f0 \tab Append the output to the files rather than overwriting them.
\par }\pard \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright {\f0
\par -}{\b\f0 i}{\f0 \tab Ignore the }{\b\f0 SIGINT}{\f0 signal.
\par
\par The following operands are available:
\par
\par }{\i\f0 file}{\f0 \tab A pathname of an output file .
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\adjustright {\f0
\par The }{\b\f0 tee}{\f0 utility takes the default action for all signals, except in the event of the -}{\b\f0 i}{\f0 option.
\par
\par The }{\b\f0 tee}{\f0 utility exits 0 on success, and >0 if an error occurs.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 STANDARDS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 The }{\b\f0 tee}{\f0 function is expected to be POSIX p1003.2 compatible.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SEE ALSO
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\i\f0 GNO/Shell User's Manual }{\f0 , }{\b\f0 signal}{\f0 (2)
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\f4\fs24 TIME(1)\tab Commands and Applications\tab TIME(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\tqr\tx10080\adjustright {\f4
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\f4\fs24 TIME(1)\tab Commands and Applications\tab TIME(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {\f4
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\tqc\tx4500\tqr\tx10080\adjustright \fs20\cgrid {\ul \tab \tab }{
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4500\tqr\tx10080\adjustright {\chpgn
\par }}{\footerr \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx5220\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\qr\nowidctlpar\widctlpar\tqc\tx5220\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 51}}}{
\par }}\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 time - time a command
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 time}{\f0 }{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 time }}}{\i\f0 command}{\f0
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 The }{\b\f0 time}{\f0 command lets the specified }{\b\f0 command}{\f0 execute and then outputs the amount of elapsed real time, the time spent in the operating system, and the time spent in execution of the command. Times are reported in seconds and are written to standard error.
\par
\par The }{\b\f0 time}{\f0 command can be used to cause a command to be timed no matter how much
\par CPU time it takes. For example:
\par
\par
\par }\pard \s17\li720\nowidctlpar\widctlpar\adjustright {\f2 % /bin/time cp /etc/rc /usr/bill/rc
\par }\pard \s17\li720\nowidctlpar\widctlpar\adjustright {\f2 0.1 real 0.0 user 0.0 sys
\par
\par % /bin/time nroff sample1 > sample1.nroff
\par }\pard \s17\li720\nowidctlpar\widctlpar\adjustright {\f2 3.6 real 2.4 user 1.2 sys}{\f0
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\adjustright {\f0
\par This example indicates that the }{\b\f0 cp}{\f0 command used negligible amounts of user ( }{\i\f0 user}{\f0 ) and system time ( }{\i\f0 sys}{\f0 ), and had an elapsed time ( }{\i\f0 real}{\f0 ) of 1/10 second (0.1). The }{\b\f0 nroff}{\f0 command used 2.4 seconds of user time and 1.2 seconds of system time, and required 3.6 seconds of elapsed time.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard \nowidctlpar\widctlpar\adjustright {\b\fs24 RESTRICTIONS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Times are measured to an accuracy of 1/60 second. Thus, the sum of the user and system times can be larger than the elapsed time, but this isn't likely.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 TR(1)\tab Commands and Applications\tab TR(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 TR(1)\tab Commands and Applications\tab TR(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 52}}}{
\par }}{\footerr \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\qr\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 53}}}{
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx5220\tqr\tx10260\adjustright {
\par }}\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 tr - translate characters
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 tr}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 tr}}}{\f0 [ -}{\b\f0 cds}{\f0 ] [ }{\i\f0 string1}{\f0 [ }{\i\f0 string2}{\f0 ] ]
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 tr}{\f0 copies the standard input to the standard output with substitution or deletion of selected characters. The arguments }{\i\f0 string1}{\f0 and }{\i\f0 string2}{\f0 are considered sets of characters. Any input character found in }{\i\f0 string1}{\f0 is mapped into the character in the corresponding position within }{\i\f0 string2}{\f0 . When }{\i\f0 string2}{\f0 is short, it is padded to the length of }{\i\f0 string1}{\f0 by duplicating its last character.
\par
\par In either string the notation '}{\b\f0 a - b' }{\f0 denotes a range of characters from }{\b\f0 a}{\f0 to }{\b\f0 b}{\f0 in increasing ASCII order. The character \\, followed by 1, 2 or 3 octal digits stands for the character whose ASCII code is given by those digits. As with the shell, the escape character \\, followed by any other character, escapes any special meaning for that character.
\par
\par When }{\i\f0 string2}{\f0 is short, characters in }{\i\f0 string1}{\f0 with no corresponding character in }{\i\f0 string2}{\f0 are not translated.
\par
\par In either string the following abbreviation conventions introduce ranges of characters or repeated characters into the strings.
\par
\par }\pard \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright {\b\f0 [ a - z ]
\par }\pard \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright {\f0 \tab Stands for the string of characters whose ASCII codes run from character }{\b\f0 a}{\f0 to character }{\b\f0 z}{\f0 , inclusive.
\par
\par }{\b\f0 [ a * n ]}{\f0
\par \tab Stands for n repetitions of }{\b\f0 a}{\f0 . If the first digit of }{\b\f0 n}{\f0 is 0, }{\b\f0 n}{\f0 is considered octal; otherwise, }{\b\f0 n}{\f0 is taken to be decimal. A zero or missing }{\b\f0 n}{\f0 is taken to be huge; this facility is useful for padding }{\i\f0 string2}{\f0 .
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 OPTIONS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Any combination of the options -}{\b\f0 c}{\f0 , -}{\b\f0 d}{\f0 , or -}{\b\f0 s}{\f0 may be used:
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s17\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 -}{\b\f0 c}{\f0 \tab Complement the set of characters in }{\i\f0 string1}{\f0 with respect to the universe of characters whose ASCII codes are 01 through 0377 octal;
\par
\par -}{\b\f0 d}{\f0 \tab Delete all input characters in }{\i\f0 string1}{\f0 .
\par
\par -}{\b\f0 s}{\f0 \tab Squeeze all strings of repeated output characters that are in }{\i\f0 string2}{\f0 to single characters.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24 \page }{\fs24
\par }{\b\fs24 EXAMPLE}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 The following example creates a list of all the words in filename one per line in filename2, where a word is taken to be a maximal string of alphabetics. The second string is quoted to protect `\\' from the shell. 012 is the ASCII code for NEWLINE.
\par
\par }{\b\f2 tr -cs A-Za-z '\\012' < filename1 > filename2}{\b\f0
\par }{\f0
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 SEE ALSO}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 conv}{\f0 (1), }{\b\f0 more}{\f0 (1)
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24
\par BUGS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Will not handle ASCII NUL in }{\i\f0 string1}{\f0 or }{\i\f0 string2}{\f0 . }{\b\f0 tr}{\f0 always deletes NUL from input.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 UNSHAR(1)\tab Commands and Applications\tab UNSHAR(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {\f4
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 UNSHAR(1)\tab Commands and Applications\tab UNSHAR(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {\f4
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 54}}}{
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4500\tqr\tx10260\adjustright {
\par }}{\footerr \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\qr\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 55}}}{
\par }}\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 unshar - extracts files from shar archives
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 unshar}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 unshar}}}{\f0 \{-overwrite\} \{-nosort\} }{\i\f0 file1}{\f0 }{\i\f0 file2}{\f0 ...
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 Unshar}{\f0 is a utility which extracts files from the ubiquitous Unix shar archives. It has the following advantages over existing unshar utilities:
\par
\par }\pard\plain \s20\qj\li1440\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 - Small and fast
\par - Handles many cat and sed formats
\par - Allows extraction of subdirectories
\par - Understands ./file type filenames
\par - Understands file continuation with >>
\par - Sorts file list by Subject: line
\par - Exits cleanly with CTRL-C
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0
\par }{\b\f0 Unshar}{\f0 treats quotes and imbedded escape sequences intelligently and handles all the cat and sed formats the au\-thor ever seen, including sed commands which strip off more than one letter. There may be some formats it won't handle, but I've yet to find them.
\par
\par Invoke }{\b\f0 unshar}{\f0 with as many archive filenames as you like. All the files in each archive will be extracted into the current directory. If a file already exists, }{\b\f0 unshar}{\f0 asks you how you want to handle it. Entering `Y' will overwrite the existing file with the version in the archive, `N' will skip past the file without extracting it, and `A' will over\-write this file and any other existing files without prompting you again. Including the -o flag on the command line causes files to always be overwritten.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 OPERATION}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 Unshar}{\f0 scans through each archive specified on the command line, looking for lines beginning with `cat' or `sed'. All other lines are ignored. In particular, `echo' lines are not echoed. This way, you don't get a load of messages which are in any case fairly meaningless, because the operations they are describing are unsupported.
\par
\par When a shar archive contains a file for which a full pathname is given (as in source/file.c for example) unshar will create whatever directories are necessary. It also strips off leading /'s and ./'s, to make filenames understandable by GS/OS.
\par
\par Occasionally, a shar file distribution will contain a file too large to fit into a single shar archive (archives are typi\-cally limited to around 60K or so for transmission over Usenet). One method some archivers use to get around this is to split the large file into several smaller parts, and use the shell `>>' redirection operator to concatenate the parts together while extracting the files. In order for this to work properly, it is important that the archive files are extracted in the correct sequence; otherwise, all the pieces will get joined together in the wrong order.
\par
\par To assist with this, }{\b\f0 unshar}{\f0 does a prescan over all the files listed on the command line, and checks each file for a "Subject:" line. If it finds such a line, it scans it looking for any hints as to where the file comes in the sequence. Most shar files you feed to unshar will be directly from a Usenet sources or binaries group, and will include a volume and issue reference on the subject line. If }{\b\f0 unshar}{\f0 can't find such an issue reference, it will look for a Part number and use that instead.
\par
\par }{\b\f0 Unshar}{\f0 then extracts the archives starting with the lowest numbered file. This helps to ensure that those extra-large files are created correctly. You can tell when such a file is being created, because }{\b\f0 unshar}{\f0 says "Extending file" rather than "Unsharing file".
\par
\par If for some reason you want the files to be unarchived in the order listed on the command line, you can specify the `-n' (nosort) switch, and no sorting will take place.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 HISTORY}{\fs24
\par }\pard \qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright {\fs24 V1.0\tab First release.
\par }\pard \qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright {\fs24
\par }\pard \qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright {\fs24 V1.1\tab Added support for some more unusual uses of sed.
\par \tab Increased speed, and reduced size slightly.
\par \tab Fixed bug that truncated lines longer than 80 chars.
\par
\par V1.2\tab Added support for sorting by Subject: line
\par \tab Added support for file appending via >>
\par \tab Fixed small bug in detection of disk write errors
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\fs24
\par }{\b\fs24 AUTHOR}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Eddy Carroll (EMAIL: ecarroll@vax1.tcd.ie)
\par Apple //gs port by Andy McFadden (fadden@uts.amdahl.com).
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 WC(1)\tab Commands and Applications\tab WC(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 WC(1)\tab Commands and Applications\tab WC(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 56}}}{
\par }}{\footerr \pard\plain \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul \tab \tab
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\tab \tab \chpgn
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx5220\tqr\tx10260\adjustright {
\par }}\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 wc - display a count of lines, words and characters
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 wc}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 wc}}}{\f0 [ -}{\b\f0 lwc}{\f0 ] [ }{\i\f0 filename}{\f0 ... ]
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 wc}{\f0 counts lines, words, and characters in }{\i\f0 filename}{\f0 s, or in the standard input if no filename appears. It also keeps a total count for all named files. A word is a string of characters delimited by SPACE, TAB, or NEWLINE characters.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 OPTIONS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 When }{\i\f0 filename}{\f0 s are specified on the command line, their names will be printed along with the counts.
\par
\par The default is -}{\b\f0 lwc}{\f0 (count lines, words, and characters).
\par
\par -}{\b\f0 l}{\f0 \tab Count lines.
\par -}{\b\f0 w}{\f0 \tab Count words.
\par -}{\b\f0 c}{\f0 \tab Count characters.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 EXAMPLE}{\fs24
\par }\pard\plain \s17\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f2 example% wc $USRMAN/csh.1 $USRMAN/sh.1 $USRMAN/telnet.1
\par 1876 11223 65895 /usr/share/man/man1/csh.1
\par 674 3310 20338 /usr/share/man/man1/sh.1
\par 260 1110 6834 /usr/share/man/man1/telnet.1
\par 2810 15643 93067 total
\par example%
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 WHO(1)\tab Commands and Applications\tab WHO(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {\f4
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 WHO(1)\tab Commands and Applications\tab WHO(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {\f4
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx9360\adjustright \fs20\cgrid {\ul \tab \tab
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx9360\adjustright {\chpgn
\par }}{\footerr \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\qr\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 57}}}{
\par }}\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 who - who is on the system
\par }\pard \s17\qj\li720\nowidctlpar\widctlpar\adjustright {\f0
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 who}{\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 who}}}{\f0 [ who-file ] [ am I ]
\par
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 Who}{\f0 , without an argument, lists the login name, terminal name, and login time for each current UNIX user.
\par
\par Without an argument, }{\b\f0 who}{\f0 examines the }{\b\f0 /etc/utmp}{\f0 file to obtain its information. If a file is given, that file is examined. Typically the given file will be }{\b\f0 /usr/adm/wtmp}{\f0 , which contains a record of all the logins since it was created. Then }{\b\f0 who}{\f0 lists logins, logouts, and crashes since the creation of the wtmp file. Each login is listed with user name, terminal name (with `/dev/' suppressed), and date and time. When an argument is given, logouts produce a similar line without a user name. Reboots produce a line with `x' in the place of the device name, and a fossil time indicative of when the system went down.
\par
\par With two arguments, as in `who am I' (and also `who are you'), }{\b\f0 who}{\f0 tells who you are logged in as.
\par
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 FILES}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 /etc/utmp
\par
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 SEE ALSO}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 getuid(2), utmp(5)
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 YES(1)\tab Commands and Applications\tab YES(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqc\tx5220\tqr\tx8640\adjustright {\f4
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqc\tx5220\tqr\tx8640\tqr\tx10260\adjustright {\f4
\par
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 yes(1)\tab Commands and Applications\tab yes(1)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqc\tx5220\tqr\tx8640\tqr\tx10260\adjustright {\f4
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 58}}}{
\par }}{\footerr \pard\plain \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx9360\adjustright \fs20\cgrid {\ul \tab \tab
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx9360\adjustright {\tab \tab \chpgn
\par }}\pard\plain \s21\qj\nowidctlpar\widctlpar\adjustright \b\f4\cgrid {\f0 NAME
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 yes}{\f0 - be repetitively affirmative
\par
\par }\pard\plain \nowidctlpar\widctlpar\tqr\tx10260\adjustright \fs20\cgrid {\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 yes}{\f0 [ expletive ]
\par
\par }\pard\plain \nowidctlpar\widctlpar\tqr\tx10260\adjustright \fs20\cgrid {\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 Yes}{\f0 repeatedly outputs "y", or if }{\i\f0 expletive}{\f0 is given, that is output repeatedly. Termination is by interrupt.
\par }\pard\plain \qj\nowidctlpar\widctlpar\tqr\tx10260\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 DUP}{\fs24 (2)\tab System Calls\tab }{\fs24 DUP}{\fs24 (2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 ALARM(2)\tab System Calls\tab ALARM(2)
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 64}}}{
\par }}{\footerr \pard\plain \s16\qr\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx8640\adjustright \fs20\cgrid {
\par }\pard \s16\qr\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 59}}}{
\par }}\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 alarm - set and reset alarm timer
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 #include <gno/gno.h>
\par long int }{\b\f0 alarm}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 alarm}}}{\f0 (long int }{\i\f0 seconds}{\f0 );
\par
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 alarm sets the counter on the calling process' alarm timer to the value specified in }{\i\f0 seconds}{\f0 . If }{\i\f0 seconds}{\f0 is (long int) 0, the alarm timer is disabled.
\par
\par When an alarm timer terminates (by counting down to 0), the calling process is sent a SIGALRM }{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGALRM }}}{\f0 signal.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 RETURN VALUE}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 The amount of time previously remaining in the timer is returned. No errors are possible.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SEE ALSO}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 signal}{\f0 (2), }{\b\f0 sigpause}{\f0 (2)
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24 \sect }\sectd \psz1\linex0\endnhere\sectdefaultcl {\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {DUP(2)\tab System Calls\tab DUP(2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerr \pard\plain \s16\qr\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx9360\adjustright \fs20\cgrid {
\par }\pard \s16\qr\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 65}}}{
\par }}\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 dup,dup2 - duplicate open file descriptors
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 #include <gno/gno.h>
\par
\par int }{\b\f0 dup}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 dup}}}{\f0 (int }{\i\f0 filedes}{\f0 );
\par int }{\b\f0 dup2}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 dup2}}}{\f0 (int }{\i\f0 filedes}{\f0 , int }{\i\f0 filedes2}{\f0 );
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Given the file descriptor of a valid open file, }{\b\f0 dup}{\f0 creates a new file descriptor that is synonymous with }{\i\f0 filedes}{\f0 . The new file descriptor is returned. The second form of the call forces an existing file descriptor }{\i\f0 filedes2}{\f0 to refer to the same file as }{\i\f0 filedes}{\f0 . If }{\i\f0 filedes2}{\f0 already refers to an open file, it is closed first.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 RETURN VALUE}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 dup}{\f0 returns the new file descriptor, and }{\b\f0 dup2}{\f0 returns 0 if the calls are successful. In the event of an error, -1 is returned and }{\b\f0 errno}{\f0 is set as follows:
\par
\par [EBADF]\tab filedes refers to an invalid file descriptor (not an open file)
\par [EMFILE]\tab no more files can be opened; process is at current limit (32).
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SEE ALSO}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 fork}{\f0 (2), }{\b\f0 open}{\f0 (2)
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 EXECVE}{\fs24 (2)\tab System Calls\tab }{\fs24 EXECVE}{\fs24 (2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 EXECVE(2)\tab System Calls\tab EXECVE(2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 execve - replace current process with an executable image from a file
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 #include <gno/gno.h>
\par int }{\b\f0 execve}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 execve}}}{\f0 (char *}{\i\f0 pathname}{\f0 , char *}{\i\f0 cmdline}{\f0 );
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 execve}{\f0 is the preferred method for loading program files to be executed under the GNO system. A new userID is allocated for the process, and the GS/OS System Loader is used to bring the executable file specified by pathname into memory. }{\i\f0 pathname}{\f0 can be a partial or complete path. The executable loaded replaces the executable associated with the current process.
\par
\par If the executable file does not contain an OMF Stack Segment (SEGKIND = $12), a default stack of 4096 bytes is allocated to the process. The direct-page pointer is set to the bottom of the stack memory (for C programs this is irrelevant).
\par
\par The parameter }{\i\f0 cmdline}{\f0 is the list of arguments to be passed to the new process (a copy is actually passed). C programs parse cmdline automatically, and the individual pieces can be accessed through the argc/argv arguments to main(). }{\i\f0 cmdline}{\f0 can be accessed from assembly langugage through the X (high-order word of }{\i\f0 cmdline}{\f0 ) and Y (low-order word) registers. However, if the executable file is of file type S16 ($B3), the }{\i\f0 cmdline}{\f0 argument is ignored and the X&Y registers are set to null (i.e. the command line is only passed to an EXE executable). The 8 characters "BYTEWRKS" are prepended to }{\i\f0 cmdline}{\f0 before being passed to the process (this is the same identifier used by the ORCA shell). This Shell Identifier distinguishes the GNO and ORCA environments from others that don't support the full range of shell calls, and can be accessed from C with the library function }{\b\f0 shellid}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 shellid}}}{\f0 (). The A register is set to the userID allocated for the process.
\par
\par GS/OS prefixes 1 and 9 are set to the pathname of the directory containing the executable file; if the length of the path exceeds 64 characters prefix 1 is set to the null prefix (length 0).
\par The following information is inherited by the new executable: current machine state, controlling TTY, process group ID, and prefixes 0 and 8.
\par
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {\f0 Caught signals are reset to the default action. Ignored signals remain ignored across the }{\b\f0 execve}{\f0 . Any signals in the parent's queue are not passed to the child, and the child is started with no signals blocked. The child inherits all the open files of its parent.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 RETURN VALUE}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 A successful }{\b\f0 execve}{\f0 does not return, as the current executable is replaced with the one specified in the call. If for some reason the call fails, execve returns SYSERR (-1), and }{\b\f0 errno}{\f0 is set to one of the following:
\par }\pard \s22\qj\li1440\nowidctlpar\widctlpar\adjustright {\f0 [ENOENT]\tab the }{\i\f0 pathname}{\f0 specified does not exist
\par [EIO]\tab \tab some general I/O error occurred trying to load the executable
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 BUGS}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 ORCA/C 1.3 and previous ignore any stack }{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 stack }}}{\f0 space allocated for it by the GS/OS Loader (which execve calls) or by default in execve. Stack space in ORCA/C programs is determined by code in the .root object file, and can be set with the #pragma stacksize directive. Read the chapter on GNO Compliance in the }{\i\f0 GNO Kernel Reference Manual}{\f0 for more information on this topic. ORCA/C 2.0 and newer use the system-provided stack space.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SEE ALSO}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 exec}{\f0 (2), }{\b\f0 fork}{\f0 (2), }{\b\f0 wait}{\f0 (2), }{\b\f0 ioctl}{\f0 (2), }{\b\f0 tty}{\f0 (4), }{\i\f0 GNO Kernel Reference Manual}{\f0
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard \nowidctlpar\widctlpar\adjustright {\fs24 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 FORK}{\fs24 (2)\tab System Calls\tab }{\fs24 FORK}{\fs24 (2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 FORK(2)\tab System Calls\tab FORK(2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 fork - start a new process from inside the current application space
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 #include <gno/gno.h>
\par
\par int }{\b\f0 fork}{\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 fork}}}{\f0 (void *}{\i\f0 addr}{\f0 );
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 fork}{\f0 's argument }{\i\f0 addr}{\f0 is typically the address of a C function, although it can be any valid address inside the IIGS RAM space. }{\b\f0 fork}{\f0 creates a new entry in the process table, and sets up default settings for the new process. The process is allocated 1K (1024 bytes) of stack space, and the direct page is set to the beginning of this memory. The process is executed in 16-bit full native mode, and the registers upon entry to the routine are set as follows:
\par
\par \tab A\tab the userID assigned to the process
\par \tab X\tab 0
\par \tab Y\tab 0
\par
\par The child inherits the memory shadowing and machine state parameters of the parent, as well as signal blocking information and the ID of the controlling TTY. In addition, the child inherits all the open files of its parent.
\par
\par A forked process may share code with other children or the parent. However, this is only allowed in a forward manner; any forked process that exits by function return will be terminated. Note that any shared global variables will need to be moderated with some type of mutual exclusion, either the kernel semaphore(2) routines or custom routines. This includes C stdio routines.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 RETURN VALUE}{\fs24
\par }\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 fork}{\f0 returns the process ID of the child, or -1 (SYSERR) if an error occurs, in which case }{\b\f0 errno}{\f0 is set as follows:
\par \tab [ENOMEM]\tab not enough memory to create the new process
\par \tab [EAGAIN]\tab all process slots full; no more can be created
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 NOTES}{\fs24
\par }\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 There is no way to pass parameters directly to a child with }{\b\f0 fork}{\f0 (). Use }{\b\f0 fork2}{\f0 () instead.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 CAVEATS}{\fs24
\par }\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Most UNIX }{\b\f0 fork}{\f0 s take no parameters; they copy the entire address space of the calling process and return with a different value in the parent and child. Due to hardware limitations, this sort of manipulation isn't possible on the IIgs. UNIX programs utilizing }{\b\f0 fork}{\f0 will have to be modified slightly to work under GNO.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard \nowidctlpar\widctlpar\adjustright {\fs24
\par }{\b\fs24 SEE ALSO}{\fs24
\par }\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 fork2}{\f0 (2), }{\b\f0 exec}{\f0 (2), }{\b\f0 execve}{\f0 (2), }{\b\f0 wait}{\f0 (2), }{\b\f0 screate}{\f0 (2)
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 GETPID(2)\tab System Calls\tab GETPID(2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 66}}}{
\par }}\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 getpid, getpgrp, getppid - return information about processes
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 #include <gno/gno.h>
\par
\par int }{\b\f0 getpid}{\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 getpid}}}{\f0 (void);
\par int }{\b\f0 getpgrp}{\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 getpgrp}}}{\f0 (int }{\i\f0 pid}{\f0 );
\par int }{\b\f0 getppid}{\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 getppid}}}{\f0 (void);
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 The process ID is a unique value associated with a process, and is needed for many system calls. pid's can range from 0 (Kernel Null Process) to 32767. Some programs use }{\b\f0 getpid}{\f0 to seed random number generators. A much better approach on the IIGS is to use the horizontal and vertical positions of the electron gun, which can be obtained by reading the word value at absolute memory location $E0C02E.
\par
\par }{\b\f0 getpgrp}{\f0 returns the process group ID of the specified process, }{\i\f0 pid}{\f0 . This function is usually used when you wish to send a signal to all members of a process group using }{\b\f0 kill}{\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 kill}}}{\f0 (2).
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 RETURN VALUE}{\fs24
\par }\pard\plain \s22\fi-1080\li1800\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 getpid}{\f0 :\tab The process ID of the caller is returned. No errors are possible.
\par }{\b\f0 getppid}{\f0 :\tab The process ID of the caller's parent is returned. No errors are possible.
\par }{\b\f0 getpgrp}{\f0 :\tab The process group ID of the specified process is returned. In the event of an error, getpgrp returns -1 and sets }{\b\f0 errno}{\f0 to the appropriate error code:
\par }\pard \s22\li1800\nowidctlpar\widctlpar\adjustright {\f0 [ESRCH]\tab pid is not a valid process ID
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 NOTES}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 getpgrp}{\f0 () is provided solely for compatibility with previous versions of the UNIX operating system. The new Job Control interface should be used exclusively in new software.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par
\par }{\b\fs24 SEE ALSO}{\fs24
\par }\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 fork}{\f0 (2), }{\b\f0 job control}{\f0 (2), }{\b\f0 ioctl}{\f0 (2), }{\i\f0 GNO Kernel Reference Manual}{\f0
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright \fs20\cgrid {\fs24 GETUID(2)\tab System Calls\tab GETUID(2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {GETUID(2)\tab System Calls\tab GETUID(2)
\par }}{\footerr \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\qr\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 67}}}{
\par }}\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 getuid, geteuid, getgid, getegid - get user and group identity
\par getpgrp - get process group
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 #include <sys/types.h>
\par uid_t = }{\b\f0 getuid}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 getuid}}}{\f0 (void)
\par uid_t = }{\b\f0 geteuid}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 geteuid}}}{\f0 (void)
\par gid_t = }{\b\f0 getgid}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 getgid}}}{\f0 (void)
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {\f0 gid_t = }{\b\f0 getegid}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 getegid}}}{\f0 (void)
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 Getuid}{\f0 returns the real user ID of the current process, }{\b\f0 geteuid}{\f0 the effective user ID. The real user ID identifies the person who is logged in. The effective user ID gives the process additional permissions during execution of "set-user-ID" mode processes, which use getuid to determine the real-user-id of the process that invoked them.
\par
\par }{\b\f0 Getgid}{\f0 returns the real group ID of the current process, }{\b\f0 getegid}{\f0 the effective group ID. The real group ID is specified at login time. The effective group ID is more transient, and determines additional access permission during execution of a ``set-group-ID'' process, and it is for such processes that getgid is most useful.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 NOTES}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 The }{\b\f0 setr}{\f0 *() functions are not currently implemented in GNO/ME, because set-uid and set-group-ID behavior is specific to the UNIX filesystem.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SEE ALSO}{\fs24
\par }\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 setreuid}{\f0 (2), }{\b\f0 setregid}{\f0 (2), }{\b\f0 setgid}{\f0 (3), }{\b\f0 tty}{\f0 (4)
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 INTRO(2)\tab System Calls\tab INTRO(2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 68}}}{
\par }}\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 intro }{\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 intro }}}{\f0 - introduction to GNO system calls
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 This section describes, in alphabetical order, the system calls and kernel interfaces available for GNO. Certain distinctions of purpose are made in the headings.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 Manual Page Command Syntax}{\fs24
\par }\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Unless otherwise noted, calls described in the }{\b\f0 SYNOPSIS}{\f0 section of a manual page accept parameters and require the
\par
\par name [- option ...] [ cmdarg ...]
\par
\par where:
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard \fi-1080\li1800\nowidctlpar\widctlpar\adjustright {\fs24 []\tab Surround an option or cmdarg that is not required.
\par }\pard \fi-1080\li1800\nowidctlpar\widctlpar\adjustright {\fs24
\par ...\tab Indicates multiple occurrences of the option or cmdarg.
\par
\par name \tab The name of an executable file.
\par
\par option \tab (Almost always preceded by a "-".)
\par \tab noargletter ... or,
\par \tab argletter optarg [,...]
\par
\par noargletter \tab A single letter representing an option without an option-argument. Note that more than one noargletter option can be grouped after one "-".
\par
\par argletter \tab A single letter representing an option requiring an option-argument.
\par
\par optarg \tab An option-argument (character string) satisfying a preceding argletter. Note that groups of optargs following an argletter must be separated by white space and quoted.
\par
\par cmdarg \tab Path name (or other command argument) not beginning with a "-", or "-" by itself indicating the standard input.
\par }\pard \nowidctlpar\widctlpar\adjustright {\fs24
\par }\pard \nowidctlpar\widctlpar\adjustright {\b\fs24 SEE ALSO
\par }\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\i\f0 GNO/ME Kernel Reference Manual}{\f0
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx5040\tqr\tx10080\adjustright \fs20\cgrid {\fs24 IOCTL(2)\tab System Calls\tab IOCTL(2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {IOCTL(2)\tab System Calls\tab IOCTL(2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerr \pard\plain \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul \tab \tab
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\tab \tab \chpgn
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 ioctl - control device
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 #include <sys/ioctl.h>
\par
\par int }{\b\f0 ioctl}{\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 ioctl}}}{\f0 (int }{\i\f0 fd}{\f0 , unsigned long }{\i\f0 request}{\f0 , void *}{\i\f0 argp}{\f0 )
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 Ioctl}{\f0 performs a variety of functions on open file descriptors. In particular, many operating characteristics of character special files (e.g. terminals) may be controlled with }{\b\f0 ioctl}{\f0 requests. The writeups of various devices in section 4 discuss how }{\b\f0 ioctl}{\f0 applies to them.
\par
\par An }{\b\f0 ioctl}{\f0 }{\i\f0 request}{\f0 has encoded in it whether the argument is an "in" parameter or "out" parameter, and the size of the argument argp in bytes. Macros and defines used in specifying an }{\b\f0 ioctl}{\f0 request are located in the file <sys/ioctl.h>.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 RETURN VALUE}{\fs24
\par }\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 If an error has occurred, a value of -1 is returned and }{\b\f0 errno}{\f0 is set to indicate the error.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 ERRORS}{\fs24
\par }\pard \fi-1440\li2160\nowidctlpar\widctlpar\adjustright {\b\fs24 Ioctl}{\fs24 will fail if one or more of the following are true:
\par }\pard \fi-1440\li2160\nowidctlpar\widctlpar\adjustright {\fs24
\par }{\f2\fs24 [EBADF]}{\fs24 \tab }{\i\fs24 Fd}{\fs24 is not a valid descriptor.
\par
\par }{\f2\fs24 [ENOTTY]}{\fs24 \tab }{\i\fs24 Fd}{\fs24 is not associated with a character special device.
\par
\par }{\f2\fs24 [ENOTTY]}{\fs24 \tab The specified request does not apply to the kind of object that the descriptor fd references.
\par
\par }{\f2\fs24 [EINVAL]}{\fs24 \tab }{\i\fs24 Request}{\fs24 or }{\i\fs24 argp}{\fs24 is not valid.
\par }\pard \nowidctlpar\widctlpar\adjustright {\fs24
\par }{\b\fs24 SEE ALSO}{\fs24
\par }\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 execve}{\f0 (2), }{\b\f0 tty}{\f0 (4)
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\fs24 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx5040\tqr\tx10080\adjustright \fs20\cgrid {\fs24 JOBCONTROL(2)\tab System Calls\tab JOBCONTROL(2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 JOBCONTROL(2)\tab System Calls\tab JOBCONTROL(2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 70}}}{
\par }}{\footerr \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\qr\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 69}}}{
\par }}\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 tcnewpgrp, settpgrp, tctpgrp - interface for the new job control model
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 #include <gno/gno.h>
\par
\par int }{\b\f0 tcnewpgrp}{\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 tcnewpgrp}}}{\f0 (int }{\i\f0 fdtty}{\f0 );
\par int }{\b\f0 settpgrp}{\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 settpgrp}}}{\f0 (int }{\i\f0 fdtty}{\f0 );
\par int }{\b\f0 tctpgrp}{\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 tctpgrp}}}{\f0 (int }{\i\f0 fdtty}{\f0 , int }{\i\f0 pid}{\f0 );
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard \nowidctlpar\widctlpar\adjustright {\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 The job control interface is used to control what processes are ``in the foreground'' on a particular terminal. Every tty has a process group. Each process is a member of a process group. A process is a foreground process on a tty if and only if that process and the terminal belong to the same process group. Certain characters typed on a tty with a nonzero process group produce signals sent to every process which is a member of the group (e.g. ^C).
\par
\par A process is suspended (stopped) if it performs a sufficiently invasive operation on a tty with a different process group. This includes these job control calls, reads from a terminal, and writes to a terminal if configured to do so with }{\b\f0 ioctl}{\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 ioctl}}}{\f0 (2). When a tty file is first opened, it is assigned process group 0; init has process group 0. As init launches login processes on various ttys, it assigns process groups to those ttys and processes.
\par
\par }{\b\f0 tcnewpgrp}{\f0 (fdtty): Allocates a new process group and assigns it to the terminal referred to by fdtty. If the calling process is not in the foreground, it is sent SIGTTOU}{\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGTTOU}}}{\f0 .
\par
\par }{\b\f0 settpgrp}{\f0 (fdtty): Sets the current process to have the same process group as fdtty.
\par
\par }{\b\f0 tctpgrp}{\f0 (fdtty,pid): Sets the tty to the same process group as pid, where pid is the current process or a descendant of it.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 RETURN VALUE}{\fs24
\par }\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 The calls will return 0 if no error occurs; otherwise, they'll return -1 and set }{\b\f0 errno}{\f0 to one of the following:
\par }{\f2 [EBADF]}{\f0 \tab }{\i\f0 fdtty}{\f0 is not a valid file descriptor
\par }{\f2 [ENOTTY]}{\f0 \tab }{\i\f0 fdtty}{\f0 does not refer to a terminal file
\par }{\f2 [ESRCH]}{\f0 \tab }{\i\f0 pid}{\f0 is not a valid process identifier
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 NOTES}{\fs24
\par }\pard\plain \s22\fi-720\li1440\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Following are some example uses of the job control interface.
\par
\par \bullet \tab Forking a pipeline in a job-control shell: The shell starts with }{\b\f0 tcnewpgrp}{\f0 (fdtty), so that the tty is in the new process group before there are even any children. It then forks each process in the pipeline. Each process does }{\b\f0 settpgrp}{\f0 (fdtty), thus joining the new process group.
\par
\par \bullet \tab Handling a stopped child process: When the shell sees that a pipeline has stopped or exited, it does }{\b\f0 tctpgrp}{\f0 (fdtty,getpid()) to set the tty to its own process group. To resume the pipeline it does }{\b\f0 tctpgrp}{\f0 (fdtty,pid) where pid is one of the child processes, then sends SIGCONT.
\par
\par \bullet \tab Starting a process under a new tty: When, for instance, telnetd wants to grab a pseudo-tty, it opens the pty and forks a child process. The child does }{\b\f0 tcnewpgrp}{\f0 (fdtty) to give the tty a real process group, then }{\b\f0 settpgrp}{\f0 (fdtty) to place itself into the foreground.
\par
\par }\pard \s22\li720\nowidctlpar\widctlpar\adjustright {\f0 Security under this scheme is trivial. There is no way a process can join a process group except by settpgrp(), and that requires a descriptor open to a tty with that pgrp. To make a tty have that pgrp requires either }{\b\f0 tcnewpgrp}{\f0 (), in which case nobody else is using the pgrp, or }{\b\f0 tctpgrp}{\f0 (), which reduces to the first problem of having a process in the process group. End of security proof. (Wasn't that easy?) Note that `using' must be defined as use both by ttys and by processes; the system keeps a table of pgrps, each with a total tty + process reference count. When the reference count reaches zero, the pgrp is automatically deallocated.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SEE ALSO}{\fs24
\par }\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 ioctl}{\f0 (2), }{\b\f0 tty}{\f0 (4), }{\b\f0 signal}{\f0 (2), }{\b\f0 kill}{\f0 (2), }{\i\f0 GNO Shell Reference Manual}{\f0
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 CREDITS}{\fs24
\par }\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 This job control interface was designed by Dan Bernstein (brnstnd@kramden.acf.nyu.edu). He was inspired by Chris Torek, and dedicated the system to Mark Teitelbaum. The text of this manpage is derived from his original specifications.
\par The GNO/ME implementation was written strictly from specs.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx5040\tqr\tx10080\adjustright \fs20\cgrid {KILL(2)\tab System Calls\tab KILL(2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 KILL(2)\tab System Calls\tab KILL(2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul \tab \tab
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\chpgn
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerr \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\qr\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 71}}}{
\par }}\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 kill - send a signal to a process
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 #include <gno/gno.h>
\par
\par int }{\b\f0 kill}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 kill}}}{\f0 (int }{\i\f0 pid}{\f0 , int }{\i\f0 sig}{\f0 )
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 kill}{\f0 is used to send a signal to a process or group of processes. Signals are software interrupts; they act just like hardware interrupts and can also be used for basic IPC (Inter-process communication). The various signals are described in }{\b\f0 signal}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 signal}}}{\f0 (2).
\par
\par }{\i\f0 sig}{\f0 can be a signal number, or it can be 0, in which case no signal is sent, but error checking is done (this can be used to verify a process ID). If }{\i\f0 sig}{\f0 has been blocked (}{\b\f0 sigblock}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 sigblock}}}{\f0 (2)), the signal is deferred until it is unblocked, and }{\b\f0 kill}{\f0 returns immediately. Any previously pending signals of the same }{\i\f0 sig}{\f0 are lost (i.e. signals are not stacked).
\par
\par If }{\i\f0 pid}{\f0 is 0, the signal is sent to all processes with the same process group ID as the caller, except for system processes.
\par
\par Processes may signal themselves, in which case the signal handler is invoked immediately (if one is installed).
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\b\fs24 RETURN VALUE}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Normally }{\b\f0 kill}{\f0 returns SYSOK (0). The following conditions can cause }{\b\f0 kill}{\f0 to return SYSERR (-1):
\par }{\f2 [ESHRC]}{\f0 \tab }{\i\f0 pid}{\f0 does not correspond to an existing process
\par }{\f2 [EINVAL]}{\f0 \tab }{\i\f0 sig}{\f0 specifies an invalid signal number
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SEE ALSO}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 sigblock}{\f0 (2), }{\b\f0 signal}{\f0 (2), }{\b\f0 wait}{\f0 (2)
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 BUGS}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Do not attempt to send signals from inside a CDA (Classic Desk Accessory) or interrupt handler.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx5040\tqr\tx10080\adjustright \fs20\cgrid {\fs24 PIPE(2)\tab System Calls\tab PIPE(2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {PIPE(2)\tab System Calls\tab PIPE(2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 72}}}{
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerr \pard\plain \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul \tab \tab
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\tab \tab \chpgn
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 pipe - create an interprocess communication channel
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 #include <gno/gno.h>
\par int }{\b\f0 pipe}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 pipe}}}{\f0 (int }{\i\f0 filedes[2]}{\f0 );
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24
\par DESCRIPTION}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 The }{\b\f0 pipe}{\f0 system call creates an I/O mechanism called a pipe. The file descriptors returned can be used in read and write operations. When the pipe is written using the descriptor }{\i\f0 filedes[1]}{\f0 up to 4096 bytes of data are buffered before the writing process is suspended. A read using the descriptor }{\i\f0 filedes[0]}{\f0 will pick up the data.
\par
\par It is assumed that after the pipe has been set up, two (or more) cooperating processes (created by subsequent fork calls) will pass data through the pipe with Read and Write calls.
\par
\par The shell has a syntax to set up a linear array of processes connected by pipes.
\par
\par }{\b\f0 Read}{\f0 calls on an empty pipe (no buffered data) with only one end (all write file descriptors closed) returns an end-of-file.
\par
\par A signal (SIGPIPE}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGPIPE}}}{\f0 ) is generated if a write on a pipe with only one end is attempted.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 RETURN VALUE}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 The function value zero is returned if the pipe was created; -1 if an error occurred.
\par
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 ERRORS}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 The pipe call will fail if:
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {\f2 [EMFILE]}{\f0 \tab Too many descriptors are active.
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {\f2 [ENFILE]}{\f0 \tab The system file table is full.
\par }{\f2 [EFAULT]}{\f0 \tab The fildes buffer is in an invalid area of the process's address space.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SEE ALSO}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\i\f0 GNO Shell Users Manual}{\f0 , }{\b\f0 read}{\f0 (2), }{\b\f0 write}{\f0 (2), }{\b\f0 fork}{\f0 (2)
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 BUGS}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Should more than 4096 bytes be necessary in any pipe among a loop of processes, deadlock will occur.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 NOTES}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 In the above text, mention is made to UNIX read and write calls. On the Apple IIgs, these refer to any system calls that do I/O, namely GS/OS ReadGS, WriteGS; TextTools calls; and C library I/O calls such as read, fread, etc.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\f4 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx5040\tqr\tx10080\adjustright \fs20\cgrid {SCREATE(2)\tab System Calls\tab SCREATE(2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 SCREATE(2)\tab System Calls\tab SCREATE(2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul \tab \tab
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\chpgn
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerr \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\qr\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 73}}}{
\par }}\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 screate, sdelete, swait, ssignal - semaphore }{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 semaphore }}}{\f0 operations
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 #include <gno/gno.h>
\par
\par int }{\b\f0 swait}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 swait}}}{\f0 (int }{\i\f0 sem}{\f0 );
\par int }{\b\f0 ssignal}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 ssignal}}}{\f0 (int }{\i\f0 sem}{\f0 );
\par int }{\b\f0 screate}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 screate}}}{\f0 (int }{\i\f0 count}{\f0 );
\par int }{\b\f0 sdelete}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 sdelete}}}{\f0 (int }{\i\f0 sem}{\f0 );
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 screate}{\f0 is used to allocate a semaphore from the kernel semaphore manager. Semaphores are the most basic form of interprocess communication, and these routines provide the power necessary to solve a large number of synchronization and communication problems. (See an Operating Systems text).
\par
\par The initial }{\i\f0 count}{\f0 determines how many times }{\b\f0 swait}{\f0 can be called before processes are blocked. }{\i\f0 count}{\f0 must be >= 0, and is usually set to 1. }{\b\f0 screate}{\f0 returns a semaphore ID number as an integer. This ID must be used in all the other semaphore calls.
\par
\par }{\b\f0 sdelete}{\f0 releases the specified semaphore, and returns all processes that were blocked to a ready state.
\par
\par }{\b\f0 swait}{\f0 decrements the value of the semaphore (initially specified by }{\i\f0 count}{\f0 ) by 1. If the semaphore count is less than zero, the process is blocked and queued for release by }{\b\f0 ssignal}{\f0 .
\par
\par }{\b\f0 ssignal}{\f0 increments the semaphore count by one. If the semaphore count is less than zero, }{\b\f0 ssignal}{\f0 releases arbitrarily a process that had been blocked; FIFO operation is not guaranteed.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 RETURN VALUE}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 All the functions return SYSERR}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SYSERR}}}{\f0 (-1) if an error occurs, and an OK}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 OK}}}{\f0 (0) if no error occurs.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 BUGS}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 There is currently no mechanism for deallocating semaphores that are orphaned by abnormal process termination.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 HISTORY}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 These semaphore routines were designed for XINU, written by Douglas Comer.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard \nowidctlpar\widctlpar\adjustright {\fs24 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx5040\tqr\tx10080\adjustright \fs20\cgrid {\fs24 SETDEBUG(2)\tab System Calls\tab SETDEBUG(2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 SETDEBUG(2)\tab System Calls\tab SETDEBUG(2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 74}}}{
\par }}{\footerr \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\qr\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 75}}}{
\par }}\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 setdebug - set debugging output options
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 #include <gno/gno.h>
\par
\par int }{\b\f0 setdebug}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 setdebug}}}{\f0 (int }{\i\f0 options}{\f0 );
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 setdebug}{\f0 enables and disables various debugging }{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 debugging }}}{\f0 routines built into the kernel. The routines display useful debugging information to stderr (except for dbgSIG, see BUGS). Debug output is enabled by setting the corresponding bit in options, according to the following table. To turn off all debugging output, options should be set to 0. The various debug options are #defined in <gno/gno.h>.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard \qj\fi-1440\li2160\nowidctlpar\widctlpar\adjustright {\f2\fs24 dbgGSOS}{\pard\plain \qj\fi-1440\li2160\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\fs24 }{\fs24 dbgGSOS}}}{\fs24 \tab prints out the call numbers of any GS/OS or ORCA/shell calls that are made. The number is printed in hexadecimal format and is prefixed with a '$' character. For this and the other GS/OS call debug options, the entire call sequence is enclosed in parenthesis '()' to ease tracing multiple levels of calls.
\par
\par }{\f2\fs24 dbgPATH}{\pard\plain \qj\fi-1440\li2160\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\fs24 }{\fs24 dbgPATH}}}{\fs24 \tab If this flag is set, every time a filename argument to a GS/OS or shell call is fully expanded the expanded version is displayed as follows: "}{\f2\fs24 EP:\~<fullpath>}{\fs24 ".
\par
\par }{\f2\fs24 dbgERROR}{\pard\plain \qj\fi-1440\li2160\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\fs24 }{\fs24 dbgERROR}}}{\fs24 \tab For every GS/OS call that is made, if an error occurs the error code is printed in inverse lettering in hexidecimal format. The code is prefixed with a '#' to distinguish the error code from a call code on terminals that do not support inverse mode. If no error occurs on the call, no code is printed. This option has no effect unless }{\f2\fs24 dbgGSOS}{\fs24 is also enabled.
\par
\par }{\f2\fs24 dbgSIG}{\pard\plain \qj\fi-1440\li2160\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\fs24 }{\fs24 dbgSIG}}}{\fs24 \tab This flag enables signal tracing. Each time a signal is sent, whether by kill(2), job control or keyboard, the signal number and target process is displayed. The format is: "}{\f2\fs24 kill (-signum): pid: tpid}{\fs24 ".
\par
\par }{\f2\fs24 dbgSYSCALL}{\pard\plain \qj\fi-1440\li2160\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\fs24 }{\fs24 dbgSYSCALL}}}{\fs24 \tab The parameter lists to common system calls are displayed by this option flag. The actual format of the output varies from call to call. The calls that currently support this flag are }{\b\fs24 execve}{\pard\plain \qj\fi-1440\li2160\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\fs24 }{\b\fs24 execve}}}{\fs24 (2), }{\b\fs24 fork}{\pard\plain \qj\fi-1440\li2160\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\fs24 }{\b\fs24 fork}}}{\fs24 (2), and the job control routines.
\par
\par }{\f2\fs24 dbgPBLOCK}{\pard\plain \qj\fi-1440\li2160\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\fs24 }{\fs24 dbgPBLOCK}}}{\fs24 \tab The memory address of GS/OS and Shell parameter blocks is printed for each call. As with }{\f2\fs24 dbgERROR}{\fs24 , this option has no effect unless }{\f2\fs24 dbgGSOS}{\fs24 is also enabled.
\par
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\b\fs24 RETURN VALUE}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 setdebug}{\f0 returns the previous value of the debug options word.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SEE ALSO}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 fork}{\f0 (2),}{\b\f0 execve}{\f0 (2),}{\b\f0 ioctl}{\f0 (2),}{\b\f0 kill}{\f0 (2)
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 BUGS}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Due to problems associated with signals that are sent during process termination, }{\f2 dbgSIG}{\f0 prints its information to standard output instead of standard error.
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx5040\tqr\tx10080\adjustright \fs20\cgrid {\fs24 SIGBLOCK(2)\tab System Calls\tab SIGBLOCK(2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {SIGBLOCK(2)\tab System Calls\tab SIGBLOCK(2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 76}}}{
\par }}{\footerr \pard\plain \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul \tab \tab
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\tab \tab \chpgn
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 sigblock,sigmask - temporarily block signals
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 #include <signal.h>
\par
\par long }{\b\f0 sigblock}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 sigblock}}}{\f0 (long }{\i\f0 mask}{\f0 );
\par #define }{\b\f0 sigmask}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 sigmask}}}{\f0 (}{\i\f0 signum}{\f0 )
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 sigblock}{\f0 is used to temporarily block the reception of signals. The input parameter }{\i\f0 mask}{\f0 is a bit vector that specifies which signals are to be blocked; a 1 in a bit n will block signal n+1. The mask is bitwise-ored with the current signal mask to create the new signal mask.
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {\f0
\par }{\b\f0 sigmask}{\f0 is a macro that can be used to calculate signal }{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 signal }}}{\f0 masks for }{\b\f0 sigblock}{\f0 . It takes a signal number (}{\i\f0 signum}{\f0 ) as an argument and returns a mask that can then be passed to }{\b\f0 sigblock}{\f0 .
\par
\par If a signal is sent to a process but is blocked, the event is recorded for later release by }{\b\f0 sigsetmask}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 sigsetmask}}}{\f0 (2). Blocked signals are not stacked; further occurrences of a blocked signal will overwrite any previous pending signal of the same }{\i\f0 signum}{\f0 .
\par
\par It is not possible to block SIGKILL}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGKILL}}}{\f0 , SIGCONT}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGCONT}}}{\f0 , or SIGSTOP}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGSTOP}}}{\f0 . This restriction is silently enforced by the system.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 RETURN VALUE}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 The previous value of the signal mask is returned.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SEE ALSO}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 kill}{\f0 (2), }{\b\f0 sigsetmask}{\f0 (2), }{\b\f0 signal}{\f0 (2)
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx5040\tqr\tx10080\adjustright \fs20\cgrid {\fs24 SIGNAL(2)\tab System Calls\tab SIGNAL(2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 SIGNAL(2)\tab System Calls\tab SIGNAL(2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 78}}}{
\par }}{\footerr \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\qr\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 77}}}{
\par }}\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 signal - a simplified software signal interface
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 #include <signal.h>
\par
\par void (*}{\b\f0 signal}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 signal}}}{\f0 (int }{\i\f0 sig}{\f0 ; void (*}{\i\f0 func}{\f0 (void))(void)
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Signals are a basic form of IPC (inter-process communication), and are generally used to notify a process of some atypical event (although there is little restriction on actual use). For example, signals are sent in each of the following situations: user typing certain chars at a terminal (^C, ^Z, etc.); execution of an invalid instruction; by request of another process (}{\b\f0 kill}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 kill}}}{\f0 ); stack overflow; a process making an input request while running in the background; an attempt to write to a pipe with no reader.
\par
\par Most signals cause termination, unless a handler is installed, or the signal is set to be ignored. Certain signals cannot have their default action modified; the system silently enforces this restriction. The following is a list of signals and default actions (taken from signal.h).
\par
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\tx1440\tx2880\tx3600\adjustright {\f0 \tab SIGHUP}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\tx1440\tx2880\tx3600\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGHUP}}}{\f0 \tab 1\tab hangup
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\tx1440\tx2880\tx3600\adjustright {\f0 \tab SIGINT}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\tx1440\tx2880\tx3600\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGINT}}}{\f0 \tab 2\tab interrupt
\par \tab SIGQUIT}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\tx1440\tx2880\tx3600\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGQUIT}}}{\f0 \tab 3\tab quit
\par \tab SIGILL}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\tx1440\tx2880\tx3600\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGILL}}}{\f0 \tab 4\tab illegal instruction
\par \tab SIGTRAP}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\tx1440\tx2880\tx3600\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGTRAP}}}{\f0 \tab 5\tab trace trap
\par \tab SIGABRT}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\tx1440\tx2880\tx3600\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGABRT}}}{\f0 \tab 6\tab abort (generated by abort(3) routine)
\par \tab SIGEMT}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\tx1440\tx2880\tx3600\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGEMT}}}{\f0 \tab 7\tab emulator trap
\par \tab SIGFPE}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\tx1440\tx2880\tx3600\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGFPE}}}{\f0 \tab 8\tab arithmetic exception
\par \tab SIGKILL}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\tx1440\tx2880\tx3600\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGKILL}}}{\f0 \tab 9\tab kill (cannot be caught, blocked, or ignored)
\par \tab SIGBUS}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\tx1440\tx2880\tx3600\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGBUS}}}{\f0 \tab 10\tab bus error
\par \tab SIGSEGV}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\tx1440\tx2880\tx3600\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGSEGV}}}{\f0 \tab 11\tab segmentation violation
\par \tab SIGSYS}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\tx1440\tx2880\tx3600\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGSYS}}}{\f0 \tab 12\tab bad argument to system call
\par \tab SIGPIPE}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\tx1440\tx2880\tx3600\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGPIPE}}}{\f0 \tab 13\tab write on a pipe or other socket with no one to read it
\par \tab SIGALRM}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\tx1440\tx2880\tx3600\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGALRM}}}{\f0 \tab 14\tab alarm clock
\par \tab SIGTERM}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\tx1440\tx2880\tx3600\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGTERM}}}{\f0 \tab 15\tab software termination signal
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\tx1440\tx2880\tx3600\adjustright {\f0 \tab SIGURG}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\tx1440\tx2880\tx3600\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGURG}}}{\f0 \tab 16@\tab urgent condition present on socket
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\tx1440\tx2880\tx3600\adjustright {\f0 \tab SIGSTOP}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\tx1440\tx2880\tx3600\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGSTOP}}}{\f0 \tab 17 | +\tab stop (cannot be caught, blocked, or ignored)
\par \tab SIGTSTP}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\tx1440\tx2880\tx3600\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGTSTP}}}{\f0 \tab 18 | +\tab stop signal generated from keyboard
\par \tab SIGCONT}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\tx1440\tx2880\tx3600\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGCONT}}}{\f0 \tab 19@\tab continue after stop (cannot be blocked)
\par \tab SIGCHLD}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\tx1440\tx2880\tx3600\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGCHLD}}}{\f0 \tab 20@\tab child status has changed
\par \tab SIGCLD}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\tx1440\tx2880\tx3600\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGCLD}}}{\f0 \tab 20\tab System V name for SIGCHLD
\par \tab SIGTTIN}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\tx1440\tx2880\tx3600\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGTTIN}}}{\f0 \tab 21 | +\tab background read attempted from control terminal
\par \tab SIGTTOU}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\tx1440\tx2880\tx3600\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGTTOU}}}{\f0 \tab 22 | +\tab background write attempted to control terminal
\par \tab SIGIO}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\tx1440\tx2880\tx3600\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGIO}}}{\f0 \tab 23@\tab input/output possible on a file descriptor
\par \tab SIGPOLL}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\tx1440\tx2880\tx3600\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGPOLL}}}{\f0 \tab SIGIO\tab System V name for SIGIO
\par \tab SIGXCPU}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\tx1440\tx2880\tx3600\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGXCPU}}}{\f0 \tab 24\tab exceeded CPU time limit
\par \tab SIGUSR1}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\tx1440\tx2880\tx3600\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGUSR1}}}{\f0 \tab 30\tab user defined signal 1
\par \tab SIGUSR2}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\tx1440\tx2880\tx3600\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGUSR2}}}{\f0 \tab 31\tab user defined signal 2
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {\f0
\par If }{\i\f0 func}{\f0 is SIG_DFL}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIG_DFL}}}{\f0 , the defult action for the signal is reinstalled. This is normally termination if the signal isn't ignored or caught. Signals marked with an @ are discarded, and signals marked with | + cause the process to stop. If }{\i\f0 func}{\f0 is SIG_IGN}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIG_IGN}}}{\f0 , any future occurences of the signal are discarded, as well as any pending instances. Any other value is treated as the address of a handler routine. The system will block further occurences of the signal before the handler is called, and will unblock the signal automatically upon return from the handler. The handler remains installed after return, unlike earlier UNIX signal facilities.
\par
\par If a signal occurs during certain system calls (}{\b\f0 wait}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 wait}}}{\f0 (), and input from a TTY), the call is automatically restarted upon return from the handler.
\par
\par A forked child inherits all signal information, including pending signals and blocking and handler information. }{\b\f0 exec}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 exec}}}{\f0 () and }{\b\f0 execve}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 execve}}}{\f0 () restore all signal information to defaults and purge pending signals.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 NOTES}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 The signal handler should be defined as follows:
\par
\par void }{\b\f0 handler}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 handler}}}{\f0 (int }{\i\f0 sig}{\f0 , int }{\i\f0 code}{\f0 )
\par
\par }{\i\f0 sig}{\f0 is the signal that invoked the handler, and }{\i\f0 code}{\f0 is additional information about the interrupt condition. Currently, }{\i\f0 code}{\f0 is always 0. The handler should probably also be compiled using the #pragma databank 1 directive, in the event the signal handler is not in the same bank as the C global data segment (the handler is called with the data bank equal to the program bank).
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 RETURN VALUE}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 The previous action is returned on a successful call. Otherwise, -1 is returned. }{\f2 [EINVAL]}{\f0 will occur on any of the following conditions:
\par sig specifies an invalid signal number.
\par An attempt is made to ignore or supply a handler for SIGKILL}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGKILL}}}{\f0 or SIGSTOP}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGSTOP}}}{\f0 .
\par An attempt is made to ignore SIGCONT}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGCONT}}}{\f0 (by default SIGCONT}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 SIGCONT}}}{\f0 is ignored).
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 CAVEATS}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 ORCA/C already provides a signal() function, but it doesn't do a whole lot. GNO's signal.h file replaces the one that comes with ORCA.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SEE ALSO}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 execve}{\f0 (2), }{\b\f0 fork}{\f0 (2), }{\b\f0 kill}{\f0 (2), }{\b\f0 sigblock}{\f0 (2), }{\b\f0 sigsetmask}{\f0 (2), }{\b\f0 wait}{\f0 (2), }{\b\f0 tty}{\f0 (4)
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard \nowidctlpar\widctlpar\adjustright {\fs24 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx5040\tqr\tx10080\adjustright \fs20\cgrid {SIGPAUSE(2)\tab System Calls\tab SIGPAUSE(2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 SIGPAUSE(2)\tab System Calls\tab SIGPAUSE(2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul \tab \tab
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\chpgn
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerr \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\qr\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 79}}}{
\par }}\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 sigpause - suspend process until a signal arrives
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 #include <signal.h>
\par int }{\b\f0 sigpause}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 sigpause}}}{\f0 (long int }{\i\f0 mask}{\f0 );
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 sigpause}{\f0 suspends execution of the calling process until a signal arrives. The }{\i\f0 mask}{\f0 parameter is assigned to the set of blocked signals (}{\b\f0 sigsetmask}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 sigsetmask}}}{\f0 ), and then the process is paused. When a signal arrives, the regular signal handler (if any) is executed, and then the original signal mask is restored before returning to the caller. Usually }{\i\f0 mask}{\f0 is 0 (zero) to pause until any signal arrives.
\par
\par }{\b\f0 sigpause}{\f0 is normally used in situations where one must protect a critical section. A typical use begins with sigblock to block a signal (and enable mutual exclusion); variables modified on the occurrence of that signal are then manipulated, code is executed, etc. To end the critical section and wait for more work, sigpuase is called.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 RETURN VALUE}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 sigpause}{\f0 always returns an error (-1) and sets }{\b\f0 errno}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 errno}}}{\f0 to EINTR.
\par
\par }\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 SEE ALSO}{\fs24
\par }\pard\plain \s22\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 signal}{\f0 (2), }{\b\f0 sigblock}{\f0 (2), }{\b\f0 sigsetmask}{\f0 (2)
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard \nowidctlpar\widctlpar\adjustright {\fs24 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx5040\tqr\tx10080\adjustright \fs20\cgrid {\fs24 SIGSETMASK(2)\tab System Calls\tab SIGSETMASK(2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {SIGSETMASK(2)\tab System Calls\tab SIGSETMASK(2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 80}}}{
\par }}{\footerr \pard\plain \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul \tab \tab
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\tab \tab \chpgn
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 sigsetmask - set signal mask
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 #include <signal.h>
\par
\par long }{\b\f0 sigsetmask}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 sigsetmask}}}{\f0 (long }{\i\f0 mask}{\f0 );
\par #define }{\b\f0 sigmask}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 sigmask}}}{\f0 (}{\i\f0 signum}{\f0 )
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 sigsetmask}{\f0 is usually used to restore signal masks after modification by }{\b\f0 sigblock}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 sigblock}}}{\f0 . The parameter mask is the absolute value the process signal mask will be set to (compare to sigblock, which adds the argument to the set of blocked signals).
\par
\par If there are pending instances of signals which become unblocked by the }{\b\f0 sigsetmask}{\f0 call, they are 'released' into the system signal queue and their 'pending' status is cleared. The system signal queue is maintained by the kernel null process, and is used in situations where signals could not normally be sent (such as interrupt handlers).
\par
\par }{\b\f0 sigmask}{\f0 is a macro that can be used to calculate signal masks for }{\b\f0 sigsetmask}{\f0 . It takes a signal number, as listed in }{\b\f0 signal}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 signal}}}{\f0 (2), as an argument and returns a mask corresponding to that signal.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 RETURN VALUE}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 The previous value of the signal mask is returned.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 CAVEATS}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 If somehow the process re-blocks a signal released by }{\b\f0 sigsetmask}{\f0 before the system signal queue processes it, it will be blocked and marked as pending. This can happen if a signal handler makes a }{\b\f0 sigblock}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 sigblock}}}{\f0 call.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SEE ALSO}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 kill}{\f0 (2), }{\b\f0 sigblock}{\f0 (2), }{\b\f0 signal}{\f0 (2)
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard \nowidctlpar\widctlpar\adjustright {\fs24 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx5040\tqr\tx10080\adjustright \fs20\cgrid {\fs24 STAT(2)\tab System Calls\tab STAT(2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 STAT(2)\tab System Calls\tab STAT(2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 82}}}{
\par }}{\footerr \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\qr\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 83}}}{
\par }}\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 stat, fstat, lstat - return status information on indicated files
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 #include <sys/stat.h>
\par
\par int }{\b\f0 stat}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 stat}}}{\f0 (const char *}{\i\f0 filename}{\f0 , struct stat *}{\i\f0 s_buf}{\f0 );
\par int }{\b\f0 fstat}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 fstat}}}{\f0 (int }{\i\f0 filedes}{\f0 , struct stat *}{\i\f0 s_buf}{\f0 );
\par int }{\b\f0 lstat}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 lstat}}}{\f0 (const char *}{\i\f0 filename}{\f0 , struct stat *}{\i\f0 s_buf}{\f0 );
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 These calls are used to retreive status information about files. They do much the same thing as the GS/OS call GetFileInfo, except that they return the information in a format compatible with UNIX's stat calls, and also provide information about pipes and GNO Character Devices.
\par
\par }{\b\f0 stat}{\f0 takes arguments }{\i\f0 filename}{\f0 , a NUL-terminated string naming the file to get information on, and }{\i\f0 s_buf}{\f0 , a pointer to a }{\f2 stat}{\f0 structure, defined in <sys/stat.h>. }{\i\f0 filename}{\f0 can be a partial or a complete path. The miscellaneous types in }{\f2 struct stat}{\f0 , below, are defined in <sys/types.h>, automatically included by stat.h.
\par
\par }\pard \s22\li720\ri-900\nowidctlpar\widctlpar\tx900\tx1890\tx3600\adjustright {\f2\fs20 struct stat}{\pard\plain \s22\li720\ri-900\nowidctlpar\widctlpar\tx900\tx1890\tx3600\adjustright \v\f2\fs20\cgrid {\xe {\v\f2\fs20 }{\f2\fs20 struct stat}}}{\f2\fs20 \{
\par dev_t\tab st_dev;\tab /* ID number of device file resides on */
\par ino_t\tab st_ino;\tab /* inode number of file */
\par unsigned short st_mode;\tab /* type of file and mode */
\par short\tab st_nlink;\tab /* number of links to file = 0 */
\par uid_t\tab st_uid;\tab /* user id = 0 */
\par gid_t\tab st_gid;\tab /* group id = 0 */
\par dev_t\tab st_rdev;\tab /* device type ID */
\par off_t\tab st_size;\tab /* length of file in bytes */
\par time_t}{\f2\fs20 \tab st_atime;\tab /* last access time }{\f2\fs20 (same as mod time on Apple IIGS)}{\f2\fs20 }{\f2\fs20 */
\par int\tab st_spare1;\tab /* reserved */
\par time_t\tab st_mtime;\tab /* last modification time */
\par int\tab st_spare2;\tab /* reserved */
\par time_t\tab st_ctime;\tab /* file creation time */
\par int\tab st_spare3;\tab /* reserved */
\par long\tab st_blksize;\tab /* size in bytes of blocks on filesystem */
\par long\tab st_blocks;\tab /* number of blocks file uses */
\par long\tab st_spare4[2];\tab /* reserved */
\par \};
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {\f0
\par The items marked 'reserved' are not currently used but are reserved for future expansion; do not use these fields for any reason. }{\f2 st_dev}{\f0 is the device number the file resides on. This number is the same as the GS/OS device ID number. }{\f2 st_rdev}{\f0 is not currently used, but may in the future designate a device type code.
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {\f0
\par }{\f2 st_mode}{\f0 is a bit field representing access mode and type of the file. The flags in }{\f2 st_mode}{\f0 are as follows:
\par
\par #define S_IFDIR}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 S_IFDIR}}}{\f0 \tab 0040000\tab /* directory */
\par #define S_IFCHR}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 S_IFCHR}}}{\f0 \tab 0020000\tab /* character special */
\par #define S_IFBLK}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 S_IFBLK}}}{\f0 \tab 0060000\tab /* block special */
\par #define S_IFREG}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 S_IFREG}}}{\f0 \tab 0100000\tab /* regular */
\par #define S_IFLNK}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 S_IFLNK}}}{\f0 \tab 0120000\tab /* symbolic link */
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {\f0 #define S_IFSOCK}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 S_IFSOCK}}}{\f0 \tab 0140000\tab /* socket or pipe */
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {\f0 #define S_IREAD}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 S_IREAD}}}{\f0 \tab 0000400\tab /* read permission, owner */
\par #define S_IWRITE}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 S_IWRITE}}}{\f0 \tab 0000200\tab /* write permission, owner */
\par #define S_IEXEC}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 S_IEXEC}}}{\f0 \tab 0000100\tab /* file is an executable, owner */
\par
\par }{\b\f0 fstat}{\f0 }{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 fstat }}}{\f0 is similar to }{\b\f0 stat}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 stat}}}{\f0 except the argument is an open file descriptor }{\i\f0 filedes}{\f0 . If }{\i\f0 filedes}{\f0 refers to a character device or pipe, the entire }{\f2 s_buf}{\f0 is set to 0 and only }{\f2 st_mode}{\f0 and }{\f2 st_dev}{\f0 are set.
\par
\par }{\b\f0 lstat}{\f0 }{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 lstat }}}{\f0 is similar to }{\b\f0 stat}{\f0 , but if the }{\i\f0 filename}{\f0 is a link then information is returned about the link file instead of the file linked to.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 RETURN VALUE}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 If the call completes without mishap, stat returns a 0. If an error occurs, }{\b\f0 stat}{\f0 returns -1 and sets errno to one of the following:
\par
\par }{\f2 [ENOENT]}{\f0 \tab }{\i\f0 filename}{\f0 does not specify an existing file or directory
\par }{\f2 [ENOTDIR]}{\f0 \tab an element of }{\i\f0 filename}{\f0 is not an expected subdirectory
\par
\par }{\b\f0 fstat}{\f0 can additionally return
\par }{\f2 [EBADF]}{\f0 \tab }{\i\f0 filedes}{\f0 does not refer to an open file descriptor
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 BUGS}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 GNO does not yet support hard or symbolic file links on the IIGS. Therefore, }{\b\f0 lstat}{\f0 operates exactly like stat. But if there's a case where }{\b\f0 lstat}{\f0 might be appropriate at a time when links are supported, then use lstat instead and be ready for the future.
\par
\par }{\b\f0 fstat}{\f0 doesn't do anything clever with all the unused fields in }{\f2 struct stat}{\f0 when its argument is a pipe or terminal.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\f4 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 STATFS(2)\tab System Calls\tab STATFS(2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 STAT}{\fs24 FS}{\fs24 (2)\tab System Calls\tab STAT}{\fs24 FS}{\fs24 (2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 84}}}{
\par }}\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 statfs - get file system}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\f0 file system}}}{\f0 statistics
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 #include <sys/vfs.h>
\par
\par int }{\b\f0 statfs}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 statfs}}}{\f0 (char *}{\i\f0 path}{\f0 , struct statfs *}{\i\f0 buf}{\f0 )
\par int }{\b\f0 fstatfs}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 fstatfs}}}{\f0 (int }{\i\f0 fd}{\f0 , struct statfs *}{\i\f0 buf}{\f0 )
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 statfs}{\f0 returns information about a mounted file system. }{\i\f0 path}{\f0 is the path name of any file within the mounted filesystem. }{\i\f0 Buf}{\f0 is a pointer to a statfs structure defined as follows:
\par
\par }{\f2\fs20 typedef struct \{
\par \tab long\tab val[2];
\par \} fsid_t;
\par
\par struct statfs}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\f2\fs20\cgrid {\xe {\v\f2\fs20 }{\f2\fs20 struct statfs}}}{\f2\fs20 \{
\par \tab long\tab f_type; \tab /* type of info, zero for now */
\par \tab long\tab f_bsize;\tab /* fundamental file system block size */
\par \tab long\tab f_blocks;\tab /* total blocks in file system */
\par \tab long\tab f_bfree;\tab /* free blocks */
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {\f2\fs20 \tab long\tab f_bavail;\tab /* free blocks available to non-superuser */
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {\f2\fs20 \tab long\tab f_files;\tab /* total file nodes in file system */
\par \tab long\tab f_ffree;\tab /* free file nodes in fs */
\par \tab fsid_t f_fsid; \tab /* file system id */
\par \tab long\tab f_spare[7];\tab /* spare for later */
\par \};
\par }{\f0
\par Fields that are undefined for a particular file system are set to -1. }{\b\f0 fstatfs}{\f0 returns the same information about an open file referenced by descriptor }{\i\f0 fd}{\f0 .
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 RETURN VALUE}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 Upon successful completion, a value of 0 is returned. Otherwise, -1 is returned and the global variable }{\b\f0 errno}{\f0 is set to indicate the error.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 ERRORS}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 statfs}{\f0 fails if one or more of the following are true:
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard \qj\fi-1440\li2160\nowidctlpar\widctlpar\adjustright {\f2\fs24 ENOTDIR}{\fs24 \tab A component of the path prefix of }{\i\fs24 path}{\fs24 is not a directory.
\par }{\f2\fs24 EINVAL}{\fs24 \tab }{\i\fs24 path}{\fs24 contains a character with the high-order bit set.
\par }{\f2\fs24 ENAMETOOLONG}{\fs24 \tab The length of a component of }{\i\fs24 path}{\fs24 exceeds 255 characters, or the length of path exceeds 1023 characters.
\par }{\f2\fs24 ENOENT}{\fs24 \tab The file referred to by }{\i\fs24 path}{\fs24 does not exist.
\par }{\f2\fs24 EACCES}{\fs24 \tab Search permission is denied for a component of the path prefix of path.
\par }{\f2\fs24 EIO}{\fs24 \tab An I/O error occurred while reading from or writing to the file system.
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 fstatfs}{\f0 fails if one or both of the following are true:
\par
\par }\pard \s22\qj\fi-1440\li2160\nowidctlpar\widctlpar\adjustright {\f2 EBADF}{\f0 \tab }{\i\f0 fd}{\f0 is not a valid open file descriptor.
\par }{\f2 EIO}{\f0 \tab An I/O error occurred while reading from or writing to the file system.}{\sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 TRUNCATE(2)\tab System Calls\tab TRUNCATE(2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 TRUNCATE(2)\tab System Calls\tab TRUNCATE(2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 86}}}{
\par }}{\footerr \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx9360\adjustright \fs20\cgrid {\ul
\par }\pard \s16\qr\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx9360\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 85}}}{
\par }}\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 truncate, ftruncate - set a file to a specified length
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 #include <sys/types.h>
\par
\par int }{\b\f0 truncate}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 truncate}}}{\f0 (char *}{\i\f0 path}{\f0 , off_t }{\i\f0 length}{\f0 )
\par int }{\b\f0 ftruncate}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 ftruncate}}}{\f0 (int }{\i\f0 fd}{\f0 , off_t }{\i\f0 length}{\f0 )
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 truncate}{\f0 () causes the file referred to by }{\i\f0 path}{\f0 (or for }{\b\f0 ftruncate}{\f0 () the object referred to by }{\i\f0 fd}{\f0 ) to have a size equal to length bytes. If the file was previously longer than 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 }{\b\f0 ftruncate}{\f0 (), the file must be open for writing.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 RETURN VALUES}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 truncate}{\f0 () returns:
\par 0\tab on success.
\par -1\tab on failure and sets }{\b\f0 errno}{\f0 to indicate the error.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\b\fs24 ERRORS}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 truncate}{\f0 () may set }{\b\f0 errno}{\f0 to:
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard \qj\fi-1440\li2160\nowidctlpar\widctlpar\adjustright {\f2\fs24 EACCES}{\fs24 \tab Search permission is denied for a component of the path prefix of }{\i\fs24 path}{\fs24 .
\par \tab Write permission is denied for the file referred to by }{\i\fs24 path}{\fs24 .
\par
\par }{\f2\fs24 EIO}{\fs24 \tab An I/O error occurred while reading from or writing to the file system.
\par
\par }{\f2\fs24 EISDIR}{\fs24 \tab The file referred to by }{\i\fs24 path}{\fs24 is a directory.
\par
\par }{\f2\fs24 ENAMETOOLONG}{\fs24 \tab The length of the }{\i\fs24 path}{\fs24 argument exceeds \{}{\f2\fs24 PATH_MAX}{\fs24 \}.
\par \tab A pathname component is longer than \{}{\f2\fs24 NAME_MAX}{\fs24 \} (see }{\b\fs24 sysconf}{\pard\plain \qj\fi-1440\li2160\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\fs24 }{\b\fs24 sysconf}}}{\fs24 (2V)) while \{}{\f2\fs24 _POSIX_NO_TRUNC}{\fs24 \} is in effect (see pathconf (2V)).
\par
\par }{\f2\fs24 ENOENT}{\fs24 \tab The file referred to by }{\i\fs24 path}{\fs24 does not exist.
\par
\par }{\f2\fs24 ENOTDIR}{\fs24 \tab A component of the path prefix of }{\i\fs24 path}{\fs24 is not a directory.
\par
\par }{\f2\fs24 EROFS}{\fs24 \tab The file referred to by }{\i\fs24 path}{\fs24 resides on a read-only file system.
\par
\par }{\b\fs24 ftruncate}{\fs24 () may set }{\b\fs24 errno}{\fs24 to:
\par
\par }{\f2\fs24 EINVAL}{\fs24 \tab }{\i\fs24 fd}{\fs24 is not a valid descriptor of a file open for writing.
\par \tab }{\i\fs24 fd}{\fs24 refers to a socket, not to a file.
\par
\par }{\f2\fs24 EIO}{\fs24 \tab An I/O error occurred while reading from or writing to the file system.
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\fs24
\par }{\b\fs24 SEE ALSO}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 open}{\f0 (2)
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 BUGS}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 These calls should be generalized to allow ranges of bytes in a file to be discarded.
\par }\pard \s22\qj\fi-1440\li2160\nowidctlpar\widctlpar\adjustright {\f0 \sect }\sectd \marglsxn1080\margrsxn1800\linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 WAIT(2)\tab System Calls\tab WAIT(2)}{\fs24
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 WAIT(2)\tab System Calls\tab WAIT(2)
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\footerl \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 102}}}{
\par }}{\footerr \pard\plain \s16\nowidctlpar\widctlpar\brdrb\brdrs\brdrw30\brsp20 \tqc\tx4320\tqr\tx10080\adjustright \fs20\cgrid {\ul
\par }\pard \s16\qr\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx10080\adjustright {\field{\*\fldinst {\cs18\b PAGE }}{\fldrslt {\cs18\b\lang1024 101}}}{
\par }}\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\fs24 NAME}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 wait, WIFSTOPPED, WIFSIGNALED, WIFEXITED - wait for process to terminate or stop
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SYNOPSIS}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 #include <sys/wait.h>
\par
\par int }{\b\f0 wait}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 wait}}}{\f0 (union wait *}{\i\f0 statusp}{\f0 );
\par }{\b\f0 WIFSTOPPED}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 WIFSTOPPED}}}{\f0 (union wait }{\i\f0 status}{\f0 );
\par }{\b\f0 WIFSIGNALED}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 WIFSIGNALED}}}{\f0 (union wait }{\i\f0 status}{\f0 );
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {\b\f0 WIFEXITED}{\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 WIFEXITED}}}{\f0 (union wait }{\i\f0 status}{\f0 );
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 DESCRIPTION}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 wait}{\f0 blocks the caller until a signal is received or one of its child processes terminates. If any child has died and this has not been reported using wait, return is immediate, returning the process 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 processes that have not been reported by wait, the caller is blocked.
\par
\par If }{\i\f0 status}{\f0 is not a NULL pointer, then on return from a successful }{\b\f0 wait}{\f0 call the status of the child process whose process ID is the return value of wait is stored in the }{\f2 wait union}{\f0 pointed to by status. The wstatus member of that union is an int; it indicates the cause of termination and other information about the terminated process in the following manner:
\par
\par }\pard \s22\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright {\f0 \bullet \tab If the low-order 8 bits of }{\i\f0 wstatus}{\f0 are equal to 0177 (hex 0xFF), the child process has stopped; the high-order 8 bits of }{\i\f0 wstatus}{\f0 contain the number of the signal that caused the process to stop. See }{\b\f0 signal}{\pard\plain \s22\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 signal}}}{\f0 (2).
\par
\par \bullet \tab If the low-order 8 bits of }{\i\f0 wstatus}{\f0 are non-zero and are not equal to 0177, the child process terminated due to a signal; the low-order 7 bits of }{\i\f0 wstatus}{\f0 contain the number of the signal that terminated the process.
\par
\par \bullet \tab Otherwise, the child process terminated due to an }{\b\f0 exit}{\pard\plain \s22\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright \v\cgrid {\xe {\v\f0 }{\b\f0 exit}}}{\f0 () call; the high-order 8 bits of wstatus contain the low-order 8 bits of the argument that the child process passed to }{\b\f0 exit}{\f0 or GS/OS Quit.
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {\f0
\par Other members of the }{\f2 wait union}{\f0 can be used to extract this information more conveniently:
\par
\par }\pard \s22\qj\fi-720\li1440\nowidctlpar\widctlpar\adjustright {\f0 \bullet \tab If the }{\f2 wstopval}{\f0 member has the value }{\f2 WSTOPPED}{\f0 , the child process has stopped; the value of the }{\f2 wstopsig}{\f0 member is the signal that stopped the process.
\par
\par \bullet \tab If the }{\f2 wtermsig}{\f0 member is non-zero, the child process terminated due to a signal; the value of the }{\f2 wtermsig}{\f0 member is the number of the signal that terminated the process.
\par
\par \bullet \tab Otherwise, the child process terminated due to an }{\b\f0 exit}{\f0 () call; the value of the }{\f2 wretcode}{\f0 member is the low-order 8 bits of the argument that the child process passed to }{\b\f0 exit}{\f0 ().
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {\f0
\par The other members of the }{\f2 wait union}{\f0 merely provide an alternate way of analyzing the status. The value stored in the }{\f2 wstatus}{\f0 field is compatible with the values stored by versions of the UNIX system, and an argument of type}{\f2 int *}{\f0 may be provided instead of an argument of type }{\f2 union wait *}{\f0 for compatibility with those versions.
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {\f0
\par }{\b\f0 WIFSTOPPED}{\f0 , }{\b\f0 WIFSIGNALED}{\f0 , }{\b\f0 WIFEXITED}{\f0 , are macros that take an argument }{\i\f0 status}{\f0 , of type `}{\f2 union wait}{\f0 ', as returned by }{\b\f0 wait}{\f0 (). }{\b\f0 WIFSTOPPED}{\f0 evaluates to true (1) when the process for which the }{\b\f0 wait}{\f0 call was made is stopped, or to false (0) otherwise. }{\b\f0 WIFSIGNALED}{\f0 evaluates to true when the process was terminated with a signal. }{\b\f0 WIFEXITED}{\f0 evaluates to true when the process exited by using an }{\b\f0 exit}{\f0 (2) call.
\par
\par If }{\b\f0 wait}{\f0 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\f0 errno}{\f0 is set to indicate the error.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 ERRORS}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 wait will fail and return immediately if one or more of the following are true:
\par
\par }{\f2 [ECHILD]}{\f0 \tab The calling process has no existing unwaited-for child processes.
\par }{\f2 [EFAULT]}{\f0 \tab The status or rusage arguments point to an illegal address.
\par }{\f2 [EINTR]}{\f0 \tab The wait call was interrupted by a caught signal.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 SEE ALSO}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f0 signal}{\f0 (2), }{\b\f0 exit}{\f0 (3), }{\b\f0 rexit}{\f0 (3), }{\b\f0 execve}{\f0 (2)
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }{\b\fs24 NOTES}{\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 If a parent process terminates without waiting on its children, the Kernel Null Process (process ID = 0) inherits the children.
\par
\par }{\b\f0 wait}{\f0 is automatically restarted when a process receives a signal while awaiting termination of a child process, if the signal is not caught; i.e. }{\b\f0 signal}{\f0 () handler value is SIG_DFL or SIG_IGN.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\fs24
\par }\pard\plain \s22\qj\fi-1440\li2160\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 \sect }\sectd \marglsxn1080\margrsxn1800\linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 LIBC(3)\tab Device Drivers\tab LIBC(3)}{\fs24
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 LIBC(3)\tab Device Drivers\tab LIBC(3)}{\fs24
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\f6 GSString255Ptr }{\b\f6 __C2GSMALLOC}{\f6 (char *}{\i\f6 s}{\f6 )
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\f4\fs24 Converts a C-style string to a Class 1 GS/OS string, allocating space for the GS/OS string from C's malloc() routine. You must specifically deallocate the string with free() when you're through with it.
\par }{\f4
\par }{\f6 char *}{\b\f6 __GS2CMALLOC}{\f6 (GSString255Ptr }{\i\f6 g}{\f6 )
\par }{\f4\fs24 Converts a Class 1 GS/OS string to a C-style string, allocating space for the C string from C's malloc() routine. You must specifically deallocate the string with free() when you're through with it.
\par
\par }{\f6 char *}{\b\f6 __GS2C}{\f6 (char *}{\i\f6 s}{\f6 , GSString255Ptr }{\i\f6 g}{\f6 )
\par }{\f4\fs24 Converts a Class 1 GS/OS string to a C string; the buffer space for the C string must be allocated beforehand by the caller. The return value is the address of the C string passed as argument s.
\par
\par }{\f6 int }{\b\f6 _mapErr}{\f6 (int }{\i\f6 err}{\f6 )}{\f6\fs24
\par }{\f4\fs24 Tries to map a GS/OS error code (err) to a UNIX errno code (return value). If there is no direct mapping, EIO is returned.
\par
\par }{\b\f4\fs24 access}{\f4\fs24
\par
\par }{\f6 #include <unistd.h>
\par int }{\b\f6 access}{\f6 (char *}{\i\f6 name}{\f6 , int }{\i\f6 mode}{\f6 )
\par }{\f4\fs24
\par Returns TRUE (1) if the file specified by }{\i\f4\fs24 name}{\f4\fs24 can be acessed according to }{\i\f4\fs24 mode}{\f4\fs24 by the calling process. Values of mode are declared in <unistd.h> and are as follows:
\par }\pard \qj\li720\nowidctlpar\widctlpar\adjustright {\f4\fs24 F_OK - returns true if the file exists
\par X_OK - returns true if the process has execution permissions for the file
\par W_OK - returns true if the process has write permissions for the file
\par R_OK - returns true if the process has read permissions for the file
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\f4\fs24
\par }{\b\f4\fs24 bcopy bzero}{\f4\fs24
\par
\par }{\f6 #include <string.h>
\par void }{\b\f6 bcopy}{\f6 (char *}{\i\f6 b1}{\f6 , char *}{\i\f6 b2}{\f6 , size_t }{\i\f6 n}{\f6 )
\par void }{\b\f6 bzero}{\f6 (char *}{\i\f6 buf}{\f6 , size_t }{\i\f6 n}{\f6 )
\par }{\f4\fs24
\par }{\b\f4\fs24 bcopy}{\f4\fs24 () copies }{\i\f4\fs24 n}{\f4\fs24 bytes from memory address }{\i\f4\fs24 b1}{\f4\fs24 to memory address }{\i\f4\fs24 b2}{\f4\fs24 . }{\b\f4\fs24 bcopy}{\f4\fs24 () is functionally similar to }{\b\f4\fs24 memcpy}{\f4\fs24 (), except that bcopy copies from the first argument to the second argument, whereas }{\b\f4\fs24 memcpy}{\f4\fs24 () copies from the second argument to the first argument. If the memory areas overlap, the results are unpredictable. }{\b\f4\fs24 bcopy}{\f4\fs24 () is provided for compatibility with BSD source code.
\par
\par }{\b\f4\fs24 bzero}{\f4\fs24 () clears n bytes of memory starting at }{\i\f4\fs24 buf}{\f4\fs24 to 0 (zero). This call is functionally equivalent to }{\b\f4\fs24 memset}{\f4\fs24 (buf,0,n) and is included for BSD source code compatibilty.
\par See Also: }{\b\f4\fs24 memcpy}{\f4\fs24 , }{\b\f4\fs24 memset}{\f4\fs24 , }{\i\f4\fs24 ORCA/C 2.0 Manual}{\f4\fs24
\par }{\f4\fs24
\par
\par
\par }{\f4\fs24
\par }{\b\f4\fs24 chdir}{\f4\fs24
\par
\par }{\f6 #include <unistd.h>
\par int }{\b\f6 chdir}{\f6 (const char *}{\i\f6 pathname}{\f6 )}{\f4
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\f4\fs24 Changes the current working directory (GS/OS prefix 0) to the pathname specified by }{\i\f4\fs24 pathname}{\f4\fs24 . If an error occurs changing the prefix, -1 is returned and the error code is placed in }{\b\f4\fs24 errno}{\f4\fs24 .
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\f4\fs24
\par }{\b\f4\fs24 crypt}{\f4\fs24
\par
\par }{\f6 char *}{\b\f6 crypt}{\f6 (char *}{\i\f6 pw}{\f6 ,char *}{\i\f6 salt}{\f6 )
\par }{\f4\fs24
\par }{\b\f4\fs24 crypt}{\f4\fs24 is used to encrypt passwords for storage in the /etc/passwd file, and also to validate passwords entered in the login and passwd programs. }{\i\f4\fs24 pw}{\f4\fs24 is the password to encrypt, a NUL- terminated string. }{\i\f4\fs24 salt}{\f4\fs24 is a two- character encryption key that should be randomly generated by the caller in the case of encrypting a new password, or should be taken as the first two characters of the /etc/passwd password entry in the case of validating a password.
\par
\par }{\b\f4\fs24 crypt}{\f4\fs24 returns a pointer to the encrypted password, which is formatted as printable ASCII characters and is NUL terminated. A static buffer is used to hold the result, so to be sure the encrypted password is not overwritten by a subsequent call to }{\b\f4\fs24 crypt}{\f4\fs24 copy it before use.
\par See also: }{\b\f4\fs24 getpass}{\f4\fs24 , }{\b\f4\fs24 getpwent}{\f4\fs24
\par
\par }{\b\f4\fs24 errno strerror perror}{\f4\fs24
\par
\par }{\f6 char *}{\b\f6 strerror}{\f6 (int }{\i\f6 errnum}{\f6 )
\par void }{\b\f6 perror}{\f6 (char *}{\i\f6 s}{\f6 )
\par extern int }{\b\f6 errno}{\f6 ;
\par }{\f4\fs24
\par These routines are as documented in the ORCA/C manual, except that they support the full range of GNO's errno codes. }{\b\f4\fs24 errno}{\f4\fs24 is the variable that most library and kernel calls place their return status in. The codes are defined symbolically in <errno.h> and are listed here:
\par \tab EDOM\tab domain error
\par \tab ERANGE\tab number too large, too small, or illegal
\par \tab ENOMEM\tab Not enough memory
\par \tab ENOENT\tab No such file or directory
\par \tab EIO\tab \tab I/O error
\par \tab EINVAL\tab Invalid argument
\par \tab EBADF\tab bad file descriptor
\par \tab EMFILE\tab too many files are open
\par \tab EACCESS\tab access bits prevent the operation
\par \tab EEXIST\tab the file exists
\par \tab ENOSPC\tab the file is too large
\par \tab EPERM\tab Not owner
\par \tab ESRCH\tab No such process
\par \tab EINTR\tab Interrupted system call
\par \tab E2BIG\tab Arg list too long
\par \tab ENOEXEC\tab Exec format error
\par \tab ECHILD\tab No children
\par \tab EAGAIN\tab No more processes
\par \tab ENOTDIR\tab Not a directory
\par \tab ENOTTY\tab Not a terminal
\par \tab EPIPE\tab Broken pipe
\par \tab ESPIPE\tab Illegal seek
\par \tab ENOTBLK\tab not a block device
\par \tab EISDIR\tab not a plain file
\par
\par }{\b\f4\fs24 fsync}{\f4\fs24
\par
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\f6 int }{\b\f6 fsync}{\f6 (int }{\i\f6 fd}{\f6 )}{\f6\fs24
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\f4\fs24
\par Causes the operating system to flush any I/O buffers associated with the file referenced by file descriptor fd to disk. This ensures that all information is up to date, in the event of a system crash. This call is only needed in special circumstances, as when several daemon processes are all modifying the same file simultaneously (currently impossible with existing IIGS filesystems). This call is basically a }{\b\f4\fs24 FlushGS}{\f4\fs24 .
\par
\par }{\b\f4\fs24 ftruncate}{\f4\fs24
\par
\par }{\f6 int }{\b\f6 ftruncate}{\f6 (int }{\i\f6 fd}{\f6 , off_t }{\i\f6 length}{\f6 )}{\f6\fs24
\par }{\f4\fs24
\par Causes the EOF marker for the file specified by file descriptor }{\i\f4\fs24 fd}{\f4\fs24 to be set to length. In the event of an error, ftruncate returns -1 and sets errno.
\par
\par }{\b\f4\fs24 getgrnam getgrgid getgrent setgrent setgroupent endgrent}{\f4\fs24
\par
\par }{\f6 #include <sys/types.h>
\par #include <grp.h>
\par struct group *}{\b\f6 getgrnam}{\f6 (const char *}{\i\f6 name}{\f6 );
\par struct group *}{\b\f6 getgrgid}{\f6 (gid_t }{\i\f6 gid}{\f6 );
\par struct group *}{\b\f6 getgrent}{\f6 (void);
\par int }{\b\f6 setgrent}{\f6 (void);
\par int }{\b\f6 setgroupent}{\f6 (int }{\i\f6 stayopen}{\f6 );
\par void }{\b\f6 endgrent}{\f6 (void);
\par }{\f4\fs24 (POSIX)
\par
\par This family of functions should be used to access the groups database; applications should never read /etc/groups directly, as the implementation of the groups database is subject to change.
\par
\par }{\b\f4\fs24 getgrnam}{\f4\fs24 () reads the group database based on group name. It looks up the supplied group name and returns a pointer to a struct group (see below), or NULL on an error.
\par
\par }{\b\f4\fs24 getgrgid}{\f4\fs24 () is similar to }{\b\f4\fs24 getgrnam}{\f4\fs24 (), except that instead of looking up group information based on group name, a group ID is passed.
\par
\par To scan the groups database linearly, start the scan with either }{\b\f4\fs24 setgrent}{\f4\fs24 () or }{\b\f4\fs24 setgroupent}{\f4\fs24 (). The two functions are identical for pure scanning operations, but have different behavior when mixing scan calls with }{\b\f4\fs24 getgrnam}{\f4\fs24 () or }{\b\f4\fs24 getgrgid}{\f4\fs24 ().
\par
\par After calling }{\b\f4\fs24 setgrent}{\f4\fs24 or }{\b\f4\fs24 setgroupent}{\f4\fs24 , the scan is set to the first entry in the database. }{\b\f4\fs24 getgrent}{\f4\fs24 returns a pointer to the current entry and moves the scan to the next entry. In the event of an error, }{\b\f4\fs24 getgrent}{\f4\fs24 returns NULL. When the program is done with the database, }{\b\f4\fs24 endgrent}{\f4\fs24 should be called.}{\f4\fs24
\par }{\f4\fs24
\par If }{\b\f4\fs24 getgrnam}{\f4\fs24 or }{\b\f4\fs24 getgrgid}{\f4\fs24 is called while scanning the group database, the database will be closed unless it was opened by calling setgroupent with an argument of 1. This indicates "keep open" mode, and allows fast random access of the database with the }{\b\f4\fs24 getgrnam}{\f4\fs24 and getgrgid functions (which would otherwise open and close the database for every call).
\par
\par }{\b\f4\fs24 getopt getopt_restart}{\f4\fs24
\par
\par }{\f6 #include <getopt.h>
\par int }{\b\f6 getopt}{\f6 (int }{\i\f6 argc}{\f6 , char * const *}{\i\f6 argv}{\f6 , const char *}{\i\f6 optstring}{\f6 )
\par int }{\b\f6 getopt_restart}{\f6 (void)
\par extern char *}{\b\f6 optarg}{\f6 ;
\par extern int }{\b\f6 optind}{\f6 ;
\par }{\f4\fs24
\par }{\b\f4\fs24 Getopt}{\f4\fs24 helps parse command line options as are often used by UNIX utilities. It handles simple flags (such as "ls -l") and also flags with arguments ("cc -o prog prog.c").
\par
\par }{\b\f4\fs24 Getopt}{\f4\fs24 returns the next option letter in argv that matches a letter in optstring. }{\i\f4\fs24 Optstring}{\f4\fs24 is a string of recognized option letters; if a letter is followed by a colon, the option is expected to have an argument that may or may not be separated from it by white space. }{\b\f4\fs24 Optarg}{\f4\fs24 is set to point to the start of the option argument on return from getopt.
\par
\par }{\b\f4\fs24 Getopt}{\f4\fs24 places in }{\b\f4\fs24 optind}{\f4\fs24 the argv index of the next argument to be processed. Because }{\b\f4\fs24 optind}{\f4\fs24 is external, it is normally initialized to zero automatically before the first call to }{\b\f4\fs24 getopt}{\f4\fs24 .
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\f4\fs24
\par When all options have been processed (i.e., up to the first non-option argument), getopt returns EOF. The special option -- may be used to delimit the end of the options; EOF will be returned, and -- will be skipped.
\par
\par }{\b\f4\fs24 Getopt}{\f4\fs24 prints an error message on stderr and returns a question mark (?) when it encounters an option letter not included in }{\i\f4\fs24 optstring}{\f4\fs24 .
\par
\par The following code fragment shows how one might process the arguments for a command that can take the mutually exclusive options a and b, and the options f and o, both of which require arguments:
\par
\par }{\f6\fs24 \tab }{\f6 main(int argc, char **argv)
\par \tab \{
\par \tab int c;
\par \tab extern int optind;
\par \tab extern char *optarg;
\par
\par \tab while ((c = getopt(argc, argv, "abf:o:")) != EOF)
\par \tab \tab switch (c) \{
\par \tab \tab case `a':
\par \tab \tab \tab if (bflg)
\par \tab \tab \tab errflg++;
\par \tab \tab \tab else
\par \tab \tab \tab aflg++;
\par \tab \tab \tab break;
\par \tab \tab case `b':
\par \tab \tab \tab if (aflg)
\par \tab \tab \tab errflg++;
\par \tab \tab \tab else
\par \tab \tab \tab bproc();
\par \tab \tab \tab break;
\par \tab \tab case `f':
\par \tab \tab \tab ifile = optarg;
\par \tab \tab \tab break;
\par \tab \tab case `o':
\par \tab \tab \tab ofile = optarg;
\par \tab \tab \tab break;
\par \tab \tab case `?':
\par \tab \tab default:
\par \tab \tab \tab errflg++;
\par \tab \tab \tab break;
\par \tab \tab \}
\par \tab if (errflg) \{
\par \tab \tab fprintf(stderr, "Usage: ...");
\par \tab \tab exit(2);
\par \tab \}
\par \tab for (; optind < argc; optind++) \{
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\f6 \tab \tab .
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\f6 \}
\par \tab .
\par \tab \}
\par }{\f4\fs24
\par It is not obvious how `-' standing alone should be treated; this version treats it as a non-option argument, which is not always right. Option arguments are allowed to begin with `-'; this is reasonable but reduces the amount of error checking possible.
\par
\par }{\b\f4\fs24 getopt_restart}{\f4\fs24 should be used in restartable programs, before the first call to }{\b\f4\fs24 getopt}{\f4\fs24 , to reinitialize the }{\b\f4\fs24 optind}{\f4\fs24 and }{\b\f4\fs24 optarg}{\f4\fs24 variables.
\par
\par }{\b\f4\fs24 getpass}{\f4\fs24
\par
\par }{\f6 char *}{\b\f6 getpass}{\f6 (const char *}{\i\f6 prompt}{\f6 )
\par }{\f4\fs24 BSD
\par
\par Prompts the user for a password, and returns a pointer to a NUL-terminated string which contains the password the user typed. A password may be up to 8 characters long, and if the string the user
\par types is longer than that the returned string is truncated to 8 characters. Argument }{\i\f4\fs24 prompt}{\f4\fs24 is the string to print before requesting input. Input characters are obscured - that is, not echoed - as the user types them. The backspace and delete keys may be used to edit input, although in practice this is difficult to use because the user cannot see what he types.
\par
\par A static buffer is used to to hold the password, so to be sure the password is not overwritten by a subsequent call to getpass, copy it before use.
\par See also: }{\b\f4\fs24 crypt}{\f4\fs24 , }{\b\f4\fs24 getpwent}{\f4\fs24
\par
\par }{\b\f4\fs24 getpwnam getpwuid endpwent setpwent}{\f4\fs24
\par
\par }{\f6 #include <pwd.h>
\par struct passwd *}{\b\f6 getpwnam}{\f6 (const char *}{\i\f6 name}{\f6 );
\par struct passwd *}{\b\f6 getpwuid}{\f6 (uid_t }{\i\f6 uid}{\f6 );
\par void }{\b\f6 endpwent}{\f6 (void);
\par struct passwd *}{\b\f6 getpwent}{\f6 (void);
\par int }{\b\f6 setpwent}{\f6 (void);
\par }{\f4\fs24
\par The family of functions defined in <pwd.h> are used for accessing the /etc/passwd user database. Programs should never access this database directly, as the file format or other implementation details may change in the future.
\par
\par }{\b\f4\fs24 getpwnam}{\f4\fs24 () reads the user database based on user name. The argument }{\i\f4\fs24 name}{\f4\fs24 is a pointer to the user name to lookup. }{\b\f4\fs24 getpwnam}{\f4\fs24 () returns a pointer to a passwd structure or NULL on an error.
\par
\par }{\b\f4\fs24 getpwuid}{\f4\fs24 () reads the user database based on a user ID code. Argument }{\i\f4\fs24 uid}{\f4\fs24 is the user ID to return information on. }{\b\f4\fs24 getpwuid}{\f4\fs24 () returns a pointer to a passwd structure or NULL on an error.
\par
\par The remaining three functions are used for scanning the user database. The database is initialized by using the }{\b\f4\fs24 setpwent}{\f4\fs24 () function; an internal access marker is set to the first entry in the database.
\par
\par }{\b\f4\fs24 getpwent}{\f4\fs24 () is used to retrieve the current entry, returning a pointer to a passwd structure, and moving the marker to the next entry. If there are no more entries to scan, }{\b\f4\fs24 getpwent}{\f4\fs24 () returns a NULL pointer. If the database should be scanned again, }{\b\f4\fs24 setpwent}{\f4\fs24 () may be called again to reset the marker to the first entry. In the event of an error accessing the database, NULL is returned.
\par
\par When the application is through with the database, it should call endpwent().
\par
\par }{\f6 struct\tab passwd \{ /* see getpwent(3) */
\par \tab char\tab *pw_name;\tab \tab /* pointer to user name */
\par \tab char\tab *pw_passwd;\tab \tab /* pointer to encrypted password */
\par \tab int\tab pw_uid;\tab \tab /* user ID */
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\f6 \tab int\tab pw_gid;\tab \tab /* group ID */
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\f6 \tab int\tab pw_quota;\tab \tab /* 'quota' field - not used */
\par \tab char\tab *pw_comment;\tab /* pointer Comment field */
\par \tab char\tab *pw_gecos;\tab \tab /* not used */
\par \tab char\tab *pw_dir;\tab \tab /* pointer to user's '$home' directory name */
\par \tab char\tab *pw_shell;\tab \tab /* pointer to path of user's login shell */
\par \};
\par }{\f4\fs24
\par Not all of the string entries in struct passwd are used in GNO/ME, but those that are are all NUL- terminated strings.
\par
\par }{\b\f4\fs24 getwd}{\f4\fs24
\par
\par }{\f6 #include <unistd.h>
\par char *}{\b\f6 getwd}{\f6 (char *}{\i\f6 pathname}{\f6 )
\par }{\f4\fs24
\par Gets the current working directory (GS/OS prefix 0) and copies it to the string space pointed to by }{\i\f4\fs24 pathname}{\f4\fs24 . }{\i\f4\fs24 pathname}{\f4\fs24 must point to a buffer large enough to hold the largest conceivable pathname. In practice, a 256 byte buffer works well, but with the plethora of GS/OS file systems now available 256 may be much too small. Due to this problem, we recommend you use }{\b\f4\fs24 getwd}{\f4\fs24 carefully, and with a future GNO release switch to getcwd (not yet available).
\par If an error occurs during the operation, }{\b\f4\fs24 getwd}{\f4\fs24 returns NULL and places the error code in }{\b\f4\fs24 errno}{\f4\fs24 . Otherwise, }{\b\f4\fs24 getwd}{\f4\fs24 returns the prefix in }{\i\f4\fs24 pathname}{\f4\fs24 .
\par
\par }{\b\f4\fs24 gtty stty}{\f4\fs24
\par
\par }{\f6 #include <sgtty.h>
\par int }{\b\f6 gtty}{\f6 (int }{\i\f6 filedes}{\f6 , struct sgttyb *}{\i\f6 argp}{\f6 )
\par int }{\b\f6 stty}{\f6 (int }{\i\f6 filedes}{\f6 , struct sgttyb *}{\i\f6 argp}{\f6 )
\par }{\f4\fs24
\par Set and get TTY status information in the sgttyb structures pointed to by the argument argp. See }{\b\f4\fs24 ioctl}{\f4\fs24 (2) and }{\b\f4\fs24 tty}{\f4\fs24 (4) for more details. These routines are basically short-cuts to
\par ioctl(filedes, TIOCSETP, &structure) and ioctl(filedes, TIOCGETP, &structure).
\par
\par }{\b\f4\fs24 index rindex}{\f4\fs24
\par
\par }{\f6 char *}{\b\f6 index}{\f6 (char *}{\i\f6 a}{\f6 , int }{\i\f6 b}{\f6 )
\par char *}{\b\f6 rindex}{\f6 (char *}{\i\f6 a}{\f6 , int }{\i\f6 b}{\f6 )
\par }{\f4\fs24 (BSD)
\par
\par These functions are identical to }{\b\f4\fs24 strchr}{\f4\fs24 () and }{\b\f4\fs24 strrchr}{\f4\fs24 (), respectively. See your C compiler manual for more information. These functions are provided only for compatibility with BSD source code.
\par }{\b\f4\fs24
\par isatty}{\f4\fs24
\par
\par }{\f6 #include <sgtty.h>
\par int }{\b\f6 isatty}{\f6 (int }{\i\f6 filedes}{\f6 )}{\f6\fs24
\par }{\f4\fs24
\par This function returns true (1) if the file descriptor refers to a TTY (this includes PTYs) file. For all other types of descriptors, false (0) is returned.
\par
\par }{\b\f4\fs24 login}{\f4\fs24
\par
\par }{\f6 #include <utmp.h>
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\f6 void }{\b\f6 login}{\f6 (struct utmp *}{\i\f6 ut}{\f6 )
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\f4\fs24
\par Writes the /etc/utmp structure pointed to by ut to the utmp file. The slot in /etc/utmp actually written to depends on the return value of the }{\b\f4\fs24 ttyslot}{\f4\fs24 () function, which maps each tty device to a unique slot number, based on the contents of /etc/ttys.
\par
\par This function should not generally be used by application code.
\par
\par }{\b\f4\fs24 mkdir}{\f4\fs24
\par
\par }{\f6 int }{\b\f6 mkdir}{\f6 (char *}{\i\f6 dirname}{\f6 )
\par }{\f4\fs24
\par Creates a subdirectory (folder) with the name specified by dirname. Similar to the shell }{\b\f4\fs24 'mkdir'}{\f4\fs24 command.
\par
\par }{\b\f4\fs24 mktemp mkstemp}{\f4\fs24
\par
\par }{\f6 char *}{\b\f6 mktemp}{\f6 (char *}{\i\f6 path}{\f6 )
\par int }{\b\f6 mkstemp}{\f6 (char *}{\i\f6 path}{\f6 )
\par }{\f4\fs24
\par Creates a filename based on the string path that is guaranteed to be unique. The string path must have the following format:
\par
\par "/volume/dir1/.../dirX/fileXXXXXX" (Colons are also accepted as delimiters)
\par
\par The 'XXXXX' at the end of path is filler space that will be replaced with a string that will make path a unique filename.
\par
\par The unique string is generated by using the current process ID and a single character ASCII value; this may change in the future, and as such this behavior should not be relied upon.
\par
\par }{\b\f4\fs24 mktemp}{\f4\fs24 () does not actually create any files, as compared with }{\b\f4\fs24 tmpfile}{\f4\fs24 () in the C library.
\par
\par }{\b\f4\fs24 mkstemp}{\f4\fs24 () does create a file by calling }{\b\f4\fs24 open}{\f4\fs24 () on a unique pathname generated with }{\b\f4\fs24 mktemp}{\f4\fs24 ().
\par
\par }{\b\f4\fs24 mktemp}{\f4\fs24 () returns a pointer to the new pathname (}{\i\f4\fs24 path}{\f4\fs24 ), and }{\b\f4\fs24 mkstemp}{\f4\fs24 () returns a file descriptor to the new file, as would be returned by }{\b\f4\fs24 open}{\f4\fs24 ().
\par
\par }{\b\f4\fs24 open creat close read write lseek}{\f4\fs24
\par
\par }{\f6 #include <fcntl.h>
\par int }{\b\f6 creat}{\f6 (const char *}{\i\f6 path}{\f6 , int }{\i\f6 mode}{\f6 )
\par int }{\b\f6 open}{\f6 (const char *}{\i\f6 path}{\f6 , int }{\i\f6 oflag}{\f6 , ...)
\par int }{\b\f6 close}{\f6 (int }{\i\f6 filds}{\f6 )
\par int }{\b\f6 read}{\f6 (int }{\i\f6 filds}{\f6 , void *}{\i\f6 buf}{\f6 , size_t }{\i\f6 count}{\f6 )
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\f6 int }{\b\f6 write}{\f6 (int }{\i\f6 filds}{\f6 , void *}{\i\f6 buf}{\f6 , size_t }{\i\f6 count}{\f6 )
\par long }{\b\f6 lseek}{\f6 (int }{\i\f6 filds}{\f6 , long }{\i\f6 offset}{\f6 , int }{\i\f6 whence}{\f6 )
\par }{\f4\fs24
\par These are similar to the low-level I/O routines provided by ORCA/C. However, the GNO versions of these routines deal with actual GS/OS refNums for filds. (ORCA/C's versions use a special library-maintained definition of file descriptor in order to fake the UNIX }{\b\f4\fs24 dup}{\f4\fs24 () system call. Here they revert to standard UNIX usage because GNO provides a real }{\b\f4\fs24 dup}{\f4\fs24 (2) handled within the kernel).
\par
\par }{\b\f4\fs24 open}{\f4\fs24 () uses vararg (variable argument) parameters. The third parameter is only expected (and is required) if O_CREAT is one of the flags specified in '}{\i\f4\fs24 mode}{\f4\fs24 ', and specifies the access permissions to be given the new file.
\par
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\f4\fs24 IMPORTANT NOTE: GNO's }{\b\f4\fs24 read}{\f4\fs24 ()/}{\b\f4\fs24 write}{\f4\fs24 () functions take a size_t count, whereas ORCA's only take unsigned count. When recompiling code with the new GNO libraries, make very certain that any programs that use }{\b\f4\fs24 read}{\f4\fs24 ()/}{\b\f4\fs24 write}{\f4\fs24 () do a #include <fcntl.h>, or it is likely that your programs will crash.
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\f4\fs24
\par }{\b\f4\fs24 opendir readdir rewinddir closedir}{\b\f4\fs24
\par }{\f4\fs24
\par }{\f6 #include <dirent.h>
\par DIR *}{\b\f6 opendir}{\f6 (char *}{\i\f6 filename}{\f6 )
\par struct }{\b\f6 dirent}{\f6 *readdir(DIR *}{\i\f6 dirp}{\f6 )
\par void }{\b\f6 rewinddir}{\f6 (DIR *}{\i\f6 dirp}{\f6 )
\par }{\b\f6 closedir}{\f6 (DIR *}{\i\f6 dirp}{\f6 )}{\f6\fs24
\par }{\f4\fs24 (POSIX 1)
\par
\par This family of functions provides a machine-independent way to read a list of files (and information about them) from directories.
\par
\par }{\b\f4\fs24 opendir}{\f4\fs24 () opens the directory specified by filename and prepares it for the scan operation. }{\b\f4\fs24 opendir}{\f4\fs24 () returns a pointer to a structure which is used in the other dirent calls.
\par
\par }{\b\f4\fs24 readdir}{\f4\fs24 () takes a DIR * as argument and returns information about the next file in the directory. The return value is a pointer to a dirent structure (described below).
\par
\par If you wish to scan the directory again without closing and then reopening the directory, use }{\b\f4\fs24 rewinddir}{\f4\fs24 (). It resets the scan to the beginning of the directory.
\par
\par When finished with the directory, call }{\b\f4\fs24 closedir}{\f4\fs24 ().
\par
\par }{\f6 #define MAXNAMLEN 32\tab /* maximum filename length */
\par
\par struct dirent\tab \tab /* data from getdents()/readdir() */
\par \{
\par long d_ino;\tab /* inode number of entry */
\par off_t d_off;\tab /* offset of disk directory entry */
\par unsigned short d_reclen;\tab /* length of this record */
\par char d_name[MAXNAMLEN];\tab /* name of file */
\par unsigned short d_namlen;\tab /* length of filename */
\par \};
\par }{\f4\fs24
\par dirent is the structure returned by }{\b\f4\fs24 readdir}{\f4\fs24 () that contains information about the file. }{\b\f4\fs24 d_ino}{\f4\fs24 is not used on the Apple IIGS because neither ProDOS nor HFS have the concept of an "inode", but to simulate its use a unique d_ino value is returned for each }{\b\f4\fs24 readdir}{\f4\fs24 () call. }{\b\f4\fs24 d_off}{\f4\fs24 is the offset in the directory of the current file; the first entry is number 1, the second 2, etc. }{\b\f4\fs24 d_reclen}{\f4\fs24 specifies the length of the entire dirent structure. }{\b\f4\fs24 d_name}{\f4\fs24 is a short array containing the filename of the current file read from the directory. d_namlen is the length of the string in }{\b\f4\fs24 d_name}{\f4\fs24 .
\par
\par More specific information can be obtained by passing }{\b\f4\fs24 d_name}{\f4\fs24 to the }{\b\f4\fs24 stat}{\f4\fs24 () system call.
\par See also: }{\b\f4\fs24 stat}{\f4\fs24 (2)
\par
\par }{\b\f4\fs24 needsgno}{\f4\fs24
\par
\par }{\f6 int }{\b\f6 needsgno}{\f6 (void)}{\f6\fs24
\par }{\f4\fs24
\par This function returns 1 if GNO is operating, and 0 if it is not. Use this function to abort programs that use GNO-specific features, or to allow them to enable non-GNO environment dependent code.
\par }{\b\f4\fs24
\par }{\b\f4\fs24 parsearg}{\f4\fs24
\par
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\b\f6 ~GNO_PARSEARG}{\f6 subroutine (4:}{\i\f6 commandline}{\f6 ,4:}{\i\f6 argptr}{\f6 )
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\b\f6 ~GNO_PARSEARG}{\f6 (char *}{\i\f6 commandline}{\f6 , char **}{\i\f6 argptr}{\f6 )
\par }{\f4\fs24
\par This function will take the command-line passed to a utility and parse it into an argv,argc structure like those used in C programs. This was written NOT as a replacement for a C parser, but for use by assembly language programmers writing shell commands.
\par
\par }{\i\f4\fs24 commandline}{\f4\fs24 is the raw command line string as passed by the shell in the X & Y registers. }{\i\f4\fs24 argptr}{\f4\fs24 is a pointer to an argv[]-style array. parsearg returns the number of arguments found in the accumulator.
\par
\par This function ASSUMES that the ByteWorks Memory Manager has been started up and is usable.
\par
\par This function is based on actual GNO/ME shell (gsh) parsing code.
\par
\par }{\b\f4\fs24 pcreate pbind pgetport psend preceive pdelete preset pgetcount}{\f4\fs24
\par
\par }{\f6 #include <sys/ports.h>
\par int }{\b\f6 pcreate}{\f6 (int }{\i\f6 count}{\f6 )
\par int }{\b\f6 pbind}{\f6 (int }{\i\f6 portid}{\f6 , char *}{\i\f6 name}{\f6 )
\par int }{\b\f6 pgetport}{\f6 (char *}{\i\f6 name}{\f6 )
\par int }{\b\f6 psend}{\f6 (int }{\i\f6 portid}{\f6 , long int }{\i\f6 msg}{\f6 )
\par long }{\b\f6 preceive}{\f6 (int }{\i\f6 portid}{\f6 )
\par int }{\b\f6 pdelete}{\f6 (int }{\i\f6 portid}{\f6 , int (*}{\i\f6 dispose}{\f6 )())
\par int }{\b\f6 preset}{\f6 (int }{\i\f6 portid}{\f6 , int (*}{\i\f6 dispose}{\f6 )())
\par int }{\b\f6 pgetcount}{\f6 (int }{\i\f6 portid}{\f6 )
\par }{\f4\fs24
\par The Ports IPC mechanism is a very flexible, powerful and efficient method of interprocess communication. A port is a queue that can contain a number of 32-bit values. The size of the port (how many messages it can contain) is specified in the }{\b\f4\fs24 pcreate}{\f4\fs24 () call.
\par
\par Creation of a port is done with }{\b\f4\fs24 pcreate}{\f4\fs24 (). You must specify the size of the port in this call, which must be at least 1 (one). The larger the port, the more data it can hold without blocking a process sending data to the port. }{\b\f4\fs24 pcreate}{\f4\fs24 () returns a port ID value that must be used in subsequent calls to the Port IPC routines.
\par
\par A name may be associated with a port; this allows totally unrelated processes to access a port without having to communicate the port ID through some other method, and without knowing the process ID of the other. To bind a name to a port, call }{\b\f4\fs24 pbind}{\f4\fs24 (). The name argument may be any length, but at most 32 characters are significant. If a name has already been bound to the chosen portid, an error is returned. To get the portid of a port by its name, use the }{\b\f4\fs24 pgetport}{\f4\fs24 () call. Pass in the name of the port whose port ID you wish to obtain. If no port has that name, an error is returned. Names are only unbound from a port when a port is deleted.
\par }{\b\f4\fs24
\par }{\f4\fs24 psend() is used to send a 32-bit datum to a port. If the port is full (that is, if there are more unread messages in the port than are specified in the }{\b\f4\fs24 pcreate}{\f4\fs24 () call) then the sending process blocks until a message is read from the port. Messages are retrieved from a port using the }{\b\f4\fs24 preceive}{\f4\fs24 () call. pgetcount() returns the number of messages in the port that have not been received; this may be used to avoid blocking on a }{\b\f4\fs24 psend}{\f4\fs24 () call.
\par
\par If you wish to clear the contents of a port, say to synchronize communication after an error condition, use the }{\b\f4\fs24 preset}{\f4\fs24 () call. The arguments to this call are the port ID and the address of a }{\i\f4\fs24 'dispose'}{\f4\fs24 function. Each message in the port, before being cleared, is passed to the dispose function so that appropriate clean-up action may be taken on the data. For example, if the messages correspond to the address of memory blocks obtained with }{\b\f4\fs24 malloc}{\f4\fs24 (), you could pass }{\b\f4\fs24 'free}{\f4\fs24 ()' as the dispose function to automatically deallocate that memory. If you don't wish to take any special action on the data being cleared, pass NULL for the dispose argument.
\par
\par To destroy a port, make the }{\b\f4\fs24 pdelete}{\f4\fs24 () call. It accepts the same arguments as }{\b\f4\fs24 preset}{\f4\fs24 () and they operate as described above. The difference between }{\b\f4\fs24 preset}{\f4\fs24 () and }{\b\f4\fs24 pdelete}{\f4\fs24 () is that the latter totally destroys a port; it may no longer be used. }{\b\f4\fs24 preset}{\f4\fs24 () clears a port's data but leaves the port open for more data transmission.
\par
\par For an example of the use of ports, see the source code to the print spooling utilities (}{\b\f4\fs24 lpr}{\f4\fs24 , }{\b\f4\fs24 lpd}{\f4\fs24 , }{\b\f4\fs24 FilePort}{\f4\fs24 ). These are available from Procyon upon request.
\par
\par }\pard \qj\nowidctlpar\widctlpar\tx9720\adjustright {\b\f4\fs24 regexp}{\f4\fs24
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\f4\fs24
\par Compile and execute regular-expression programs. Use 'man regexp' for details.
\par
\par }{\b\f4\fs24 send receive recvtim recvclr}{\f4\fs24
\par
\par }{\f6 #include <gno/gno.h>
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\f6 int }{\b\f6 send}{\f6 (int pid, unsigned long }{\i\f6 msg}{\f6 );
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\f6 unsigned long }{\b\f6 receive}{\f6 (void);
\par unsigned long }{\b\f6 recvtim}{\f6 (int }{\i\f6 timeout}{\f6 );
\par unsigned long }{\b\f6 recvclr}{\f6 (void);
\par }{\f4\fs24
\par These kernel functions comprise GNO's message-passing IPC system. Messages are unsigned 32-bit data values. A process sends a message to another by using the }{\b\f4\fs24 send}{\f4\fs24 () call. You must specify the process ID of the recipient and the message to pass. To receive a message, a process makes the }{\b\f4\fs24 receive}{\f4\fs24 () call. If no message has been sent to the process, the process sleeps until a message arrives. recvclr() is used to clear any pending message a process may have waiting. }{\b\f4\fs24 recvtim}{\f4\fs24 () is similar to }{\b\f4\fs24 receive}{\f4\fs24 () but takes a timeout argument, specified in 1/10ths of a second. If no message has been received in }{\i\f4\fs24 timeout}{\f4\fs24 /10 seconds, }{\b\f4\fs24 recvtim}{\f4\fs24 () fails and returns -1. The message buffer for a process is only one message deep; any attempt to }{\b\f4\fs24 send}{\f4\fs24 () a message to a process that already has one queued results in an error. For an IPC system with a deeper queue, see the Ports IPC section.
\par
\par A }{\b\f4\fs24 receive}{\f4\fs24 () that is interrupted by a signal will abort and return -1, with errno set to EINTR.
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\f4\fs24
\par }{\b\f4\fs24 setenv unsetenv}{\f4\fs24
\par
\par }{\f6 #include <unistd.h>
\par int }{\b\f6 setenv}{\f6 (const char *}{\i\f6 name}{\f6 , const char *}{\i\f6 value}{\f6 , int }{\i\f6 rewrite}{\f6 )
\par void }{\b\f6 unsetenv}{\f6 (const char *}{\i\f6 name}{\f6 )}{\f6
\par }{\f6
\par }{\f4\fs24 Set the value of the environmental variable name to be value. If }{\i\f4\fs24 rewrite}{\f4\fs24 is set, }{\b\f4\fs24 setenv}{\f4\fs24 replaces any current value. The variable is considered 'exported', according to the shell convention for variables. No errors are possible, and the only return code is 0.
\par
\par }{\b\f4\fs24 unsetenv}{\f4\fs24 removes the environmental variable specified by name from the variable table. The variable is no longer accessible, and any value that was assigned to that variable is deallocated. No errors are possible, and there is no return value.
\par
\par }{\b\f4\fs24 statfs}{\f4\fs24
\par
\par }{\f6 int }{\b\f6 statfs}{\f6 (char *}{\i\f6 path}{\f6 , struct statfs *}{\i\f6 buf}{\f6 )
\par }{\f4\fs24
\par Returns information on the filesystem that the file }{\i\f4\fs24 path}{\f4\fs24 resides on. The information is placed in a structure pointed to by the input argument }{\i\f4\fs24 buf}{\f4\fs24 . Read }{\b\f4\fs24 statfs}{\f4\fs24 (3) for more information.
\par
\par }{\b\f4\fs24 strdup}{\f4\fs24
\par
\par }{\f6 #include <string.h>
\par char *}{\b\f6 strdup}{\f6 (const char *}{\i\f6 str}{\f6 )
\par }{\f4\fs24
\par }{\b\f4\fs24 strdup}{\f4\fs24 () creates a copy of the NUL-terminated string pointed to by }{\i\f4\fs24 str}{\f4\fs24 . It allocates a piece of memory exactly large enough to hold the string with the }{\b\f4\fs24 malloc}{\f4\fs24 () library function. When you no longer need the copy, dispose of it with }{\b\f4\fs24 free}{\f4\fs24 ().
\par See also: }{\b\f4\fs24 strcpy}{\f4\fs24 (), }{\b\f4\fs24 malloc}{\f4\fs24 (), }{\b\f4\fs24 free}{\f4\fs24 ()
\par
\par }{\b\f4\fs24 strsep}{\f4\fs24
\par
\par }{\f6 #include <string.h>
\par char *}{\b\f6 strsep}{\f6 (char **}{\i\f6 stringp}{\f6 , const char *}{\i\f6 delim}{\f6 )
\par }{\f4\fs24
\par Gets a token from string *}{\i\f4\fs24 stringp}{\f4\fs24 , where tokens are nonempty strings separated by characters from delim.
\par
\par }{\b\f4\fs24 strsep}{\f4\fs24 writes NULs into *}{\i\f4\fs24 stringp}{\f4\fs24 to end tokens. }{\i\f4\fs24 delim}{\f4\fs24 need not remain constant from call to call. On return, *}{\i\f4\fs24 stringp}{\f4\fs24 points past the last NUL written (if there might be further tokens), or is NULL (if there are definitely no more tokens). If *}{\i\f4\fs24 stringp}{\f4\fs24 is NULL, }{\i\f4\fs24 strsep}{\f4\fs24 returns NULL.
\par
\par }{\b\f4\fs24 termcap}{\f4\fs24
\par
\par The termcap library accesses the /etc/termcap database, which is used to provide terminal- independent support for advanced terminal features, such as various text modes, scrolling regions, cursor movement, and more. Use 'man termcap' for more details.
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\f4\fs24
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\b\f4\fs24 ttyname}{\f4\fs24
\par
\par }{\f6 #include <unistd.h>
\par char *}{\b\f6 ttyname}{\f6 (int }{\i\f6 fd}{\f6 )
\par }{\f4\fs24
\par Returns the filename of the tty referenced by file descriptor }{\i\f4\fs24 fd}{\f4\fs24 . If fd does not refer to a tty file, NULL is returned. Otherwise, a pointer to the filename (NUL-terminated string) is returned.
\par
\par tty filenames are in the format ".ttyXX", where XX is a device designator. When porting existing BSD code, take care to watch for code that depends on the existence of a '/' character in the string, as UNIX tty files are in the form "/dev/ttyXX".
\par
\par The string pointer returned points to a static buffer, and will be overwritten on any further calls to }{\b\f4\fs24 ttyname}{\f4\fs24 . Copy the string if you wish to preserve it.
\par
\par }{\b\f4\fs24 unlink}{\f4\fs24
\par
\par }{\f6 int }{\b\f6 unlink}{\f6 (char *}{\i\f6 fname}{\f6 )
\par }{\f4\fs24
\par Causes the link file specified by }{\i\f4\fs24 fname}{\f4\fs24 to be removed. Since GNO/ME does not yet support symbolic or hard file links, this function operates the same as the }{\b\f4\fs24 remove}{\f4\fs24 () (or DestroyGS) routine.
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0 \sect }\sectd \linex0\endnhere\sectdefaultcl {\headerl \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 TTY(4)\tab Library Routines\tab TTY(4)}{\fs24
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}{\headerr \pard\plain \s15\nowidctlpar\widctlpar\tqc\tx4680\tqr\tx9360\adjustright \fs20\cgrid {\fs24 TTY(4)\tab Library Routines\tab TTY(4)}{\fs24
\par }\pard \s15\nowidctlpar\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {
\par }}\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\f4\fs24 NAME}{\f4\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {tty - general terminal interface
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\f4\fs24
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\b\f4\fs24 SYNOPSIS}{\f4\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {#include <sgtty.h>
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\f4\fs24
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\b\f4\fs24 DESCRIPTION}{\f4\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {This file documents the special file }{\f6 .tty}{ and the terminal drivers used for user-oriented I/O.
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\f4\fs24 The Controlling Terminal}{\f4\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {Every process has associated with it a controlling terminal, which is the terminal the process was invoked from. In some versions of Unix, the controlling terminal association is responsible for job control; this is not so under GNO. A process' controlling terminal is inherited from its parent. By opening the special file .tty, a process can access its controlling terminal. This is useful where the input and output of a process was redirected and the process wants to be sure of outputting or getting input from the user at the terminal.
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {
\par A process can remove the association it has with its controlling terminal by opening the file .tty and issuing an
\par
\par ioctl(f, TIOCNOTTY, 0);
\par
\par This is often desirable in server processes.
\par
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\b\f4\fs24 Process Groups}{\f4\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {Every terminal has an associated process group. Any time a signal-generating special character is typed at the terminal, the terminal's process group is sent that signal. Unix systems set process groups using ioctl() calls, but under GNO a new interface method is used; process group assignments are controlled with the JOB CONTROL(2) routines.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\f4\fs24
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\b\f4\fs24 Modes}{\f4\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {There are four modes in which terminal drivers operate. These modes control how the driver deals with I/O.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\f4\fs24
\par }\pard \qj\fi-1440\li2160\nowidctlpar\widctlpar\adjustright {\i\f4\fs24 cooked}{\f4\fs24 \tab This is the default mode of the terminal driver. If an incoming character is one of the special characters defined in sgttyb, tchars, or ltchars, the appropriate action is performed (see below). This mode also allows for input editing, as input is internally buffered line by line, and data is returned to a reading process only when CR is entered.
\par }\pard \qj\fi-1440\li2160\nowidctlpar\widctlpar\adjustright {\f4\fs24
\par }\pard \qj\fi-1440\li2160\nowidctlpar\widctlpar\adjustright {\i\f4\fs24 cbreak}{\f4\fs24 \tab Input is returned on a per-character basis, instead of line by line as in cooked mode. If no data is available, a read will block the calling process. If data is available, a number of characters up to but not exceeding the requested number will be returned. Special characters such as t_intrc are not handled, but are passed on to the caller as data.
\par
\par }{\i\f4\fs24 raw}{\f4\fs24 \tab Like cbreak mode, except that no input or output processing whatsoever is performed.
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\f4\fs24
\par
\par }{\b\f4\fs24 Summary of terminal control modes}{\f4\fs24
\par
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {Due to the colorful history of Unix systems, the data structures used to manipulate terminal modes and settings are separated into four groups. Future revisions of GNO will implement the POSIX termio interface, which consolidates these structures into one place.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\f4
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\b\f4\fs24 sgtty}{\f4\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {The basic ioctls use the structure defined in <sgtty.h>:
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {
\par }{\f6\fs20 struct sgttyb \{
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {\f6\fs20 \tab char\tab sg_ispeed;
\par \tab char\tab sg_ospeed;
\par \tab char\tab sg_erase;
\par \tab char\tab sg_kill;
\par \tab short\tab sg_flags;
\par \};
\par }{
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {sg_ispeed and sg_ospeed indicate the baud rates for input and output according to the following table. Speed changes that do not apply to a particular piece of hardware are ignored (for instance, the console driver does not access a serial port so all baud rate settings are, in effect, impossible). Also, not all the baud rates supported by a particular device are allowed to be set from this interface.
\par
\par These symbolic names for the baud rate settings are defined in <sgtty.h>.
\par
\par B0\tab \tab 0\tab (hang up dataphone)
\par B50\tab \tab 1\tab 50 baud
\par B75\tab \tab 2\tab 75 baud
\par B110\tab \tab 3\tab 110 baud
\par B134\tab \tab 4\tab 134.5 baud
\par B150\tab \tab 5\tab 150 baud
\par B300\tab \tab 7\tab 300 baud
\par B600\tab \tab 8\tab 600 baud
\par B1200\tab }{\tab }{9\tab 1200 baud
\par B1800\tab }{\tab }{10\tab 1800 baud
\par B2400\tab }{\tab }{11\tab 2400 baud
\par B4800\tab }{\tab }{12\tab 4800 baud
\par B9600\tab }{\tab }{13\tab 9600 baud
\par B19200\tab \tab and
\par EXTA\tab \tab 14\tab 19200 baud
\par B38400\tab \tab and
\par EXTB\tab \tab 15\tab 38400 baud
\par B57600\tab 6\tab 57600 baud
\par
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {The sg_erase and sg_kill fields specify the line-editing erase and kill characters. sg_erase is 0x7F (delete) by default, and sg_kill is not currently used.
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {
\par sg_flags is a bitmapped value that indicates various state settings for the terminal driver (values are in hex).
\par
\par EVENP\tab 0x80\tab Use Even parity (serial devices only)
\par ODDP\tab \tab 0x40\tab Use Odd parity (serial devices only)
\par RAW\tab \tab 0x20\tab Raw mode: wake up on all characters, 8-bit interface
\par CRMOD\tab 0x10\tab Map CR into LF; output LF as CR-LF
\par ECHO\tab }{\tab }{0x08\tab Echo (full duplex)
\par CBREAK\tab 0x02\tab Return each character as soon as typed
\par TANDEM\tab 0x01\tab Automatic flow control
\par
\par }{\b RAW}{ and }{\b CBREAK}{ modes were described above, in Modes.
\par
\par If the }{\b CRMOD}{ bit is set, a line feed character is appended to any echoed or ouputted carriage return.
\par
\par The }{\b ECHO}{ bit controls input echoing; if enabled, any characters read from the terminal are echoed. This behavior differs slightly from Unix, where input characters are echoed as soon as typed.
\par
\par }{\b TANDEM}{ mode enables automatic software flow control utilizing the special characters t_startc and t_stopc in tchars (below). Whenever the input queue is in danger of overflowing, the system sends t_stopc; when the queue has drained sufficiently, t_startc is sent. This mode has no effect on the console driver.
\par
\par Note: t_startc and t_stopc are used for both directions of flow control; when t_stopc is received from a remote system (or user), the terminal stops output, and when t_startc is received output resumes. Certain drivers may also require t_stopc and t_startc to be the same character, in which case one or the other setting will be ignored. See the driver's documentation for details.
\par Basic Ioctls
\par
\par Most }{\b ioctl}{() calls apply to terminals. They have the form
\par #include <sgtty.h>
\par
\par ioctl(int filedes, unsigned long code, void *arg)
\par
\par arg is usually a pointer to a structure or int. The ioctl codes that apply to sgtty are:
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\f4
\par }\pard \qj\fi-1440\li2160\nowidctlpar\widctlpar\adjustright {\b\f6\fs24 TIOCGETP}{\f4\fs24 \tab Fetch the basic parameters associated with the terminal, and store in the sgttyb structure pointed to by arg.
\par
\par }{\b\f6\fs24 TIOCSETP}{\f4\fs24 \tab Set the terminal's basic parameters according to the sgttyb structure pointed to by arg. The input queue is flushed, and the call waits for the output queue to drain before the parameters are changed.
\par
\par }{\b\f6\fs24 TIOCSETN}{\f4\fs24 \tab This is like TIOCSETP, except there is no delay and the input queue is not flushed.
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\f4
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {With the following codes arg is ignored.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\f4
\par }\pard \qj\fi-1440\li2160\nowidctlpar\widctlpar\adjustright {\b\f6\fs24 TIOCEXCL}{\f4\fs24 \tab Set "exclusive-use" mode. The terminal may not be opened again by any process until all existing references are closed.
\par
\par }{\b\f6\fs24 TIOCNXCL\tab }{\f4\fs24 Turns off "exclusive-use" mode.
\par
\par }{\b\f6\fs24 TIOCHPCL}{\f4\fs24 \tab When the last reference to the terminal is closed, the terminal line is forced to hang up. This applies only to modem drivers.
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\f4
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {With the following codes, arg is a pointer to an int.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\f4
\par }\pard \qj\fi-1440\li2160\nowidctlpar\widctlpar\adjustright {\b\f6\fs24 TIOCGETD}{\f4\fs24 \tab The current line discipline number is stored in the int pointed to by arg. This value is currently ignored.
\par
\par }{\b\f6\fs24 TIOCSETD}{\f4\fs24 \tab The line discipline is set according to the int pointed to by arg.
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\f4\fs24
\par }\pard \qj\fi-1440\li2160\nowidctlpar\widctlpar\adjustright {\b\f6\fs24 TIOCFLUSH}{\f4\fs24 \tab The specified queue is flushed. If the value pointed to by arg is zero, both the input and output queues are flushed. If the value is FREAD (defined in <sys/file.h>), the input queue is flushed. If the value is FWRITE, the output queue is flushed.
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\f4
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {The last few calls permit detailed control of the driver. In cases where an argument is required, it is described. Otherwise, arg should be a NULL pointer.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\f4
\par }\pard\plain \s22\qj\fi-1440\li2160\nowidctlpar\widctlpar\adjustright \f4\cgrid {\b\f6 TIOCSTI}{\tab }{The character pointed to by the argument is placed in the input queue as if it had been typed on the terminal.
\par }\pard \s22\qj\fi-1440\li2160\nowidctlpar\widctlpar\adjustright {
\par }{\b\f6 TIOCSBRK}{\tab Begins a break sequence on the terminal.
\par
\par }{\b\f6 TIOCCBRK}{\tab Ends a break sequence.
\par
\par }{\b\f6 TIOCSDTR}{\tab The DTR line is turned on
\par
\par }{\b\f6 TIOCCDTR}{\tab The DTR line is turned off
\par
\par }{\b\f6 TIOCSTOP}{\tab Output is stopped as if t_stopc had been typed on the terminal.
\par }{\b
\par }\pard \s22\qj\fi-1440\li2160\nowidctlpar\widctlpar\adjustright {\b\f6 TIOCSTART}{\tab If output is stopped, it is resumed as if t_startc had been typed on the terminal.
\par }\pard \s22\qj\fi-1440\li2160\nowidctlpar\widctlpar\adjustright {
\par }{\b\f6 TIOCOUTQ}{\tab The number of characters in the output queue is returned in the int pointed to by arg.
\par
\par }{\b\f6 FIONREAD}{\tab The number of characters immediately available for input from the terminal is returned in the int pointed to by arg. This is the preferred method of non-blocking I/O (checking for the presence of characters without waiting for them).
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\f4
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\f4\fs24
\par }{\b\f4\fs24 Tchars}{\f4\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {The second structure associated with a terminal defines special characters. The structure is defined in <sys/ioctl.h> which is automatically included by <sgtty.h>.
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {
\par struct tchars \{
\par \tab char\tab t_intrc;\tab /* interrupt */
\par \tab char\tab t_quitc;\tab /* quit */
\par \tab char\tab t_startc;\tab /* start output */
\par \tab char\tab t_stopc;\tab /* stop output */
\par \tab char\tab t_eofc;\tab /* end-of-file */
\par \tab char\tab t_brkc;\tab /* input delimiter (like nl) */
\par \};
\par
\par The default values for these characters are ^C, ^\\, ^Q, ^S, ^D and -1 respectively. A value of -1 for any of the characters means that the effect of that character is ignored. The stop and start characters may be the same to produce a 'toggle' effect. It is not recommended to set any of the other characters to the same values; the order in which the special characters are checked is not defined, and the results you get may not be what was expected.
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {The ioctl calls that apply to tchars are:
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\f4\fs24
\par }\pard \qj\fi-1440\li2160\nowidctlpar\widctlpar\adjustright {\b\f6\fs24 TIOCGETC}{\f4\fs24 \tab Returns the special characters settings in the tchars structure pointed to by arg.
\par
\par }{\b\f6\fs24 TIOCSETC}{\f4\fs24 \tab The special characters are set according to the given structure.
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\f4\fs24
\par }{\b\f4\fs24 Local mode}{\f4\fs24
\par
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {The third structure in the terminal interface is a local mode word. The various bitfields in this word are as follows (values are in hex):
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {
\par LCRTBS\tab 0x0001\tab Backspace on erase rather than echoing erase
\par LPRTERA\tab 0x0002\tab Printing terminal erase mode
\par LCRTERA\tab 0x0004\tab Erase character echoes as backspace-space-backspace
\par LTILDE\tab 0x0008\tab Convert ~ to ` on output (for Hazeltine terminals)
\par LMDMBUF\tab 0x0010\tab Stop/start output when carrier drops
\par LLITOUT\tab 0x0020\tab Suppress output translations
\par LTOSTOP\tab 0x0040\tab Send SIGTTOU for background output (not implemented)
\par LFLUSHO\tab 0x0080\tab Output is being flushed
\par LNOHANG\tab 0x0100\tab Don't send hangup when carrier drops
\par LPASSOUT\tab 0x0200\tab Cooked mode with 8-bit output
\par LCRTKIL\tab 0x0400\tab BS-space-BS erase entire line on line kill
\par LPASS8\tab 0x0800\tab Pass all 8 bits through on input, in any mode
\par LCTLECH\tab 0x1000\tab Echo input control chars as ^?
\par LPENDIN\tab 0x2000\tab Retype pending input at next read or input character
\par LDECCTQ\tab 0x4000\tab Only ^Q restarts output after ^S
\par LNOFLSH\tab 0x8000\tab Inhibit flushing of pending I/O when intr char is typed
\par
\par The ioctl's used to access the local mode follow. arg in all cases is a pointer to an int.
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\f4
\par }\pard \qj\fi-1440\li2160\nowidctlpar\widctlpar\adjustright {\b\f6\fs24 TIOCLBIS}{\f4\fs24 \tab The bits of the local mode word specified by `1' bits in the argument are set; this operation is a bit-wise OR.
\par
\par }{\b\f6\fs24 TIOCLBIC}{\f4\fs24 \tab The bits of the local mode word specified by `1' bits in the argument are cleared; this operation ANDs the local mode with the bitwise negation of the argument.
\par
\par }{\b\f6\fs24 TIOCLSET}{\f4\fs24 \tab Sets the local mode word to the value of the argument.
\par
\par }{\b\f6\fs24 TIOCLGET}{\f4\fs24 \tab Returns the local mode word in the int pointed to by arg.
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\f4\fs24
\par }{\b\f4\fs24 Local Special Characters}{\f4\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {The fourth terminal structure is another set of special characters. The structure is named ltchars and is again defined in <ioctl.h>.
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {
\par }{\f6\fs20 struct ltchars \{
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {\f6\fs20 \tab char\tab t_suspc;\tab /* stop process signal */
\par \tab char\tab t_dsuspc;\tab /* delayed stop process signal */
\par \tab char\tab t_rprntc;\tab /* reprint line */
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {\f6\fs20 \tab char\tab t_flushc;\tab /* flush output (toggles) */
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {\f6\fs20 \tab char\tab t_werasc;\tab /* word erase */
\par \tab char\tab t_lnextc;\tab /* literal next character */
\par \};
\par }{
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {Defaults for these characters are ^Z, ^Y, ^R, ^O, ^W, and ^V. As with tchars, a value of -1 disables the effect of that character. Only t_suspc is currently implemented for the console driver.
\par
\par The applicable ioctl functions are:
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\f4\fs24
\par }\pard \qj\fi-1440\li2160\nowidctlpar\widctlpar\adjustright {\b\f6\fs24 TIOCSLTC}{\f4\fs24 \tab sets the local characters according to the ltchars structure pointed to by arg.
\par
\par }{\b\f6\fs24 TIOCGLTC}{\f4\fs24 \tab retreives the local characters, storing them in the argument.
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\f4\fs24
\par
\par }{\b\f4\fs24 Window/terminal sizes
\par }{\f4\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {Provision is made for storage of the current window or terminal size along with the other terminal information. This info is recorded in a winsize structure, and is defined in <ioctl.h>:
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {
\par }{\f6\fs20 struct winsize \{
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {\f6\fs20 \tab unsigned short\tab ws_row;\tab /* rows, in characters */
\par \tab unsigned short\tab ws_col;\tab /* columns, in characters */
\par \tab unsigned short\tab ws_xpixel;\tab /* horizontal size, pixels */
\par \tab unsigned short\tab ws_ypixel;\tab /* vertical size, pixels */
\par \};
\par }{
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {A '0' in a field indicates that the field value is undefined. '0' is the default when a terminal is first opened. These values are not used by the terminal driver itself; rather, they are for the benefit of applications. The ioctl calls for winsize are:
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\f4\fs24
\par }\pard \qj\fi-1800\li2520\nowidctlpar\widctlpar\adjustright {\b\f6\fs24 TIOCGWINSZ}{\f4\fs24 \tab Returns the window size parameters in the provided winsize structure.
\par
\par }{\b\f6\fs24 TIOCSWINSZ}{\f4\fs24 \tab Sets the window size parameters. If any of the values differ from the old ones, a SIGWINCH signal is sent to the terminal's process group.
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\f4\fs24
\par }{\b\f4\fs24 FILES}{\f4\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {.tty
\par }\pard \s22\qj\li720\nowidctlpar\widctlpar\adjustright {.ttyco (console driver)
\par .tty* (user-installed drivers)
\par }\pard\plain \qj\nowidctlpar\widctlpar\adjustright \fs20\cgrid {\f4\fs24
\par }\pard \qj\nowidctlpar\widctlpar\adjustright {\b\f4\fs24 SEE ALSO}{\f4\fs24
\par }\pard\plain \s22\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\i GNO Shell Reference Manual}{, }{\b stty}{(1), }{\b ioctl}{(2), }{\b signal}{(2)
\par }\pard\plain \s17\qj\li720\nowidctlpar\widctlpar\adjustright \f4\cgrid {\f0
\par }}