summaryrefslogtreecommitdiff
path: root/src/argacces.h
blob: 632bd40e453f6a3fce74964b34a59d1b9bcabd07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
   /*******************************************************/
   /*      "C" Language Integrated Production System      */
   /*                                                     */
   /*             CLIPS Version 6.30  08/22/14            */
   /*                                                     */
   /*             ARGUMENT ACCESS HEADER FILE             */
   /*******************************************************/

/*************************************************************/
/* Purpose: Provides access routines for accessing arguments */
/*   passed to user or system functions defined using the    */
/*   DefineFunction protocol.                                */
/*                                                           */
/* Principal Programmer(s):                                  */
/*      Gary D. Riley                                        */
/*                                                           */
/* Contributing Programmer(s):                               */
/*      Brian L. Dantes                                      */
/*                                                           */
/* Revision History:                                         */
/*                                                           */
/*      6.24: Renamed BOOLEAN macro type to intBool.         */
/*                                                           */
/*            Added IllegalLogicalNameMessage function.      */
/*                                                           */
/*      6.30: Support for long long integers.                */
/*                                                           */
/*            Added const qualifiers to remove C++           */
/*            deprecation warnings.                          */
/*                                                           */
/*            Converted API macros to function calls.        */
/*                                                           */
/*************************************************************/

#ifndef _H_argacces

#define _H_argacces

#ifndef _H_expressn
#include "expressn.h"
#endif
#ifndef _H_evaluatn
#include "evaluatn.h"
#endif
#ifndef _H_moduldef
#include "moduldef.h"
#endif

#ifdef LOCALE
#undef LOCALE
#endif

#ifdef _ARGACCES_SOURCE_
#define LOCALE
#else
#define LOCALE extern
#endif

   LOCALE int                            EnvRtnArgCount(void *);
   LOCALE int                            EnvArgCountCheck(void *,const char *,int,int);
   LOCALE int                            EnvArgRangeCheck(void *,const char *,int,int);
   LOCALE const char                    *EnvRtnLexeme(void *,int);
   LOCALE double                         EnvRtnDouble(void *,int);
   LOCALE long long                      EnvRtnLong(void *,int);
   LOCALE struct dataObject             *EnvRtnUnknown(void *,int,struct dataObject *);
   LOCALE int                            EnvArgTypeCheck(void *,const char *,int,int,struct dataObject *);
   LOCALE intBool                        GetNumericArgument(void *,struct expr *,const char *,struct dataObject *,int,int);
   LOCALE const char                    *GetLogicalName(void *,int,const char *);
   LOCALE const char                    *GetFileName(void *,const char *,int);
   LOCALE const char                    *GetConstructName(void *,const char *,const char *);
   LOCALE void                           ExpectedCountError(void *,const char *,int,int);
   LOCALE void                           OpenErrorMessage(void *,const char *,const char *);
   LOCALE intBool                        CheckFunctionArgCount(void *,const char *,const char *,int);
   LOCALE void                           ExpectedTypeError1(void *,const char *,int,const char *);
   LOCALE void                           ExpectedTypeError2(void *,const char *,int);
   LOCALE struct defmodule              *GetModuleName(void *,const char *,int,int *);
   LOCALE void                          *GetFactOrInstanceArgument(void *,int,DATA_OBJECT *,const char *);
   LOCALE void                           IllegalLogicalNameMessage(void *,const char *);

#if ALLOW_ENVIRONMENT_GLOBALS

  LOCALE int                             ArgCountCheck(const char *,int,int);
  LOCALE int                             ArgRangeCheck(const char *,int,int);
  LOCALE int                             ArgTypeCheck(const char *,int,int,DATA_OBJECT_PTR);
  LOCALE int                             RtnArgCount(void);
  LOCALE double                          RtnDouble(int);
  LOCALE const char                     *RtnLexeme(int);
  LOCALE long long                       RtnLong(int);
  LOCALE DATA_OBJECT_PTR                 RtnUnknown(int,DATA_OBJECT_PTR);

#endif

#endif