Subversion Repositories HelenOS

Rev

Rev 3386 | Rev 4327 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3386 Rev 4153
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
 
-
 
66
extern FILE *stdin, *stdout, *stderr;
-
 
67
 
55
extern int getchar(void);
68
extern int getchar(void);
56
 
69
 
57
extern int puts(const char *);
70
extern int puts(const char *);
58
extern int putchar(int);
71
extern int putchar(int);
59
 
72
 
60
extern int printf(const char *, ...);
73
extern int printf(const char *, ...);
61
extern int asprintf(char **, const char *, ...);
74
extern int asprintf(char **, const char *, ...);
62
extern int sprintf(char *, const char *fmt, ...);
75
extern int sprintf(char *, const char *, ...);
63
extern int snprintf(char *, size_t , const char *, ...);
76
extern int snprintf(char *, size_t , const char *, ...);
64
 
77
 
65
extern int vprintf(const char *, va_list);
78
extern int vprintf(const char *, va_list);
66
extern int vsprintf(char *, const char *, va_list);
79
extern int vsprintf(char *, const char *, va_list);
67
extern int vsnprintf(char *, size_t, const char *, va_list);
80
extern int vsnprintf(char *, size_t, const char *, va_list);
68
 
81
 
69
#define fprintf(f, fmt, ...) printf(fmt, ##__VA_ARGS__)
-
 
70
 
-
 
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
 
-
 
92
extern int fgetc(FILE *);
-
 
93
extern int fputc(int, FILE *);
-
 
94
extern int fputs(const char *, FILE *);
-
 
95
 
-
 
96
extern int fprintf(FILE *, const char *, ...);
-
 
97
extern int vfprintf(FILE *, const char *, va_list);
-
 
98
 
-
 
99
#define getc fgetc
-
 
100
#define putc fputc
-
 
101
 
-
 
102
extern int fseek(FILE *, long, int);
-
 
103
 
-
 
104
#ifndef SEEK_SET
-
 
105
    #define SEEK_SET    0
-
 
106
    #define SEEK_CUR    1
-
 
107
    #define SEEK_END    2
-
 
108
#endif
-
 
109
 
73
#endif
110
#endif
74
 
111
 
75
/** @}
112
/** @}
76
 */
113
 */