Rune - Fix array passing, optimize constant array indices
[rune.git] / tests / libc.c
1 /*
2  * LIBC.C       - Test C file for DICE to process into Rune prototypes
3  *
4  *      Interfacing to C code is a two-pass process.  The DICE DCC is
5  *      used to generate function prototypes based on the includes,
6  *      and main() is run to generate constants and other random stuff.
7  */
8
9 /*
10  * Pull genprint.h in first if generating constants in order to catch
11  * missing includes/prototypes required for libsupport (libsupport/genprint.h
12  * is supposed to be self-contained when DDC_GEN is specified so any problems
13  * must be fixed there).
14  */
15 #ifdef DDC_GEN
16 #include <libsupport/genprint.h>
17 #endif
18
19 /*
20  * Headers to pull prototypes out of (automatic)
21  */
22 #include <sys/types.h>
23 #include <sys/stat.h>
24 #include <sys/time.h>
25 #include <stdio.h>
26 #include <stdlib.h>
27 #include <stdarg.h>
28 #include <unistd.h>
29 #include <fcntl.h>
30 #include <netdb.h>
31
32 /*
33  * Generate constants and other interfacing necessities (manual).
34  */
35 #ifdef DDC_GEN
36
37 int
38 main(int ac, char **av)
39 {
40         printf("\n");
41         FmtConstIntD(SEEK_SET);
42         FmtConstIntD(SEEK_END);
43         FmtConstIntD(SEEK_CUR);
44         return(0);
45 }
46
47 #endif