make pmatch a global; move SPACE structure here since main.c
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sat, 29 Aug 1992 06:25:46 +0000 (22:25 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sat, 29 Aug 1992 06:25:46 +0000 (22:25 -0800)
needs it now

SCCS-vsn: usr.bin/sed/defs.h 5.3

usr/src/usr.bin/sed/defs.h

index ee94560..e0c9de2 100644 (file)
@@ -8,7 +8,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)defs.h      5.2 (Berkeley) %G%
+ *     @(#)defs.h      5.3 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -40,7 +40,6 @@ struct s_subst {
        char *wfile;                            /* NULL if no wfile */
        int wfd;                                /* Cached file descriptor */
        regex_t *re;                            /* Regular expression */
        char *wfile;                            /* NULL if no wfile */
        int wfd;                                /* Cached file descriptor */
        regex_t *re;                            /* Regular expression */
-       regmatch_t *pmatch;                     /* Array of match strucs */
        int maxbref;                            /* Largest backreference. */
        u_long linenum;                         /* Line number. */
        char *new;                              /* Replacement text */
        int maxbref;                            /* Largest backreference. */
        u_long linenum;                         /* Line number. */
        char *new;                              /* Replacement text */
@@ -92,6 +91,23 @@ struct s_appends {
        char *s;
 };
 
        char *s;
 };
 
+enum e_spflag {
+       APPEND,                                 /* Append to the contents. */
+       APPENDNL,                               /* Append, with newline. */
+       REPLACE,                                /* Replace the contents. */
+};
+
+/*
+ * Structure for a space (process, hold, otherwise).
+ */
+typedef struct {
+       char *space;            /* Current space pointer. */
+       size_t len;             /* Current length. */
+       int deleted;            /* If deleted. */
+       char *back;             /* Backing memory. */
+       size_t blen;            /* Backing memory length. */
+} SPACE;
+
 /*
  * Error severity codes:
  */
 /*
  * Error severity codes:
  */