Small code's simplifying: use issoftcr() in CopyToBuf()
This commit is contained in:
parent
6aa5bd173f
commit
996d97f7b7
@ -230,7 +230,7 @@ uint CopyToBuf(char* p, char* out, char** end) {
|
|||||||
|
|
||||||
uint len = 1;
|
uint len = 1;
|
||||||
|
|
||||||
while((*p==CR) or (*p==LF) or (not WideDispsoftcr and *p==SOFTCR))
|
while((*p==CR) or (*p==LF) or issoftcr(*p))
|
||||||
p++;
|
p++;
|
||||||
|
|
||||||
while((*p==CTRL_A) or (strncmp(p, "AREA:", 5)==0)) {
|
while((*p==CTRL_A) or (strncmp(p, "AREA:", 5)==0)) {
|
||||||
@ -239,7 +239,7 @@ uint CopyToBuf(char* p, char* out, char** end) {
|
|||||||
if(*p == CTRL_A)
|
if(*p == CTRL_A)
|
||||||
p++;
|
p++;
|
||||||
|
|
||||||
while(*p and (*p != CR) and (*p != LF) and (WideDispsoftcr or *p!=SOFTCR)) {
|
while(*p and (*p != CR) and (*p != LF) and !issoftcr(*p)) {
|
||||||
if(out)
|
if(out)
|
||||||
*out++ = *p;
|
*out++ = *p;
|
||||||
len++;
|
len++;
|
||||||
@ -251,11 +251,11 @@ uint CopyToBuf(char* p, char* out, char** end) {
|
|||||||
|
|
||||||
len++;
|
len++;
|
||||||
|
|
||||||
while((*p==LF) or (not WideDispsoftcr and *p==SOFTCR))
|
while((*p==LF) or issoftcr(*p))
|
||||||
p++;
|
p++;
|
||||||
if(*p == CR)
|
if(*p == CR)
|
||||||
p++;
|
p++;
|
||||||
while((*p==LF) or (not WideDispsoftcr and *p==SOFTCR))
|
while((*p==LF) or issoftcr(*p))
|
||||||
p++;
|
p++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user