home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / apps / program / d / elvis / Source / c / vars < prev    next >
Encoding:
Text File  |  1989-12-31  |  2.7 KB  |  82 lines

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