From: cuz Date: Mon, 14 Feb 2005 09:37:30 +0000 (+0000) Subject: New scanf type routines for conio by Greg King + a few comment changes X-Git-Tag: V2.12.0~457 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bb66b590a9d866524fe3cac03bf34fcae1601482;p=cc65 New scanf type routines for conio by Greg King + a few comment changes git-svn-id: svn://svn.cc65.org/cc65/trunk@3381 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/include/conio.h b/include/conio.h index 11064c9f5..4a7bd0eb7 100644 --- a/include/conio.h +++ b/include/conio.h @@ -1,8 +1,8 @@ /*****************************************************************************/ /* */ -/* conio.h */ +/* conio.h */ /* */ -/* Direct console I/O */ +/* Direct console I/O */ /* */ /* */ /* */ @@ -35,7 +35,7 @@ /* * This is the direct console interface for cc65. I do not like the function - * names very much, but the first version started as a rewrite of Borlands + * names very much, but the first version started as a rewrite of Borland's * conio, and, even if the interface has changed, the names did not. * * The interface does direct screen I/O, so it is fast enough for most @@ -58,7 +58,7 @@ # include #endif -/* Include the correct machine specific file */ +/* Include the correct machine-specific file */ #if defined(__APPLE2__) # include #elif defined(__APPLE2ENH__) @@ -69,6 +69,10 @@ # include #elif defined(__CBM__) # include +#elif defined(__GEOS__) +# include +#elif defined(__LUNIX__) +# include #elif defined(__LYNX__) # include #elif defined(__NES__) @@ -80,7 +84,7 @@ /*****************************************************************************/ -/* Functions */ +/* Functions */ /*****************************************************************************/ @@ -113,25 +117,31 @@ void __fastcall__ cputcxy (unsigned char x, unsigned char y, char c); /* Same as "gotoxy (x, y); cputc (c);" */ void __fastcall__ cputs (const char* s); -/* Output a NUL terminated string at the current cursor position */ +/* Output a NUL-terminated string at the current cursor position */ void __fastcall__ cputsxy (unsigned char x, unsigned char y, const char* s); /* Same as "gotoxy (x, y); puts (s);" */ int cprintf (const char* format, ...); -/* Like printf, but uses direct screen I/O */ +/* Like printf(), but uses direct screen output */ int __fastcall__ vcprintf (const char* format, va_list ap); -/* Like vprintf, but uses direct screen I/O */ +/* Like vprintf(), but uses direct screen output */ char cgetc (void); /* Return a character from the keyboard. If there is no character available, - * the functions waits until the user does press a key. If cursor is set to + * the function waits until the user does press a key. If cursor is set to * 1 (see below), a blinking cursor is displayed while waiting. */ +int cscanf (const char* format, ...); +/* Like scanf(), but uses direct keyboard input */ + +int __fastcall__ vcscanf (const char* format, va_list ap); +/* Like vscanf(), but uses direct keyboard input */ + unsigned char __fastcall__ cursor (unsigned char onoff); -/* If onoff is 1, a cursor is display when waiting for keyboard input. If +/* If onoff is 1, a cursor is displayed when waiting for keyboard input. If * onoff is 0, the cursor is hidden when waiting for keyboard input. The * function returns the old cursor setting. */