Commit 34156430 authored by rswindell's avatar rswindell
Browse files

inbuf is modified (CRs stripped), so don't make const.

parent 4a7dc25d
......@@ -33,6 +33,7 @@
#include <genwrap.h>
#include <stdlib.h> /* realloc */
#include "wordwrap.h"
static int get_prefix(const char *text, int *bytes, int *len, int maxlen)
{
......@@ -166,7 +167,7 @@ static int compare_prefix(char *old_prefix, int old_prefix_bytes, const char *ne
return(0);
}
char* wordwrap(const char* inbuf, int len, int oldlen, BOOL handle_quotes)
char* wordwrap(char* inbuf, int len, int oldlen, BOOL handle_quotes)
{
int l;
int crcount=0;
......@@ -395,7 +396,7 @@ char* wordwrap(const char* inbuf, int len, int oldlen, BOOL handle_quotes)
if(!crcount) {
for(inbuf=outbuf; *inbuf; inbuf++) {
if(*inbuf=='\r')
memmove((void*)inbuf, inbuf+1, strlen(inbuf));
memmove(inbuf, inbuf+1, strlen(inbuf));
}
}
......
......@@ -34,6 +34,6 @@
#ifndef _WORDWRAP_H_
#define _WORDWRAP_H_
char* wordwrap(const char* inbuf, int len, int oldlen, BOOL handle_quotes);
char* wordwrap(char* inbuf, int len, int oldlen, BOOL handle_quotes);
#endif /* Don't add anything after this line */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment