Must distinguish between "ambiguous" and "unknown" commands.
[unix-history] / usr / src / usr.bin / ex / ex.h
index 2c1e100..85c37be 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)ex.h        7.7 (Berkeley) %G%
+ *     @(#)ex.h        7.8 (Berkeley) %G%
  */
 
 #ifdef V6
  */
 
 #ifdef V6
  * of additional terminal descriptions you add to the termcap data base.
  */
 
  * of additional terminal descriptions you add to the termcap data base.
  */
 
+#ifndef        vms
 #include <sys/param.h>
 #include <sys/param.h>
+#else
+#define        MAXBSIZE        1024    /* Maximum block size */
+#include <types.h>
+#endif
 #include <ctype.h>
 #include <errno.h>
 #include <signal.h>
 #include <setjmp.h>
 #include <ctype.h>
 #include <errno.h>
 #include <signal.h>
 #include <setjmp.h>
+#ifndef        vms
 #include <sys/stat.h>
 #include <sys/stat.h>
+#else
+#include <stat.h>
+#endif
 
 #ifndef var
 #define var    extern
 
 #ifndef var
 #define var    extern
 #include <termio.h>
 #define CBREAK xxxxx
 #else
 #include <termio.h>
 #define CBREAK xxxxx
 #else
+#ifndef        vms
 #include <sgtty.h>
 #include <sgtty.h>
+#else
+#include "vmstty.h"
+#endif
 #endif
 
 extern int errno;
 #endif
 
 extern int errno;
@@ -111,6 +124,11 @@ struct     option {
 
 extern  struct option options[NOPTS + 1];
 
 
 extern  struct option options[NOPTS + 1];
 
+#ifdef vms
+#define        st_blksize      st_fab_mrs
+#define        _exit(n)        vms_exit(n)
+#define        fork()          vfork()
+#endif
 
 /*
  * The editor does not normally use the standard i/o library.  Because
 
 /*
  * The editor does not normally use the standard i/o library.  Because
@@ -125,13 +143,11 @@ extern     struct option options[NOPTS + 1];
  * are not debugging.  Such a modified printf exists in "printf.c" here.
  */
 #ifdef TRACE
  * are not debugging.  Such a modified printf exists in "printf.c" here.
  */
 #ifdef TRACE
-#      include <stdio.h>
+# include <stdio.h>
        var     FILE    *trace;
        var     bool    trubble;
        var     bool    techoin;
        var     char    tracbuf[BUFSIZ];
        var     FILE    *trace;
        var     bool    trubble;
        var     bool    techoin;
        var     char    tracbuf[BUFSIZ];
-#      undef   putchar
-#      undef   getchar
 #else
 # ifdef        VMUNIX
 #      define  BUFSIZ  1024
 #else
 # ifdef        VMUNIX
 #      define  BUFSIZ  1024
@@ -156,7 +172,9 @@ extern       struct option options[NOPTS + 1];
  */
 #define        QUOTE   0200
 #define        TRIM    0177
  */
 #define        QUOTE   0200
 #define        TRIM    0177
+#ifndef vms
 #undef CTRL
 #undef CTRL
+#endif
 #define        CTRL(c) ('c' & 037)
 #define        NL      CTRL(j)
 #define        CR      CTRL(m)
 #define        CTRL(c) ('c' & 037)
 #define        NL      CTRL(j)
 #define        CR      CTRL(m)
@@ -178,7 +196,7 @@ var bool    dosusp;         /* Do SIGTSTP in visual when ^Z typed */
 var    bool    edited;         /* Current file is [Edited] */
 var    line    *endcore;       /* Last available core location */
 extern  bool   endline;        /* Last cmd mode command ended with \n */
 var    bool    edited;         /* Current file is [Edited] */
 var    line    *endcore;       /* Last available core location */
 extern  bool   endline;        /* Last cmd mode command ended with \n */
-#ifndef VMUNIX
+#ifdef EXSTRINGS
 var    short   erfile;         /* Error message file unit */
 #endif
 var    line    *fendcore;      /* First address in line pointer space */
 var    short   erfile;         /* Error message file unit */
 #endif
 var    line    *fendcore;      /* First address in line pointer space */
@@ -314,21 +332,6 @@ var        line    *undadot;       /* If we saved all lines, dot reverts here */
 #define        UNDNONE         3
 #define        UNDPUT          4
 
 #define        UNDNONE         3
 #define        UNDPUT          4
 
-#ifdef CRYPT
-/*
- * Various miscellaneous flags and buffers needed by the encryption routines.
- */
-#define        KSIZE   9       /* key size for encryption */
-#define        KEYPROMPT       "Key: "
-var    int     xflag;          /* True if we are in encryption mode */
-var    int     xtflag;         /* True if the temp file is being encrypted */
-var    int     kflag;          /* True if the key has been accepted */
-var    char    perm[768];
-var    char    tperm[768];
-var    char    *key;
-var    char    crbuf[CRSIZE];
-char   *getpass();
-#endif
 
 /*
  * Function type definitions
 
 /*
  * Function type definitions
@@ -338,7 +341,7 @@ char        *getpass();
 
 extern int     (*Outchar)();
 extern int     (*Pline)();
 
 extern int     (*Outchar)();
 extern int     (*Pline)();
-extern int     (*Putchar)();
+extern int     (*Put_char)();
 var    int     (*oldhup)();
 int    (*setlist())();
 int    (*setnorm())();
 var    int     (*oldhup)();
 int    (*setlist())();
 int    (*setnorm())();
@@ -349,6 +352,9 @@ char        *cgoto();
 char   *genindent();
 char   *getblock();
 char   *getenv();
 char   *genindent();
 char   *getblock();
 char   *getenv();
+#ifdef vms
+char   *getlog();
+#endif
 line   *getmark();
 char   *longname();
 char   *mesg();
 line   *getmark();
 char   *longname();
 char   *mesg();
@@ -372,7 +378,7 @@ char        *vskipwh();
 int    put();
 int    putreg();
 int    YANKreg();
 int    put();
 int    putreg();
 int    YANKreg();
-int    delete();
+int    ex_delete();
 int    execl();
 int    filter();
 int    getfile();
 int    execl();
 int    filter();
 int    getfile();