struct eventResult er;
struct button * bu = co->data;
+ er.result = ER_IGNORED;
+
if (ev.when == EV_NORMAL) {
switch (ev.event) {
case EV_FOCUS:
}
break;
}
- } else
- er.result = ER_IGNORED;
+ }
return er;
}
struct eventResult er;
const char * cur;
+ er.result = ER_IGNORED;
+
if (ev.when == EV_NORMAL) {
switch (ev.event) {
case EV_FOCUS:
}
}
}
- } else
- er.result = ER_IGNORED;
+ }
return er;
}
struct items ** item;
int i, j;
char * spaces;
- int currRow;
+ int currRow = co->top;
if (!co->isMapped) return ;
spaces = alloca(co->width);
memset(spaces, ' ', co->width);
SLsmg_set_color(NEWT_COLORSET_LISTBOX);
- }
- while (i < co->height) {
- newtGotorc(co->top + i, co->left);
- SLsmg_write_nstring(spaces, co->width);
- i++;
+
+ while (i < co->height) {
+ newtGotorc(co->top + i, co->left);
+ SLsmg_write_nstring(spaces, co->width);
+ i++;
+ }
}
if(ct->sb) {
buf[strlen(buf) - 1] = '\0';
if (!strcmp(buf, "XXX")) {
- fgets(buf3, sizeof(buf3) - 1, f);
+ if (!fgets(buf3, sizeof(buf3) - 1, f))
+ break;
buf3[strlen(buf3) - 1] = '\0';
arg = buf3;
struct eventResult er;
int ch;
+ er.result = ER_IGNORED;
+
if (ev.when == EV_NORMAL) {
switch (ev.event) {
case EV_FOCUS:
}
break;
}
- } else
- er.result = ER_IGNORED;
+ }
return er;
}
static int menuSize(int * height, int * width, enum mode mode,
poptContext options) {
- char ** argv = poptGetArgs(options);
- char * * items = argv;
+ const char ** argv = poptGetArgs(options);
+ const char ** items = argv;
int h = 0;
int tagWidth = 0;
int descriptionWidth = 0;
if (mode == MODE_NONE) usage(WAS_ERROR);
- if (!(text = poptGetArg(optCon))) usage(WAS_ERROR);
+ if (!(nextArg = poptGetArg(optCon))) usage(WAS_ERROR);
+ text = strdup(nextArg);
if (mode == MODE_TEXTBOX ) text = readTextFile(text);