V25 with 64-bit support
[debian/pforth] / csrc / pf_text.h
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 #define PF_ERR_CELL_SIZE_CONFLICT (PF_ERR_BASE | 21)\r
45 /* If you add an error code here, also add a text message in "pf_text.c". */\r
46 \r
47 #ifdef __cplusplus\r
48 extern "C" {\r
49 #endif\r
50 \r
51 void pfReportError( const char *FunctionName, Err ErrCode );\r
52 void pfReportThrow( ThrowCode code );\r
53 \r
54 char  *ForthStringToC( char *dst, const char *FString );\r
55 char  *CStringToForth( char *dst, const char *CString );\r
56 \r
57 cell_t ffCompare( const char *s1, cell_t len1, const char *s2, int32_t len2 );\r
58 cell_t ffCompareText( const char *s1, const char *s2, cell_t len );\r
59 cell_t ffCompareTextCaseN( const char *s1, const char *s2, cell_t len );\r
60 \r
61 void  DumpMemory( void *addr, cell_t cnt);\r
62 char *ConvertNumberToText( cell_t Num, cell_t Base, int32_t IfSigned, int32_t MinChars );\r
63 void  TypeName( const char *Name );\r
64 \r
65 #ifdef __cplusplus\r
66 }   \r
67 #endif\r
68 \r
69 #endif /* _pforth_text_h */\r