1 | /* clib.h -- Header file for emx.dll's minimal C run-time library
|
---|
2 | Copyright (c) 1992-1995 by Eberhard Mattes
|
---|
3 |
|
---|
4 | This file is part of emx.
|
---|
5 |
|
---|
6 | emx is free software; you can redistribute it and/or modify it
|
---|
7 | under the terms of the GNU General Public License as published by
|
---|
8 | the Free Software Foundation; either version 2, or (at your option)
|
---|
9 | any later version.
|
---|
10 |
|
---|
11 | emx is distributed in the hope that it will be useful,
|
---|
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
14 | GNU General Public License for more details.
|
---|
15 |
|
---|
16 | You should have received a copy of the GNU General Public License
|
---|
17 | along with emx; see the file COPYING. If not, write to
|
---|
18 | the Free Software Foundation, 59 Temple Place - Suite 330,
|
---|
19 | Boston, MA 02111-1307, USA.
|
---|
20 |
|
---|
21 | As special exception, emx.dll can be distributed without source code
|
---|
22 | unless it has been changed. If you modify emx.dll, this exception
|
---|
23 | no longer applies and you must remove this paragraph from all source
|
---|
24 | files for emx.dll. */
|
---|
25 |
|
---|
26 |
|
---|
27 | #if !defined (_SIZE_T)
|
---|
28 | #define _SIZE_T
|
---|
29 | typedef unsigned long size_t;
|
---|
30 | #endif
|
---|
31 |
|
---|
32 | #define offsetof(type, member) ((size_t)&((type *)0)->member)
|
---|
33 |
|
---|
34 | void _defext (char *dst, const char *ext);
|
---|
35 | char *_getname (const char *path);
|
---|
36 | void *memcpy (void *dst, const void *src, size_t count);
|
---|
37 | size_t strlen (const char *s);
|
---|
38 | int strcmp (const char *string1, const char *string2);
|
---|
39 | char *strcpy (char *dst, const char *src);
|
---|
40 | int stricmp (const char *string1, const char *string2);
|
---|
41 | void *memset (void *dst, int c, size_t n);
|
---|
42 | int strncmp (const char *string1, const char *string2, size_t n);
|
---|
43 |
|
---|
44 | static inline int tolower (int c)
|
---|
45 | {
|
---|
46 | return (c >= 'A' && c <= 'Z' ? c - 'A' + 'a' : c);
|
---|
47 | }
|
---|