brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.8 KiB · df9da1b Raw
180 lines · plain
1// -*- C++ -*-2//===----------------------------------------------------------------------===//3//4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.5// See https://llvm.org/LICENSE.txt for license information.6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception7//8//===----------------------------------------------------------------------===//9 10#ifndef _LIBCPP_CSTDIO11#define _LIBCPP_CSTDIO12 13/*14    cstdio synopsis15 16Macros:17 18    BUFSIZ19    EOF20    FILENAME_MAX21    FOPEN_MAX22    L_tmpnam23    NULL24    SEEK_CUR25    SEEK_END26    SEEK_SET27    TMP_MAX28    _IOFBF29    _IOLBF30    _IONBF31    stderr32    stdin33    stdout34 35namespace std36{37 38Types:39 40FILE41fpos_t42size_t43 44int remove(const char* filename);45int rename(const char* old, const char* new);46FILE* tmpfile(void);47char* tmpnam(char* s);48int fclose(FILE* stream);49int fflush(FILE* stream);50FILE* fopen(const char* restrict filename, const char* restrict mode);51FILE* freopen(const char* restrict filename, const char * restrict mode,52              FILE * restrict stream);53void setbuf(FILE* restrict stream, char* restrict buf);54int setvbuf(FILE* restrict stream, char* restrict buf, int mode, size_t size);55int fprintf(FILE* restrict stream, const char* restrict format, ...);56int fscanf(FILE* restrict stream, const char * restrict format, ...);57int printf(const char* restrict format, ...);58int scanf(const char* restrict format, ...);59int snprintf(char* restrict s, size_t n, const char* restrict format, ...);    // C9960int sprintf(char* restrict s, const char* restrict format, ...);61int sscanf(const char* restrict s, const char* restrict format, ...);62int vfprintf(FILE* restrict stream, const char* restrict format, va_list arg);63int vfscanf(FILE* restrict stream, const char* restrict format, va_list arg);  // C9964int vprintf(const char* restrict format, va_list arg);65int vscanf(const char* restrict format, va_list arg);                          // C9966int vsnprintf(char* restrict s, size_t n, const char* restrict format,         // C9967              va_list arg);68int vsprintf(char* restrict s, const char* restrict format, va_list arg);69int vsscanf(const char* restrict s, const char* restrict format, va_list arg); // C9970int fgetc(FILE* stream);71char* fgets(char* restrict s, int n, FILE* restrict stream);72int fputc(int c, FILE* stream);73int fputs(const char* restrict s, FILE* restrict stream);74int getc(FILE* stream);75int getchar(void);76char* gets(char* s);  // removed in C++1477int putc(int c, FILE* stream);78int putchar(int c);79int puts(const char* s);80int ungetc(int c, FILE* stream);81size_t fread(void* restrict ptr, size_t size, size_t nmemb,82             FILE* restrict stream);83size_t fwrite(const void* restrict ptr, size_t size, size_t nmemb,84              FILE* restrict stream);85int fgetpos(FILE* restrict stream, fpos_t* restrict pos);86int fseek(FILE* stream, long offset, int whence);87int fsetpos(FILE*stream, const fpos_t* pos);88long ftell(FILE* stream);89void rewind(FILE* stream);90void clearerr(FILE* stream);91int feof(FILE* stream);92int ferror(FILE* stream);93void perror(const char* s);94 95}  // std96*/97 98#if __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)99#  include <__cxx03/cstdio>100#else101#  include <__config>102#  include <__cstddef/size_t.h>103 104#  include <stdio.h>105 106#  ifndef _LIBCPP_STDIO_H107#   error <cstdio> tried including <stdio.h> but didn't find libc++'s <stdio.h> header. \108          This usually means that your header search paths are not configured properly. \109          The header search paths should contain the C++ Standard Library headers before \110          any C Standard Library, and you are probably using compiler flags that make that \111          not be the case.112#  endif113 114#  if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)115#    pragma GCC system_header116#  endif117 118_LIBCPP_BEGIN_NAMESPACE_STD119 120using ::FILE _LIBCPP_USING_IF_EXISTS;121using ::fpos_t _LIBCPP_USING_IF_EXISTS;122 123using ::fclose _LIBCPP_USING_IF_EXISTS;124using ::fflush _LIBCPP_USING_IF_EXISTS;125using ::setbuf _LIBCPP_USING_IF_EXISTS;126using ::setvbuf _LIBCPP_USING_IF_EXISTS;127using ::fprintf _LIBCPP_USING_IF_EXISTS;128using ::fscanf _LIBCPP_USING_IF_EXISTS;129using ::snprintf _LIBCPP_USING_IF_EXISTS;130using ::sprintf _LIBCPP_USING_IF_EXISTS;131using ::sscanf _LIBCPP_USING_IF_EXISTS;132using ::vfprintf _LIBCPP_USING_IF_EXISTS;133using ::vfscanf _LIBCPP_USING_IF_EXISTS;134using ::vsscanf _LIBCPP_USING_IF_EXISTS;135using ::vsnprintf _LIBCPP_USING_IF_EXISTS;136using ::vsprintf _LIBCPP_USING_IF_EXISTS;137using ::fgetc _LIBCPP_USING_IF_EXISTS;138using ::fgets _LIBCPP_USING_IF_EXISTS;139using ::fputc _LIBCPP_USING_IF_EXISTS;140using ::fputs _LIBCPP_USING_IF_EXISTS;141using ::getc _LIBCPP_USING_IF_EXISTS;142using ::putc _LIBCPP_USING_IF_EXISTS;143using ::ungetc _LIBCPP_USING_IF_EXISTS;144using ::fread _LIBCPP_USING_IF_EXISTS;145using ::fwrite _LIBCPP_USING_IF_EXISTS;146using ::fgetpos _LIBCPP_USING_IF_EXISTS;147using ::fseek _LIBCPP_USING_IF_EXISTS;148using ::fsetpos _LIBCPP_USING_IF_EXISTS;149using ::ftell _LIBCPP_USING_IF_EXISTS;150using ::rewind _LIBCPP_USING_IF_EXISTS;151using ::clearerr _LIBCPP_USING_IF_EXISTS;152using ::feof _LIBCPP_USING_IF_EXISTS;153using ::ferror _LIBCPP_USING_IF_EXISTS;154using ::perror _LIBCPP_USING_IF_EXISTS;155 156using ::fopen _LIBCPP_USING_IF_EXISTS;157using ::freopen _LIBCPP_USING_IF_EXISTS;158using ::remove _LIBCPP_USING_IF_EXISTS;159using ::rename _LIBCPP_USING_IF_EXISTS;160using ::tmpfile _LIBCPP_USING_IF_EXISTS;161using ::tmpnam _LIBCPP_USING_IF_EXISTS;162 163using ::getchar _LIBCPP_USING_IF_EXISTS;164#  if _LIBCPP_STD_VER <= 11165using ::gets _LIBCPP_USING_IF_EXISTS;166#  endif167using ::scanf _LIBCPP_USING_IF_EXISTS;168using ::vscanf _LIBCPP_USING_IF_EXISTS;169 170using ::printf _LIBCPP_USING_IF_EXISTS;171using ::putchar _LIBCPP_USING_IF_EXISTS;172using ::puts _LIBCPP_USING_IF_EXISTS;173using ::vprintf _LIBCPP_USING_IF_EXISTS;174 175_LIBCPP_END_NAMESPACE_STD176 177#endif // __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)178 179#endif // _LIBCPP_CSTDIO180