Allow returning something of type void in a function that returns void
[delight/core.git] / dmd2 / lib.h
blob0abf9dc0f08a499d34ceadf11d0dcb553af3929d
2 // Compiler implementation of the D programming language
3 // Copyright (c) 1999-2008 by Digital Mars
4 // All Rights Reserved
5 // written by Walter Bright
6 // http://www.digitalmars.com
7 // License for redistribution is by either the Artistic License
8 // in artistic.txt, or the GNU General Public License in gnu.txt.
9 // See the included readme.txt for details.
11 #ifndef DMD_LIB_H
12 #define DMD_LIB_H
14 #ifdef __DMC__
15 #pragma once
16 #endif /* __DMC__ */
18 struct ObjModule;
20 struct ObjSymbol
22 char *name;
23 ObjModule *om;
26 struct Library
28 File *libfile;
29 Array objmodules; // ObjModule[]
30 Array objsymbols; // ObjSymbol[]
32 StringTable tab;
34 Library();
35 void setFilename(char *dir, char *filename);
36 void addObject(char *module_name, void *buf, size_t buflen);
37 void addLibrary(void *buf, size_t buflen);
38 void write();
40 private:
41 void addSymbol(ObjModule *om, char *name, int pickAny = 0);
42 void scanObjModule(ObjModule *om);
43 unsigned short numDictPages(unsigned padding);
44 int FillDict(unsigned char *bucketsP, unsigned short uNumPages);
45 void WriteLibToBuffer(OutBuffer *libbuf);
48 #endif /* DMD_LIB_H */