MISR Toolkit  1.5.1
odlinter.h
Go to the documentation of this file.
1 /*****************************************************************************
2 
3  Module: odlinter.h
4 
5  Description: This C-language include file contains prototypes for the
6  functions used internally by the PDS Object Description
7  Language (ODL) processing software.
8 
9  Author: Marti DeMore, Jet Propulsion Laboratory
10 
11  Creation Date: 18 May 1991
12 
13  History:
14 
15  Creation - This include file was included in the Version 2.2 modification
16  of the ODLC library.
17 
18 ****************************************************************************/
19 
20 #ifndef ODLINTER
21 #define ODLINTER
22 
23 #if defined(__STDC__) || defined(__cplusplus)/* 1992/08/05 JWH changed from !SUN_UNIX */
24 
25 #ifdef EOSDIS
26  extern int yylineno;
27  extern int ODLerror_count;
28  extern int ODLwarning_count;
29  extern int ODLlinenumber_flag;
30 #endif
31 
32 VALUE_DATA ODLConvertInteger (char vtext[],
33  int vlength);
34 VALUE_DATA ODLConvertReal (char vtext[],
35  int vlength);
36 VALUE_DATA ODLConvertSymbol (char vtext[],
37  int vlength,
38  int vflag);
39 VALUE_DATA ODLConvertString (char vtext[],
40  int vlength);
41 VALUE_DATA ODLConvertDate (char vtext[],
42  int vlength);
43 VALUE_DATA ODLConvertTime (char vtext[],
44  int vlength);
45 VALUE_DATA ODLConvertDateTime (char vtext[],
46  int vlength);
47 VALUE_DATA ODLConvertDate (char vtext[],
48  int vlength);
49 
50 
51 void ODLExtractDate (char *text,
52  VALUE_DATA *item);
53 void ODLExtractTime (char *text,
54  VALUE_DATA *item);
55 
56 
57 int ODLFormatInteger (char stmt[],
58  VALUE_DATA *item);
59 int ODLFormatReal (char stmt[],
60  VALUE_DATA *item);
61 int ODLFormatUnits (char stmt[],
62  struct ODLUnits *units);
63 int ODLFormatSymbol (char stmt[],
64  VALUE_DATA *item);
65 int ODLFormatDate (char stmt[],
66  VALUE_DATA *item);
67 int ODLFormatTime (char stmt[],
68  VALUE_DATA *item);
69 int ODLFormatDateTime (char stmt[],
70  VALUE_DATA *item);
71 int ODLFormatString (char stmt[],
72  VALUE_DATA *item,
73  int *column,
74  int left_margin,
75  int right_margin,
76  int format_flag,
77  int is_pointer);
78 int ODLFormatComment (char stmt[],
79  char comment[],
80  int left_margin,
81  int right_margin);
82 
83 
84 #ifdef EOSDIS
85 /* GMS: redirect errors to IK_Syslog instead */
86 # include "IK_Syslog.h"
87 # define ODLPrintError(warning) \
88 { \
89  if (ODLlinenumber_flag) \
90  IK_vSyslog(LOG_ERR, "ODL: Error at line %d: %s", yylineno,warning); \
91  else \
92  IK_vSyslog(LOG_ERR, "ODL: %s", warning); \
93  ODLerror_count++; \
94 }
95 
96 # define ODLPrintWarning(warning) \
97 { \
98  if (ODLlinenumber_flag) \
99  IK_vSyslog(LOG_NOTICE, "ODL: Warning at line %d: %s", yylineno,warning); \
100  else \
101  IK_vSyslog(LOG_NOTICE, "ODL: %s", warning); \
102  ODLwarning_count++; \
103  }
104 
105 # define ODLPrintInfo(warning) IK_vSyslog(LOG_INFO, "ODL: %s", warning)
106 #else
107  void ODLPrintError (char error_msg[]);
108  void ODLPrintWarning (char warning[]);
109  void ODLPrintInfo (char info_message[]);
110 #endif
111 void ODLPrintStmt (char statement[]);
112 void ODLWriteStmt (FILE *output_file,
113  char statement[]);
114 
115 
117  VALUE_DATA *item);
119  VALUE_DATA *item);
121  VALUE_DATA *item);
122 void ODLMarkParameter (VALUE_KIND kind);
123 void ODLStoreValue (VALUE_DATA *item);
126  VALUE_DATA *exponent);
127 void ODLMarkUnits (int exponent_sign);
128 void ODLCheckSequence (void);
129 void ODLCheckRange (VALUE_DATA *low,
130  VALUE_DATA *high);
131 int ODLEndLabel (void);
132 
133 #else
134 
142 
143 void ODLExtractDate ();
144 void ODLExtractTime ();
145 
146 int ODLFormatInteger ();
147 int ODLFormatReal ();
148 int ODLFormatUnits ();
149 int ODLFormatSymbol ();
150 int ODLFormatDate ();
151 int ODLFormatTime ();
152 int ODLFormatDateTime ();
153 int ODLFormatString ();
154 int ODLFormatComment ();
155 
156 #ifdef EOSDIS
157 /* GMS: redirect errors to IK_Syslog instead */
158 # include "IK_Syslog.h"
159 # define ODLPrintError(warning) \
160 { \
161  if (ODLlinenumber_flag) \
162  IK_vSyslog(LOG_ERR, "ODL: Error at line %d: %s", yylineno,warning); \
163  else \
164  IK_vSyslog(LOG_ERR, "ODL: %s", warning); \
165  ODLerror_count++; \
166  }
167 
168 # define ODLPrintWarning(warning) \
169 { \
170  if (ODLlinenumber_flag) \
171  IK_vSyslog(LOG_NOTICE, "ODL: Warning at line %d: %s", yylineno,warning); \
172  else \
173  IK_vSyslog(LOG_NOTICE, "ODL: %s", warning); \
174  ODLwarning_count++; \
175  }
176 
177 # define ODLPrintInfo(warning) IK_vSyslog(LOG_INFO, "ODL: %s", warning)
178 
179 #else
180  void ODLPrintError ();
181  void ODLPrintWarning ();
182  void ODLPrintInfo ();
183 #endif
184 void ODLPrintStmt ();
185 void ODLWriteStmt ();
186 
187 void ODLBeginAggregate ();
188 void ODLEndAggregate ();
189 void ODLBeginParameter ();
190 void ODLMarkParameter ();
191 void ODLStoreValue ();
192 void ODLStoreUnits1 ();
193 void ODLStoreUnits2 ();
194 void ODLMarkUnits ();
195 void ODLCheckSequence ();
196 void ODLCheckRange ();
197 int ODLEndLabel ();
198 
199 #endif
200 #endif
void ODLStoreUnits1()
void ODLMarkParameter()
void ODLBeginParameter()
VALUE_DATA ODLConvertTime()
int ODLFormatDate()
void ODLCheckSequence()
Definition: parsact.c:593
void ODLStoreValue()
VALUE_DATA ODLConvertInteger()
int ODLlinenumber_flag
Definition: output.c:60
enum Parameter_Kind PARAMETER_KIND
Definition: odldef.h:91
int ODLFormatTime()
void ODLStoreUnits2()
int ODLFormatInteger()
int yylineno
Definition: lexan.c:1951
int ODLwarning_count
Definition: output.c:59
void ODLExtractTime()
int ODLFormatReal()
VALUE_DATA ODLConvertDateTime()
void ODLEndAggregate()
void ODLMarkUnits()
int ODLEndLabel()
Definition: parsact.c:676
HDFFCLIBAPI _fcd name
void ODLPrintStmt()
int ODLFormatDateTime()
void ODLExtractDate()
enum Aggregate_Kind AGGREGATE_KIND
Definition: odldef.h:88
void ODLBeginAggregate()
VALUE_DATA ODLConvertDate()
int ODLFormatString()
VALUE_DATA ODLConvertString()
VALUE_DATA ODLConvertReal()
void ODLWriteStmt()
int ODLFormatUnits()
H5TOOLS_DLL void error_msg(const char *fmt,...)
int ODLFormatComment()
void ODLPrintWarning()
int ODLerror_count
Definition: output.c:58
void ODLCheckRange()
VALUE_DATA ODLConvertSymbol()
void ODLPrintError()
int ODLFormatSymbol()
enum Value_Kind VALUE_KIND
Definition: odldef.h:94
void ODLPrintInfo()

MISR Toolkit - Copyright © 2005 - 2020 Jet Propulsion Laboratory
Generated on Fri Jun 19 2020 22:49:51