Comaptability with gcc-2.95

This commit is contained in:
Glenn L McGrath 2003-10-09 07:22:59 +00:00
parent 9d1a33c690
commit 586d86cc8c

View File

@ -457,6 +457,7 @@ void add_cmd(char *cmdstr)
{ {
static char *add_cmd_line=NULL; static char *add_cmd_line=NULL;
sed_cmd_t *sed_cmd; sed_cmd_t *sed_cmd;
int temp;
/* Append this line to any unfinished line from last time. */ /* Append this line to any unfinished line from last time. */
if(add_cmd_line) { if(add_cmd_line) {
@ -471,7 +472,7 @@ void add_cmd(char *cmdstr)
} else add_cmd_line=NULL; } else add_cmd_line=NULL;
/* If this line ends with backslash, request next line. */ /* If this line ends with backslash, request next line. */
int temp=strlen(cmdstr); temp=strlen(cmdstr);
if(temp && cmdstr[temp-1]=='\\') { if(temp && cmdstr[temp-1]=='\\') {
if(!add_cmd_line) add_cmd_line=strdup(cmdstr); if(!add_cmd_line) add_cmd_line=strdup(cmdstr);
add_cmd_line[temp-1]=0; add_cmd_line[temp-1]=0;