Skip to content
Snippets Groups Projects
Commit 640c1355 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Add uifcapi_t.kmode that can be used to set global key-input mode flags

e.g. this a way to set the K_TRIM mode globally for all keyboard input
parent 5e0d2ef7
Branches
Tags
No related merge requests found
/* Text-mode User Interface Library (inspired by Novell SYSCON look & feel) */ /* Text-mode User Interface Library (inspired by Novell SYSCON look & feel) */
/* $Id: uifc.h,v 1.97 2020/08/16 20:37:08 rswindell Exp $ */
/**************************************************************************** /****************************************************************************
* @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
...@@ -15,21 +13,9 @@ ...@@ -15,21 +13,9 @@
* See the GNU Lesser General Public License for more details: lgpl.txt or * * See the GNU Lesser General Public License for more details: lgpl.txt or *
* http://www.fsf.org/copyleft/lesser.html * * http://www.fsf.org/copyleft/lesser.html *
* * * *
* Anonymous FTP access to the most recent released source is available at *
* ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net *
* *
* Anonymous CVS access to the development source and modification history *
* is available at cvs.synchro.net:/cvsroot/sbbs, example: *
* cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login *
* (just hit return, no password is necessary) *
* cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src *
* *
* For Synchronet coding style and modification guidelines, see * * For Synchronet coding style and modification guidelines, see *
* http://www.synchro.net/source.html * * http://www.synchro.net/source.html *
* * * *
* You are encouraged to submit any modifications (preferably in Unix diff *
* format) via e-mail to mods@synchro.net *
* *
* Note: If this box doesn't appear square, then you need to fix your tabs. * * Note: If this box doesn't appear square, then you need to fix your tabs. *
****************************************************************************/ ****************************************************************************/
...@@ -346,7 +332,8 @@ typedef struct { ...@@ -346,7 +332,8 @@ typedef struct {
/****************************************************************************/ /****************************************************************************/
/* Controls general UIFC library behavior. */ /* Controls general UIFC library behavior. */
/****************************************************************************/ /****************************************************************************/
long mode; int mode;
int kmode;
/****************************************************************************/ /****************************************************************************/
/* Set to TRUE when changes to data have been made by input function. */ /* Set to TRUE when changes to data have been made by input function. */
/****************************************************************************/ /****************************************************************************/
......
...@@ -2135,6 +2135,8 @@ int ugetstr(int left, int top, int width, char *outstr, int max, long mode, int ...@@ -2135,6 +2135,8 @@ int ugetstr(int left, int top, int width, char *outstr, int max, long mode, int
char *pastebuf=NULL; char *pastebuf=NULL;
unsigned char *pb=NULL; unsigned char *pb=NULL;
mode |= api->kmode; // Global keyboard input mode flags (e.g. K_TRIM)
api->exit_flags = 0; api->exit_flags = 0;
if((str=alloca(max+1))==NULL) { if((str=alloca(max+1))==NULL) {
cprintf("UIFC line %d: error allocating %u bytes\r\n" cprintf("UIFC line %d: error allocating %u bytes\r\n"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment