scanf.h 693 Bytes
#ifndef	__SCANF_H__
#define	__SCANF_H__


void scanf_init( void );

/*
 * 	input string
 */
int mygets( char *buf, int bufSize );


/*
 * 
		format	=	%type
		type	=	{
						c		-	single byte, char type data
						s		-	single byte string
						d/D, 	-	signed int
						u/U, 	-	unsigned int
						x/X, 	-	unsigned hexadecimal, upper/lower case
					}
	
		to scan '%', use '%%'
 *		
 */
int myscanf( const char *format, ... );


/*
 * 	pend waitting ENTER key input
 */
int mywaitcharEnter( void );

/*
 * 	no pend, immediately return
 * 	return 0 if no char input, otherwise return input char value
 */
int mygetcharSync( void );



#define	CONTROL_C_CHAR	0x03


int mygetchar( void );



#endif