Implement RENAME-FILE
[pforth] / csrc / pf_clib.h
CommitLineData
8e9db35f
PB
1/* @(#) pf_clib.h 96/12/18 1.10 */
2#ifndef _pf_clib_h
3#define _pf_clib_h
4
5/***************************************************************
6** Include file for PForth tools
7**
8** Author: Phil Burk
9** Copyright 1994 3DO, Phil Burk, Larry Polansky, David Rosenboom
10**
11** The pForth software code is dedicated to the public domain,
12** and any third party may reproduce, distribute and modify
13** the pForth software code or any derivative works thereof
14** without any compensation or license. The pForth software
15** code is provided on an "as is" basis without any warranty
16** of any kind, including, without limitation, the implied
17** warranties of merchantability and fitness for a particular
18** purpose and their equivalents under the laws of any jurisdiction.
19**
20***************************************************************/
21
22#ifdef PF_NO_CLIB
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
28 cell_t pfCStringLength( const char *s );
29 void *pfSetMemory( void *s, cell_t c, cell_t n );
30 void *pfCopyMemory( void *s1, const void *s2, cell_t n);
31 #define EXIT(n) {while(1);}
32
33 #ifdef __cplusplus
34 }
35 #endif
36
37#else /* PF_NO_CLIB */
38
39 #ifdef PF_USER_CLIB
40 #include PF_USER_CLIB
41 #else
42/* Use stdlib functions if available because they are probably faster. */
43 #define pfCStringLength strlen
44 #define pfSetMemory memset
45 #define pfCopyMemory memcpy
46 #define EXIT(n) exit(n)
47 #endif /* PF_USER_CLIB */
48
49#endif /* !PF_NO_CLIB */
50
51#ifdef __cplusplus
52extern "C" {
53#endif
54
55/* Always use my own functions to avoid macro expansion problems with tolower(*s++) */
56char pfCharToUpper( char c );
57char pfCharToLower( char c );
58
59#ifdef __cplusplus
60}
61#endif
62
63#endif /* _pf_clib_h */