Annotation of 43BSDReno/include/vis.h, revision 1.1

1.1     ! root        1: /*-
        !             2:  * Copyright (c) 1990 The Regents of the University of California.
        !             3:  * All rights reserved.
        !             4:  *
        !             5:  * Redistribution and use in source and binary forms are permitted provided
        !             6:  * that: (1) source distributions retain this entire copyright notice and
        !             7:  * comment, and (2) distributions including binaries display the following
        !             8:  * acknowledgement:  ``This product includes software developed by the
        !             9:  * University of California, Berkeley and its contributors'' in the
        !            10:  * documentation or other materials provided with the distribution and in
        !            11:  * all advertising materials mentioning features or use of this software.
        !            12:  * Neither the name of the University nor the names of its contributors may
        !            13:  * be used to endorse or promote products derived from this software without
        !            14:  * specific prior written permission.
        !            15:  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
        !            16:  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
        !            17:  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
        !            18:  *
        !            19:  *     @(#)vis.h       5.4 (Berkeley) 6/26/90
        !            20:  */
        !            21: 
        !            22: /*
        !            23:  * to select alternate encoding format
        !            24:  */
        !            25: #define        VIS_OCTAL       0x01    /* use octal \ddd format */
        !            26: #define        VIS_CSTYLE      0x02    /* use \[nrft0..] where appropiate */
        !            27: 
        !            28: /*
        !            29:  * to alter set of characters encoded (default is to encode all
        !            30:  * non-graphic except space, tab, and newline).
        !            31:  */
        !            32: #define        VIS_SP          0x04    /* also encode space */
        !            33: #define        VIS_TAB         0x08    /* also encode tab */
        !            34: #define        VIS_NL          0x10    /* also encode newline */
        !            35: #define        VIS_WHITE       (VIS_SP | VIS_TAB | VIS_NL)
        !            36: #define        VIS_SAFE        0x20    /* only encode "unsafe" characters */
        !            37: 
        !            38: /*
        !            39:  * other
        !            40:  */
        !            41: #define        VIS_NOSLASH     0x40    /* inhibit printing '\' */
        !            42: 
        !            43: /*
        !            44:  * unvis return codes
        !            45:  */
        !            46: #define        UNVIS_VALID      1      /* character valid */
        !            47: #define        UNVIS_VALIDPUSH  2      /* character valid, push back passed char */
        !            48: #define        UNVIS_NOCHAR     3      /* valid sequence, no character produced */
        !            49: #define        UNVIS_SYNBAD    -1      /* unrecognized escape sequence */
        !            50: #define        UNVIS_ERROR     -2      /* decoder in unknown state (unrecoverable) */
        !            51: 
        !            52: /*
        !            53:  * unvis flags
        !            54:  */
        !            55: #define        UNVIS_END       1       /* no more characters */
        !            56: 
        !            57: #if __STDC__ || c_plusplus
        !            58: char *vis(char *, char, char, int);
        !            59: int   strvis(char *, const char *, int);
        !            60: int   strvisx(char *, const char *, size_t, int);
        !            61: #else
        !            62: char *vis();
        !            63: int   strvis();
        !            64: int   strvisx();
        !            65: #endif

unix.superglobalmegacorp.com

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