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

Add uifcinput() function (used to get password when blank)

parent a7f5c4e5
No related branches found
No related tags found
No related merge requests found
......@@ -95,6 +95,31 @@ void uifcmsg(char *msg, char *helpbuf)
}
}
void uifcinput(char *title, int len, char *msg, int mode, char *helpbuf)
{
int i;
char *buf;
struct text_info txtinfo;
gettextinfo(&txtinfo);
i=uifc_initialized;
if(!i) {
buf=(char *)alloca(txtinfo.screenheight*txtinfo.screenwidth*2);
gettext(1,1,txtinfo.screenwidth,txtinfo.screenheight,buf);
}
init_uifc(FALSE, FALSE);
if(uifc_initialized) {
uifc.helpbuf=helpbuf;
uifc.input(WIN_MID|WIN_SAV, 0, 0, title, msg, len, mode);
}
else
fprintf(stderr,"%s\n",msg);
if(!i) {
uifcbail();
puttext(1,1,txtinfo.screenwidth,txtinfo.screenheight,buf);
}
}
int confirm(char *msg, char *helpbuf)
{
int i;
......
......@@ -9,6 +9,7 @@ extern uifcapi_t uifc; /* User Interface (UIFC) Library API */
int init_uifc(BOOL scrn, BOOL bottom);
void uifcbail(void);
void uifcmsg(char *msg, char *helpbuf);
void uifcinput(char *title, int len, char *msg, int mode, char *helpbuf);
int confirm(char *msg, char *helpbuf);
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment