scanf.h
693 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#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