Rev 3348 | Rev 3757 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3348 | Rev 3756 | ||
---|---|---|---|
Line 50... | Line 50... | ||
50 | n = snprintf(buf, sizeof(buf), fmt, ##__VA_ARGS__); \ |
50 | n = snprintf(buf, sizeof(buf), fmt, ##__VA_ARGS__); \ |
51 | if (n > 0) \ |
51 | if (n > 0) \ |
52 | (void) __SYSCALL3(SYS_KLOG, 1, (sysarg_t) buf, strlen(buf)); \ |
52 | (void) __SYSCALL3(SYS_KLOG, 1, (sysarg_t) buf, strlen(buf)); \ |
53 | } |
53 | } |
54 | 54 | ||
- | 55 | typedef struct { |
|
- | 56 | /** Underlying file descriptor. */ |
|
- | 57 | int fd; |
|
- | 58 | ||
- | 59 | /** Error indicator. */ |
|
- | 60 | int error; |
|
- | 61 | ||
- | 62 | /** End-of-file indicator. */ |
|
- | 63 | int eof; |
|
- | 64 | } FILE; |
|
- | 65 | ||
55 | extern int getchar(void); |
66 | extern int getchar(void); |
56 | 67 | ||
57 | extern int puts(const char *); |
68 | extern int puts(const char *); |
58 | extern int putchar(int); |
69 | extern int putchar(int); |
59 | 70 | ||
Line 68... | Line 79... | ||
68 | 79 | ||
69 | #define fprintf(f, fmt, ...) printf(fmt, ##__VA_ARGS__) |
80 | #define fprintf(f, fmt, ...) printf(fmt, ##__VA_ARGS__) |
70 | 81 | ||
71 | extern int rename(const char *, const char *); |
82 | extern int rename(const char *, const char *); |
72 | 83 | ||
- | 84 | extern FILE *fopen(const char *, const char *); |
|
- | 85 | extern int fclose(FILE *); |
|
- | 86 | extern size_t fread(void *, size_t, size_t, FILE *); |
|
- | 87 | extern size_t fwrite(const void *, size_t, size_t, FILE *); |
|
- | 88 | extern int feof(FILE *); |
|
- | 89 | extern int ferror(FILE *); |
|
- | 90 | extern void clearerr(FILE *); |
|
- | 91 | ||
73 | #endif |
92 | #endif |
74 | 93 | ||
75 | /** @} |
94 | /** @} |
76 | */ |
95 | */ |