Skip to content
Snippets Groups Projects
Commit bf4c341e authored by rswindell's avatar rswindell
Browse files

Add printf member functoin to stdio versoin of uifc. This was causing echocfg

v3 to crash when used with the '-iD' option. Oops.
parent 4b8a6336
No related branches found
No related tags found
No related merge requests found
/* uifcx.c */
/* Standard I/O Implementation of UIFC (user interface) library */
/* $Id$ */
......@@ -8,7 +6,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2010 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public License *
......@@ -62,6 +60,22 @@ static void umsg(char *str);
static void upop(char *str);
static void sethelp(int line, char* file);
/****************************************************************************/
/****************************************************************************/
static int uprintf(int x, int y, unsigned attr, char *fmat, ...)
{
va_list argptr;
char str[MAX_COLS + 1];
int i;
va_start(argptr, fmat);
vsprintf(str, fmat, argptr);
va_end(argptr);
i = printf("%s", str);
return(i);
}
/****************************************************************************/
/* Initialization function, see uifc.h for details. */
/* Returns 0 on success. */
......@@ -85,6 +99,7 @@ int UIFCCALL uifcinix(uifcapi_t* uifcapi)
api->showhelp=help;
api->showbuf=NULL;
api->timedisplay=NULL;
api->printf = uprintf;
setvbuf(stdin,NULL,_IONBF,0);
setvbuf(stdout,NULL,_IONBF,0);
......
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