whitespace
This commit is contained in:
@ -226,7 +226,7 @@ void Input::file()
|
|||||||
|
|
||||||
// continue if last char read was not a newline
|
// continue if last char read was not a newline
|
||||||
// can happen if line is very long
|
// can happen if line is very long
|
||||||
|
|
||||||
m += strlen(&line[m]);
|
m += strlen(&line[m]);
|
||||||
if (line[m-1] != '\n') continue;
|
if (line[m-1] != '\n') continue;
|
||||||
break;
|
break;
|
||||||
@ -436,18 +436,18 @@ void Input::parse()
|
|||||||
}
|
}
|
||||||
if (*ptr == '\'') {
|
if (*ptr == '\'') {
|
||||||
ptrmatch = strchr(ptr+1,'\'');
|
ptrmatch = strchr(ptr+1,'\'');
|
||||||
if (ptrmatch == NULL)
|
if (ptrmatch == NULL)
|
||||||
error->all(FLERR,"Unmatched single quote in command");
|
error->all(FLERR,"Unmatched single quote in command");
|
||||||
ptr = ptrmatch + 1;
|
ptr = ptrmatch + 1;
|
||||||
} else if (*ptr == '"') {
|
} else if (*ptr == '"') {
|
||||||
if (strstr(ptr,"\"\"\"") == ptr) {
|
if (strstr(ptr,"\"\"\"") == ptr) {
|
||||||
ptrmatch = strstr(ptr+3,"\"\"\"");
|
ptrmatch = strstr(ptr+3,"\"\"\"");
|
||||||
if (ptrmatch == NULL)
|
if (ptrmatch == NULL)
|
||||||
error->all(FLERR,"Unmatched triple quote in command");
|
error->all(FLERR,"Unmatched triple quote in command");
|
||||||
ptr = ptrmatch + 3;
|
ptr = ptrmatch + 3;
|
||||||
} else {
|
} else {
|
||||||
ptrmatch = strchr(ptr+1,'"');
|
ptrmatch = strchr(ptr+1,'"');
|
||||||
if (ptrmatch == NULL)
|
if (ptrmatch == NULL)
|
||||||
error->all(FLERR,"Unmatched double quote in command");
|
error->all(FLERR,"Unmatched double quote in command");
|
||||||
ptr = ptrmatch + 1;
|
ptr = ptrmatch + 1;
|
||||||
}
|
}
|
||||||
@ -668,7 +668,7 @@ void Input::substitute(char *&str, char *&str2, int &max, int &max2, int flag)
|
|||||||
|
|
||||||
} else if (*ptr == '\'') {
|
} else if (*ptr == '\'') {
|
||||||
ptrmatch = strchr(ptr+1,'\'');
|
ptrmatch = strchr(ptr+1,'\'');
|
||||||
if (ptrmatch == NULL)
|
if (ptrmatch == NULL)
|
||||||
error->all(FLERR,"Unmatched single quote in command");
|
error->all(FLERR,"Unmatched single quote in command");
|
||||||
nchars = ptrmatch+1 - ptr;
|
nchars = ptrmatch+1 - ptr;
|
||||||
strncpy(ptr2,ptr,nchars);
|
strncpy(ptr2,ptr,nchars);
|
||||||
@ -677,7 +677,7 @@ void Input::substitute(char *&str, char *&str2, int &max, int &max2, int flag)
|
|||||||
} else if (*ptr == '"') {
|
} else if (*ptr == '"') {
|
||||||
if (strstr(ptr,"\"\"\"") == ptr) {
|
if (strstr(ptr,"\"\"\"") == ptr) {
|
||||||
ptrmatch = strstr(ptr+3,"\"\"\"");
|
ptrmatch = strstr(ptr+3,"\"\"\"");
|
||||||
if (ptrmatch == NULL)
|
if (ptrmatch == NULL)
|
||||||
error->all(FLERR,"Unmatched triple quote in command");
|
error->all(FLERR,"Unmatched triple quote in command");
|
||||||
nchars = ptrmatch+3 - ptr;
|
nchars = ptrmatch+3 - ptr;
|
||||||
strncpy(ptr2,ptr,nchars);
|
strncpy(ptr2,ptr,nchars);
|
||||||
@ -685,7 +685,7 @@ void Input::substitute(char *&str, char *&str2, int &max, int &max2, int flag)
|
|||||||
ptr2 += nchars;
|
ptr2 += nchars;
|
||||||
} else {
|
} else {
|
||||||
ptrmatch = strchr(ptr+1,'"');
|
ptrmatch = strchr(ptr+1,'"');
|
||||||
if (ptrmatch == NULL)
|
if (ptrmatch == NULL)
|
||||||
error->all(FLERR,"Unmatched double quote in command");
|
error->all(FLERR,"Unmatched double quote in command");
|
||||||
nchars = ptrmatch+1 - ptr;
|
nchars = ptrmatch+1 - ptr;
|
||||||
strncpy(ptr2,ptr,nchars);
|
strncpy(ptr2,ptr,nchars);
|
||||||
|
|||||||
Reference in New Issue
Block a user