-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathstdio.h
60 lines (52 loc) · 2.03 KB
/
stdio.h
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
51
52
53
54
55
56
57
58
59
60
// stdio.h
// Copyright (C) 2022 iProgramInCpp
// The NanoShell Standard C Library
#ifndef _STDIO__H
#define _STDIO__H
#include <nanoshell/stdio_types.h>
// Standard C file access functions
FILE* fopen (const char* file, const char* mode);
FILE* fdopen(int fd, const char* mode);
int fclose(FILE* file);
int fread ( void* ptr, size_t size, size_t nmemb, FILE* stream);
int fwrite(const void* ptr, size_t size, size_t nmemb, FILE* stream);
int fseek (FILE* file, int offset, int whence);
int ftell (FILE* file);
int fflush(FILE* file);
int fputs (const char* s, FILE* stream);
int fputc (int c, FILE* stream);
int putc (int c, FILE* stream);
int feof (FILE* file);
int getc (FILE* file);
void rewind(FILE* file);
int vfprintf (FILE* file, const char* fmt, va_list list);
int fprintf (FILE* file, const char* fmt, ...);
int vprintf (const char* fmt, va_list list);
// Operations on files
int remove(const char* filename);
int rename(const char* oldname, const char* newname);
int renameat(int olddirdd, const char* oldname, int newdirdd, const char* newname);
// External definitions to stdin, stdout and stderr
extern FILE *stdin, *stdout, *stderr;
// Formatted input/output
int vfprintf(FILE* file, const char* fmt, va_list list);
int fprintf (FILE* file, const char* fmt, ...);
int vsnprintf(char* OutBuffer, size_t BufferSize, const char* FormatType, va_list list);
int vsprintf (char* OutBuffer, const char* FormatType, va_list list);
int snprintf (char* OutBuffer, size_t BufferSize, const char* fmt, ...);
int sprintf (char* OutBuffer, const char* FormatType, ...);
void LogMsg (const char* Format, ...);
void LogMsgNoCr(const char* Format, ...);
int printf (const char* Format, ...);
// Character input/output
int fputs(const char* s, FILE * stream);
int fputc(int c, FILE * stream);
int putc(int c, FILE* stream);
int puts(const char * s);
int putchar(int c);
int fgetc(FILE* stream);
int getc(FILE* stream);
int ungetc(int c, FILE * stream);
int ferror(FILE* stream);
void perror(const char* fmt, ...);
#endif//_STDIO__H