Annotation of coherent/d/usr/bin/elvis/vars.c, revision 1.1

1.1     ! root        1: /* vars.c */
        !             2: 
        !             3: /* Author:
        !             4:  *     Steve Kirkendall
        !             5:  *     16820 SW Tallac Way
        !             6:  *     Beaverton, OR 97006
        !             7:  *     [email protected], or ...uunet!tektronix!psueea!jove!kirkenda
        !             8:  */
        !             9: 
        !            10: 
        !            11: /* This file contains variables which weren't happy anyplace else */
        !            12: 
        !            13: #include "config.h"
        !            14: #include "vi.h"
        !            15: 
        !            16: /*------------------------------------------------------------------------*/
        !            17: 
        !            18: /* used to remember whether the file has been modified */
        !            19: struct _viflags        viflags;
        !            20: 
        !            21: /* used to access the tmp file */
        !            22: long           lnum[MAXBLKS];
        !            23: long           nlines;
        !            24: int            tmpfd = -1;
        !            25: 
        !            26: /* used to keep track of the current file & alternate file */
        !            27: long           origtime;
        !            28: char           origname[256];
        !            29: char           prevorig[256];
        !            30: long           prevline = 1;
        !            31: 
        !            32: /* used to track various places in the text */
        !            33: MARK           mark[NMARKS];   /* marks 'a through 'z, plus mark '' */
        !            34: MARK           cursor;         /* the cursor position within the file */
        !            35: 
        !            36: /* which mode of the editor we're in */
        !            37: int            mode;           /* vi mode? ex mode? quitting? */
        !            38: 
        !            39: /* used to manage the args list */
        !            40: char           args[BLKSIZE];  /* list of filenames to edit */
        !            41: int            argno;          /* index of current file in args list */
        !            42: int            nargs;          /* number of filenames in args[] */
        !            43: 
        !            44: /* dummy var, never explicitly referenced */
        !            45: int            bavar;          /* used only in BeforeAfter macros */
        !            46: 
        !            47: /* have we made a multi-line change? */
        !            48: int            mustredraw;     /* must we redraw the whole screen? */
        !            49: 
        !            50: /* used to detect changes that invalidate cached text/blocks */
        !            51: long           changes;        /* incremented when file is changed */
        !            52: int            significant;    /* boolean: was a *REAL* change made? */
        !            53: 
        !            54: /* used to support the pfetch() macro */
        !            55: int            plen;           /* length of the line */
        !            56: long           pline;          /* line number that len refers to */
        !            57: long           pchgs;          /* "changes" level that len refers to */
        !            58: char           *ptext;         /* text of previous line, if valid */
        !            59: 
        !            60: /* misc temporary storage - mostly for strings */
        !            61: BLK            tmpblk;         /* a block used to accumulate changes */
        !            62: 
        !            63: /* screen oriented stuff */
        !            64: long           topline;        /* file line number of top line */
        !            65: int            leftcol;        /* column number of left col */
        !            66: int            physcol;        /* physical column number that cursor is on */
        !            67: int            physrow;        /* physical row number that cursor is on */
        !            68: 
        !            69: /* used to help minimize that "[Hit a key to continue]" message */
        !            70: int            exwrote;        /* Boolean: was the last ex command wordy? */
        !            71: 
        !            72: /* This variable affects the behaviour of certain functions -- most importantly
        !            73:  * the input function.
        !            74:  */
        !            75: int            doingdot;       /* boolean: are we doing the "." command? */
        !            76: 
        !            77: /* This variable affects the behaviour of the ":s" command, and it is also
        !            78:  * used to detect & prohibit nesting of ":g" commands
        !            79:  */
        !            80: int            doingglobal;    /* boolean: are doing a ":g" command? */
        !            81: /* These are used for reporting multi-line changes to the user */
        !            82: long           rptlines;       /* number of lines affected by a command */
        !            83: char           *rptlabel;      /* description of how lines were affected */
        !            84: 
        !            85: /* These store info that pertains to the shift-U command */
        !            86: long   U_line;                 /* line# of the undoable line, or 0l for none */
        !            87: char   U_text[BLKSIZE];        /* contents of the undoable line */
        !            88: 
        !            89: /* Bigger stack req'ed for TOS */
        !            90: 
        !            91: #if TOS
        !            92: long   _stksize = 16384;
        !            93: #endif

unix.superglobalmegacorp.com

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