Quelltext /~heha/hs/borg.zip/GNAME.H

//	 gname.h
//
// generic name class - class of items comprising names and locations
// - used for exports,imports and names classes
// - common parts separated into this class Build 16.

#ifndef gname_h
#define gname_h

#include "list.h"
#include "common.h"
#include "savefile.h"

#define GNAME_MAXLEN 40

#if 0
struct gnameitem {
 lptr addr;
 char *name;
};
#else
struct gnameitem {
 lptr addr;
 char *name;
#ifdef NEW_GNAME
 gnameitem();
 ~gnameitem();
#endif
};
#endif

class gname:public slist <gnameitem *> {
public:
 gname();
 ~gname();
 BOOL addname(lptr loc,char *nm);
 BOOL findname(LPCTSTR nm);
 bool isname(lptr loc);
 void printname(lptr loc);
 void delname(lptr loc);
 dword getoffsfromname(char *nm);
    // virtual functions from slist
 /*virtual*/ int compare(gnameitem *i,gnameitem *j);
#ifndef NEW_GNAME
 /*virtual*/ void delfunc(gnameitem *i);
#endif
};

extern gname *expt;     // exports table
extern gname *import;   // imports table
extern gname *name;     // user defined names

#endif
Vorgefundene Kodierung: UTF-80