1    /*******************************************************/
2    /*      "C" Language Integrated Production System      */
3    /*                                                     */
4    /*             CLIPS Version 6.30  08/22/14            */
5    /*                                                     */
6    /*              PRINT UTILITY HEADER FILE              */
7    /*******************************************************/
8 
9 /*************************************************************/
10 /* Purpose: Utility routines for printing various items      */
11 /*   and messages.                                           */
12 /*                                                           */
13 /* Principal Programmer(s):                                  */
14 /*      Gary D. Riley                                        */
15 /*                                                           */
16 /* Contributing Programmer(s):                               */
17 /*                                                           */
18 /* Revision History:                                         */
19 /*                                                           */
20 /*      6.24: Link error occurs for the SlotExistError       */
21 /*            function when OBJECT_SYSTEM is set to 0 in     */
22 /*            setup.h. DR0865                                */
23 /*                                                           */
24 /*            Added DataObjectToString function.             */
25 /*                                                           */
26 /*            Added SlotExistError function.                 */
27 /*                                                           */
28 /*      6.30: Support for long long integers.                */
29 /*                                                           */
30 /*            Support for DATA_OBJECT_ARRAY primitive.       */
31 /*                                                           */
32 /*            Support for typed EXTERNAL_ADDRESS.            */
33 /*                                                           */
34 /*            Used gensprintf and genstrcat instead of       */
35 /*            sprintf and strcat.                            */
36 /*                                                           */
37 /*            Changed integer type/precision.                */
38 /*                                                           */
39 /*            Added code for capturing errors/warnings.      */
40 /*                                                           */
41 /*            Added const qualifiers to remove C++           */
42 /*            deprecation warnings.                          */
43 /*                                                           */
44 /*            Fixed linkage issue when BLOAD_ONLY compiler   */
45 /*            flag is set to 1.                              */
46 /*                                                           */
47 /*************************************************************/
48 
49 #ifndef _H_prntutil
50 #define _H_prntutil
51 
52 #ifndef _H_moduldef
53 #include "moduldef.h"
54 #endif
55 
56 #ifndef _STDIO_INCLUDED_
57 #define _STDIO_INCLUDED_
58 #include <stdio.h>
59 #endif
60 
61 #define PRINT_UTILITY_DATA 53
62 
63 struct printUtilityData
64   {
65    intBool PreserveEscapedCharacters;
66    intBool AddressesToStrings;
67    intBool InstanceAddressesToNames;
68   };
69 
70 #define PrintUtilityData(theEnv) ((struct printUtilityData *) GetEnvironmentData(theEnv,PRINT_UTILITY_DATA))
71 
72 #ifdef LOCALE
73 #undef LOCALE
74 #endif
75 
76 #ifdef _PRNTUTIL_SOURCE_
77 #define LOCALE
78 #else
79 #define LOCALE extern
80 #endif
81 
82    LOCALE void                           InitializePrintUtilityData(void *);
83    LOCALE void                           PrintInChunks(void *,const char *,const char *);
84    LOCALE void                           PrintFloat(void *,const char *,double);
85    LOCALE void                           PrintLongInteger(void *,const char *,long long);
86    LOCALE void                           PrintAtom(void *,const char *,int,void *);
87    LOCALE void                           PrintTally(void *,const char *,long long,const char *,const char *);
88    LOCALE const char                    *FloatToString(void *,double);
89    LOCALE const char                    *LongIntegerToString(void *,long long);
90    LOCALE const char                    *DataObjectToString(void *,DATA_OBJECT *);
91    LOCALE void                           SyntaxErrorMessage(void *,const char *);
92    LOCALE void                           SystemError(void *,const char *,int);
93    LOCALE void                           PrintErrorID(void *,const char *,int,int);
94    LOCALE void                           PrintWarningID(void *,const char *,int,int);
95    LOCALE void                           CantFindItemErrorMessage(void *,const char *,const char *);
96    LOCALE void                           CantDeleteItemErrorMessage(void *,const char *,const char *);
97    LOCALE void                           AlreadyParsedErrorMessage(void *,const char *,const char *);
98    LOCALE void                           LocalVariableErrorMessage(void *,const char *);
99    LOCALE void                           DivideByZeroErrorMessage(void *,const char *);
100    LOCALE void                           SalienceInformationError(void *,const char *,const char *);
101    LOCALE void                           SalienceRangeError(void *,int,int);
102    LOCALE void                           SalienceNonIntegerError(void *);
103    LOCALE void                           CantFindItemInFunctionErrorMessage(void *,const char *,const char *,const char *);
104    LOCALE void                           SlotExistError(void *,const char *,const char *);
105 
106 #endif /* _H_prntutil */
107 
108 
109 
110 
111 
112 
113