bb6b2dcd |
1 | /* @(#) pf_text.h 96/12/18 1.10 */\r |
2 | #ifndef _pforth_text_h\r |
3 | #define _pforth_text_h\r |
4 | \r |
5 | /***************************************************************\r |
6 | ** Include file for PForth Text\r |
7 | **\r |
8 | ** Author: Phil Burk\r |
9 | ** Copyright 1994 3DO, Phil Burk, Larry Polansky, David Rosenboom\r |
10 | **\r |
11 | ** The pForth software code is dedicated to the public domain,\r |
12 | ** and any third party may reproduce, distribute and modify\r |
13 | ** the pForth software code or any derivative works thereof\r |
14 | ** without any compensation or license. The pForth software\r |
15 | ** code is provided on an "as is" basis without any warranty\r |
16 | ** of any kind, including, without limitation, the implied\r |
17 | ** warranties of merchantability and fitness for a particular\r |
18 | ** purpose and their equivalents under the laws of any jurisdiction.\r |
19 | **\r |
20 | ***************************************************************/\r |
21 | \r |
22 | #define PF_ERR_INDEX_MASK (0xFFFF)\r |
23 | #define PF_ERR_BASE (0x80000000)\r |
24 | #define PF_ERR_NO_MEM (PF_ERR_BASE | 0)\r |
25 | #define PF_ERR_TOO_BIG (PF_ERR_BASE | 2)\r |
26 | #define PF_ERR_NUM_PARAMS (PF_ERR_BASE | 3)\r |
27 | #define PF_ERR_OPEN_FILE (PF_ERR_BASE | 4)\r |
28 | #define PF_ERR_WRONG_FILE (PF_ERR_BASE | 5)\r |
29 | #define PF_ERR_BAD_FILE (PF_ERR_BASE | 6)\r |
30 | #define PF_ERR_READ_FILE (PF_ERR_BASE | 7)\r |
31 | #define PF_ERR_WRITE_FILE (PF_ERR_BASE | 8)\r |
32 | #define PF_ERR_CORRUPT_DIC (PF_ERR_BASE | 9)\r |
33 | #define PF_ERR_NOT_SUPPORTED (PF_ERR_BASE | 10)\r |
34 | #define PF_ERR_VERSION_FUTURE (PF_ERR_BASE | 11)\r |
35 | #define PF_ERR_VERSION_PAST (PF_ERR_BASE | 12)\r |
36 | #define PF_ERR_COLON_STACK (PF_ERR_BASE | 13)\r |
37 | #define PF_ERR_HEADER_ROOM (PF_ERR_BASE | 14)\r |
38 | #define PF_ERR_CODE_ROOM (PF_ERR_BASE | 15)\r |
39 | #define PF_ERR_NO_SHELL (PF_ERR_BASE | 16)\r |
40 | #define PF_ERR_NO_NAMES (PF_ERR_BASE | 17)\r |
41 | #define PF_ERR_OUT_OF_RANGE (PF_ERR_BASE | 18)\r |
42 | #define PF_ERR_ENDIAN_CONFLICT (PF_ERR_BASE | 19)\r |
43 | #define PF_ERR_FLOAT_CONFLICT (PF_ERR_BASE | 20)\r |
44 | /* If you add an error code here, also add a text message in "pf_text.c". */\r |
45 | \r |
46 | #ifdef __cplusplus\r |
47 | extern "C" {\r |
48 | #endif\r |
49 | \r |
50 | void pfReportError( const char *FunctionName, Err ErrCode );\r |
51 | void pfReportThrow( ThrowCode code );\r |
52 | \r |
53 | char *ForthStringToC( char *dst, const char *FString );\r |
54 | char *CStringToForth( char *dst, const char *CString );\r |
55 | \r |
56 | int32 ffCompare( const char *s1, int32 len1, const char *s2, int32 len2 );\r |
57 | int32 ffCompareText( const char *s1, const char *s2, int32 len );\r |
58 | int32 ffCompareTextCaseN( const char *s1, const char *s2, int32 len );\r |
59 | \r |
60 | void DumpMemory( void *addr, int32 cnt);\r |
61 | char *ConvertNumberToText( int32 Num, int32 Base, int32 IfSigned, int32 MinChars );\r |
62 | void TypeName( const char *Name );\r |
63 | \r |
64 | #ifdef __cplusplus\r |
65 | } \r |
66 | #endif\r |
67 | \r |
68 | #endif /* _pforth_text_h */\r |