source: mainline/uspace/lib/cpp/include/cstdio@ 08c1df0

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 08c1df0 was de53138, checked in by Dzejrou <dzejrou@…>, 7 years ago

cpp: revamped c header wrappers, now only include standard symbols, others are in std::hel, fixed some bugs

  • Property mode set to 100644
File size: 4.2 KB
Line 
1/*
2 * Copyright (c) 2018 Jaroslav Jindrak
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * - The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29#ifndef LIBCPP_CSTDIO
30#define LIBCPP_CSTDIO
31
32#include "internal/common.hpp"
33
34namespace std::hel
35{
36 extern "C" {
37 #include <stdio.h>
38 }
39}
40
41namespace std
42{
43 using std::hel::FILE;
44 /* using std::hel::fpos_t */
45 using std::hel::size_t;
46
47 using std::hel::clearerr;
48 using std::hel::fclose;
49 using std::hel::feof;
50 using std::hel::ferror;
51 using std::hel::fflush;
52 using std::hel::fgetc;
53 /* using std::hel::fgetpos; */
54 using std::hel::fgets;
55 using std::hel::fopen;
56 using std::hel::fprintf;
57 using std::hel::fputc;
58 using std::hel::fputs;
59 using std::hel::fread;
60 using std::hel::freopen;
61 /* using std::hel::fscanf; */
62 using std::hel::fseek;
63 /* using std::hel::fsetpos; */
64 using std::hel::ftell;
65 using std::hel::fwrite;
66 /* using std::hel::getc; */
67 using std::hel::getchar;
68 /* using std::hel::perror; */
69 using std::hel::printf;
70 /* using std::hel::putc; */
71 using std::hel::putchar;
72 using std::hel::puts;
73 using std::hel::remove;
74 using std::hel::rename;
75 using std::hel::rewind;
76 /* using std::hel::scanf; */
77 using std::hel::setbuf;
78 using std::hel::setvbuf;
79 using std::hel::snprintf;
80 /* using std::hel::sprintf; */
81 /* using std::hel::sscanf; */
82 /* using std::hel::tmpfile; */
83 /* using std::hel::tmpnam; */
84 using std::hel::ungetc;
85 using std::hel::vfprintf;
86 using std::hel::vprintf;
87 /* using std::hel::vscanf; */
88 using std::hel::vsnprintf;
89 /* using std::hel::vsprintf; */
90 /* using std::hel::vsscanf; */
91}
92
93using std::hel::FILE;
94/* using std::hel::fpos_t */
95using std::hel::size_t;
96
97using std::hel::clearerr;
98using std::hel::fclose;
99using std::hel::feof;
100using std::hel::ferror;
101using std::hel::fflush;
102using std::hel::fgetc;
103/* using std::hel::fgetpos; */
104using std::hel::fgets;
105using std::hel::fopen;
106using std::hel::fprintf;
107using std::hel::fputc;
108using std::hel::fputs;
109using std::hel::fread;
110using std::hel::freopen;
111/* using std::hel::fscanf; */
112using std::hel::fseek;
113/* using std::hel::fsetpos; */
114using std::hel::ftell;
115using std::hel::fwrite;
116/* using std::hel::getc; */
117using std::hel::getchar;
118/* using std::hel::perror; */
119using std::hel::printf;
120/* using std::hel::putc; */
121using std::hel::putchar;
122using std::hel::puts;
123using std::hel::remove;
124using std::hel::rename;
125using std::hel::rewind;
126/* using std::hel::scanf; */
127using std::hel::setbuf;
128using std::hel::setvbuf;
129using std::hel::snprintf;
130/* using std::hel::sprintf; */
131/* using std::hel::sscanf; */
132/* using std::hel::tmpfile; */
133/* using std::hel::tmpnam; */
134using std::hel::ungetc;
135using std::hel::vfprintf;
136using std::hel::vprintf;
137/* using std::hel::vscanf; */
138using std::hel::vsnprintf;
139/* using std::hel::vsprintf; */
140/* using std::hel::vsscanf; */
141
142#endif
Note: See TracBrowser for help on using the repository browser.