# 2.11BSD#431 - /usr/src/local/mp/mp.h

##### Variables

    boldshow          X
    do_date           X
    emptyline         X
    endcol            X
    endfile           X
    endline           X
    endpage           X
    expand            X
    get_header        X
    get_mult_hdr      X
    get_opt           X
    get_options       X
    hdr_equal         X
    init_setup        X
    main              X
    mixedshow         X
    parse_headers     X
    printfile         X
    process_name_fieldX
    process_postscriptX
    psdef             X
    readline          X
    reset_headers     X
    romanshow         X
    set_defs          X
    show_headers      X
    show_mult_hdr     X
    show_prologue     X
    show_trailer      X
    startfile         X
    startline         X
    startpage         X
    textshow          X
    usage             X
    useline           X

##### Macros

    EQUAL             X
    FALSE             X
    FCLOSE            X
    FPRINTF           X
    FPUTS             X
    INC               X
    LINELENGTH        X
    MAXCONT           X
    MAXLINE           X
    MAXPATHLEN        X
    MAXSIZES          X
    NAMEFIELDS        X
    NAMELENGTH        X
    P                 X
    PAGELENGTH        X
    PRINTF            X
    PROLOGUE          X
    PUTC              X
    SPRINTF           X
    SSCANF            X
    STRCPY            X
    STRNCPY           X
    TRUE              X
    UNGETC            X
    strchr            X

##### typedef's

    bool              X

       1:
       2: /*  @(#)mp.h 1.4 92/02/17
       3:  *
       4:  *  Contains all the global definitions used by mp.
       5:  *
       6:  *  Copyright (c) Steve Holden and Rich Burridge.
       7:  *                All rights reserved.
       8:  *
       9:  *  Permission is given to distribute these sources, as long as the
      10:  *  copyright messages are not removed, and no monies are exchanged.
      11:  *
      12:  *  No responsibility is taken for any errors or inaccuracies inherent
      13:  *  either to the comments or the code of this program, but if
      14:  *  reported to me then an attempt will be made to fix them.
      15:  */
      16:
      17: #include <stdio.h>
      18: #include <sys/types.h>
      19: #include <sys/file.h>
      20: #include <sys/param.h>
      21: #include <ctype.h>
      22: #include <time.h>
      23: #include <pwd.h>
      24:
      25: #ifdef   SYSV
      26: #include <string.h>
      27: #endif /*SYSV*/
      28:
      29: #define  FCLOSE       (void) fclose
      30: #define  FPRINTF      (void) fprintf
      31: #define  FPUTS        (void) fputs
      32: #define  PRINTF       (void) printf
      33: #define  PUTC         (void) putc
      34: #define  SPRINTF      (void) sprintf
      35: #define  SSCANF       (void) sscanf
      36: #define  STRCPY       (void) strcpy
      37: #define  STRNCPY      (void) strncpy
      38: #define  UNGETC       (void) ungetc
      39:
      40: /*  For all function declarations, if ANSI then use a prototype. */
      41:
      42: #if  defined(__STDC__)
      43: #define P(args)  args
      44: #else  /* ! __STDC__ */
      45: #define P(args)  ()
      46: #endif  /* STDC */
      47:
      48: /* Configuration constants */
      49:
      50: #ifndef  PROLOGUE            /* PostScript prologue file */
      51: #define  PROLOGUE     "/usr/local/lib"
      52: #endif /*PROLOGUE*/
      53:
      54: #define  EQUAL(val)   (!strncmp(val, nextline, strlen(val)))
      55: #define  INC          argc-- ; argv++ ;
      56:
      57: #ifdef  NOSTRCHR
      58: #define  strchr       index
      59: #endif /*NOINDEX*/
      60:
      61: #define  LINELENGTH   80     /* Number of characters per line. */
      62:
      63: #ifndef  MAXPATHLEN
      64: #define  MAXPATHLEN   1024
      65: #endif /*MAXPATHLEN*/
      66:
      67: #define  MAXSIZES     4      /* Maximum number of different sizes. */
      68:
      69: #define  NAMEFIELDS   3      /* Default no. of "words" from passwd gecos. */
      70: #define  NAMELENGTH   18     /* Maximum allowable real user name. */
      71: #define  PAGELENGTH   60     /* Number of lines per page. */
      72: #define  MAXCONT      10     /* Maximum no of continuation header lines */
      73: #define  MAXLINE      256    /* Maximum string length. */
      74:
      75: #ifndef TRUE
      76: #define TRUE          1
      77: #define FALSE         0
      78: #endif  /*TRUE*/
      79:
      80: typedef enum {DO_MAIL, DO_NEWS, DO_TEXT} document_type ;
      81: typedef enum { A4, US }                  paper_type ;
      82: typedef char bool ;
      83:
      84: extern time_t time          P((time_t *)) ;
      85: extern struct tm *localtime P((const time_t *)) ;
      86:
      87: bool emptyline              P((char *)) ;
      88:
      89: extern FILE *fopen          P((const char *, const char *)) ;
      90: extern void exit            P((int)) ;
      91: extern char *asctime        P((const struct tm *)) ;
      92: extern char *getenv         P((char *)) ;
      93: extern char *getlogin       P(()) ;
      94: extern char *gets           P((char *)) ;
      95: extern char *malloc         P((unsigned int)) ;
      96:
      97: #ifndef SYSV
      98: extern char *realloc        P((char *, unsigned int)) ;
      99: extern char *strchr         P((char *, int)) ;
     100: extern char *strcpy         P((char *, char *)) ;
     101: extern char *strncpy        P((char *, char *, int)) ;
     102: #endif /*SYSV*/
     103:
     104: int boldshow                P((char *, char *)) ;
     105: int endcol                  P(()) ;
     106: int endfile                 P(()) ;
     107: int endline                 P(()) ;
     108: int endpage                 P(()) ;
     109: int expand                  P((unsigned char *)) ;
     110: int get_opt                 P((int, char **, char *)) ;
     111: int get_options             P((int, char **)) ;
     112: int hdr_equal               P((char *)) ;
     113: int main                    P((int, char **)) ;
     114: int mixedshow               P((char *, char *)) ;
     115: int printfile               P(()) ;
     116: int process_name_field      P((char *, char *, int, int)) ;
     117: int process_postscript      P(()) ;
     118: int psdef                   P((char *, char *)) ;
     119: int romanshow               P((char *)) ;
     120: int show_prologue           P((char *)) ;
     121: int show_trailer            P(()) ;
     122: int startline               P(()) ;
     123: int startfile               P(()) ;
     124: int startpage               P(()) ;
     125: int textshow                P((char *)) ;
     126: int usage                   P(()) ;
     127: int useline                 P(()) ;
     128:
     129: void do_date                P(()) ;
     130: void get_header             P((char *, char **)) ;
     131: void get_mult_hdr           P((char *, char **)) ;
     132: void init_setup             P(()) ;
     133: void parse_headers          P((int)) ;
     134: void readline               P(()) ;
     135: void reset_headers          P(()) ;
     136: void set_defs               P(()) ;
     137: void show_headers           P((int)) ;
     138: void show_mult_hdr          P((char *, char **)) ;

#### Defined variables

boldshow defined in line 104; used 1 times

- in /usr/src/local/mp/header.c line 242

do_date defined in line 129; used 1 times

- in /usr/src/local/mp/print.c line 160

emptyline defined in line 87; used 4 times

- in /usr/src/local/mp/header.c line 52, 148, 160-163(2)

endcol defined in line 105; used 3 times

- in /usr/src/local/mp/main.c line 236, 257
- in /usr/src/local/mp/print.c line 282

endfile defined in line 106; used 2 times

- in /usr/src/local/mp/main.c line 238, 259

endline defined in line 107; used 4 times

- in /usr/src/local/mp/print.c line 28, 104, 126, 273

endpage defined in line 108; used 4 times

- in /usr/src/local/mp/main.c line 237, 258, 280
- in /usr/src/local/mp/print.c line 285

expand defined in line 109; used 7 times

- in /usr/src/local/mp/print.c line 26-27(2), 101-103(2), 113, 125, 272

get_header defined in line 130; used 11 times

- in /usr/src/local/mp/header.c line 49, 152-157(6), 170-176(4)

get_mult_hdr defined in line 131; used 2 times

- in /usr/src/local/mp/header.c line 159-162(2)

get_opt defined in line 110; used 1 times

- in /usr/src/local/mp/misc.c line 106

get_options defined in line 111; used 1 times

- in /usr/src/local/mp/main.c line 119

hdr_equal defined in line 112; used 19 times

- in /usr/src/local/mp/header.c line 28, 47, 124, 165-167(2), 177, 190(2)
- in /usr/src/local/mp/main.c line 203(2), 216-217(2), 226(3), 234, 272-273(3)

init_setup defined in line 132; used 1 times

- in /usr/src/local/mp/main.c line 169

main defined in line 113; never used
mixedshow defined in line 114; used 11 times

- in /usr/src/local/mp/header.c line 236-251(10), 262

parse_headers defined in line 133; used 4 times

- in /usr/src/local/mp/main.c line 168, 209, 222, 230

printfile defined in line 115; used 2 times

- in /usr/src/local/mp/main.c line 130, 144

process_name_field defined in line 116; used 2 times

- in /usr/src/local/mp/misc.c line 210-212(2)

process_postscript defined in line 117; used 1 times

- in /usr/src/local/mp/main.c line 239

psdef defined in line 118; used 5 times

- in /usr/src/local/mp/misc.c line 38, 44
- in /usr/src/local/mp/print.c line 139, 158-163(2)

readline defined in line 134; used 6 times

- in /usr/src/local/mp/header.c line 51, 57, 193-194(2)
- in /usr/src/local/mp/main.c line 160, 252

reset_headers defined in line 135; used 2 times

- in /usr/src/local/mp/main.c line 208, 221

romanshow defined in line 119; used 1 times

- in /usr/src/local/mp/header.c line 264

set_defs defined in line 136; used 2 times

- in /usr/src/local/mp/print.c line 43, 255

show_headers defined in line 137; used 4 times

- in /usr/src/local/mp/main.c line 180, 210, 223, 231

show_mult_hdr defined in line 138; used 2 times

- in /usr/src/local/mp/header.c line 245-247(2)

show_prologue defined in line 120; used 1 times

- in /usr/src/local/mp/main.c line 121

show_trailer defined in line 121; used 1 times

- in /usr/src/local/mp/main.c line 147

startfile defined in line 123; used 2 times

- in /usr/src/local/mp/main.c line 171, 190

startline defined in line 122; used 4 times

- in /usr/src/local/mp/print.c line 25, 100, 124, 271

startpage defined in line 124; used 4 times

- in /usr/src/local/mp/main.c line 172, 191, 271
- in /usr/src/local/mp/print.c line 287

textshow defined in line 125; used 1 times

- in /usr/src/local/mp/main.c line 246

usage defined in line 126; used 1 times

- in /usr/src/local/mp/misc.c line 153

useline defined in line 127; used 4 times

- in /usr/src/local/mp/print.c line 23, 98, 122, 270

#### Defined typedef's

bool defined in line 82; used 15 times

- in line 87
- in /usr/src/local/mp/io.c line 21
- in /usr/src/local/mp/main.c line 22-30(9), 96-98(3), 158

#### Defined macros

EQUAL defined in line 54; never used
FALSE defined in line 77; used 26 times

- in /usr/src/local/mp/io.c line 27, 46
- in /usr/src/local/mp/main.c line 22-30(8), 96-98(2), 168, 174, 180, 202-212(5), 219-223(3), 247
- in /usr/src/local/mp/misc.c line 136, 219

FCLOSE defined in line 29; used 3 times

- in /usr/src/local/mp/main.c line 262
- in /usr/src/local/mp/print.c line 236-239(2)

FPRINTF defined in line 30; used 10 times

- in /usr/src/local/mp/main.c line 138, 163
- in /usr/src/local/mp/misc.c line 268-272(5)
- in /usr/src/local/mp/print.c line 86, 181, 231

FPUTS defined in line 31; used 20 times

- in /usr/src/local/mp/header.c line 253
- in /usr/src/local/mp/main.c line 123, 182, 276, 287
- in /usr/src/local/mp/print.c line 24, 35, 79-83(3), 99-102(2), 123, 197-208(5), 235, 256

INC defined in line 55; never used
LINELENGTH defined in line 61; used 1 times

- in /usr/src/local/mp/main.c line 84

MAXCONT defined in line 72; used 4 times

- in /usr/src/local/mp/header.c line 52, 217
- in /usr/src/local/mp/main.c line 53-55(2)

MAXLINE defined in line 73; used 8 times

- in /usr/src/local/mp/header.c line 70, 116
- in /usr/src/local/mp/main.c line 94, 278
- in /usr/src/local/mp/print.c line 175(2), 184, 235

MAXPATHLEN defined in line 64; used 1 times

- in line 63

MAXSIZES defined in line 67; never used
NAMEFIELDS defined in line 69; used 1 times

- in /usr/src/local/mp/misc.c line 171

NAMELENGTH defined in line 70; used 1 times

- in /usr/src/local/mp/misc.c line 177

P defined in line 45; used 48 times

- in line 84-138(48)

PAGELENGTH defined in line 71; used 1 times

- in /usr/src/local/mp/main.c line 89

PRINTF defined in line 32; used 11 times

- in /usr/src/local/mp/main.c line 275, 288
- in /usr/src/local/mp/print.c line 39-41(2), 59, 67, 112-114(2), 246, 253-254(2)

PROLOGUE defined in line 51; used 3 times

- in line 50
- in /usr/src/local/mp/main.c line 71, 116

PUTC defined in line 33; never used
SPRINTF defined in line 34; used 8 times

- in /usr/src/local/mp/main.c line 117
- in /usr/src/local/mp/misc.c line 43, 124-129(3), 145-147(2)
- in /usr/src/local/mp/print.c line 228

SSCANF defined in line 35; used 2 times

- in /usr/src/local/mp/header.c line 179
- in /usr/src/local/mp/print.c line 213

STRCPY defined in line 36; used 7 times

- in /usr/src/local/mp/header.c line 31, 55
- in /usr/src/local/mp/main.c line 129, 135
- in /usr/src/local/mp/misc.c line 139, 188-190(2)

STRNCPY defined in line 37; used 2 times

- in /usr/src/local/mp/print.c line 147, 154

TRUE defined in line 76; used 33 times

- in line 75
- in /usr/src/local/mp/header.c line 146
- in /usr/src/local/mp/io.c line 30, 86-93(3), 101-105(3)
- in /usr/src/local/mp/main.c line 29, 230-231(2), 242-245(3), 278
- in /usr/src/local/mp/misc.c line 38, 109-121(6), 128-133(3)
- in /usr/src/local/mp/print.c line 38, 44, 135-141(3), 150, 280

UNGETC defined in line 38; used 3 times

- in /usr/src/local/mp/io.c line 75, 89, 102

strchr defined in line 58; used 2 times

- in /usr/src/local/mp/header.c line 126
- in /usr/src/local/mp/misc.c line 75

#### Usage of this include

mp.h used 5 times

- in /usr/src/local/mp/header.c line 15
- in /usr/src/local/mp/io.c line 15
- in /usr/src/local/mp/main.c line 18
- in /usr/src/local/mp/misc.c line 15
- in /usr/src/local/mp/print.c line 15

Last modified: 1992-02-17 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1813 |