Skip to content
Snippets Groups Projects
Commit 16fecd90 authored by deuce's avatar deuce
Browse files

Make the ugly actually used...

And add a touch more ugly while I'm at it.
parent cadb1021
No related branches found
No related tags found
No related merge requests found
...@@ -278,6 +278,7 @@ char* wordwrap(char* inbuf, int len, int oldlen, uint32_t flags) ...@@ -278,6 +278,7 @@ char* wordwrap(char* inbuf, int len, int oldlen, uint32_t flags)
break; break;
} }
if(0) { // This is a very ugly thing... figure this out before editing!!! if(0) { // This is a very ugly thing... figure this out before editing!!!
BOOL ignore=FALSE;
case '\n': case '\n':
if(!lf_break) { if(!lf_break) {
if(i==0) if(i==0)
...@@ -285,8 +286,10 @@ char* wordwrap(char* inbuf, int len, int oldlen, uint32_t flags) ...@@ -285,8 +286,10 @@ char* wordwrap(char* inbuf, int len, int oldlen, uint32_t flags)
if(inbuf[i-1] != '\r') { if(inbuf[i-1] != '\r') {
if(l==0 || isspace(linebuf[l-1])) if(l==0 || isspace(linebuf[l-1]))
break; break;
ignore=TRUE;
} }
} }
if(!ignore) {
if(handle_quotes && (quote_count=get_prefix(inbuf+i+1, &prefix_bytes, &prefix_len, len*2+2))!=0) { if(handle_quotes && (quote_count=get_prefix(inbuf+i+1, &prefix_bytes, &prefix_len, len*2+2))!=0) {
/* Move the input pointer offset to the last char of the prefix */ /* Move the input pointer offset to the last char of the prefix */
i+=prefix_bytes; i+=prefix_bytes;
...@@ -357,6 +360,7 @@ char* wordwrap(char* inbuf, int len, int oldlen, uint32_t flags) ...@@ -357,6 +360,7 @@ char* wordwrap(char* inbuf, int len, int oldlen, uint32_t flags)
} }
icol=prefix_len+1; icol=prefix_len+1;
break; break;
}
} // This is where the ugly referenced above finishes. } // This is where the ugly referenced above finishes.
default: default:
if(inbuf[i]=='\n') if(inbuf[i]=='\n')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment