/[projet1]/public/pc/tools/osdk/main/Osdk/_final_/include2/stdio.h
Defence Force logotype

Annotation of /public/pc/tools/osdk/main/Osdk/_final_/include2/stdio.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1159 - (hide annotations)
Sun Aug 10 18:31:35 2014 UTC (5 years, 4 months ago) by dbug
File MIME type: text/plain
File size: 2025 byte(s)


1 dbug 1159 /* stdio.h */
2    
3     #ifndef _STDIO_
4    
5     #define _STDIO_
6    
7     #ifndef NULL
8     #define NULL (0) /* for contiki */
9     #endif
10    
11     /* Print a character on the screen */
12    
13     extern void putchar(char c);
14    
15     /* Get a character from the keyboard (and echo it) */
16     /* Note: there's no keyboard buffer for this routine, it waits until the
17     user emits an ascii char */
18    
19     extern int getchar(void);
20    
21     /* Print a string on the screen */
22     /* This is the prefered way for outputting a message to the screen, the
23     routine is much smaller than 'printf/sprintf' */
24    
25     extern void puts(char *s);
26    
27     /* Get a line from the keyboard */
28     /* Like 'puts', the routine is much smaller than 'scanf/sscanf' */
29     /* Note: the Del key is active, allowing limited editing. All control chars
30     except Return are rejected */
31     /* Caution: nothing prevents the user to exceed the buffer space, so this
32     implementation has been limited to a 256-bytes entry : this way, a
33     256-bytes buffer will never be exceeded */
34    
35     extern void gets(char buf[]);
36    
37    
38     /* Format and print to standard output */
39     /* Allowed specifiers are :
40     %c : character image
41     %d : integer value
42     %f : floating point value (note: the printed value may be an integer
43     if the value has no fractional part)
44     %s : string
45     %x : hexadecimal value
46     */
47    
48     extern void printf(const char *format,...);
49    
50     /* Format and print to a buffer */
51    
52     extern void sprintf(char buf[], const char *format,...);
53    
54     /* Scan formatted data from the keyboard */
55     /* Note: this is implemented as a 'gets' followed by a 'sscanf'. An internal
56     256-bytes buffer is used for gets, which will only read one line.
57     This means 'scanf' will only parse one entry line. Also, extra
58     data won't be retained for future scans */
59    
60     extern int scanf(const char *format,...);
61    
62     /* Scan formatted data from a string */
63    
64     extern int sscanf(char buf[], const char *format,...);
65    
66     #endif /* _STDIO_ */
67    
68     /* end of file */
69    

  ViewVC Help
Powered by ViewVC 1.1.26