BSD 4 release
[unix-history] / usr / src / cmd / ex / ex_vis.h
index 9fac3bc..b401d39 100644 (file)
@@ -1,6 +1,7 @@
-/* Copyright (c) 1979 Regents of the University of California */
+/* Copyright (c) 1980 Regents of the University of California */
+/* sccs id:    @(#)ex_vis.h    6.1 10/18/80  */
 /*
 /*
- * Ex version 2
+ * Ex version 3
  * Mark Horton, UCB
  * Bill Joy UCB
  *
  * Mark Horton, UCB
  * Bill Joy UCB
  *
@@ -134,6 +135,20 @@ line       *wdot;
 short  vundkind;       /* Which kind of undo - from above */
 char   *vutmp;         /* Prev line image when "VCHNG" */
 
 short  vundkind;       /* Which kind of undo - from above */
 char   *vutmp;         /* Prev line image when "VCHNG" */
 
+/*
+ * State information for undoing of macros.  The basic idea is that
+ * if the macro does only 1 change or even none, we don't treat it
+ * specially.  If it does 2 or more changes we want to be able to
+ * undo it as a unit.  We remember how many changes have been made
+ * within the current macro.  (Remember macros can be nested.)
+ */
+#define VC_NOTINMAC    0       /* Not in a macro */
+#define VC_NOCHANGE    1       /* In a macro, no changes so far */
+#define VC_ONECHANGE   2       /* In a macro, one change so far */
+#define VC_MANYCHANGE  3       /* In a macro, at least 2 changes so far */
+
+short  vch_mac;        /* Change state - one of the above */
+
 /*
  * For U undo's the line is grabbed by "vmove" after it first appears
  * on that line.  The "vUNDdot" which specifies which line has been
 /*
  * For U undo's the line is grabbed by "vmove" after it first appears
  * on that line.  The "vUNDdot" which specifies which line has been