⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cawf.1

📁 操作系统设计与实现源码
💻 1
📖 第 1 页 / 共 2 页
字号:


CAWF(1)                   Minix Programmer's Manual                    CAWF(1)


NAME
     cawf, nroff - C version of  the  nroff-like,  Amazingly  Workable  (text)
     Formatter

SYNOPSIS
     cawf [ -cconfig ] [ -ddevice ] [ -e ] [ -ffont ] [ -h ]  [  -macros  ]  [
     file ... ]

DESCRIPTION
     Cawf formats the text from the input file(s) (standard input if none)  in
     an  approximation  of nroff.  It comes closest to duplicating nroff's man
     or ms macro package styles.  It has some limited support for  nroff's  me
     macros.

OPTIONS
     Options must precede file names.

     -cconfig
          defines  an  alternate  path  to  the  device  configuration   file.
          Normally  the device configuration file is found in device.cf in the
          cawf library (see the FILES section).

          The device configuration file contains device character strings  for
          selecting  fonts and the bold or italic type faces.  See the DEVICES
          section for more information.

     -ddevice
          specifies the name of the output device.  There are  three  built-in
          devices  -  ANSI, NONE and NORMAL - and other devices may be defined
          in the device configuration file.  See the DEVICES section for  more
          information.

          The NORMAL device is the default.

     -e   directs cawf to issue an eject (FF or ^L) after the last page.

     -ffont
          specifies the one font for the device, declared  with  the  -ddevice
          option, that is to be used for the entire document.  Font must match
          a  font  associated  with  the  device's  stanza   in   the   device
          configuration file.  See the DEVICES section for more information.

          No font may be specified for the  built-in  devices  ANSI,  NONE  or
          NORMAL.

     -h   requests a help display.

     -macro
          specifies the macro file to be used.  The standard cawf distribution
          supplies  macro files to support ``-man'', ``-me'' or ``-ms''.  Cawf


Purdue University                       November, 1992                       1



CAWF(1)                   Minix Programmer's Manual                    CAWF(1)


          finds a macro file by constructing its name from `m', acro and  .mac
          -  e.  g.,  -man is converted to man.mac.  The default directory for
          macro files is defined when cawf is compiled;  it's  C:\SYS\LIB\CAWF
          in the MS-DOS environment; /usr/lib/cawf in the UNIX environment.

     file ...
          are the names of files containing nroff source text.

NROFF COMPATIBILITY
     Cawf accepts the following raw nroff requests:

             .\"     .ad     .bp     .br     .ce     .de     .di     .ds
             .el     .fi     .fl     .ft     .i0     .ie     .if     .in
             .it     .lg     .li     .ll     .ls     .na     .ne     .nf
             .nr     .ns     .pl     .po     .ps     .rm     .rn     .rr
             .rs     .so     .sp     .ta     .ti     .tm     .tr

     and the following in-text codes:

          \$      \%      \*      \"      \c      \f      \h      \k
          \n      \s      \w

     plus the full list of nroff/troff special characters in the  original  V7
     troff manual.

     Many restrictions are present; the behavior in general  is  a  subset  of
     nroff's.  Of particular note are the following:

     o The fully supported nroff request  control  character  is  the  period.
       There  is  limited  support  for  the   non-break, acute accent control
       character.

     o Point sizes do not exist; .ps is ignored.

     o Special vertical spacing - the .vs request included - is ignored.

     o Conditionals cover only the numeric comparisons >, =, <, >= and  <=  on
       \n(.$;  string  comparisons  between a macro parameter and a literal; n
       (always true); and  t  (always  false).   Only  single  line  input  is
       accepted  from conditionals; multi-line input - e.g., \(anything\) - is
       not supported.

     o The handling of strings is generally primitive.

     o Horizontal motion via \h  must  be  supplied  with  a  number  register
       interpolation and must be positive - e. g., \w\n(NN, where the value in
       NN is >= 0.





Purdue University                       November, 1992                       2



CAWF(1)                   Minix Programmer's Manual                    CAWF(1)


     o The \k function is reliable only after TAB characters, so it is  useful
       only for measuring table positions.

     o The .di request only turns output on  and  off  -  any  macro  name  is
       ignored.

     o Expressions - e. g., .sp - are reasonably general, but the |, &, and  :
       operators  do  not  exist, there must be white space between the end of
       the nroff function and the beginning of the expression, and \w requires
       that  quote  (')  be  used as the delimiters.  \w counts the characters
       inside the quotes and scales the result in ens, so that,  for  example,
       \w'\(bu' equals 4n, and \w'\(bu'/1n equals 4.

     o The only acceptable count for  the  .it  request  is  one,  and  it  is
       effective only with man, me or ms macros.

     o The default scaling factor is `v' for the .ne, .sp, and .pl  raw  nroff
       requests;  it  is  `u' for .nr; and `n' for .in, .ll, .ls, .po, .ta and
       .ti.  (A different scaling factor may  be  specified  with  a  trailing
       character.)

     o Some obsolete or meaningless requests - .i0, .lg and .li - are silently
       ignored.

     White space at the beginning of lines, and embedded  white  space  within
     lines  is dealt with properly.  Sentence terminators at ends of lines are
     understood to imply extra space afterward in filled lines.  Tabs are  im-
     plemented  crudely  and  not  exactly,  although  usually  they  work  as
     expected.  Hyphenation is done only at explicit hyphens,  em-dashes,  and
     nroff  discretionary  hyphens.  By default bold and italic characters are
     emulated with backspacing and overprinting, but the -d  and  -f  options,
     combined  with the contents of the device configuration file, may be used
     to generate special codes for  bold  and  italic  characters.   (See  the
     DEVICES section for more information.)

MAN MACROS
     The man macro set replicates the full V7 manual macros, plus a few  semi-
     random oddballs.  The full list is:

          .AT     .B      .BI     .BR     .BY     .DE     .DS     .DT     .HP
          .I
          .IB     .IP     .IR     .IX     .LP     .NB     .P      .PD     .PP
          .RB
          .RE     .RI     .RS     .SH     .SM     .SS     .TH     .TP     .UC

     .BY and .NB each take a single string argument  (respectively,  an  indi-
     cation  of authorship and a note about the status of the manual page) and
     arrange to place it in the page footer.  .AT and .IX do nothing.




Purdue University                       November, 1992                       3



CAWF(1)                   Minix Programmer's Manual                    CAWF(1)


ME MACROS
     The me macro subset has been derived from the  cawf  ms  macros  by  Chet
     Creider <creider@csd.uwo.ca>.  It includes:

          .(l     .(q     .)l     .)q     .b      .bu     .i      .ip     .lp
          .np
          .pp     .r      .sh     .sm     .u      .uh

     The .(l C and .(l L options are supported.  In addition,  the  .AB,  .AE,
     .AI,  .AU,  .DA,  .ND,  .TL and .UX macros have been retained from the ms
     set, and the .XP macro has been borrowed from the Berkeley  additions  to
     the ms macro set.

MS MACROS
     The ms macro set is a substantial subset of  the  V7  manuscript  macros.
     The macros are:

          .AB     .AE     .AI     .AU     .B      .CD     .DA     .DE     .DS
          .I
          .ID     .IP     .LD     .LG     .LP     .ND     .NH     .NL     .PP
          .QE
          .QP     .QS     .R      .RE     .RP     .RS     .SH     .SM     .TL
          .TP
          .UL     .UX

     Size changes are recognized but ignored, as are .RP and  .ND.   .UL  just
     prints  its  argument in italics.  .DS/.DE does not do a keep, nor do any
     of the other macros that normally imply keeps.

     The DY string variable is available.  The PD, PI, and LL number registers
     exist and can be changed.

HEADERS AND FOOTERS
     Cawf allows the placement of text into the five line  header  and  footer
     sections  from  the  LH, CH, RF, LF, CF, and RF string variables, via the
     control of the .^b request:

     .^b fh 1   enables header string placement on the first page
     .^b fh 0   disables header string placement on the first page
     .^b HF 1   enables header/footer string placement
     .^b HF 0   disables header/footer string placement

     There are appropriate .^b requests in the distribution  man,  me  and  ms
     macro files.  (The me and ms macro files use another .^b request, .^b NH,
     to enable numbered header processing.)







Purdue University                       November, 1992                       4



CAWF(1)                   Minix Programmer's Manual                    CAWF(1)


OUTPUT
     The default output format supported by cawf, in its distributed form,  is
     that  appropriate to a dumb terminal, using overprinting for italics (via
     underlining) and bold.  The nroff special characters are printed as  some
     vague  approximation  (it's  sometimes  extremely vague) to their correct
     appearance.

     One part of cawf's  knowledge  of  the  output  device,  related  to  the
     formation  of  characters, is established by a device file, which is read
     before the user's input.  The search for  it  begins  in  cawf's  library
     directory,  under  the name term.dev (where term is the value of the TERM
     environment variable).  Failing to find that, cawf searches for dumb.dev.
     (See  the  FILES  section for a description of the path to cawf's library
     directory.)  The device file uses special internal  requests  to  set  up
     resolution,  special characters and more normal nroff functions to set up
     page length, etc.

     Cawf has limited support for fonts  special  forms  of  bold  and  italic
     characters.   It  is  provided through the -c config, -ddevice and -ffont
     options.  See the DEVICES section for more information.

     Note  the  distinction  between  the  device  and   the   output   device
     configuration  files.   The  device file typically defines characters and
     constant output parameters.  The output device configuration file defines
     font  and  type  face  codes.   It  is  usually not necessary to define a

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -