xref: /trunk/main/soltools/ldump/ldump.hxx (revision 38268e38)
1*38268e38SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*38268e38SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*38268e38SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*38268e38SAndrew Rist  * distributed with this work for additional information
6*38268e38SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*38268e38SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*38268e38SAndrew Rist  * "License"); you may not use this file except in compliance
9*38268e38SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*38268e38SAndrew Rist  *
11*38268e38SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*38268e38SAndrew Rist  *
13*38268e38SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*38268e38SAndrew Rist  * software distributed under the License is distributed on an
15*38268e38SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*38268e38SAndrew Rist  * KIND, either express or implied.  See the License for the
17*38268e38SAndrew Rist  * specific language governing permissions and limitations
18*38268e38SAndrew Rist  * under the License.
19*38268e38SAndrew Rist  *
20*38268e38SAndrew Rist  *************************************************************/
21*38268e38SAndrew Rist 
22*38268e38SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #include "hashtbl.hxx"
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #define MAXFILT 200
27cdf0e10cSrcweir 
28cdf0e10cSrcweir struct LibExport
29cdf0e10cSrcweir {
30cdf0e10cSrcweir 	char			*cExportName;		// zu exportierende Fkt.
31cdf0e10cSrcweir 	unsigned long	nOrdinal;			// Nummer der zu export. Fkt.
32cdf0e10cSrcweir 	bool 			bByName;			// NONAME anhaengen
33cdf0e10cSrcweir 	bool			bExport;			// exportieren oder nicht ?
34cdf0e10cSrcweir };
35cdf0e10cSrcweir 
36cdf0e10cSrcweir class ExportSet;
37cdf0e10cSrcweir class LibDump
38cdf0e10cSrcweir {
39cdf0e10cSrcweir 	ExportSet		*pBaseTab;			// Zugriff auf gemangelte Namen
40cdf0e10cSrcweir 	ExportSet		*pIndexTab;			// Zugriff auf die Ordinals
41cdf0e10cSrcweir 	char 			*cBName;			// Name der Datenbasis
42cdf0e10cSrcweir 	char 			*cAPrefix;			// Prefix fuer C-Fkts.
43cdf0e10cSrcweir 	char 			*cLibName;			// Name der zu untersuchenden Lib
44cdf0e10cSrcweir 	char 			*cFilterName;		// Name der Filterdatei
45cdf0e10cSrcweir 	char 			*cModName;			// Modulname
46cdf0e10cSrcweir 	unsigned short	nBegin;				// Nummer des ersten Exports
47cdf0e10cSrcweir 	unsigned long	nBaseLines;			// Line in Datenbasis
48cdf0e10cSrcweir 	unsigned long	nFilterLines;		// Line in FilterTabelle
49cdf0e10cSrcweir 	char			**pFilterLines;		// Filtertabelle
50cdf0e10cSrcweir 	unsigned long	nDefStart;
51cdf0e10cSrcweir 	bool			bBase;				// Existenz der DatenBasis;
52cdf0e10cSrcweir 	bool			bAll;				// Alle Fkts exportieren
53cdf0e10cSrcweir 	bool			bDef;				// DefFile schreiben ( bei -E )
54cdf0e10cSrcweir     int             bExportName;        // 0 - export by ordinal; 1 - export by name
55cdf0e10cSrcweir 
56cdf0e10cSrcweir 	bool			CheckDataBase();
57cdf0e10cSrcweir 	bool			CheckLibrary(char * cName);
58cdf0e10cSrcweir 	bool			ReadDataBase();
59cdf0e10cSrcweir 	bool			ReadFilter(char *);
60cdf0e10cSrcweir 	bool			PrintSym(char *, bool bName = true );
61cdf0e10cSrcweir public:
62cdf0e10cSrcweir 					LibDump( char *cFileName, int bExportByName );
63cdf0e10cSrcweir 					~LibDump();
64cdf0e10cSrcweir 	bool			Dump();
65cdf0e10cSrcweir 	bool			SetFilter(char *cFilterName);
SetBeginExport(unsigned short nVal)66cdf0e10cSrcweir 	void			SetBeginExport(unsigned short nVal){nBegin = nVal;}
67cdf0e10cSrcweir 	void			SetCExport( char* pName );
68cdf0e10cSrcweir 	bool			Filter(char *pName);
69cdf0e10cSrcweir 	bool			IsFromAnonymousNamespace(char *pName);
70cdf0e10cSrcweir 	bool			PrintDefFile();
71cdf0e10cSrcweir 	bool			PrintDataBase();
72cdf0e10cSrcweir 	static void		DumpError(unsigned long nError);
73cdf0e10cSrcweir };
74cdf0e10cSrcweir 
75