1 /* @(#) pf_clib.h 96/12/18 1.10 */
5 /***************************************************************
6 ** Include file for PForth tools
9 ** Copyright 1994 3DO, Phil Burk, Larry Polansky, David Rosenboom
11 ** Permission to use, copy, modify, and/or distribute this
12 ** software for any purpose with or without fee is hereby granted.
14 ** THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
15 ** WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
16 ** WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
17 ** THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
18 ** CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
19 ** FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
20 ** CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
21 ** OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23 ***************************************************************/
31 cell_t pfCStringLength( const char *s );
32 void *pfSetMemory( void *s, cell_t c, cell_t n );
33 void *pfCopyMemory( void *s1, const void *s2, cell_t n);
34 #define EXIT(n) {while(1);}
40 #else /* PF_NO_CLIB */
45 /* Use stdlib functions if available because they are probably faster. */
46 #define pfCStringLength strlen
47 #define pfSetMemory memset
48 #define pfCopyMemory memcpy
49 #define EXIT(n) exit(n)
50 #endif /* PF_USER_CLIB */
52 #endif /* !PF_NO_CLIB */
58 /* Always use my own functions to avoid macro expansion problems with tolower(*s++) */
59 char pfCharToUpper( char c );
60 char pfCharToLower( char c );
66 #endif /* _pf_clib_h */