File: cstdio

package info (click to toggle)
cppreference-doc 20170409-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 259,872 kB
  • sloc: xml: 570,184; python: 1,923; php: 520; makefile: 168; sh: 25; cpp: 9; ansic: 9
file content (101 lines) | stat: -rw-r--r-- 3,530 bytes parent folder | download | duplicates (3)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/*  Copyright (C) 2015  Povilas Kanapickas <povilas@radix.lt>

    This file is part of cppreference-doc

    This work is licensed under the Creative Commons Attribution-ShareAlike 3.0
    Unported License. To view a copy of this license, visit
    http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative
    Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.

    Permission is granted to copy, distribute and/or modify this document
    under the terms of the GNU Free Documentation License, Version 1.3 or
    any later version published by the Free Software Foundation; with no
    Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
*/

#ifndef CPPREFERENCE_CSTDIO_H
#define CPPREFERENCE_CSTDIO_H

#define stdin (::std::FILE*)(NULL) // actually a valid pointer
#define stdout (::std::FILE*)(NULL)
#define stderr (::std::FILE*)(NULL)
#define EOR 0
#define FOPEN_MAX 0
#define FILENAME_MAX 0
#define BUFSIZ 0
#define _IOFBF 0
#define _IOLBF 0
#define _IONBF 0
#define SEEK_SET 0
#define SEEK_CUR 0
#define SEEK_END 0
#define TMP_MAX 0
#define L_tmpnam 0

namespace std {

struct FILE;
struct fpos_t;

std::FILE* fopen(const char* filename, const char* mode);
std::FILE* freopen(const char* filename, const char* mode, std::FILE* stream);
int fclose(std::FILE* stream);
int fflush(std::FILE* stream);
int fwide(std::FILE* stream, int mode);
void setbuf(std::FILE* stream, char* buffer);
int setvbuf(std::FILE* stream, char* buffer, int mode, std::size_t size);
std::size_t fread(void* buffer, std::size_t size, std::size_t count, std::FILE* stream);
std::size_t fwrite(const void* buffer, std::size_t size, std::size_t count, std::FILE* stream);
int fgetc(std::FILE* stream);
int getc(std::FILE* stream);
char* fgets(char* str, int count, std::FILE* stream);
int fputc(int ch, std::FILE* stream);
int putc(int ch, std::FILE* stream);
int fputs(const char* str, std::FILE* stream);
int getchar();
int putchar(int ch);
int puts(const char* str);
int ungetc(int ch, std::FILE* stream);

int scanf(const char* format, ...);
int fscanf(std::FILE* stream, const char* format, ...);
int sscanf(const char* buffer, const char* format, ...);

#if CPPREFERENCE_STDVER>= 2011
int vscanf(const char* format, v_list vlist);
int vfscanf(std::FILE* stream, const char* format, va_list vlist);
int vsscanf(const char* buffer, const char* format, va_list vlist);
#endif

int printf(const char* format, ...);
int fprintf(std::FILE* stream, const char* format, ...);
int sprintf(char* buffer, const char* format, ...);
#if CPPREFERENCE_STDVER>= 2011
int snprintf(char* buffer, std::size_t buf_size, const char* format, ...);
#endif

int vprintf(const char* format, va_list vlist);
int vfprintf(std::FILE* stream, const char* format, va_list vlist);
int vsprintf(char* buffer, const char* format, va_list vlist);
#if CPPREFERENCE_STDVER>= 2011
int vsnprintf(char* buffer, std::size_t buf_size, const char* format, va_list vlist);
#endif

long ftell(std::FILE* stream);
int fgetpos(std::FILE* stream, std::fpos_t* pos);
int fseek(std::FILE* stream, long offset, int origin);
int fsetpos(std::FILE* stream, const std::fpos_t* pos);
void rewind(std::FILE* stream);
void clearerr(std::FILE* stream);
int feof(std::FILE* stream);
int ferror(std::FILE* stream);
void perror(const char* s);
int remove(const char* fname);
int rename(const char* old_filename, const char* new_filename);
std::FILE* tmpfile();
char* tmpnam(char* filename);

} // namespace std

#endif // CPPREFERENCE_CSTDIO_H