mlibc: Cleanup.
[mes.git] / lib / m4.c
1 /* -*-comment-start: "//";comment-end:""-*-
2  * Mes --- Maxwell Equations of Software
3  * Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
4  *
5  * This file is part of Mes.
6  *
7  * Mes is free software; you can redistribute it and/or modify it
8  * under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3 of the License, or (at
10  * your option) any later version.
11  *
12  * Mes is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with Mes.  If not, see <http://www.gnu.org/licenses/>.
19  */
20
21 int
22 abort (int x)
23 {
24   eputs ("abort stub\n");
25   return 0;
26 }
27
28 int
29 atof (int x)
30 {
31   eputs ("atof stub\n");
32   return 0;
33 }
34
35 int
36 atol (int x)
37 {
38   eputs ("atol stub\n");
39   return 0;
40 }
41
42 int
43 bcmp (int x)
44 {
45   eputs ("bcmp stub\n");
46   return 0;
47 }
48
49 void
50 bcopy (void const *src, void *dest, size_t n)
51 {
52   return memmove (dest, src, n);
53 }
54
55 int
56 bzero (int x)
57 {
58   eputs ("bzero stub\n");
59   return 0;
60 }
61
62 int
63 fileno (FILE *stream)
64 {
65   return (int)stream;
66 }
67
68 int
69 fpurge (FILE *stream)
70 {
71   eputs ("fpurge stub\n");
72   return 0;
73 }
74
75 size_t
76 freadahead (FILE *fp)
77 {
78   eputs ("freadahead stub\n");
79   return 0;
80 }
81
82 int
83 index (char const *s, int c)
84 {
85   return strchr (s, c);
86 }
87
88 int
89 isalnum (int c)
90 {
91   return isdigit (c) || isalpha (c);
92 }
93
94 int
95 isalpha (int c)
96 {
97   return islower (c) || isupper (c);
98 }
99
100 int
101 iscntrl (int c)
102 {
103   return c >= 0 && c < 32;
104 }
105
106 int
107 islower (int c)
108 {
109   return c >= 'a' && c <= 'z';
110 }
111
112 int
113 isprint (int c)
114 {
115   return c >= 32 && c < 127;
116 }
117
118 int
119 ispunct (int c)
120 {
121   return isprint (c) && !isspace (c) && !isalnum (c);
122 }
123
124 int
125 isupper (int c)
126 {
127   return c >= 'A' && c <= 'Z';
128 }
129
130 int
131 mktemp (int x)
132 {
133   eputs ("mktemp stub\n");
134   return 0;
135 }
136
137 int
138 pclose (int x)
139 {
140   eputs ("pclose stub\n");
141   return 0;
142 }
143
144 int
145 popen (int x)
146 {
147   eputs ("popen stub\n");
148   return 0;
149 }
150
151 int
152 rindex (char const *s, int c)
153 {
154   return strrchr (s, c);
155 }
156
157 int
158 rewind (int x)
159 {
160   eputs ("rewind stub\n");
161   return 0;
162 }
163
164 int
165 setbuf (int x)
166 {
167   eputs ("setbuf stub\n");
168   return 0;
169 }
170
171 int
172 signal (int x)
173 {
174   eputs ("signal stub\n");
175   return 0;
176 }
177
178 int
179 sys_errlist (int x)
180 {
181   eputs ("sys_errlist stub\n");
182   return 0;
183 }
184
185 int
186 sys_nerr (int x)
187 {
188   eputs ("sys_nerr stub\n");
189   return 0;
190 }
191
192 int
193 system (int x)
194 {
195   eputs ("system stub\n");
196   return 0;
197 }
198
199 int
200 tolower (int x)
201 {
202   eputs ("tolower stub\n");
203   return 0;
204 }
205
206 int
207 toupper (int x)
208 {
209   eputs ("toupper stub\n");
210   return 0;
211 }