Annotation of coherent/d/bin/nroff/code.h, revision 1.1

1.1     ! root        1: /*
        !             2:  * code.h
        !             3:  * Nroff/Troff.
        !             4:  * Data structure for storing character codes and stream directives.
        !             5:  */
        !             6: 
        !             7: /*
        !             8:  * Stream directives.
        !             9:  */
        !            10: #define DNULL  0                       /* Null                         */
        !            11: #define DHMOV  (-1)                    /* Move horizontally            */
        !            12: #define DVMOV  (-2)                    /* Move vertically              */
        !            13: #define DFONT  (-3)                    /* Change font                  */
        !            14: #define DPSZE  (-4)                    /* Change pointsize             */
        !            15: #define DSPAR  (-5)                    /* Space down and return        */
        !            16: #define DPADC  (-6)                    /* Paddable character           */
        !            17: #define DHYPH  (-7)                    /* Place to hyphenate           */
        !            18: #define        DHYPC   (-8)                    /* Hyphen character             */
        !            19: #define        DTRAB   (-9)                    /* Transparent buffer           */
        !            20: #define        DFPOS   (-10)                   /* Fix position                 */
        !            21: #define        DHLIN   (-11)                   /* Horizontal line              */
        !            22: #define        DVLIN   (-12)                   /* Vertical line                */
        !            23: 
        !            24: /*
        !            25:  * All characters and commands are stored in this structure.
        !            26:  * To identify whether an element is a character or a command,
        !            27:  * call the function ifcchar(element) which returns 1 if the
        !            28:  * element is a character code and 0 if the element is a command.
        !            29:  */
        !            30: typedef        union   {
        !            31:        struct c_arg {                  /* Structure containing character */
        !            32:                int     c_code;         /* Character code               */
        !            33:                unsigned c_move;        /* Distance to move after char  */
        !            34:        } c_arg;
        !            35:        struct l_arg {                  /* Command with one int argument */
        !            36:                int     c_code;         /* Type of command              */
        !            37:                int     c_iarg;         /* Int parameter                */
        !            38:        } l_arg;
        !            39:        struct b_arg {                  /* Command with buffer ptr. (dag)*/
        !            40:                int     c_code;         /* Type of command              */
        !            41:                char    *c_bufp;        /* Pointer to buffer            */
        !            42:        } b_arg;
        !            43: } CODE;
        !            44: 
        !            45: /*
        !            46:  * Macros testing whether an element is a character code
        !            47:  * or a stream directive.
        !            48:  */
        !            49: #define is_char(c)     ((c) > 0)
        !            50: #define is_dir(c)      ((c) < 0)
        !            51: 
        !            52: /*
        !            53:  * Global variables.
        !            54:  */
        !            55: extern CODE    codeval;                /* Diversion struct returned by getl */
        !            56: 
        !            57: /* end of code.h */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.