changed start to Start and start_default to Start_default to
authorRalph Campbell <ralph@ucbvax.Berkeley.EDU>
Tue, 9 Mar 1993 10:32:01 +0000 (02:32 -0800)
committerRalph Campbell <ralph@ucbvax.Berkeley.EDU>
Tue, 9 Mar 1993 10:32:01 +0000 (02:32 -0800)
avoid conflicts with start defined in crt0.o

SCCS-vsn: contrib/ed/c.c 5.4
SCCS-vsn: contrib/ed/d.c 5.4
SCCS-vsn: contrib/ed/e.c 5.5
SCCS-vsn: contrib/ed/ed.h 5.5
SCCS-vsn: contrib/ed/equal.c 5.4
SCCS-vsn: contrib/ed/g.c 5.5
SCCS-vsn: contrib/ed/i.c 5.4
SCCS-vsn: contrib/ed/main.c 5.6
SCCS-vsn: contrib/ed/j.c 5.4
SCCS-vsn: contrib/ed/input_lines.c 5.7
SCCS-vsn: contrib/ed/k.c 5.4
SCCS-vsn: contrib/ed/l.c 5.5
SCCS-vsn: contrib/ed/m.c 5.4
SCCS-vsn: contrib/ed/p.c 5.4
SCCS-vsn: contrib/ed/q.c 5.4
SCCS-vsn: contrib/ed/t.c 5.4
SCCS-vsn: contrib/ed/w.c 5.4
SCCS-vsn: contrib/ed/sub.c 5.4
SCCS-vsn: contrib/ed/z.c 5.5

19 files changed:
usr/src/contrib/ed/c.c
usr/src/contrib/ed/d.c
usr/src/contrib/ed/e.c
usr/src/contrib/ed/ed.h
usr/src/contrib/ed/equal.c
usr/src/contrib/ed/g.c
usr/src/contrib/ed/i.c
usr/src/contrib/ed/input_lines.c
usr/src/contrib/ed/j.c
usr/src/contrib/ed/k.c
usr/src/contrib/ed/l.c
usr/src/contrib/ed/m.c
usr/src/contrib/ed/main.c
usr/src/contrib/ed/p.c
usr/src/contrib/ed/q.c
usr/src/contrib/ed/sub.c
usr/src/contrib/ed/t.c
usr/src/contrib/ed/w.c
usr/src/contrib/ed/z.c

index ead5935..1cda903 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)c.c        5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)c.c        5.4 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -35,16 +35,16 @@ c(inputt, errnum)
        FILE *inputt;
        int *errnum;
 {
        FILE *inputt;
        int *errnum;
 {
-       if (start_default && End_default)
-               start = End = current;
+       if (Start_default && End_default)
+               Start = End = current;
        else
        else
-               if (start_default)
-                       start = End;
-       if (start == NULL) {
+               if (Start_default)
+                       Start = End;
+       if (Start == NULL) {
                *errnum = -1;
                return;
        }
                *errnum = -1;
                return;
        }
-       start_default = End_default = 0;
+       Start_default = End_default = 0;
 
        /* first delete the lines */
        d(inputt, errnum);
 
        /* first delete the lines */
        d(inputt, errnum);
@@ -55,7 +55,7 @@ c(inputt, errnum)
        if ((current != NULL) && (current != bottom))
                current = current->above;
        add_flag = 1;
        if ((current != NULL) && (current != bottom))
                current = current->above;
        add_flag = 1;
-       start_default = End_default = 1;
+       Start_default = End_default = 1;
        /* now get the "change" lines */
        input_lines(inputt, errnum);
        add_flag = 0;
        /* now get the "change" lines */
        input_lines(inputt, errnum);
        add_flag = 0;
index f0d6cd3..47f111a 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)d.c        5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)d.c        5.4 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -31,7 +31,7 @@ static void d_add __P((LINE *, LINE *));
 /*
  * This removes lines in the buffer from user access. The specified
  * lines are not really deleted yet(!) as they might be called back
 /*
  * This removes lines in the buffer from user access. The specified
  * lines are not really deleted yet(!) as they might be called back
- * by an undo. So the pointers from start, End, and neighbours are placed
+ * by an undo. So the pointers from Start, End, and neighbours are placed
  * in a stack for deletion later when no undo can be performed on these lines.
  * The lines in the buffer are freed then as well.
  */
  * in a stack for deletion later when no undo can be performed on these lines.
  * The lines in the buffer are freed then as well.
  */
@@ -42,17 +42,17 @@ d(inputt, errnum)
 {
        LINE *l_temp1, *l_temp2;
 
 {
        LINE *l_temp1, *l_temp2;
 
-       if (start_default && End_default)
-               start = End = current;
+       if (Start_default && End_default)
+               Start = End = current;
        else
        else
-               if (start_default)
-                       start = End;
-       if (start == NULL) {
+               if (Start_default)
+                       Start = End;
+       if (Start == NULL) {
                strcpy(help_msg, "buffer empty");
                *errnum = -1;
                return;
        }
                strcpy(help_msg, "buffer empty");
                *errnum = -1;
                return;
        }
-       start_default = End_default = 0;
+       Start_default = End_default = 0;
 
        if (join_flag == 0) {
                if (rol(inputt, errnum))
 
        if (join_flag == 0) {
                if (rol(inputt, errnum))
@@ -64,42 +64,42 @@ d(inputt, errnum)
        if ((u_set == 0) && (g_flag == 0))
                u_clr_stk();    /* for undo */
 
        if ((u_set == 0) && (g_flag == 0))
                u_clr_stk();    /* for undo */
 
-       if ((start == NULL) && (End == NULL)) { /* nothing to do... */
+       if ((Start == NULL) && (End == NULL)) { /* nothing to do... */
                *errnum = 1;
                return;
        }
 
                *errnum = 1;
                return;
        }
 
-       d_add(start, End);      /* for buffer clearing later(!) */
+       d_add(Start, End);      /* for buffer clearing later(!) */
 
        /*
         * Now change & preserve the pointers in case of undo and then adjust
         * them.
         */
        sigspecial++;
 
        /*
         * Now change & preserve the pointers in case of undo and then adjust
         * them.
         */
        sigspecial++;
-       if (start == top) {
+       if (Start == top) {
                top = End->below;
                if (top != NULL) {
                        u_add_stk(&(top->above));
                        (top->above) = NULL;
                }
        } else {
                top = End->below;
                if (top != NULL) {
                        u_add_stk(&(top->above));
                        (top->above) = NULL;
                }
        } else {
-               l_temp1 = start->above;
+               l_temp1 = Start->above;
                u_add_stk(&(l_temp1->below));
                (l_temp1->below) = End->below;
        }
 
        if (End == bottom) {
                u_add_stk(&(l_temp1->below));
                (l_temp1->below) = End->below;
        }
 
        if (End == bottom) {
-               bottom = start->above;
+               bottom = Start->above;
                current = bottom;
        } else {
                l_temp2 = End->below;
                u_add_stk(&(l_temp2->above));
                current = bottom;
        } else {
                l_temp2 = End->below;
                u_add_stk(&(l_temp2->above));
-               (l_temp2->above) = start->above;
+               (l_temp2->above) = Start->above;
                current = l_temp2;
        }
 
        /* To keep track of the marks. */
                current = l_temp2;
        }
 
        /* To keep track of the marks. */
-       ku_chk(start, End, NULL);
+       ku_chk(Start, End, NULL);
        change_flag = 1L;
 
        *errnum = 1;
        change_flag = 1L;
 
        *errnum = 1;
index 09c351a..7a506f3 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)e.c        5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)e.c        5.5 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -72,10 +72,10 @@ e(inputt, errnum)
                ungetc('\n', inputt);
                return;
        }
                ungetc('\n', inputt);
                return;
        }
-       start = top;
+       Start = top;
        End = bottom;
        End = bottom;
-       start_default = End_default = 0;
-       if (start == NULL && bottom == NULL);
+       Start_default = End_default = 0;
+       if (Start == NULL && bottom == NULL);
        else {
                ungetc(ss, inputt);
                d(inputt, errnum);      /* delete the whole buffer */
        else {
                ungetc(ss, inputt);
                d(inputt, errnum);      /* delete the whole buffer */
@@ -152,7 +152,7 @@ e2(inputt, errnum)
        }
 #endif
        current = top;
        }
 #endif
        current = top;
-       start = top;
+       Start = top;
        End = bottom;
 
        sigspecial--;
        End = bottom;
 
        sigspecial--;
index 1845151..1695301 100644 (file)
@@ -7,7 +7,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)ed.h        5.4 (Berkeley) %G%
+ *     @(#)ed.h        5.5 (Berkeley) %G%
  */
 
 #define        FILENAME_LEN    PATH_MAX
  */
 
 #define        FILENAME_LEN    PATH_MAX
@@ -56,8 +56,8 @@ struct d_layer {
        struct d_layer *next;
 };
 
        struct d_layer *next;
 };
 
-extern int nn_max, nn_max_flag, start_default, End_default, address_flag;
-extern LINE *nn_max_start, *nn_max_end, *start, *End, *current;
+extern int nn_max, nn_max_flag, Start_default, End_default, address_flag;
+extern LINE *nn_max_start, *nn_max_end, *Start, *End, *current;
 extern char *text, *prompt_string, help_msg[];
 extern struct MARK mark_matrix[];
 extern char *filename_current, *buf;
 extern char *text, *prompt_string, help_msg[];
 extern struct MARK mark_matrix[];
 extern char *filename_current, *buf;
index b23a01d..f47a1c7 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)equal.c    5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)equal.c    5.4 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -35,14 +35,14 @@ equal(inputt, errnum)
        int *errnum;
 {
        if (End_default)
        int *errnum;
 {
        if (End_default)
-               start = bottom;
+               Start = bottom;
        else
        else
-               start = End;
-       start_default = End_default = 0;
+               Start = End;
+       Start_default = End_default = 0;
 
        if (rol(inputt, errnum))
                return;
 
 
        if (rol(inputt, errnum))
                return;
 
-       (void)printf("%d\n", line_number(start));
+       (void)printf("%d\n", line_number(Start));
        *errnum = 1;
 }
        *errnum = 1;
 }
index f8b3d6d..a5f8e61 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)g.c        5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)g.c        5.5 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -108,13 +108,13 @@ g(inputt, errnum)
        LINE *l_posix_cur;
 #endif
 
        LINE *l_posix_cur;
 #endif
 
-       if (start_default && End_default) {
-               start = top;
+       if (Start_default && End_default) {
+               Start = top;
                End = bottom;
        } else
                End = bottom;
        } else
-               if (start_default)
-                       start = End;
-       if (start == NULL) {
+               if (Start_default)
+                       Start = End;
+       if (Start == NULL) {
                strcpy(help_msg, "buffer empty");
                *errnum = -1;
                return;
                strcpy(help_msg, "buffer empty");
                *errnum = -1;
                return;
@@ -199,7 +199,7 @@ g(inputt, errnum)
 #ifdef POSIX
        l_posix_cur = current;
 #endif
 #ifdef POSIX
        l_posix_cur = current;
 #endif
-       current = start;
+       current = Start;
 
        sigspecial++;
 
 
        sigspecial++;
 
index 226d484..14075b5 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)i.c        5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)i.c        5.4 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -40,7 +40,7 @@ i(inputt, errnum)
 #endif
 
        if ((End_default == 1) && (current != NULL))
 #endif
 
        if ((End_default == 1) && (current != NULL))
-               start = End = current->above;
+               Start = End = current->above;
        else {
                if (End == NULL) {
                        strcpy(help_msg, "illegal address for command i");
        else {
                if (End == NULL) {
                        strcpy(help_msg, "illegal address for command i");
@@ -49,7 +49,7 @@ i(inputt, errnum)
                } else
                        End = End->above;
        }
                } else
                        End = End->above;
        }
-       start_default = End_default = 0;
+       Start_default = End_default = 0;
 #ifdef POSIX
        l_address = End;
 #endif
 #ifdef POSIX
        l_address = End;
 #endif
index db8b9ac..710ae43 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)input_lines.c      5.6 (Berkeley) %G%";
+static char sccsid[] = "@(#)input_lines.c      5.7 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -46,20 +46,20 @@ input_lines(fp, errnum)
        char *l_text2;
 
        if (End_default)
        char *l_text2;
 
        if (End_default)
-               start = current;
+               Start = current;
        else
        else
-               start = End;
-       start_default = End_default = 0;
+               Start = End;
+       Start_default = End_default = 0;
 
        sigspecial++;
 
        sigspecial++;
-       /* start == NULL means line 0 which is legal for this function only. */
-       nn_max_end = l_temp_line = start;
-       if (start == NULL) {
+       /* Start == NULL means line 0 which is legal for this function only. */
+       nn_max_end = l_temp_line = Start;
+       if (Start == NULL) {
                l_temp1 = top;
                u_add_stk(&(top->above));
        } else {
                l_temp1 = top;
                u_add_stk(&(top->above));
        } else {
-               u_add_stk(&(start->below));
-               l_temp1 = start->below;
+               u_add_stk(&(Start->below));
+               l_temp1 = Start->below;
        }
        sigspecial--;
        if (sigint_flag && (!sigspecial))
        }
        sigspecial--;
        if (sigint_flag && (!sigspecial))
index 26d2bbb..87eab44 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)j.c        5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)j.c        5.4 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -41,20 +41,20 @@ j(inputt, errnum)
        long l_ttl = 0;
        char *l_temp1;
 
        long l_ttl = 0;
        char *l_temp1;
 
-       if (start_default && End_default) {
-               start = current;
+       if (Start_default && End_default) {
+               Start = current;
                *errnum = 1;
                *errnum = 1;
-               if (start == NULL) {
+               if (Start == NULL) {
                        strcpy(help_msg, "buffer empty");
                        *errnum = -1;
                        return;
                } else
                        strcpy(help_msg, "buffer empty");
                        *errnum = -1;
                        return;
                } else
-                       if ((start->below) != NULL)
-                               End = start->below;
+                       if ((Start->below) != NULL)
+                               End = Start->below;
                else
                        return;
        } else
                else
                        return;
        } else
-               if (start_default) {
+               if (Start_default) {
                        if (rol(inputt, errnum))
                                return;
 
                        if (rol(inputt, errnum))
                                return;
 
@@ -67,21 +67,21 @@ j(inputt, errnum)
                                 * For BSD a 'j' with one address sets
                                 * "current" to that line
                                 */
                                 * For BSD a 'j' with one address sets
                                 * "current" to that line
                                 */
-                               if (start)
-                                       current = start;
+                               if (Start)
+                                       current = Start;
 #endif
                                *errnum = 1;
                        }
                        return;
                }
 
 #endif
                                *errnum = 1;
                        }
                        return;
                }
 
-       if (start == NULL) {
+       if (Start == NULL) {
                strcpy(help_msg, "buffer empty");
                *errnum = -1;
                return;
        }
 
                strcpy(help_msg, "buffer empty");
                *errnum = -1;
                return;
        }
 
-       start_default = End_default = 0;
+       Start_default = End_default = 0;
 
        if (rol(inputt, errnum))
                return;
 
        if (rol(inputt, errnum))
                return;
@@ -91,7 +91,7 @@ j(inputt, errnum)
        u_set = 1;              /* set for d */
 
        /* Figure out what the length of the joined lines will be. */
        u_set = 1;              /* set for d */
 
        /* Figure out what the length of the joined lines will be. */
-       for (l_ptr = start; l_ptr != (End->below); l_ptr = (l_ptr->below))
+       for (l_ptr = Start; l_ptr != (End->below); l_ptr = (l_ptr->below))
                l_ttl = l_ptr->len + l_ttl;
 
        if (l_ttl > nn_max) {
                l_ttl = l_ptr->len + l_ttl;
 
        if (l_ttl > nn_max) {
@@ -118,7 +118,7 @@ j(inputt, errnum)
        }
        l_temp1[0] = '\0';
 
        }
        l_temp1[0] = '\0';
 
-       l_ptr = start;
+       l_ptr = Start;
 
        sigspecial++;
        for (;;) {
 
        sigspecial++;
        for (;;) {
@@ -141,17 +141,17 @@ j(inputt, errnum)
        (l_temp_line->len) = l_ttl;
        /* Add the new line to the buffer. */
        (l_temp_line->handle) = add_line(l_temp1, l_ttl);
        (l_temp_line->len) = l_ttl;
        /* Add the new line to the buffer. */
        (l_temp_line->handle) = add_line(l_temp1, l_ttl);
-       if (start == top) {
+       if (Start == top) {
                top = l_temp_line;
                (l_temp_line->above) = NULL;
        } else {
                top = l_temp_line;
                (l_temp_line->above) = NULL;
        } else {
-               (l_temp_line->above) = start->above;
+               (l_temp_line->above) = Start->above;
                u_add_stk(&(l_temp_line->above->below));
                (l_temp_line->above->below) = l_temp_line;
        }
                u_add_stk(&(l_temp_line->above->below));
                (l_temp_line->above->below) = l_temp_line;
        }
-       (l_temp_line->below) = start;
-       u_add_stk(&(start->above));
-       (start->above) = l_temp_line;
+       (l_temp_line->below) = Start;
+       u_add_stk(&(Start->above));
+       (Start->above) = l_temp_line;
 
        sigspecial--;
        if (sigint_flag && (!sigspecial))
 
        sigspecial--;
        if (sigint_flag && (!sigspecial))
index e4ca133..ff632d5 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)k.c        5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)k.c        5.4 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -46,7 +46,7 @@ set_mark(inputt, errnum)
                ungetc('\n', inputt);
                return;
        }
                ungetc('\n', inputt);
                return;
        }
-       start_default = End_default = 0;
+       Start_default = End_default = 0;
 
        /*
         * The marks have to be "a" to "z" (inclusive); that is, ye olde
 
        /*
         * The marks have to be "a" to "z" (inclusive); that is, ye olde
index f8c2d98..341592a 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)l.c        5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)l.c        5.5 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -37,23 +37,23 @@ l(inputt, errnum)
 {
        int l_cnt, l_len = 1;
 
 {
        int l_cnt, l_len = 1;
 
-       if (start_default && End_default)
-               start = End = current;
+       if (Start_default && End_default)
+               Start = End = current;
        else
        else
-               if (start_default)
-                       start = End;
+               if (Start_default)
+                       Start = End;
 
 
-       if (start == NULL) {
+       if (Start == NULL) {
                strcpy(help_msg, "empty buffer");
                *errnum = -1;
                return;
        }
                strcpy(help_msg, "empty buffer");
                *errnum = -1;
                return;
        }
-       start_default = End_default = 0;
+       Start_default = End_default = 0;
 
        if (rol(inputt, errnum))        /* For "command-suffix pairs". */
                return;
 
 
        if (rol(inputt, errnum))        /* For "command-suffix pairs". */
                return;
 
-       current = start;
+       current = Start;
        for (;;) {
                /*
                 * Print out the line character-by-character and split the
        for (;;) {
                /*
                 * Print out the line character-by-character and split the
index a28a448..1df66af 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)m.c        5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)m.c        5.4 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -57,21 +57,21 @@ m(inputt, errnum)
        if (rol(inputt, errnum))
                return;
 
        if (rol(inputt, errnum))
                return;
 
-       if (start_default && End_default)
-               start = End = current;
+       if (Start_default && End_default)
+               Start = End = current;
        else
        else
-               if (start_default)
-                       start = End;
-       if (start == NULL) {
+               if (Start_default)
+                       Start = End;
+       if (Start == NULL) {
                strcpy(help_msg, "buffer empty");
                *errnum = -1;
                return;
        }
                strcpy(help_msg, "buffer empty");
                *errnum = -1;
                return;
        }
-       start_default = End_default = 0;
+       Start_default = End_default = 0;
 
        /* Do some address checking. */
 
        /* Do some address checking. */
-       if ((l_dest) && ((l_dest == start) ||
-           (address_check(l_dest, start) == -1)) &&
+       if ((l_dest) && ((l_dest == Start) ||
+           (address_check(l_dest, Start) == -1)) &&
            (address_check(End, l_dest) == -1)) {
                ungetc(ss, inputt);
                *errnum = -1;
            (address_check(End, l_dest) == -1)) {
                ungetc(ss, inputt);
                *errnum = -1;
@@ -87,11 +87,11 @@ m(inputt, errnum)
         * but are kind-a useless since the buffer doesn't change.
         */
        *errnum = 1;
         * but are kind-a useless since the buffer doesn't change.
         */
        *errnum = 1;
-       if ((start == l_dest) || (End == l_dest))
+       if ((Start == l_dest) || (End == l_dest))
                return;
                return;
-       if ((start == top) && (End == bottom))
+       if ((Start == top) && (End == bottom))
                return;
                return;
-       if ((start == top) && (l_dest == NULL))
+       if ((Start == top) && (l_dest == NULL))
                return;
        *errnum = 0;
 
                return;
        *errnum = 0;
 
@@ -100,53 +100,53 @@ m(inputt, errnum)
 
        sigspecial++;
 
 
        sigspecial++;
 
-       if (start == top) {
+       if (Start == top) {
                top = End->below;
                u_add_stk(&(End->below->above));
                top->above = NULL;
        } else
                if (End == bottom) {
                top = End->below;
                u_add_stk(&(End->below->above));
                top->above = NULL;
        } else
                if (End == bottom) {
-                       bottom = start->above;
-                       u_add_stk(&(start->above->below));
+                       bottom = Start->above;
+                       u_add_stk(&(Start->above->below));
                        bottom->below = NULL;
                } else {
                        bottom->below = NULL;
                } else {
-                       u_add_stk(&(start->above->below));
-                       start->above->below = End->below;
+                       u_add_stk(&(Start->above->below));
+                       Start->above->below = End->below;
                        u_add_stk(&(End->below->above));
                        u_add_stk(&(End->below->above));
-                       End->below->above = start->above;
+                       End->below->above = Start->above;
                }
 
        if (l_dest == NULL) {
                }
 
        if (l_dest == NULL) {
-               u_add_stk(&(start->above));
-               start->above = NULL;
+               u_add_stk(&(Start->above));
+               Start->above = NULL;
                u_add_stk(&(End->below));
                End->below = l_old_top;
                u_add_stk(&(l_old_top->above));
                l_old_top->above = End;
                u_add_stk(&(End->below));
                End->below = l_old_top;
                u_add_stk(&(l_old_top->above));
                l_old_top->above = End;
-               top = start;
+               top = Start;
        } else
                if (l_dest == l_old_bottom) {
                        u_add_stk(&(End->below));
                        End->below = NULL;
        } else
                if (l_dest == l_old_bottom) {
                        u_add_stk(&(End->below));
                        End->below = NULL;
-                       u_add_stk(&(start->above));
-                       start->above = l_dest;
+                       u_add_stk(&(Start->above));
+                       Start->above = l_dest;
                        u_add_stk(&(l_dest->below));
                        u_add_stk(&(l_dest->below));
-                       l_dest->below = start;
+                       l_dest->below = Start;
                        bottom = End;
                } else {
                        bottom = End;
                } else {
-                       u_add_stk(&(start->above));
-                       start->above = l_dest;
+                       u_add_stk(&(Start->above));
+                       Start->above = l_dest;
                        u_add_stk(&(End->below));
                        End->below = l_dest->below;
                        u_add_stk(&(l_dest->below->above));
                        l_dest->below->above = End;
                        u_add_stk(&(l_dest->below));
                        u_add_stk(&(End->below));
                        End->below = l_dest->below;
                        u_add_stk(&(l_dest->below->above));
                        l_dest->below->above = End;
                        u_add_stk(&(l_dest->below));
-                       l_dest->below = start;
+                       l_dest->below = Start;
                }
 
        if (l_dest)
                }
 
        if (l_dest)
-               l_dest->below = start;
-       current = start;
+               l_dest->below = Start;
+       current = Start;
 
        sigspecial--;
 
 
        sigspecial--;
 
index 5850e5f..58306b7 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)main.c     5.5 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c     5.6 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -35,7 +35,7 @@ static char sccsid[] = "@(#)main.c    5.5 (Berkeley) %G%";
  * set for extern in the ed.h header file (so everyone can get them).
  */
 
  * set for extern in the ed.h header file (so everyone can get them).
  */
 
-int nn_max, nn_max_flag, start_default, End_default, address_flag;
+int nn_max, nn_max_flag, Start_default, End_default, address_flag;
 int zsnum, filename_flag, add_flag=0, join_flag=0;
 int help_flag=0;
 #ifdef STDIO
 int zsnum, filename_flag, add_flag=0, join_flag=0;
 int help_flag=0;
 #ifdef STDIO
@@ -56,7 +56,7 @@ char *filename_current, *prompt_string=NULL, help_msg[130];
 char *template=NULL;
 int prompt_str_flg=0, start_up_flag=0, name_set=0;
 
 char *template=NULL;
 int prompt_str_flg=0, start_up_flag=0, name_set=0;
 
-LINE *top, *current, *bottom, *start, *End; 
+LINE *top, *current, *bottom, *Start, *End; 
 struct u_layer *u_stk;
 struct d_layer *d_stk;
 LINE *u_current, *u_top, *u_bottom;
 struct u_layer *u_stk;
 struct d_layer *d_stk;
 LINE *u_current, *u_top, *u_bottom;
@@ -98,7 +98,7 @@ main(argc, argv)
        if (line_length == 0)
                line_length = 78;
 
        if (line_length == 0)
                line_length = 78;
 
-       start = End = NULL;
+       Start = End = NULL;
        top = bottom = NULL;
        current = NULL;
        nn_max_flag = 0;
        top = bottom = NULL;
        current = NULL;
        nn_max_flag = 0;
@@ -109,7 +109,7 @@ main(argc, argv)
        text = calloc(NN_MAX_START + 2, sizeof(char));
        if (text == NULL)
                ed_exit(4);
        text = calloc(NN_MAX_START + 2, sizeof(char));
        if (text == NULL)
                ed_exit(4);
-       start_default = End_default = 0;
+       Start_default = End_default = 0;
        zsnum = 22;             /* for the 'z' command */
        u_stk = NULL;
        d_stk = NULL;
        zsnum = 22;             /* for the 'z' command */
        u_stk = NULL;
        d_stk = NULL;
@@ -217,8 +217,8 @@ cmd_loop(inputt, errnum)
                        (void)printf("%s", prompt_string);
                ss = getc(inputt);
                *errnum = 0;
                        (void)printf("%s", prompt_string);
                ss = getc(inputt);
                *errnum = 0;
-               l_tempp = start = End = NULL;
-               start_default = End_default = 1;
+               l_tempp = Start = End = NULL;
+               Start_default = End_default = 1;
 
                /*
                 * This isn't nice and alphabetical mainly because of
 
                /*
                 * This isn't nice and alphabetical mainly because of
@@ -369,13 +369,13 @@ cmd_loop(inputt, errnum)
                         * and the compatibility for address "chains".
                         */
                        case ';':
                         * and the compatibility for address "chains".
                         */
                        case ';':
-                               if (End_default == 1 && start_default == 1) {
-                                       start = current;
+                               if (End_default == 1 && Start_default == 1) {
+                                       Start = current;
                                        End = bottom;
                                        End = bottom;
-                                       start_default = End_default = 0;
+                                       Start_default = End_default = 0;
                                } else {
                                } else {
-                                       start = current = End;
-                                       start_default = 0;
+                                       Start = current = End;
+                                       Start_default = 0;
                                        End_default = 1;
                                }
                                l_tempp = NULL;
                                        End_default = 1;
                                }
                                l_tempp = NULL;
@@ -385,13 +385,13 @@ cmd_loop(inputt, errnum)
                         * bug - for backward compatability.
                         */
                        case ',':
                         * bug - for backward compatability.
                         */
                        case ',':
-                               if (End_default == 1 && start_default == 1) {
-                                       start = top;
+                               if (End_default == 1 && Start_default == 1) {
+                                       Start = top;
                                        End = bottom;
                                        End = bottom;
-                                       start_default = End_default = 0;
+                                       Start_default = End_default = 0;
                                } else {
                                } else {
-                                       start = End;
-                                       start_default = 0;
+                                       Start = End;
+                                       Start_default = 0;
                                        End_default = 1;
                                }
                                l_tempp = NULL;
                                        End_default = 1;
                                }
                                l_tempp = NULL;
@@ -403,9 +403,9 @@ cmd_loop(inputt, errnum)
                                        *errnum = -1;
                                        break;
                                }
                                        *errnum = -1;
                                        break;
                                }
-                               start = top;
+                               Start = top;
                                End = bottom;
                                End = bottom;
-                               start_default = End_default = 0;
+                               Start_default = End_default = 0;
                                l_tempp = NULL;
                                break;
                        /*
                                l_tempp = NULL;
                                break;
                        /*
@@ -433,7 +433,7 @@ cmd_loop(inputt, errnum)
                        case '/':
                        case '.':
                                ungetc(ss, inputt);
                        case '/':
                        case '.':
                                ungetc(ss, inputt);
-                               if (start_default == 0 && End_default == 0) {
+                               if (Start_default == 0 && End_default == 0) {
                                        strcpy(help_msg,
                                            "badly formed address");
                                        *errnum = -1;
                                        strcpy(help_msg,
                                            "badly formed address");
                                        *errnum = -1;
@@ -445,8 +445,8 @@ cmd_loop(inputt, errnum)
                                        break;
                                End = l_tempp;
                                End_default = 0;
                                        break;
                                End = l_tempp;
                                End_default = 0;
-                               if (start_default == 0)
-                                       *errnum = address_check(start, End);
+                               if (Start_default == 0)
+                                       *errnum = address_check(Start, End);
                                break;
                        default:
                                *errnum = -1;
                                break;
                        default:
                                *errnum = -1;
@@ -460,7 +460,7 @@ cmd_loop(inputt, errnum)
                                        return;
                                /* Do the suffixes if there were any. */
                                if (printsfx > 0) {
                                        return;
                                /* Do the suffixes if there were any. */
                                if (printsfx > 0) {
-                                       start = End = current;
+                                       Start = End = current;
                                        ungetc(ss, inputt);
                                        if (printsfx == 1)
                                                p(inputt, errnum, 0);
                                        ungetc(ss, inputt);
                                        if (printsfx == 1)
                                                p(inputt, errnum, 0);
index 5689eec..6bbd444 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)p.c        5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)p.c        5.4 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -38,14 +38,14 @@ p(inputt, errnum, flag)
 {
        int l_ln=0;
 
 {
        int l_ln=0;
 
-       if (start_default && End_default)
-               start = End = current;
+       if (Start_default && End_default)
+               Start = End = current;
        else
        else
-               if (start_default)
-                       start = End;
-       start_default = End_default = 0;
+               if (Start_default)
+                       Start = End;
+       Start_default = End_default = 0;
 
 
-       if (start == NULL) {
+       if (Start == NULL) {
                strcpy(help_msg, "buffer empty");
                *errnum = -1;
                return;
                strcpy(help_msg, "buffer empty");
                *errnum = -1;
                return;
@@ -54,8 +54,8 @@ p(inputt, errnum, flag)
                return;
 
        if (flag == 1)
                return;
 
        if (flag == 1)
-               l_ln = line_number(start);
-       current = start;
+               l_ln = line_number(Start);
+       current = Start;
        for (;;) {
                /* Print out the lines. */
                if (current == NULL)
        for (;;) {
                /* Print out the lines. */
                if (current == NULL)
index b8b9951..72e93b1 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)q.c        5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)q.c        5.4 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -66,9 +66,9 @@ q(inputt, errnum)
                return;
        }
        /* Do cleanup; should it be even bothered?? */
                return;
        }
        /* Do cleanup; should it be even bothered?? */
-       start = top;
+       Start = top;
        End = bottom;
        End = bottom;
-       start_default = End_default = 0;
+       Start_default = End_default = 0;
 
        /* We don't care about the returned errnum val anymore. */
        d(inputt, errnum);
 
        /* We don't care about the returned errnum val anymore. */
        d(inputt, errnum);
index 8312b86..2bb0735 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)sub.c      5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)sub.c      5.4 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -46,16 +46,16 @@ s(inputt, errnum)
        size_t l_offset = 0;
 #endif
 
        size_t l_offset = 0;
 #endif
 
-       if (start_default && End_default)
-               start = End = current;
+       if (Start_default && End_default)
+               Start = End = current;
        else
        else
-               if (start_default)
-                       start = End;
-       if (start == NULL) {
+               if (Start_default)
+                       Start = End;
+       if (Start == NULL) {
                *errnum = -1;
                return;
        }
                *errnum = -1;
                return;
        }
-       start_default = End_default = 0;
+       Start_default = End_default = 0;
 
        l_sl = ss = getc(inputt);
        if (l_first_pass_flag == 0)
 
        l_sl = ss = getc(inputt);
        if (l_first_pass_flag == 0)
@@ -175,7 +175,7 @@ bcg1:
        if (sigint_flag && (!sigspecial))
                SIGINT_ACTION;
 bcg2:
        if (sigint_flag && (!sigspecial))
                SIGINT_ACTION;
 bcg2:
-       current = start;
+       current = Start;
        l_s_flag = 0;
        do {
                RE_match[0].rm_eo = 0;
        l_s_flag = 0;
        do {
                RE_match[0].rm_eo = 0;
@@ -297,7 +297,7 @@ bcg2:
        } while (current != (End->below));
 
        if (l_s_flag == 0) {
        } while (current != (End->below));
 
        if (l_s_flag == 0) {
-               current = start;
+               current = Start;
                strcpy(help_msg, "no matches found for substitution");
                *errnum = -1;
                ungetc('\n', inputt);
                strcpy(help_msg, "no matches found for substitution");
                *errnum = -1;
                ungetc('\n', inputt);
@@ -307,7 +307,7 @@ bcg2:
        current = l_last;
 
        if (l_print > 0) {
        current = l_last;
 
        if (l_print > 0) {
-               start = End = current;
+               Start = End = current;
                ungetc(ss, inputt);
                if (l_print == (l_print | (int) 1))
                        p(inputt, errnum, 0);
                ungetc(ss, inputt);
                if (l_print == (l_print | (int) 1))
                        p(inputt, errnum, 0);
index 67d7f86..51a4379 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)t.c        5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)t.c        5.4 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -63,24 +63,24 @@ t(inputt, errnum)
        if (rol(inputt, errnum))
                return;
 
        if (rol(inputt, errnum))
                return;
 
-       if (start_default && End_default)
-               start = End = current;
+       if (Start_default && End_default)
+               Start = End = current;
        else
        else
-               if (start_default)
-                       start = End;
-       if (start == NULL) {
+               if (Start_default)
+                       Start = End;
+       if (Start == NULL) {
                strcpy(help_msg, "empty buffer");
                *errnum = -1;
                return;
        }
                strcpy(help_msg, "empty buffer");
                *errnum = -1;
                return;
        }
-       start_default = End_default = 0;
+       Start_default = End_default = 0;
 
        if (g_flag == 0)
                u_clr_stk();
 
        sigspecial++;
 
 
        if (g_flag == 0)
                u_clr_stk();
 
        sigspecial++;
 
-       for (l_ptr = start; l_ptr != (End->below); l_ptr = (l_ptr->below)) {
+       for (l_ptr = Start; l_ptr != (End->below); l_ptr = (l_ptr->below)) {
                get_line(l_ptr->handle, l_ptr->len);
                if (sigint_flag && (!sigspecial))
                        break;
                get_line(l_ptr->handle, l_ptr->len);
                if (sigint_flag && (!sigspecial))
                        break;
index 03ffe61..3e4a9cc 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)w.c        5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)w.c        5.4 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -44,18 +44,18 @@ w(inputt, errnum)
        int l_ttl = 0, l_q_flag = 0, l_sl;
        char *filename_read=NULL, *temp;
 
        int l_ttl = 0, l_q_flag = 0, l_sl;
        char *filename_read=NULL, *temp;
 
-       if (start_default && End_default) {
-               start = top;
+       if (Start_default && End_default) {
+               Start = top;
                End = bottom;
        } else
                End = bottom;
        } else
-               if (start_default)
-                       start = End;
-       if (start == NULL) {
+               if (Start_default)
+                       Start = End;
+       if (Start == NULL) {
                strcpy(help_msg, "buffer empty");
                *errnum = -1;
                return;
        }
                strcpy(help_msg, "buffer empty");
                *errnum = -1;
                return;
        }
-       start_default = End_default = 0;
+       Start_default = End_default = 0;
 
        l_sl = ss;
        ss = getc(inputt);
 
        l_sl = ss;
        ss = getc(inputt);
@@ -103,7 +103,7 @@ w(inputt, errnum)
                goto point;
 
        /* Write it out and get a report on the number of bytes written. */
                goto point;
 
        /* Write it out and get a report on the number of bytes written. */
-       l_ttl = edwrite(fp, start, End);
+       l_ttl = edwrite(fp, Start, End);
        if (explain_flag != 0)          /* For -s option. */
                printf("%d\n", l_ttl);
 
        if (explain_flag != 0)          /* For -s option. */
                printf("%d\n", l_ttl);
 
index 1651111..8083d23 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)z.c        5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)z.c        5.5 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -63,7 +63,7 @@ z(inputt, errnum)
        }
        if (End_default) {
                if ((current->below) != NULL)
        }
        if (End_default) {
                if ((current->below) != NULL)
-                       start = current->below;
+                       Start = current->below;
                else {
                        strcpy(help_msg, "at end of buffer");
                        *errnum = -1;
                else {
                        strcpy(help_msg, "at end of buffer");
                        *errnum = -1;
@@ -71,16 +71,16 @@ z(inputt, errnum)
                        return;
                }
        } else
                        return;
                }
        } else
-               start = End;
-       if (start == NULL) {
+               Start = End;
+       if (Start == NULL) {
                strcpy(help_msg, "bad address");
                *errnum = -1;
                ungetc('\n', inputt);
                return;
        }
                strcpy(help_msg, "bad address");
                *errnum = -1;
                ungetc('\n', inputt);
                return;
        }
-       start_default = End_default = 0;
+       Start_default = End_default = 0;
 
 
-       current = start;
+       current = Start;
        l_cnt = 1;              /* Yes, set to = 1. */
        while (1) {
                /* Scroll-out the next 'zsnum' of lines or until bottom. */
        l_cnt = 1;              /* Yes, set to = 1. */
        while (1) {
                /* Scroll-out the next 'zsnum' of lines or until bottom. */