#ifndef PDCURSES
static char wordchar(void)
{
- return 0x17; /* ^W */
+ return 0x17; /* ^W */
}
#endif
/* foreground, background */
- init_pair(TITLECOLOR & ~A_ATTR, COLOR_BLACK, COLOR_CYAN);
- init_pair(MAINMENUCOLOR & ~A_ATTR, COLOR_WHITE, COLOR_CYAN);
+ init_pair(TITLECOLOR & ~A_ATTR, COLOR_BLACK, COLOR_CYAN);
+ init_pair(MAINMENUCOLOR & ~A_ATTR, COLOR_WHITE, COLOR_CYAN);
init_pair(MAINMENUREVCOLOR & ~A_ATTR, COLOR_WHITE, COLOR_BLACK);
- init_pair(SUBMENUCOLOR & ~A_ATTR, COLOR_WHITE, COLOR_CYAN);
- init_pair(SUBMENUREVCOLOR & ~A_ATTR, COLOR_WHITE, COLOR_BLACK);
- init_pair(BODYCOLOR & ~A_ATTR, COLOR_WHITE, COLOR_BLUE);
- init_pair(STATUSCOLOR & ~A_ATTR, COLOR_WHITE, COLOR_CYAN);
+ init_pair(SUBMENUCOLOR & ~A_ATTR, COLOR_WHITE, COLOR_CYAN);
+ init_pair(SUBMENUREVCOLOR & ~A_ATTR, COLOR_WHITE, COLOR_BLACK);
+ init_pair(BODYCOLOR & ~A_ATTR, COLOR_WHITE, COLOR_BLUE);
+ init_pair(STATUSCOLOR & ~A_ATTR, COLOR_WHITE, COLOR_CYAN);
init_pair(INPUTBOXCOLOR & ~A_ATTR, COLOR_BLACK, COLOR_CYAN);
init_pair(EDITBOXCOLOR & ~A_ATTR, COLOR_WHITE, COLOR_BLACK);
#endif
#endif
wbkgd(win, attr);
- werase(win);
+ werase(win);
#ifdef PDCURSES
maxy = getmaxy(win);
tp->tm_hour, tp->tm_min, tp->tm_sec);
mvwaddstr(wtitl, 0, bw - strlen(buf) - 2, buf);
- wrefresh(wtitl);
+ wrefresh(wtitl);
}
static void menudim(menu *mp, int *lines, int *columns)
{
if (old != -1)
{
- mvwaddstr(wmain, 0, old * barlen,
+ mvwaddstr(wmain, 0, old * barlen,
prepad(padstr(mp[old].name, barlen - 1), 1));
statusmsg(mp[cur].desc);
setcolor(wmain, MAINMENUREVCOLOR);
- mvwaddstr(wmain, 0, cur * barlen,
+ mvwaddstr(wmain, 0, cur * barlen,
prepad(padstr(mp[cur].name, barlen - 1), 1));
setcolor(wmain, MAINMENUCOLOR);
if (cur != old)
{
if (old != -1)
- mvwaddstr(wmenu, old + 1, 1,
+ mvwaddstr(wmenu, old + 1, 1,
prepad(padstr(mp[old].name, barlen - 1), 1));
setcolor(wmenu, SUBMENUREVCOLOR);
werase(win);
mvwprintw(win, 0, 0, "%s", padstr(buf, maxx));
wmove(win, 0, x);
- wrefresh(win);
+ wrefresh(win);
}
/*
Description:
The initial value of 'str' with a maximum length of 'field' - 1,
- which is supplied by the calling routine, is editted. The user's
- erase (^H), kill (^U) and delete word (^W) chars are interpreted.
+ which is supplied by the calling routine, is editted. The user's
+ erase (^H), kill (^U) and delete word (^W) chars are interpreted.
The PC insert or Tab keys toggle between insert and edit mode.
Escape aborts the edit session, leaving 'str' unchanged.
Enter, Up or Down Arrow are used to accept the changes to 'str'.
NOTE: editstr(), mveditstr(), and mvweditstr() are macros.
Return Value:
- Returns the input terminating character on success (Escape,
+ Returns the input terminating character on success (Escape,
Enter, Up or Down Arrow) and ERR on error.
Errors:
{
tp = bp;
- while ((bp > buf) && (*(bp - 1) == ' '))
+ while ((bp > buf) && (*(bp - 1) == ' '))
bp--;
- while ((bp > buf) && (*(bp - 1) != ' '))
+ while ((bp > buf) && (*(bp - 1) != ' '))
bp--;
memmove((void *)bp, (const void *)tp, strlen(tp) + 1);
if (!*bp)
bp[1] = '\0';
-
+
*bp++ = c;
}
}
getyx(wbody, oldy, oldx);
getmaxyx(wbody, maxy, maxx);
- winput = mvwinputbox(wbody, (maxy - nlines) / 2, (maxx - ncols) / 2,
+ winput = mvwinputbox(wbody, (maxy - nlines) / 2, (maxx - ncols) / 2,
nlines, ncols);
for (i = 0; i < n; i++)