root/trunk/src/lib.h

Revision 428, 1.1 kB (checked in by walter, 2 years ago)

remove tabs, any trailing spaces

  • Property svn:eol-style set to native
Line 
1 // Compiler implementation of the D programming language
2 // Copyright (c) 1999-2008 by Digital Mars
3 // All Rights Reserved
4 // written by Walter Bright
5 // http://www.digitalmars.com
6 // License for redistribution is by either the Artistic License
7 // in artistic.txt, or the GNU General Public License in gnu.txt.
8 // See the included readme.txt for details.
9
10 #ifndef DMD_LIB_H
11 #define DMD_LIB_H
12
13 #ifdef __DMC__
14 #pragma once
15 #endif /* __DMC__ */
16
17 struct ObjModule;
18
19 struct ObjSymbol
20 {
21     char *name;
22     ObjModule *om;
23 };
24
25 struct Library
26 {
27     File *libfile;
28     Array objmodules;   // ObjModule[]
29     Array objsymbols;   // ObjSymbol[]
30
31     StringTable tab;
32
33     Library();
34     void setFilename(char *dir, char *filename);
35     void addObject(const char *module_name, void *buf, size_t buflen);
36     void addLibrary(void *buf, size_t buflen);
37     void write();
38
39   private:
40     void addSymbol(ObjModule *om, char *name, int pickAny = 0);
41     void scanObjModule(ObjModule *om);
42     unsigned short numDictPages(unsigned padding);
43     int FillDict(unsigned char *bucketsP, unsigned short uNumPages);
44     void WriteLibToBuffer(OutBuffer *libbuf);
45 };
46
47 #endif /* DMD_LIB_H */
Note: See TracBrowser for help on using the browser.