Commit bc8314e2 authored by deuce's avatar deuce
Browse files

Include genwrap.h for alloca(), rename truncsp() to truncspctrl() since it's

not the same behaviour as in genwrap.c
parent 637726e9
......@@ -45,9 +45,9 @@
#elif defined(_WIN32)
#include <share.h>
#include <windows.h>
#include <malloc.h>
#define mswait(x) Sleep(x)
#endif
#include <genwrap.h> // for alloca()
#include "ciolib.h"
#include "uifc.h"
......@@ -476,7 +476,7 @@ static void timedisplay(BOOL force)
/****************************************************************************/
/* Truncates white-space chars off end of 'str' */
/****************************************************************************/
static void truncsp(char *str)
static void truncspctrl(char *str)
{
uint c;
......@@ -579,7 +579,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
width=title_len+hbrdrsize+2;
for(i=0;i<opts;i++) {
if(option[i]!=NULL) {
truncsp(option[i]);
truncspctrl(option[i]);
if((j=strlen(option[i])+hbrdrsize+2+1)>width)
width=j;
}
......@@ -1893,7 +1893,7 @@ int ugetstr(int left, int top, int width, char *outstr, int max, long mode, int
str[0]=0;
if(mode&K_EDIT && outstr[0]) {
/***
truncsp(outstr);
truncspctrl(outstr);
***/
outstr[max]=0;
i=j=strlen(outstr);
......@@ -2174,7 +2174,7 @@ int ugetstr(int left, int top, int width, char *outstr, int max, long mode, int
str[j]=0;
if(mode&K_EDIT)
{
truncsp(str);
truncspctrl(str);
if(strcmp(outstr,str))
api->changes=1;
}
......
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