Commit c2190260 authored by rswindell's avatar rswindell
Browse files

Change prototypes to use int instead of char args for window coordinates.

parent d0dd674b
......@@ -72,7 +72,7 @@ static uint max_opts=MAX_OPTS;
static uifcapi_t* api;
/* Prototypes */
static int uprintf(char x, char y, char attr, char *fmt,...);
static int uprintf(int x, int y, char attr, char *fmt,...);
static void bottomline(int line);
static char *utimestr(time_t *intime);
static void help();
......@@ -80,10 +80,10 @@ static void help();
/* API routines */
static void uifcbail(void);
static int uscrn(char *str);
static int ulist(int mode, char left, int top, char width, int *dflt, int *bar
static int ulist(int mode, int left, int top, int width, int *dflt, int *bar
,char *title, char **option);
static int uinput(int imode, char left, char top, char *prompt, char *str
,char len ,int kmode);
static int uinput(int imode, int left, int top, char *prompt, char *str
,int len ,int kmode);
static void umsg(char *str);
static void upop(char *str);
static void sethelp(int line, char* file);
......@@ -336,7 +336,7 @@ static void truncsp(char *str)
/****************************************************************************/
/* General menu function, see uifc.h for details. */
/****************************************************************************/
int ulist(int mode, char left, int top, char width, int *cur, int *bar
int ulist(int mode, int left, int top, int width, int *cur, int *bar
, char *title, char **option)
{
uchar line[256],shade[256],win[MAX_BFLN],*ptr,a,b,c,longopt
......@@ -1160,8 +1160,8 @@ hitesc:
/*************************************************************************/
/* This function is a windowed input string input routine. */
/*************************************************************************/
int uinput(int mode, char left, char top, char *prompt, char *str,
char max, int kmode)
int uinput(int mode, int left, int top, char *prompt, char *str,
int max, int kmode)
{
unsigned char c,tmp[81],save_buf[2048],in_win[2048]
,shade[160],width,height=3;
......@@ -1461,7 +1461,7 @@ return(j);
/****************************************************************************/
/* Performs printf() through puttext() routine */
/****************************************************************************/
static int uprintf(char x, char y, char attr, char *fmat, ...)
static int uprintf(int x, int y, char attr, char *fmat, ...)
{
va_list argptr;
char str[256],buf[512];
......
......@@ -304,7 +304,7 @@ typedef struct {
/* Returns the 0-based selected option number, -1 for ESC, or the selected */
/* option number OR'd with MSK_INS, MSK_DEL, MSK_GET, or MSK_PUT. */
/****************************************************************************/
int (*list) (int mode, char left, int top, char width, int* dflt
int (*list) (int mode, int left, int top, int width, int* dflt
,int* bar, char *title, char** option);
/****************************************************************************/
/* Windowed string input routine. */
......@@ -317,8 +317,8 @@ typedef struct {
/* This function sets uifcapi_t.changes to TRUE if the string is modified. */
/* Returns the length of the string or -1 on escape/abort. */
/****************************************************************************/
int (*input)(int mode, char left, char top, char* prompt, char* str
,char len, int kmode);
int (*input)(int mode, int left, int top, char* prompt, char* str
,int len, int kmode);
/****************************************************************************/
/* Sets the current help index by source code file and line number. */
/****************************************************************************/
......
......@@ -100,7 +100,7 @@ void uifcbail(void)
/****************************************************************************/
int uscrn(char *str)
{
sprintf(app_title,"%.*s",sizeof(app_title)-1,str);
sprintf(app_title,"%.*s",(int)sizeof(app_title)-1,str);
/**********************************************************************/
/* ToDo - Does not display application title... mostly 'cause I clear */
/* the screen so often */
......@@ -320,13 +320,13 @@ int ulist(int mode, char left, int top, char width, int *cur, int *bar
/*************************************************************************/
/* This function is a windowed input string input routine. */
/*************************************************************************/
int uinput(int mode, char left, char top, char *prompt, char *outstr,
char max, int kmode)
int uinput(int mode, int left, int top, char *prompt, char *outstr,
int max, int kmode)
{
char str[256];
if(!(kmode&K_EDIT))
outstr[0]=0;
sprintf(str,"%.*s",sizeof(str)-1,outstr);
sprintf(str,"%.*s",(int)sizeof(str)-1,outstr);
while(dialog_inputbox((char*)NULL, prompt, 9, max+4, str)==-2)
help();
if(kmode&K_UPPER) /* convert to uppercase? */
......
......@@ -54,10 +54,10 @@ static void help();
/* API routines */
static void uifcbail(void);
static int uscrn(char *str);
static int ulist(int mode, char left, int top, char width, int *dflt, int *bar
static int ulist(int mode, int left, int top, int width, int *dflt, int *bar
,char *title, char **option);
static int uinput(int imode, char left, char top, char *prompt, char *str
,char len ,int kmode);
static int uinput(int imode, int left, int top, char *prompt, char *str
,int len ,int kmode);
static void umsg(char *str);
static void upop(char *str);
static void sethelp(int line, char* file);
......@@ -187,7 +187,7 @@ static char* strupr(char* str)
/****************************************************************************/
/* General menu function, see uifc.h for details. */
/****************************************************************************/
int ulist(int mode, char left, int top, char width, int *cur, int *bar
int ulist(int mode, int left, int top, int width, int *cur, int *bar
, char *title, char **option)
{
char str[128];
......@@ -312,8 +312,8 @@ int ulist(int mode, char left, int top, char width, int *cur, int *bar
/*************************************************************************/
/* This function is a windowed input string input routine. */
/*************************************************************************/
int uinput(int mode, char left, char top, char *prompt, char *outstr,
char max, int kmode)
int uinput(int mode, int left, int top, char *prompt, char *outstr,
int max, int kmode)
{
char str[256];
......
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