Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/c++/v1/cstdio is written in an unsupported language. File is not indexed.

0001 // -*- C++ -*-
0002 //===----------------------------------------------------------------------===//
0003 //
0004 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0005 // See https://llvm.org/LICENSE.txt for license information.
0006 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0007 //
0008 //===----------------------------------------------------------------------===//
0009 
0010 #ifndef _LIBCPP_CSTDIO
0011 #define _LIBCPP_CSTDIO
0012 
0013 /*
0014     cstdio synopsis
0015 
0016 Macros:
0017 
0018     BUFSIZ
0019     EOF
0020     FILENAME_MAX
0021     FOPEN_MAX
0022     L_tmpnam
0023     NULL
0024     SEEK_CUR
0025     SEEK_END
0026     SEEK_SET
0027     TMP_MAX
0028     _IOFBF
0029     _IOLBF
0030     _IONBF
0031     stderr
0032     stdin
0033     stdout
0034 
0035 namespace std
0036 {
0037 
0038 Types:
0039 
0040 FILE
0041 fpos_t
0042 size_t
0043 
0044 int remove(const char* filename);
0045 int rename(const char* old, const char* new);
0046 FILE* tmpfile(void);
0047 char* tmpnam(char* s);
0048 int fclose(FILE* stream);
0049 int fflush(FILE* stream);
0050 FILE* fopen(const char* restrict filename, const char* restrict mode);
0051 FILE* freopen(const char* restrict filename, const char * restrict mode,
0052               FILE * restrict stream);
0053 void setbuf(FILE* restrict stream, char* restrict buf);
0054 int setvbuf(FILE* restrict stream, char* restrict buf, int mode, size_t size);
0055 int fprintf(FILE* restrict stream, const char* restrict format, ...);
0056 int fscanf(FILE* restrict stream, const char * restrict format, ...);
0057 int printf(const char* restrict format, ...);
0058 int scanf(const char* restrict format, ...);
0059 int snprintf(char* restrict s, size_t n, const char* restrict format, ...);    // C99
0060 int sprintf(char* restrict s, const char* restrict format, ...);
0061 int sscanf(const char* restrict s, const char* restrict format, ...);
0062 int vfprintf(FILE* restrict stream, const char* restrict format, va_list arg);
0063 int vfscanf(FILE* restrict stream, const char* restrict format, va_list arg);  // C99
0064 int vprintf(const char* restrict format, va_list arg);
0065 int vscanf(const char* restrict format, va_list arg);                          // C99
0066 int vsnprintf(char* restrict s, size_t n, const char* restrict format,         // C99
0067               va_list arg);
0068 int vsprintf(char* restrict s, const char* restrict format, va_list arg);
0069 int vsscanf(const char* restrict s, const char* restrict format, va_list arg); // C99
0070 int fgetc(FILE* stream);
0071 char* fgets(char* restrict s, int n, FILE* restrict stream);
0072 int fputc(int c, FILE* stream);
0073 int fputs(const char* restrict s, FILE* restrict stream);
0074 int getc(FILE* stream);
0075 int getchar(void);
0076 char* gets(char* s);  // removed in C++14
0077 int putc(int c, FILE* stream);
0078 int putchar(int c);
0079 int puts(const char* s);
0080 int ungetc(int c, FILE* stream);
0081 size_t fread(void* restrict ptr, size_t size, size_t nmemb,
0082              FILE* restrict stream);
0083 size_t fwrite(const void* restrict ptr, size_t size, size_t nmemb,
0084               FILE* restrict stream);
0085 int fgetpos(FILE* restrict stream, fpos_t* restrict pos);
0086 int fseek(FILE* stream, long offset, int whence);
0087 int fsetpos(FILE*stream, const fpos_t* pos);
0088 long ftell(FILE* stream);
0089 void rewind(FILE* stream);
0090 void clearerr(FILE* stream);
0091 int feof(FILE* stream);
0092 int ferror(FILE* stream);
0093 void perror(const char* s);
0094 
0095 }  // std
0096 */
0097 
0098 #if __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
0099 #  include <__cxx03/cstdio>
0100 #else
0101 #  include <__config>
0102 #  include <__cstddef/size_t.h>
0103 
0104 #  include <stdio.h>
0105 
0106 #  ifndef _LIBCPP_STDIO_H
0107 #   error <cstdio> tried including <stdio.h> but didn't find libc++'s <stdio.h> header. \
0108           This usually means that your header search paths are not configured properly. \
0109           The header search paths should contain the C++ Standard Library headers before \
0110           any C Standard Library, and you are probably using compiler flags that make that \
0111           not be the case.
0112 #  endif
0113 
0114 #  if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0115 #    pragma GCC system_header
0116 #  endif
0117 
0118 _LIBCPP_BEGIN_NAMESPACE_STD
0119 
0120 using ::FILE _LIBCPP_USING_IF_EXISTS;
0121 using ::fpos_t _LIBCPP_USING_IF_EXISTS;
0122 
0123 using ::fclose _LIBCPP_USING_IF_EXISTS;
0124 using ::fflush _LIBCPP_USING_IF_EXISTS;
0125 using ::setbuf _LIBCPP_USING_IF_EXISTS;
0126 using ::setvbuf _LIBCPP_USING_IF_EXISTS;
0127 using ::fprintf _LIBCPP_USING_IF_EXISTS;
0128 using ::fscanf _LIBCPP_USING_IF_EXISTS;
0129 using ::snprintf _LIBCPP_USING_IF_EXISTS;
0130 using ::sprintf _LIBCPP_USING_IF_EXISTS;
0131 using ::sscanf _LIBCPP_USING_IF_EXISTS;
0132 using ::vfprintf _LIBCPP_USING_IF_EXISTS;
0133 using ::vfscanf _LIBCPP_USING_IF_EXISTS;
0134 using ::vsscanf _LIBCPP_USING_IF_EXISTS;
0135 using ::vsnprintf _LIBCPP_USING_IF_EXISTS;
0136 using ::vsprintf _LIBCPP_USING_IF_EXISTS;
0137 using ::fgetc _LIBCPP_USING_IF_EXISTS;
0138 using ::fgets _LIBCPP_USING_IF_EXISTS;
0139 using ::fputc _LIBCPP_USING_IF_EXISTS;
0140 using ::fputs _LIBCPP_USING_IF_EXISTS;
0141 using ::getc _LIBCPP_USING_IF_EXISTS;
0142 using ::putc _LIBCPP_USING_IF_EXISTS;
0143 using ::ungetc _LIBCPP_USING_IF_EXISTS;
0144 using ::fread _LIBCPP_USING_IF_EXISTS;
0145 using ::fwrite _LIBCPP_USING_IF_EXISTS;
0146 using ::fgetpos _LIBCPP_USING_IF_EXISTS;
0147 using ::fseek _LIBCPP_USING_IF_EXISTS;
0148 using ::fsetpos _LIBCPP_USING_IF_EXISTS;
0149 using ::ftell _LIBCPP_USING_IF_EXISTS;
0150 using ::rewind _LIBCPP_USING_IF_EXISTS;
0151 using ::clearerr _LIBCPP_USING_IF_EXISTS;
0152 using ::feof _LIBCPP_USING_IF_EXISTS;
0153 using ::ferror _LIBCPP_USING_IF_EXISTS;
0154 using ::perror _LIBCPP_USING_IF_EXISTS;
0155 
0156 using ::fopen _LIBCPP_USING_IF_EXISTS;
0157 using ::freopen _LIBCPP_USING_IF_EXISTS;
0158 using ::remove _LIBCPP_USING_IF_EXISTS;
0159 using ::rename _LIBCPP_USING_IF_EXISTS;
0160 using ::tmpfile _LIBCPP_USING_IF_EXISTS;
0161 using ::tmpnam _LIBCPP_USING_IF_EXISTS;
0162 
0163 using ::getchar _LIBCPP_USING_IF_EXISTS;
0164 #  if _LIBCPP_STD_VER <= 11
0165 using ::gets _LIBCPP_USING_IF_EXISTS;
0166 #  endif
0167 using ::scanf _LIBCPP_USING_IF_EXISTS;
0168 using ::vscanf _LIBCPP_USING_IF_EXISTS;
0169 
0170 using ::printf _LIBCPP_USING_IF_EXISTS;
0171 using ::putchar _LIBCPP_USING_IF_EXISTS;
0172 using ::puts _LIBCPP_USING_IF_EXISTS;
0173 using ::vprintf _LIBCPP_USING_IF_EXISTS;
0174 
0175 _LIBCPP_END_NAMESPACE_STD
0176 
0177 #endif // __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
0178 
0179 #endif // _LIBCPP_CSTDIO