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:
-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>
FILE *inputt;
int *errnum;
{
FILE *inputt;
int *errnum;
{
- if (start_default && End_default)
- start = End = current;
+ if (Start_default && End_default)
+ Start = End = current;
- if (start_default)
- start = End;
- if (start == NULL) {
+ if (Start_default)
+ Start = End;
+ if (Start == NULL) {
- start_default = End_default = 0;
+ Start_default = End_default = 0;
/* first delete the lines */
d(inputt, errnum);
/* first delete the lines */
d(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;
-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>
/*
* 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.
*/
{
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;
- 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))
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... */
- 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++;
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) {
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;
-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>
ungetc('\n', inputt);
return;
}
ungetc('\n', inputt);
return;
}
- 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 */
End = bottom;
sigspecial--;
End = bottom;
sigspecial--;
*
* %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
-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;
-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>
int *errnum;
{
if (End_default)
int *errnum;
{
if (End_default)
- 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));
-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>
LINE *l_posix_cur;
#endif
LINE *l_posix_cur;
#endif
- if (start_default && End_default) {
- start = top;
+ if (Start_default && End_default) {
+ Start = top;
- 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;
#ifdef POSIX
l_posix_cur = current;
#endif
#ifdef POSIX
l_posix_cur = current;
#endif
-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>
#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");
} 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
-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>
char *l_text2;
if (End_default)
char *l_text2;
if (End_default)
- start = End;
- start_default = End_default = 0;
+ Start = End;
+ Start_default = End_default = 0;
- /* 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))
-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>
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;
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;
if (rol(inputt, errnum))
return;
if (rol(inputt, errnum))
return;
* 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;
}
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;
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) {
(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);
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))
-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>
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
-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>
- if (start_default && End_default)
- start = End = current;
+ if (Start_default && End_default)
+ Start = End = current;
- if (start_default)
- start = End;
+ if (Start_default)
+ Start = End;
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;
for (;;) {
/*
* Print out the line character-by-character and split the
for (;;) {
/*
* Print out the line character-by-character and split the
-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>
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;
- 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;
* 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))
- if ((start == top) && (End == bottom))
+ if ((Start == top) && (End == bottom))
- if ((start == top) && (l_dest == NULL))
+ if ((Start == top) && (l_dest == NULL))
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;
- 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;
} 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));
- 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;
- current = start;
+ l_dest->below = Start;
+ current = Start;
-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>
* 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
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;
if (line_length == 0)
line_length = 78;
if (line_length == 0)
line_length = 78;
top = bottom = NULL;
current = NULL;
nn_max_flag = 0;
top = bottom = NULL;
current = NULL;
nn_max_flag = 0;
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;
(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
* 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;
- start_default = End_default = 0;
+ Start_default = End_default = 0;
- start = current = End;
- start_default = 0;
+ Start = current = End;
+ Start_default = 0;
End_default = 1;
}
l_tempp = NULL;
End_default = 1;
}
l_tempp = NULL;
* 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;
- start_default = End_default = 0;
+ Start_default = End_default = 0;
- start = End;
- start_default = 0;
+ Start = End;
+ Start_default = 0;
End_default = 1;
}
l_tempp = NULL;
End_default = 1;
}
l_tempp = NULL;
- start_default = End_default = 0;
+ Start_default = End_default = 0;
l_tempp = NULL;
break;
/*
l_tempp = NULL;
break;
/*
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;
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;
return;
/* Do the suffixes if there were any. */
if (printsfx > 0) {
return;
/* Do the suffixes if there were any. */
if (printsfx > 0) {
ungetc(ss, inputt);
if (printsfx == 1)
p(inputt, errnum, 0);
ungetc(ss, inputt);
if (printsfx == 1)
p(inputt, errnum, 0);
-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>
- if (start_default && End_default)
- start = End = current;
+ if (Start_default && End_default)
+ Start = End = current;
- if (start_default)
- start = End;
- start_default = End_default = 0;
+ if (Start_default)
+ Start = End;
+ Start_default = End_default = 0;
strcpy(help_msg, "buffer empty");
*errnum = -1;
return;
strcpy(help_msg, "buffer empty");
*errnum = -1;
return;
- 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)
-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>
return;
}
/* Do cleanup; should it be even bothered?? */
return;
}
/* Do cleanup; should it be even bothered?? */
- 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);
-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>
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;
- if (start_default)
- start = End;
- if (start == NULL) {
+ if (Start_default)
+ Start = End;
+ if (Start == NULL) {
- 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)
if (sigint_flag && (!sigspecial))
SIGINT_ACTION;
bcg2:
if (sigint_flag && (!sigspecial))
SIGINT_ACTION;
bcg2:
l_s_flag = 0;
do {
RE_match[0].rm_eo = 0;
l_s_flag = 0;
do {
RE_match[0].rm_eo = 0;
} while (current != (End->below));
if (l_s_flag == 0) {
} while (current != (End->below));
if (l_s_flag == 0) {
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);
current = l_last;
if (l_print > 0) {
current = l_last;
if (l_print > 0) {
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);
-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>
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;
- 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;
-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>
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;
- 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);
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);
-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>
}
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;
- 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;
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. */