1 | /* |
---|
2 | * uemf.h -- GoAhead Micro Embedded Management Framework Header |
---|
3 | * |
---|
4 | * Copyright (c) GoAhead Software Inc., 1995-2000. All Rights Reserved. |
---|
5 | * |
---|
6 | * See the file "license.txt" for usage and redistribution license requirements |
---|
7 | */ |
---|
8 | |
---|
9 | #ifndef _h_UEMF |
---|
10 | #define _h_UEMF 1 |
---|
11 | |
---|
12 | /******************************** Description *********************************/ |
---|
13 | |
---|
14 | /* |
---|
15 | * GoAhead Web Server header. This defines the Web public APIs |
---|
16 | */ |
---|
17 | |
---|
18 | /******************************* Per O/S Includes *****************************/ |
---|
19 | |
---|
20 | #if WIN |
---|
21 | #include <direct.h> |
---|
22 | #include <io.h> |
---|
23 | #include <sys/stat.h> |
---|
24 | #include <limits.h> |
---|
25 | #include <tchar.h> |
---|
26 | #include <windows.h> |
---|
27 | #include <winnls.h> |
---|
28 | #include <time.h> |
---|
29 | #include <sys/types.h> |
---|
30 | #include <stdio.h> |
---|
31 | #include <stdlib.h> |
---|
32 | #include <fcntl.h> |
---|
33 | #include <errno.h> |
---|
34 | #endif /* WIN */ |
---|
35 | |
---|
36 | #if CE |
---|
37 | #include <limits.h> |
---|
38 | #include <tchar.h> |
---|
39 | #include <windows.h> |
---|
40 | #include <winnls.h> |
---|
41 | #include "CE/wincompat.h" |
---|
42 | #include <winsock.h> |
---|
43 | #endif /* CE */ |
---|
44 | |
---|
45 | #if NW |
---|
46 | #include <stdio.h> |
---|
47 | #endif /* NW */ |
---|
48 | |
---|
49 | #if SCOV5 |
---|
50 | #include <sys/types.h> |
---|
51 | #include <stdio.h> |
---|
52 | #include "sys/socket.h" |
---|
53 | #include "sys/select.h" |
---|
54 | #include "netinet/in.h" |
---|
55 | #include "arpa/inet.h" |
---|
56 | #include "netdb.h" |
---|
57 | #endif /* SCOV5 */ |
---|
58 | |
---|
59 | #if UNIX |
---|
60 | #include <stdio.h> |
---|
61 | #endif /* UNIX */ |
---|
62 | |
---|
63 | #if LINUX || __rtems__ |
---|
64 | #include <sys/types.h> |
---|
65 | #include <sys/stat.h> |
---|
66 | #include <sys/param.h> |
---|
67 | #include <limits.h> |
---|
68 | #include <stdio.h> |
---|
69 | #include <stdlib.h> |
---|
70 | #include <unistd.h> |
---|
71 | #include <sys/socket.h> |
---|
72 | #include <sys/select.h> |
---|
73 | #include <netinet/in.h> |
---|
74 | #include <arpa/inet.h> |
---|
75 | #include <netdb.h> |
---|
76 | #include <time.h> |
---|
77 | #include <fcntl.h> |
---|
78 | #include <errno.h> |
---|
79 | #endif /* LINUX */ |
---|
80 | |
---|
81 | #if LYNX |
---|
82 | #include <limits.h> |
---|
83 | #include <stdarg.h> |
---|
84 | #include <stdio.h> |
---|
85 | #include <stdlib.h> |
---|
86 | #include <unistd.h> |
---|
87 | #include <socket.h> |
---|
88 | #include <netinet/in.h> |
---|
89 | #include <arpa/inet.h> |
---|
90 | #include <netdb.h> |
---|
91 | #include <time.h> |
---|
92 | #include <fcntl.h> |
---|
93 | #include <errno.h> |
---|
94 | #endif /* LYNX */ |
---|
95 | |
---|
96 | #if UW |
---|
97 | #include <stdio.h> |
---|
98 | #endif /* UW */ |
---|
99 | |
---|
100 | #if VXWORKS |
---|
101 | #include <vxWorks.h> |
---|
102 | #include <sockLib.h> |
---|
103 | #include <selectLib.h> |
---|
104 | #include <inetLib.h> |
---|
105 | #include <ioLib.h> |
---|
106 | #include <stdio.h> |
---|
107 | #include <stat.h> |
---|
108 | #include <time.h> |
---|
109 | #include <usrLib.h> |
---|
110 | #include <fcntl.h> |
---|
111 | #include <errno.h> |
---|
112 | #endif /* VXWORKS */ |
---|
113 | |
---|
114 | #if SOLARIS |
---|
115 | #include <sys/types.h> |
---|
116 | #include <limits.h> |
---|
117 | #include <stdio.h> |
---|
118 | #include <stdlib.h> |
---|
119 | #include <unistd.h> |
---|
120 | #include <socket.h> |
---|
121 | #include <sys/select.h> |
---|
122 | #include <netinet/in.h> |
---|
123 | #include <arpa/inet.h> |
---|
124 | #include <netdb.h> |
---|
125 | #include <time.h> |
---|
126 | #include <fcntl.h> |
---|
127 | #include <errno.h> |
---|
128 | #endif /* SOLARIS */ |
---|
129 | |
---|
130 | #if QNX4 |
---|
131 | #include <sys/types.h> |
---|
132 | #include <stdio.h> |
---|
133 | #include <sys/socket.h> |
---|
134 | #include <sys/select.h> |
---|
135 | #include <netinet/in.h> |
---|
136 | #include <arpa/inet.h> |
---|
137 | #include <netdb.h> |
---|
138 | #include <stdlib.h> |
---|
139 | #include <unistd.h> |
---|
140 | #include <sys/uio.h> |
---|
141 | #include <sys/wait.h> |
---|
142 | #endif /* QNX4 */ |
---|
143 | |
---|
144 | #if ECOS |
---|
145 | #include <limits.h> |
---|
146 | #include <cyg/infra/cyg_type.h> |
---|
147 | #include <cyg/kernel/kapi.h> |
---|
148 | #include <time.h> |
---|
149 | #include <network.h> |
---|
150 | #include <errno.h> |
---|
151 | #endif /* ECOS */ |
---|
152 | |
---|
153 | /********************************** Includes **********************************/ |
---|
154 | |
---|
155 | #include <ctype.h> |
---|
156 | #include <stdarg.h> |
---|
157 | #include <string.h> |
---|
158 | |
---|
159 | #if ! WEBS |
---|
160 | #include "messages.h" |
---|
161 | #endif /* ! WEBS */ |
---|
162 | |
---|
163 | /******************************* Per O/S Defines *****************************/ |
---|
164 | |
---|
165 | #if defined(__rtems__) |
---|
166 | #define __NO_PACK 1 |
---|
167 | #endif |
---|
168 | |
---|
169 | #if UW |
---|
170 | #define __NO_PACK 1 |
---|
171 | #endif /* UW */ |
---|
172 | |
---|
173 | #if SCOV5 || VXWORKS || LINUX || LYNX || __rtems__ |
---|
174 | #ifndef O_BINARY |
---|
175 | #define O_BINARY 0 |
---|
176 | #endif /* O_BINARY */ |
---|
177 | #define SOCKET_ERROR -1 |
---|
178 | #endif /* SCOV5 || VXWORKS || LINUX || LYNX */ |
---|
179 | |
---|
180 | #if WIN || CE |
---|
181 | /* |
---|
182 | * __NO_FCNTL means can't access fcntl function. Fcntl.h is still available. |
---|
183 | */ |
---|
184 | #define __NO_FCNTL 1 |
---|
185 | |
---|
186 | #undef R_OK |
---|
187 | #define R_OK 4 |
---|
188 | #undef W_OK |
---|
189 | #define W_OK 2 |
---|
190 | #undef X_OK |
---|
191 | #define X_OK 1 |
---|
192 | #undef F_OK |
---|
193 | #define F_OK 0 |
---|
194 | #endif /* WIN || CE */ |
---|
195 | |
---|
196 | #if LINUX && !__rtems__ && ! _STRUCT_TIMEVAL |
---|
197 | struct timeval |
---|
198 | { |
---|
199 | time_t tv_sec; /* Seconds. */ |
---|
200 | time_t tv_usec; /* Microseconds. */ |
---|
201 | }; |
---|
202 | #define _STRUCT_TIMEVAL 1 |
---|
203 | #endif /* LINUX && ! _STRUCT_TIMEVAL */ |
---|
204 | |
---|
205 | #if ECOS |
---|
206 | #define O_RDONLY 1 |
---|
207 | #define O_BINARY 2 |
---|
208 | |
---|
209 | #define __NO_PACK 1 |
---|
210 | #define __NO_EJ_FILE 1 |
---|
211 | #define __NO_CGI_BIN 1 |
---|
212 | #define __NO_FCNTL 1 |
---|
213 | |
---|
214 | /* |
---|
215 | * #define LIBKERN_INLINE to avoid kernel inline functions |
---|
216 | */ |
---|
217 | #define LIBKERN_INLINE |
---|
218 | |
---|
219 | #endif /* ECOS */ |
---|
220 | |
---|
221 | #if QNX4 |
---|
222 | typedef long fd_mask; |
---|
223 | #define NFDBITS (sizeof (fd_mask) * NBBY) /* bits per mask */ |
---|
224 | #endif /* QNX4 */ |
---|
225 | |
---|
226 | /********************************** Unicode ***********************************/ |
---|
227 | /* |
---|
228 | * Constants and limits. Also FNAMESIZE and PATHSIZE are currently defined |
---|
229 | * in param.h to be 128 and 512 |
---|
230 | */ |
---|
231 | #define TRACE_MAX (4096 - 48) |
---|
232 | #define VALUE_MAX_STRING (4096 - 48) |
---|
233 | #define SYM_MAX (512) |
---|
234 | #define XML_MAX 4096 /* Maximum size for tags/tokens */ |
---|
235 | #define BUF_MAX 4096 /* General sanity check for bufs */ |
---|
236 | |
---|
237 | #if LITTLEFOOT || WEBS |
---|
238 | #define LF_BUF_MAX (510) |
---|
239 | #define LF_PATHSIZE LF_BUF_MAX |
---|
240 | #else |
---|
241 | #define LF_BUF_MAX BUF_MAX |
---|
242 | #define LF_PATHSIZE PATHSIZE |
---|
243 | #define UPPATHSIZE PATHSIZE |
---|
244 | #endif /* LITTLEFOOT || WEBS */ |
---|
245 | |
---|
246 | #ifndef CHAR_T_DEFINED |
---|
247 | #define CHAR_T_DEFINED 1 |
---|
248 | #if UNICODE |
---|
249 | /* |
---|
250 | * To convert strings to UNICODE. We have a level of indirection so things |
---|
251 | * like T(__FILE__) will expand properly. |
---|
252 | */ |
---|
253 | #define T(x) __TXT(x) |
---|
254 | #define __TXT(s) L ## s |
---|
255 | typedef unsigned short char_t; |
---|
256 | typedef unsigned short uchar_t; |
---|
257 | |
---|
258 | /* |
---|
259 | * Text size of buffer macro. A buffer bytes will hold (size / char size) |
---|
260 | * characters. |
---|
261 | */ |
---|
262 | #define TSZ(x) (sizeof(x) / sizeof(char_t)) |
---|
263 | |
---|
264 | /* |
---|
265 | * How many ASCII bytes are required to represent this UNICODE string? |
---|
266 | */ |
---|
267 | #define TASTRL(x) ((wcslen(x) + 1) * sizeof(char_t)) |
---|
268 | |
---|
269 | #else |
---|
270 | #define T(s) s |
---|
271 | typedef char char_t; |
---|
272 | #define TSZ(x) (sizeof(x)) |
---|
273 | #define TASTRL(x) (strlen(x) + 1) |
---|
274 | #if WIN |
---|
275 | typedef unsigned char uchar_t; |
---|
276 | #endif /* WIN */ |
---|
277 | |
---|
278 | #endif /* UNICODE */ |
---|
279 | |
---|
280 | #endif /* ! CHAR_T_DEFINED */ |
---|
281 | |
---|
282 | /* |
---|
283 | * "Boolean" constants |
---|
284 | */ |
---|
285 | |
---|
286 | #ifndef TRUE |
---|
287 | #define TRUE 1 |
---|
288 | #endif |
---|
289 | |
---|
290 | #ifndef FALSE |
---|
291 | #define FALSE 0 |
---|
292 | #endif |
---|
293 | |
---|
294 | /* |
---|
295 | * GoAhead Copyright. |
---|
296 | */ |
---|
297 | #define GOAHEAD_COPYRIGHT \ |
---|
298 | T("Copyright (c) GoAhead Software Inc., 1995-2000. All Rights Reserved.") |
---|
299 | |
---|
300 | /* |
---|
301 | * The following include has to be after the unicode defines. By putting it |
---|
302 | * here, many modules in various parts of the tree are cleaner. |
---|
303 | */ |
---|
304 | #if LITTLEFOOT && INMEM |
---|
305 | #include "lf/inmem.h" |
---|
306 | #endif /* LITTLEFOOT && INMEM */ |
---|
307 | |
---|
308 | /* |
---|
309 | * Type for unicode systems |
---|
310 | */ |
---|
311 | #if UNICODE |
---|
312 | |
---|
313 | #define gmain wmain |
---|
314 | |
---|
315 | #define gasctime _wasctime |
---|
316 | #define gsprintf swprintf |
---|
317 | #define gprintf wprintf |
---|
318 | #define gfprintf fwprintf |
---|
319 | #define gsscanf swscanf |
---|
320 | #define gvsprintf vswprintf |
---|
321 | |
---|
322 | #define gstrcpy wcscpy |
---|
323 | #define gstrncpy wcsncpy |
---|
324 | #define gstrncat wcsncat |
---|
325 | #define gstrlen wcslen |
---|
326 | #define gstrcat wcscat |
---|
327 | #define gstrcmp wcscmp |
---|
328 | #define gstrncmp wcsncmp |
---|
329 | #define gstricmp wcsicmp |
---|
330 | #define gstrchr wcschr |
---|
331 | #define gstrrchr wcsrchr |
---|
332 | #define gstrtok wcstok |
---|
333 | #define gstrnset wcsnset |
---|
334 | #define gstrrchr wcsrchr |
---|
335 | #define gstrstr wcsstr |
---|
336 | #define gstrtol wcstol |
---|
337 | |
---|
338 | #define gfopen _wfopen |
---|
339 | #define gopen _wopen |
---|
340 | #define gclose close |
---|
341 | #define gcreat _wcreat |
---|
342 | #define gfgets fgetws |
---|
343 | #define gfputs fputws |
---|
344 | #define gfscanf fwscanf |
---|
345 | #define ggets _getws |
---|
346 | #define glseek lseek |
---|
347 | #define gunlink _wunlink |
---|
348 | #define gread read |
---|
349 | #define grename _wrename |
---|
350 | #define gwrite write |
---|
351 | #define gtmpnam _wtmpnam |
---|
352 | #define gtempnam _wtempnam |
---|
353 | #define gfindfirst _wfindfirst |
---|
354 | #define gfinddata_t _wfinddata_t |
---|
355 | #define gfindnext _wfindnext |
---|
356 | #define gfindclose _findclose |
---|
357 | #define gstat _wstat |
---|
358 | #define gaccess _waccess |
---|
359 | #define gchmod _wchmod |
---|
360 | |
---|
361 | typedef struct _stat gstat_t; |
---|
362 | |
---|
363 | #define gmkdir _wmkdir |
---|
364 | #define gchdir _wchdir |
---|
365 | #define grmdir _wrmdir |
---|
366 | #define ggetcwd _wgetcwd |
---|
367 | |
---|
368 | #define gtolower towlower |
---|
369 | #define gtoupper towupper |
---|
370 | #if CE |
---|
371 | #define gisspace isspace |
---|
372 | #define gisdigit isdigit |
---|
373 | #define gisxdigit isxdigit |
---|
374 | #define gisupper isupper |
---|
375 | #define gislower islower |
---|
376 | #define gisprint isprint |
---|
377 | #else |
---|
378 | #define gremove _wremove |
---|
379 | #define gisspace iswspace |
---|
380 | #define gisdigit iswdigit |
---|
381 | #define gisxdigit iswxdigit |
---|
382 | #define gisupper iswupper |
---|
383 | #define gislower iswlower |
---|
384 | #endif /* if CE */ |
---|
385 | #define gisalnum iswalnum |
---|
386 | #define gisalpha iswalpha |
---|
387 | #define gatoi(s) wcstol(s, NULL, 10) |
---|
388 | |
---|
389 | #define gctime _wctime |
---|
390 | #define ggetenv _wgetenv |
---|
391 | #define gexecvp _wexecvp |
---|
392 | |
---|
393 | #else /* ! UNICODE */ |
---|
394 | |
---|
395 | #ifndef gopen |
---|
396 | #if INMEM |
---|
397 | #define gclose imClose |
---|
398 | #define gclosedir imClosedir |
---|
399 | #define gchdir imChdir |
---|
400 | #define gchmod imChmod |
---|
401 | #define ggetcwd imGetcwd |
---|
402 | #define glseek imLseek |
---|
403 | #define gloadModule imLoadModule |
---|
404 | #define gmkdir imMkdir |
---|
405 | #define gopen imOpen |
---|
406 | #define gopendir imOpendir |
---|
407 | #define gread imRead |
---|
408 | #define greaddir imReaddir |
---|
409 | #define grename imRename |
---|
410 | #define grmdir imRmdir |
---|
411 | #define gstat imStat |
---|
412 | #define gunlink imUnlink |
---|
413 | #define gwrite imWrite |
---|
414 | #else |
---|
415 | #define gclose close |
---|
416 | #define gclosedir closedir |
---|
417 | #if VXWORKS |
---|
418 | #define gchdir vxchdir |
---|
419 | #define gmkdir vxmkdir |
---|
420 | #define grmdir vxrmdir |
---|
421 | #else |
---|
422 | #if LYNX || LINUX || SOLARIS |
---|
423 | #define gmkdir(s) mkdir(s,0755) |
---|
424 | #else |
---|
425 | #define gmkdir mkdir |
---|
426 | #endif /* LYNX || LINUX || SOLARIS */ |
---|
427 | #define grmdir rmdir |
---|
428 | #define gchdir chdir |
---|
429 | #endif /* VXWORKS */ |
---|
430 | #define gchmod chmod |
---|
431 | #define ggetcwd getcwd |
---|
432 | #define glseek lseek |
---|
433 | #define gloadModule loadModule |
---|
434 | #define gopen open |
---|
435 | #define gopendir opendir |
---|
436 | #define gread read |
---|
437 | #define greaddir readdir |
---|
438 | #define grename rename |
---|
439 | #define gstat stat |
---|
440 | #define gunlink unlink |
---|
441 | #define gwrite write |
---|
442 | #endif /* INMEM */ |
---|
443 | #endif /* ! gopen */ |
---|
444 | |
---|
445 | #define gasctime asctime |
---|
446 | #define gsprintf sprintf |
---|
447 | #define gprintf printf |
---|
448 | #define gfprintf fprintf |
---|
449 | #define gsscanf sscanf |
---|
450 | #define gvsprintf vsprintf |
---|
451 | |
---|
452 | #define gstrcpy strcpy |
---|
453 | #define gstrncpy strncpy |
---|
454 | #define gstrncat strncat |
---|
455 | #define gstrlen strlen |
---|
456 | #define gstrcat strcat |
---|
457 | #define gstrcmp strcmp |
---|
458 | #define gstrncmp strncmp |
---|
459 | #define gstricmp strcmpci |
---|
460 | #define gstrchr strchr |
---|
461 | #define gstrrchr strrchr |
---|
462 | #define gstrtok strtok |
---|
463 | #define gstrnset strnset |
---|
464 | #define gstrrchr strrchr |
---|
465 | #define gstrstr strstr |
---|
466 | #define gstrtol strtol |
---|
467 | |
---|
468 | #define gfopen fopen |
---|
469 | #define gcreat creat |
---|
470 | #define gfgets fgets |
---|
471 | #define gfputs fputs |
---|
472 | #define gfscanf fscanf |
---|
473 | #define ggets gets |
---|
474 | #define gtmpnam tmpnam |
---|
475 | #define gtempnam tempnam |
---|
476 | #define gfindfirst _findfirst |
---|
477 | #define gfinddata_t _finddata_t |
---|
478 | #define gfindnext _findnext |
---|
479 | #define gfindclose _findclose |
---|
480 | #define gaccess access |
---|
481 | |
---|
482 | typedef struct stat gstat_t; |
---|
483 | |
---|
484 | #define gremove remove |
---|
485 | |
---|
486 | #define gtolower tolower |
---|
487 | #define gtoupper toupper |
---|
488 | #define gisspace isspace |
---|
489 | #define gisdigit isdigit |
---|
490 | #define gisxdigit isxdigit |
---|
491 | #define gisalnum isalnum |
---|
492 | #define gisalpha isalpha |
---|
493 | #define gisupper isupper |
---|
494 | #define gislower islower |
---|
495 | #define gatoi atoi |
---|
496 | |
---|
497 | #define gctime ctime |
---|
498 | #define ggetenv getenv |
---|
499 | #define gexecvp execvp |
---|
500 | #ifndef VXWORKS |
---|
501 | #define gmain main |
---|
502 | #endif /* ! VXWORKS */ |
---|
503 | #if VXWORKS |
---|
504 | #define fcntl(a, b, c) |
---|
505 | #endif /* VXWORKS */ |
---|
506 | #endif /* ! UNICODE */ |
---|
507 | |
---|
508 | /********************************** Defines ***********************************/ |
---|
509 | |
---|
510 | #ifndef FNAMESIZE |
---|
511 | #define FNAMESIZE 254 /* Max length of file names */ |
---|
512 | #endif /* FNAMESIZE */ |
---|
513 | |
---|
514 | #define E_MAX_ERROR 4096 |
---|
515 | #define URL_MAX 4096 |
---|
516 | |
---|
517 | /* |
---|
518 | * Error types |
---|
519 | */ |
---|
520 | #define E_ASSERT 0x1 /* Assertion error */ |
---|
521 | #define E_LOG 0x2 /* Log error to log file */ |
---|
522 | #define E_USER 0x3 /* Error that must be displayed */ |
---|
523 | |
---|
524 | #define E_L T(__FILE__), __LINE__ |
---|
525 | #define E_ARGS_DEC char_t *file, int line |
---|
526 | #define E_ARGS file, line |
---|
527 | |
---|
528 | #if ASSERT || ASSERT_CE |
---|
529 | #define a_assert(C) if (C) ; else error(E_L, E_ASSERT, T("%s"), T(#C)) |
---|
530 | #else |
---|
531 | #define a_assert(C) if (1) ; else |
---|
532 | #endif /* ASSERT || ASSERT_CE */ |
---|
533 | |
---|
534 | /******************************************************************************/ |
---|
535 | /* VALUE */ |
---|
536 | /******************************************************************************/ |
---|
537 | /* |
---|
538 | * These values are not prefixed so as to aid code readability |
---|
539 | */ |
---|
540 | |
---|
541 | typedef enum { |
---|
542 | undefined = 0, |
---|
543 | byteint = 1, |
---|
544 | shortint = 2, |
---|
545 | integer = 3, |
---|
546 | hex = 4, |
---|
547 | percent = 5, |
---|
548 | octal = 6, |
---|
549 | big = 7, |
---|
550 | flag = 8, |
---|
551 | floating = 9, |
---|
552 | string = 10, |
---|
553 | bytes = 11, |
---|
554 | symbol = 12, |
---|
555 | errmsg = 13 |
---|
556 | } vtype_t; |
---|
557 | |
---|
558 | #ifndef __NO_PACK |
---|
559 | #pragma pack(2) |
---|
560 | #endif /* _NO_PACK */ |
---|
561 | |
---|
562 | typedef struct { |
---|
563 | |
---|
564 | union { |
---|
565 | char flag; |
---|
566 | char byteint; |
---|
567 | short shortint; |
---|
568 | char percent; |
---|
569 | long integer; |
---|
570 | long hex; |
---|
571 | long octal; |
---|
572 | long big[2]; |
---|
573 | #if FLOATING_POINT_SUPPORT |
---|
574 | double floating; |
---|
575 | #endif /* FLOATING_POINT_SUPPORT */ |
---|
576 | char_t *string; |
---|
577 | char *bytes; |
---|
578 | char_t *errmsg; |
---|
579 | void *symbol; |
---|
580 | } value; |
---|
581 | |
---|
582 | vtype_t type : 16; |
---|
583 | unsigned int valid : 8; |
---|
584 | unsigned int allocated : 8; /* String was balloced */ |
---|
585 | } value_t; |
---|
586 | |
---|
587 | #ifndef __NO_PACK |
---|
588 | #pragma pack() |
---|
589 | #endif /* __NO_PACK */ |
---|
590 | |
---|
591 | /* |
---|
592 | * Allocation flags |
---|
593 | */ |
---|
594 | #define VALUE_ALLOCATE 0x1 |
---|
595 | |
---|
596 | #define value_numeric(t) (t >= byteint && t <= big) |
---|
597 | #define value_str(t) (t >= string && t <= bytes) |
---|
598 | #define value_ok(t) (t > undefined && t <= symbol) |
---|
599 | |
---|
600 | #define VALUE_VALID { {0}, integer, 1 } |
---|
601 | #define VALUE_INVALID { {0}, undefined, 0 } |
---|
602 | |
---|
603 | /******************************************************************************/ |
---|
604 | /* |
---|
605 | * A ring queue allows maximum utilization of memory for data storage and is |
---|
606 | * ideal for input/output buffering. This module provides a highly effecient |
---|
607 | * implementation and a vehicle for dynamic strings. |
---|
608 | * |
---|
609 | * WARNING: This is a public implementation and callers have full access to |
---|
610 | * the queue structure and pointers. Change this module very carefully. |
---|
611 | * |
---|
612 | * This module follows the open/close model. |
---|
613 | * |
---|
614 | * Operation of a ringq where rq is a pointer to a ringq : |
---|
615 | * |
---|
616 | * rq->buflen contains the size of the buffer. |
---|
617 | * rq->buf will point to the start of the buffer. |
---|
618 | * rq->servp will point to the first (un-consumed) data byte. |
---|
619 | * rq->endp will point to the next free location to which new data is added |
---|
620 | * rq->endbuf will point to one past the end of the buffer. |
---|
621 | * |
---|
622 | * Eg. If the ringq contains the data "abcdef", it might look like : |
---|
623 | * |
---|
624 | * +-------------------------------------------------------------------+ |
---|
625 | * | | | | | | | | a | b | c | d | e | f | | | | | |
---|
626 | * +-------------------------------------------------------------------+ |
---|
627 | * ^ ^ ^ ^ |
---|
628 | * | | | | |
---|
629 | * rq->buf rq->servp rq->endp rq->enduf |
---|
630 | * |
---|
631 | * The queue is empty when servp == endp. This means that the queue will hold |
---|
632 | * at most rq->buflen -1 bytes. It is the fillers responsibility to ensure |
---|
633 | * the ringq is never filled such that servp == endp. |
---|
634 | * |
---|
635 | * It is the fillers responsibility to "wrap" the endp back to point to |
---|
636 | * rq->buf when the pointer steps past the end. Correspondingly it is the |
---|
637 | * consumers responsibility to "wrap" the servp when it steps to rq->endbuf. |
---|
638 | * The ringqPutc and ringqGetc routines will do this automatically. |
---|
639 | */ |
---|
640 | |
---|
641 | /* |
---|
642 | * Ring queue buffer structure |
---|
643 | */ |
---|
644 | typedef struct { |
---|
645 | unsigned char *buf; /* Holding buffer for data */ |
---|
646 | unsigned char *servp; /* Pointer to start of data */ |
---|
647 | unsigned char *endp; /* Pointer to end of data */ |
---|
648 | unsigned char *endbuf; /* Pointer to end of buffer */ |
---|
649 | int buflen; /* Length of ring queue */ |
---|
650 | int maxsize; /* Maximum size */ |
---|
651 | int increment; /* Growth increment */ |
---|
652 | } ringq_t; |
---|
653 | |
---|
654 | /* |
---|
655 | * Block allocation (balloc) definitions |
---|
656 | */ |
---|
657 | #ifdef B_STATS |
---|
658 | #ifndef B_L |
---|
659 | #define B_L T(__FILE__), __LINE__ |
---|
660 | #define B_ARGS_DEC char_t *file, int line |
---|
661 | #define B_ARGS file, line |
---|
662 | #endif /* B_L */ |
---|
663 | #endif /* B_STATS */ |
---|
664 | |
---|
665 | /* |
---|
666 | * Block classes are: 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, |
---|
667 | * 16384, 32768, 65536 |
---|
668 | */ |
---|
669 | typedef struct { |
---|
670 | union { |
---|
671 | void *next; /* Pointer to next in q */ |
---|
672 | int size; /* Actual requested size */ |
---|
673 | } u; |
---|
674 | int flags; /* Per block allocation flags */ |
---|
675 | } bType; |
---|
676 | |
---|
677 | #define B_SHIFT 4 /* Convert size to class */ |
---|
678 | #define B_ROUND ((1 << (B_SHIFT)) - 1) |
---|
679 | #define B_MAX_CLASS 13 /* Maximum class number + 1 */ |
---|
680 | #define B_MALLOCED 0x80000000 /* Block was malloced */ |
---|
681 | #define B_DEFAULT_MEM (64 * 1024) /* Default memory allocation */ |
---|
682 | #define B_MAX_FILES (512) /* Maximum number of files */ |
---|
683 | #define B_FILL_CHAR (0x77) /* Fill byte for buffers */ |
---|
684 | #define B_FILL_WORD (0x77777777) /* Fill word for buffers */ |
---|
685 | #define B_MAX_BLOCKS (64 * 1024) /* Maximum allocated blocks */ |
---|
686 | |
---|
687 | /* |
---|
688 | * Flags. The integrity value is used as an arbitrary value to fill the flags. |
---|
689 | */ |
---|
690 | #define B_INTEGRITY 0x8124000 /* Integrity value */ |
---|
691 | #define B_INTEGRITY_MASK 0xFFFF000 /* Integrity mask */ |
---|
692 | #define B_USE_MALLOC 0x1 /* Okay to use malloc if required */ |
---|
693 | #define B_USER_BUF 0x2 /* User supplied buffer for mem */ |
---|
694 | |
---|
695 | /* |
---|
696 | * The symbol table record for each symbol entry |
---|
697 | */ |
---|
698 | |
---|
699 | typedef struct sym_t { |
---|
700 | struct sym_t *forw; /* Pointer to next hash list */ |
---|
701 | value_t name; /* Name of symbol */ |
---|
702 | value_t content; /* Value of symbol */ |
---|
703 | int arg; /* Parameter value */ |
---|
704 | } sym_t; |
---|
705 | |
---|
706 | typedef int sym_fd_t; /* Returned by symOpen */ |
---|
707 | |
---|
708 | /* |
---|
709 | * Script engines |
---|
710 | */ |
---|
711 | #define EMF_SCRIPT_JSCRIPT 0 /* javascript */ |
---|
712 | #define EMF_SCRIPT_TCL 1 /* tcl */ |
---|
713 | #define EMF_SCRIPT_EJSCRIPT 2 /* Ejscript */ |
---|
714 | #define EMF_SCRIPT_MAX 3 |
---|
715 | |
---|
716 | #define MAXINT INT_MAX |
---|
717 | #define BITSPERBYTE 8 |
---|
718 | #define BITS(type) (BITSPERBYTE * (int) sizeof(type)) |
---|
719 | #define STRSPACE T("\t \n\r\t") |
---|
720 | |
---|
721 | #ifndef max |
---|
722 | #define max(a,b) (((a) > (b)) ? (a) : (b)) |
---|
723 | #endif /* max */ |
---|
724 | |
---|
725 | #ifndef min |
---|
726 | #define min(a,b) (((a) < (b)) ? (a) : (b)) |
---|
727 | #endif /* min */ |
---|
728 | |
---|
729 | /******************************************************************************/ |
---|
730 | /* CRON */ |
---|
731 | /******************************************************************************/ |
---|
732 | |
---|
733 | typedef struct { |
---|
734 | char_t *minute; |
---|
735 | char_t *hour; |
---|
736 | char_t *day; |
---|
737 | char_t *month; |
---|
738 | char_t *dayofweek; |
---|
739 | } cron_t; |
---|
740 | |
---|
741 | extern long cronUntil(cron_t *cp, int period, time_t testTime); |
---|
742 | extern int cronAlloc(cron_t *cp, char_t *str); |
---|
743 | extern int cronFree(cron_t *cp); |
---|
744 | |
---|
745 | /******************************************************************************/ |
---|
746 | /* SOCKET */ |
---|
747 | /******************************************************************************/ |
---|
748 | /* |
---|
749 | * Socket flags |
---|
750 | */ |
---|
751 | |
---|
752 | #if (WIN || CE) && WEBS |
---|
753 | #define EWOULDBLOCK WSAEWOULDBLOCK |
---|
754 | #define ENETDOWN WSAENETDOWN |
---|
755 | #define ECONNRESET WSAECONNRESET |
---|
756 | #endif /* (WIN || CE) && WEBS) */ |
---|
757 | |
---|
758 | #define SOCKET_EOF 0x1 /* Seen end of file */ |
---|
759 | #define SOCKET_CONNECTING 0x2 /* Connect in progress */ |
---|
760 | #define SOCKET_BROADCAST 0x4 /* Broadcast mode */ |
---|
761 | #define SOCKET_PENDING 0x8 /* Message pending on this socket */ |
---|
762 | #define SOCKET_FLUSHING 0x10 /* Background flushing */ |
---|
763 | #define SOCKET_DATAGRAM 0x20 /* Use datagrams */ |
---|
764 | #define SOCKET_ASYNC 0x40 /* Use async connect */ |
---|
765 | #define SOCKET_BLOCK 0x80 /* Use blocking I/O */ |
---|
766 | #define SOCKET_LISTENING 0x100 /* Socket is server listener */ |
---|
767 | #define SOCKET_CLOSING 0x200 /* Socket is closing */ |
---|
768 | |
---|
769 | #define SOCKET_PORT_MAX 0xffff /* Max Port size */ |
---|
770 | |
---|
771 | /* |
---|
772 | * Socket error values |
---|
773 | */ |
---|
774 | #define SOCKET_WOULDBLOCK 1 /* Socket would block on I/O */ |
---|
775 | #define SOCKET_RESET 2 /* Socket has been reset */ |
---|
776 | #define SOCKET_NETDOWN 3 /* Network is down */ |
---|
777 | #define SOCKET_AGAIN 4 /* Issue the request again */ |
---|
778 | #define SOCKET_INTR 5 /* Call was interrupted */ |
---|
779 | #define SOCKET_INVAL 6 /* Invalid */ |
---|
780 | |
---|
781 | /* |
---|
782 | * Handler event masks |
---|
783 | */ |
---|
784 | #define SOCKET_READABLE 0x2 /* Make socket readable */ |
---|
785 | #define SOCKET_WRITABLE 0x4 /* Make socket writable */ |
---|
786 | #define SOCKET_EXCEPTION 0x8 /* Interested in exceptions */ |
---|
787 | #define EMF_SOCKET_MESSAGE (WM_USER+13) |
---|
788 | |
---|
789 | #if LITTLEFOOT |
---|
790 | #define SOCKET_BUFSIZ 510 /* Underlying buffer size */ |
---|
791 | #else |
---|
792 | #define SOCKET_BUFSIZ 1024 /* Underlying buffer size */ |
---|
793 | #endif /* LITTLEFOOT */ |
---|
794 | |
---|
795 | typedef void (*socketHandler_t)(int sid, int mask, int data); |
---|
796 | typedef int (*socketAccept_t)(int sid, char *ipaddr, int port, |
---|
797 | int listenSid); |
---|
798 | typedef struct { |
---|
799 | char host[64]; /* Host name */ |
---|
800 | ringq_t inBuf; /* Input ring queue */ |
---|
801 | ringq_t outBuf; /* Output ring queue */ |
---|
802 | ringq_t lineBuf; /* Line ring queue */ |
---|
803 | socketAccept_t accept; /* Accept handler */ |
---|
804 | socketHandler_t handler; /* User I/O handler */ |
---|
805 | int handler_data; /* User handler data */ |
---|
806 | int handlerMask; /* Handler events of interest */ |
---|
807 | int sid; /* Index into socket[] */ |
---|
808 | int port; /* Port to listen on */ |
---|
809 | int flags; /* Current state flags */ |
---|
810 | int sock; /* Actual socket handle */ |
---|
811 | int fileHandle; /* ID of the file handler */ |
---|
812 | int interestEvents; /* Mask of events to watch for */ |
---|
813 | int currentEvents; /* Mask of ready events (FD_xx) */ |
---|
814 | int selectEvents; /* Events being selected */ |
---|
815 | int saveMask; /* saved Mask for socketFlush */ |
---|
816 | int error; /* Last error */ |
---|
817 | } socket_t; |
---|
818 | |
---|
819 | /********************************* Prototypes *********************************/ |
---|
820 | /* |
---|
821 | * Balloc module |
---|
822 | * |
---|
823 | */ |
---|
824 | |
---|
825 | extern void bclose(); |
---|
826 | extern int bopen(void *buf, int bufsize, int flags); |
---|
827 | |
---|
828 | /* |
---|
829 | * Define NO_BALLOC to turn off our balloc module altogether |
---|
830 | * #define NO_BALLOC 1 |
---|
831 | */ |
---|
832 | |
---|
833 | #if NO_BALLOC |
---|
834 | #define balloc(B_ARGS, num) malloc(num) |
---|
835 | #define bfree(B_ARGS, p) free(p) |
---|
836 | #define bfreeSafe(B_ARGS, p) \ |
---|
837 | if (p) { free(p); } else |
---|
838 | #define brealloc(B_ARGS, p, num) realloc(p, num) |
---|
839 | extern char_t *bstrdupNoBalloc(char_t *s); |
---|
840 | extern char *bstrdupANoBalloc(char *s); |
---|
841 | #define bstrdup(B_ARGS, s) bstrdupNoBalloc(s) |
---|
842 | #define bstrdupA(B_ARGS, s) bstrdupANoBalloc(s) |
---|
843 | #define gstrdup(B_ARGS, s) bstrdupNoBalloc(s) |
---|
844 | |
---|
845 | #else /* BALLOC */ |
---|
846 | |
---|
847 | #ifndef B_STATS |
---|
848 | #define balloc(B_ARGS, num) balloc(num) |
---|
849 | #define bfree(B_ARGS, p) bfree(p) |
---|
850 | #define bfreeSafe(B_ARGS, p) bfreeSafe(p) |
---|
851 | #define brealloc(B_ARGS, p, size) brealloc(p, size) |
---|
852 | #define bstrdup(B_ARGS, p) bstrdup(p) |
---|
853 | |
---|
854 | #if UNICODE |
---|
855 | #define bstrdupA(B_ARGS, p) bstrdupA(p) |
---|
856 | #else /* UNICODE */ |
---|
857 | #define bstrdupA bstrdup |
---|
858 | #endif /* UNICODE */ |
---|
859 | |
---|
860 | #endif /* B_STATS */ |
---|
861 | |
---|
862 | #define gstrdup bstrdup |
---|
863 | extern void *balloc(B_ARGS_DEC, int size); |
---|
864 | extern void bfree(B_ARGS_DEC, void *mp); |
---|
865 | extern void bfreeSafe(B_ARGS_DEC, void *mp); |
---|
866 | extern void *brealloc(B_ARGS_DEC, void *buf, int newsize); |
---|
867 | extern char_t *bstrdup(B_ARGS_DEC, char_t *s); |
---|
868 | |
---|
869 | #if UNICODE |
---|
870 | extern char *bstrdupA(B_ARGS_DEC, char *s); |
---|
871 | #else /* UNICODE */ |
---|
872 | #define bstrdupA bstrdup |
---|
873 | #endif /* UNICODE */ |
---|
874 | #endif /* BALLOC */ |
---|
875 | |
---|
876 | extern void bstats(int handle, void (*writefn)(int handle, char_t *fmt, ...)); |
---|
877 | |
---|
878 | /* |
---|
879 | * Flags. The integrity value is used as an arbitrary value to fill the flags. |
---|
880 | */ |
---|
881 | #define B_USE_MALLOC 0x1 /* Okay to use malloc if required */ |
---|
882 | #define B_USER_BUF 0x2 /* User supplied buffer for mem */ |
---|
883 | |
---|
884 | #if !LINUX && !__rtems__ |
---|
885 | extern char_t *basename(char_t *name); |
---|
886 | #endif /* !LINUX */ |
---|
887 | |
---|
888 | #if UEMF && WEBS |
---|
889 | /* |
---|
890 | * The open source webserver uses a different callback/timer mechanism |
---|
891 | * than other emf derivative products such as FieldUpgrader agents |
---|
892 | * so redefine those API for webserver so that they can coexist in the |
---|
893 | * same address space as the others. |
---|
894 | */ |
---|
895 | #define emfSchedCallback websSchedCallBack |
---|
896 | #define emfUnschedCallback websUnschedCallBack |
---|
897 | #define emfReschedCallback websReschedCallBack |
---|
898 | #endif /* UEMF && WEBS */ |
---|
899 | |
---|
900 | typedef void (emfSchedProc)(void *data, int id); |
---|
901 | extern int emfSchedCallback(int delay, emfSchedProc *proc, void *arg); |
---|
902 | extern void emfUnschedCallback(int id); |
---|
903 | extern void emfReschedCallback(int id, int delay); |
---|
904 | extern void emfSchedProcess(); |
---|
905 | extern int emfInstGet(); |
---|
906 | extern void emfInstSet(int inst); |
---|
907 | extern void error(E_ARGS_DEC, int flags, char_t *fmt, ...); |
---|
908 | extern void (*errorSetHandler(void (*function)(int etype, char_t *msg))) \ |
---|
909 | (int etype, char_t *msg); |
---|
910 | |
---|
911 | #if B_STATS |
---|
912 | #define hAlloc(x) HALLOC(B_L, x) |
---|
913 | #define hAllocEntry(x, y, z) HALLOCENTRY(B_L, x, y, z) |
---|
914 | extern int HALLOC(B_ARGS_DEC, void ***map); |
---|
915 | extern int HALLOCENTRY(B_ARGS_DEC, void ***list, int *max, int size); |
---|
916 | #else |
---|
917 | extern int hAlloc(void ***map); |
---|
918 | extern int hAllocEntry(void ***list, int *max, int size); |
---|
919 | #endif /* B_STATS */ |
---|
920 | |
---|
921 | extern int hFree(void ***map, int handle); |
---|
922 | |
---|
923 | extern int ringqOpen(ringq_t *rq, int increment, int maxsize); |
---|
924 | extern void ringqClose(ringq_t *rq); |
---|
925 | extern int ringqLen(ringq_t *rq); |
---|
926 | |
---|
927 | extern int ringqPutc(ringq_t *rq, char_t c); |
---|
928 | extern int ringqInsertc(ringq_t *rq, char_t c); |
---|
929 | extern int ringqPutStr(ringq_t *rq, char_t *str); |
---|
930 | extern int ringqGetc(ringq_t *rq); |
---|
931 | |
---|
932 | extern int fmtValloc(char_t **s, int n, char_t *fmt, va_list arg); |
---|
933 | extern int fmtAlloc(char_t **s, int n, char_t *fmt, ...); |
---|
934 | extern int fmtStatic(char_t *s, int n, char_t *fmt, ...); |
---|
935 | |
---|
936 | #if UNICODE |
---|
937 | extern int ringqPutcA(ringq_t *rq, char c); |
---|
938 | extern int ringqInsertcA(ringq_t *rq, char c); |
---|
939 | extern int ringqPutStrA(ringq_t *rq, char *str); |
---|
940 | extern int ringqGetcA(ringq_t *rq); |
---|
941 | #else |
---|
942 | #define ringqPutcA ringqPutc |
---|
943 | #define ringqInsertcA ringqInsertc |
---|
944 | #define ringqPutStrA ringqPutStr |
---|
945 | #define ringqGetcA ringqGetc |
---|
946 | #endif /* UNICODE */ |
---|
947 | |
---|
948 | extern int ringqPutBlk(ringq_t *rq, unsigned char *buf, int len); |
---|
949 | extern int ringqPutBlkMax(ringq_t *rq); |
---|
950 | extern void ringqPutBlkAdj(ringq_t *rq, int size); |
---|
951 | extern int ringqGetBlk(ringq_t *rq, unsigned char *buf, int len); |
---|
952 | extern int ringqGetBlkMax(ringq_t *rq); |
---|
953 | extern void ringqGetBlkAdj(ringq_t *rq, int size); |
---|
954 | extern void ringqFlush(ringq_t *rq); |
---|
955 | extern void ringqAddNull(ringq_t *rq); |
---|
956 | |
---|
957 | extern int scriptSetVar(int engine, char_t *var, char_t *value); |
---|
958 | extern int scriptEval(int engine, char_t *cmd, char_t **rslt, int chan); |
---|
959 | |
---|
960 | extern void socketClose(); |
---|
961 | extern void socketCloseConnection(int sid); |
---|
962 | extern void socketCreateHandler(int sid, int mask, socketHandler_t |
---|
963 | handler, int arg); |
---|
964 | extern void socketDeleteHandler(int sid); |
---|
965 | extern int socketEof(int sid); |
---|
966 | extern int socketCanWrite(int sid); |
---|
967 | extern void socketSetBufferSize(int sid, int in, int line, int out); |
---|
968 | extern int socketFlush(int sid); |
---|
969 | extern int socketGets(int sid, char_t **buf); |
---|
970 | extern int socketGetPort(int sid); |
---|
971 | extern int socketInputBuffered(int sid); |
---|
972 | extern int socketOpen(); |
---|
973 | extern int socketOpenConnection(char *host, int port, |
---|
974 | socketAccept_t accept, int flags); |
---|
975 | extern void socketProcess(int hid); |
---|
976 | extern int socketRead(int sid, char *buf, int len); |
---|
977 | extern int socketReady(int hid); |
---|
978 | extern int socketWrite(int sid, char *buf, int len); |
---|
979 | extern int socketWriteString(int sid, char_t *buf); |
---|
980 | extern int socketSelect(int hid, int timeout); |
---|
981 | extern int socketGetHandle(int sid); |
---|
982 | extern int socketSetBlock(int sid, int flags); |
---|
983 | extern int socketGetBlock(int sid); |
---|
984 | extern int socketAlloc(char *host, int port, socketAccept_t accept, |
---|
985 | int flags); |
---|
986 | extern void socketFree(int sid); |
---|
987 | extern int socketGetError(); |
---|
988 | extern socket_t *socketPtr(int sid); |
---|
989 | extern int socketWaitForEvent(socket_t *sp, int events, int *errCode); |
---|
990 | extern void socketRegisterInterest(socket_t *sp, int handlerMask); |
---|
991 | extern int socketGetInput(int sid, char *buf, int toRead, int *errCode); |
---|
992 | |
---|
993 | extern char_t *strlower(char_t *string); |
---|
994 | extern char_t *strupper(char_t *string); |
---|
995 | |
---|
996 | extern char_t *stritoa(int n, char_t *string, int width); |
---|
997 | |
---|
998 | extern sym_fd_t symOpen(int hash_size); |
---|
999 | extern void symClose(sym_fd_t sd); |
---|
1000 | extern sym_t *symLookup(sym_fd_t sd, char_t *name); |
---|
1001 | extern sym_t *symEnter(sym_fd_t sd, char_t *name, value_t v, int arg); |
---|
1002 | extern int symDelete(sym_fd_t sd, char_t *name); |
---|
1003 | extern void symWalk(sym_fd_t sd, void (*fn)(sym_t *symp)); |
---|
1004 | extern sym_t *symFirst(sym_fd_t sd); |
---|
1005 | extern sym_t *symNext(sym_fd_t sd); |
---|
1006 | extern int symSubOpen(); |
---|
1007 | extern void symSubClose(); |
---|
1008 | |
---|
1009 | extern void trace(int lev, char_t *fmt, ...); |
---|
1010 | extern void traceRaw(char_t *buf); |
---|
1011 | extern void (*traceSetHandler(void (*function)(int level, char_t *buf))) |
---|
1012 | (int level, char_t *buf); |
---|
1013 | |
---|
1014 | extern value_t valueInteger(long value); |
---|
1015 | extern value_t valueString(char_t *value, int flags); |
---|
1016 | extern value_t valueErrmsg(char_t *value); |
---|
1017 | extern void valueFree(value_t *v); |
---|
1018 | extern int vxchdir(char *dirname); |
---|
1019 | |
---|
1020 | extern unsigned int hextoi(char_t *hexstring); |
---|
1021 | extern unsigned int gstrtoi(char_t *s); |
---|
1022 | extern time_t timeMsec(); |
---|
1023 | |
---|
1024 | extern char_t *ascToUni(char_t *ubuf, char *str, int nBytes); |
---|
1025 | extern char *uniToAsc(char *buf, char_t *ustr, int nBytes); |
---|
1026 | extern char_t *ballocAscToUni(char *cp, int alen); |
---|
1027 | extern char *ballocUniToAsc(char_t *unip, int ulen); |
---|
1028 | |
---|
1029 | extern char_t *basicGetHost(); |
---|
1030 | extern char_t *basicGetAddress(); |
---|
1031 | extern char_t *basicGetProduct(); |
---|
1032 | extern void basicSetHost(char_t *host); |
---|
1033 | extern void basicSetAddress(char_t *addr); |
---|
1034 | |
---|
1035 | extern int harnessOpen(char_t **argv); |
---|
1036 | extern void harnessClose(int status); |
---|
1037 | extern void harnessTesting(char_t *msg, ...); |
---|
1038 | extern void harnessPassed(); |
---|
1039 | extern void harnessFailed(int line); |
---|
1040 | extern int harnessLevel(); |
---|
1041 | |
---|
1042 | #endif /* _h_UEMF */ |
---|
1043 | |
---|
1044 | /******************************************************************************/ |
---|