added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / tools / genmodule / config.h
blobd7a4a878a58ed0deb62ba3d0a1870bb25dda56db
1 /*
2 Copyright © 1995-2005, The AROS Development Team. All rights reserved.
4 Desc: Define the C structure for storing the command line options and the
5 module config data
6 */
8 #ifndef _CONFIG_H
9 #define _CONFIG_H
11 #include <assert.h>
13 #include "functionhead.h"
14 #include "stringlist.h"
16 enum command { CMD_UNSPECIFIED, DUMMY, FILES, LIBDEFS, INCLUDES, MAKEFILE, WRITEFUNCLIST };
17 enum modtype { UNSPECIFIED, LIBRARY, MCC, MUI, MCP, DEVICE, RESOURCE, IMAGE, GADGET,
18 DATATYPE, CLASS, HIDD
21 enum optionbit { BIT_NOAUTOLIB, BIT_NOEXPUNGE, BIT_NORESIDENT,
22 BIT_DUPBASE
24 enum optionflags
26 OPTION_NOAUTOLIB = 1<<BIT_NOAUTOLIB,
27 OPTION_NOEXPUNGE = 1<<BIT_NOEXPUNGE,
28 OPTION_NORESIDENT = 1<<BIT_NORESIDENT,
29 OPTION_DUPBASE = 1<<BIT_DUPBASE
32 enum coptionbit { CBIT_PRIVATE };
33 enum coptionflags { COPTION_PRIVATE = 1<<CBIT_PRIVATE };
35 enum intcfgbit { BIT_GENASTUBS, BIT_GENLINKLIB, BIT_NOREADREF };
36 enum intcfgflags
38 CFG_GENASTUBS = 1<<BIT_GENASTUBS,
39 CFG_GENLINKLIB = 1<<BIT_GENLINKLIB,
40 CFG_NOREADREF = 1<<BIT_NOREADREF
43 /* Classinfo is used to store the information of a BOOPSI class */
44 struct classinfo
46 struct classinfo *next;
48 /* Type and name of the class */
49 enum modtype classtype;
50 char *basename;
52 /* Priority with which the class will be initialized */
53 int initpri;
55 /* Additional options for the class */
56 enum coptionflags options;
58 const char **boopsimprefix;
59 char *classid, *superclass, *superclass_field, *classptr_field, *classptr_var;
60 char *dispatcher; /* == NULL when the generated dispatcher is used,
61 * otherwise it is the function name of the dispatcher */;
62 char *classdatatype; /* The type of the data for every object */
64 struct functionhead *methlist;
66 /* Interfaces used in this class (only for HIDD classes) */
67 struct stringlist *interfaces;
70 struct config
72 /* members that store filename and paths derived from argv */
73 char *conffile, *gendir, *genincdir, *reffile;
75 /* The name and type of the module */
76 char *modulename, *modulenameupper;
77 enum modtype modtype;
78 char *suffix;
80 /* firstlvo is the LVO number of the first user definable function
81 * in the module
83 unsigned int firstlvo;
85 /* What to do ? */
86 enum command command;
88 /* Name for variables and types */
89 char *basename, *libbase, *libbasetype, *libbasetypeptrextern;
92 /* The default path to put the module relative to SYS: */
93 char *moddir;
95 /* The names of the fields in the custom library base for storing internal
96 * information
98 char *sysbase_field, *seglist_field, *rootbase_field;
100 /* Some additional options, see optionsflags enum above */
101 enum optionflags options;
103 /* Internal configuration flags */
104 enum intcfgflags intcfg;
106 /* Further configuration data for the generated Resident struct */
107 char *datestring, *copyright;
108 int residentpri;
109 unsigned int majorversion, minorversion;
111 /* In forcelist a list of basenames is present that need to be present in the
112 * static link library so that certain libraries are opened by a program
114 struct stringlist *forcelist;
116 /* Code to add to the generated fioles */
117 struct stringlist *cdeflines, *cdefprivatelines;
119 /* device specific data */
120 char *beginiofunc, *abortiofunc;
122 /* The functions of this module */
123 struct functionhead *funclist;
125 /* The classes defined in this module */
126 struct classinfo *classlist;
129 /* Function prototypes */
131 struct config *initconfig(int, char **);
133 const char* getBanner(struct config* config);
135 #endif //_CONFIG_H