1 /* -*-comment-start: "//";comment-end:""-*-
2 * Mes --- Maxwell Equations of Software
3 * Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
5 * This file is part of Mes.
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.
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.
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/>.
34 chown (char const *file_name, uid_t owner, gid_t group)
36 eputs ("chown stub\n");
45 eputs ("ctime stub\n");
52 fdgets (char *s, int count, int fd)
56 while (--count > 0 && c != '\n')
63 if (p == s && (c == EOF || count == -1))
72 char c = fgetc (stream);
79 fgets (char *s, int count, FILE *stream)
81 return fdgets (s, count, (int)stream);
87 eputs ("frexp stub\n");
92 perror (char const *message)
94 fprintf (stderr, "%s: %s\n", strerror (errno), message);
100 eputs ("sigsetmask stub\n");
106 strcspn (char const *string, char const *stopset)
110 if (strchr (stopset, *p))
118 strncat (char *to, char const *from, size_t size)
122 char *p = strchr (to , '\0');
123 while (*from && size-- > 0)
130 strpbrk (char const *string, char const* stopset)
134 if (strchr (stopset, *p))
142 strspn (char const *string, char const *skipset)
146 if (!strchr (skipset, *p))
156 eputs ("sys_siglist stub\n");
164 eputs ("umask stub\n");
173 eputs ("utime stub\n");
181 fscanf (FILE *stream, char const *template, ...)
183 eputs ("fscan stub\n");
190 return c >= 0 && c <= 127;
195 bsearch (void const *key, void const *array, size_t count, size_t size, void (*compare) ())
197 bsearch (void const *key, void const *array, size_t count, size_t size, comparison_fn_t compare)
200 eputs ("bsearch stub\n");
205 gmtime (time_t const *time)
208 eputs ("gmtime stub\n");
211 return localtime (time);
214 #if __SBRK_CHAR_PTRDIFF
219 sbrk (intptr_t delta)
223 return malloc (delta);