SOM Runtime C library somwm35i is a subset of C runtime library functions found to be used by IBM SOM 3.0 for NT emitters. SOM Runtime C library provided only for support of IBM SOM 3.0 for NT emitters. This is not full featured C library but compatibility layer and must not be used for development. Functions utilize IBM Optlink calling convention. This library required only under Windows NT systems.
List of emulated function and variables.
somFree Compiler library somc is a set of helper functions for compiler tasks. Used by IBM SOM emitters. Library provided solely to provide support of IBM emitters. Must not be used to write new code.
SOMEXTERN BOOL somtfexists(char *file); SOMEXTERN BOOL SOMLINK somtfexistsSL(char *file);
Check is file exists in paths.
Note: somtfexists version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtsearchFile(char *file, char *fullpath, char *env); SOMEXTERN char * SOMLINK somtsearchFileSL(char *file, char *fullpath, char *env);
Search path using file and env dirs and return full path if exists.
Note: somtsearchFile version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN int somttraverseParents(FILE *fp, Entry * cls, Entry *arg, int (*fn)(FILE*,Entry*,Entry*), SMTraverse flg); SOMEXTERN int SOMLINK somttraverseParentsSL(FILE *fp, Entry * cls, Entry *arg, int (*fn)(FILE*,Entry*,Entry*), SMTraverse flg);
Note: somttraverseParents version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN EmitFn SOMLINK somtloadSL(char *fileName, char *functionName, void **modHandle);
Load emitter <fileName> and return pointer <EmitFn> to emit or emitSL function <functionName> and return handle <modHandle> of loaded module. This function switches somc to IBM SOM 3.0 ABI if emitSL function found or to IBM SOM 2.1 ABI if emit function found.
SOMEXTERN Entry * somtfindBaseEp(Entry *ep); SOMEXTERN Entry * SOMLINK somtfindBaseEpSL(Entry *ep);
Note: somtfindBaseEp version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN Entry * somtgetType(char *name, SOMTTypes type); SOMEXTERN Entry * SOMLINK somtgetTypeSL(char *name, SOMTTypes type);
Note: somtGetType version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN FILE * somtokfopen(char *path, char *mode); SOMEXTERN FILE * SOMLINK somtokfopenSL(char *path, char *mode);
Same as C fopen function.
Note: somtokfopen version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN int somtokrename(const char*, const char *); SOMEXTERN int SOMLINK somtokrenameSL(const char*, const char *);
Note: somtokrename version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN FILE * somtopenEmitFile(char *file, char *ext); SOMEXTERN FILE * SOMLINK somtopenEmitFileSL(char *file, char *ext);
Note: somtopenEmitFile version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN BOOL somtisDbcs(int c); SOMEXTERN BOOL SOMLINK somtisDbcsSL(int c);
Note: somtisDbcs version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN boolean somtremoveExt(char *name, char *ext, char *buf); SOMEXTERN boolean SOMLINK somtremoveExt(char *name, char *ext, char *buf);
Remove extension from<name> and return to <buf>
Note: somtremoveExt version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtaddExt(char *name, char *ext, char *buf); SOMEXTERN char * SOMLINK somtaddExtSL(char *name, char *ext, char *buf);
Add <ext> extension to <name> filestem and return result in <buf>
Note: somtaddExt version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtarrayToPtr(Entry *ep, char *stars, char *buf); SOMEXTERN char * SOMLINK somtarrayToPtrSL(Entry *ep, char *stars, char *buf);
Note: somtarrayToPtr version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtattNormalise(char *name, char *buf); SOMEXTERN char * SOMLINK somtattNormaliseSL(char *name, char *buf);
Note: somtattNormalise version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtbasenameSL(char *path); SOMEXTERN char * SOMLINK somtbasenameSL(char *path);
Return filename without path.
Note: somtbasename version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtctos(Const *con, char *buf); SOMEXTERN char * SOMLINK somtctosSL(Const *con, char *buf);
Note: somtctos version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtdbcsPostincr(char **p); SOMEXTERN char * SOMLINK somtdbcsPostincrSL(char **p);
Note: somtdbcsPostincr version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtdbcsPreincr(char **p); SOMEXTERN char * SOMLINK somtdbcsPreincrSL(char **p);
Note: somtdbcsPreincr version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtdbcsStrchr(char *s, int c); SOMEXTERN char * SOMLINK somtdbcsStrchrSL(char *s, int c);
Note: somtdbcsStrchr version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtdbcsStrrchr(char *s, int c); SOMEXTERN char * SOMLINK somtdbcsStrrchrSL(char *s, int c);
Note: somtdbcsStrrchr version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtdbcsStrstr(char *s1, char *s2); SOMEXTERN char * SOMLINK somtdbcsStrstrSL(char *s1, char *s2);
Note: somtdbcsStrstr version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somteptotype(Entry *ep, char *ptrs, char *buf); SOMEXTERN char * SOMLINK somteptotypeSL(Entry *ep, char *ptrs, char *buf);
Note: somteptotype version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtgetDesc(Stab *stab, Entry *cls, Entry *method, char *desc, BOOL addQuotes, BOOL use, BOOL versflg); SOMEXTERN char * SOMLINK somtgetDescSL(Stab *stab, Entry *cls, Entry *method, char *desc, BOOL addQuotes, BOOL use, BOOL versflg);
Note: somtgetDesc version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtgetVersion(char *sccsid, char *version); SOMEXTERN char * SOMLINK somtgetVersionSL(char *sccsid, char *version);
Note: somtgetVersion version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtgetgatt(char *s); SOMEXTERN char * SOMLINK somtgetgattSL(char *s);
Note: somtgetgatt version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtnextword(const char *s, char *buf); SOMEXTERN char * SOMLINK somtnextwordSL(const char *s, char *buf);
Note: somtnextword version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtnormaliseDesc(char *desc, char *normal); SOMEXTERN char * SOMLINK somtnormaliseDescSL(char *desc, char *normal);
Note: somtnormaliseDesc version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtsatos(char **sa, char *sep, char *buf); SOMEXTERN char * SOMLINK somtsatosSL(char **sa, char *sep, char *buf);
Note: somtsatos version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtsearchFile(char *file, char *path, char *envvar); SOMEXTERN char * SOMLINK somtsearchFileSL(char *file, char *path, char *envvar);
Note: somtsearchFile version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtskipws(const char *s); SOMEXTERN char * SOMLINK somtskipwsSL(const char *s);
Note: somtskipws version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtstringFmtSL(char *fmt, ...) SOMEXTERN char * SOMLINK somtstringFmtSL(char *fmt, ...)
Allocate buffer for string, format it using <fmt> and return pointer to buffer.
Note: somtstringFmt version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somttype(SOMTType type); SOMEXTERN char * SOMLINK somttypeSL(SOMTType type);
Return string representation of type of Entry structure except special case SOMTEmitterBeginE and SOMTEmitterEndE types.
Note: somttype version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
Warning: Depricated. Use somtEntryTypeName instead.
SOMEXTERN char * somtuniqFmt(MemBuf *membuf, char *fmt, ...) SOMEXTERN char * SOMLINK somtuniqFmtSL(MemBuf *membuf, char *fmt, ...)
Return unique formatted string.
Note: somtuniqFmt version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN int somtargFlag(int *argc, char ***argv); SOMEXTERN int SOMLINK somtargFlagSL(int *argc, char ***argv);
Search command line for argument flag (starting with “-”) and return its name.
Note: somtargFlag version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN int somtattjoin(register AttList *ap1, AttList *ap2); SOMEXTERN int SOMLINK somtattjoinSL(register AttList *ap1, AttList *ap2);
Note: somtattjoin version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN int somtdbcsLastChar(char *buf); SOMEXTERN int SOMLINK somtdbcsLastCharSL(char *buf);
Note: somtdbcsLastChar version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN int somtdbcsScan(char **buf); SOMEXTERN int SOMLINK somtdbcsScanSL(char **buf);
Note: somtdbcsScan version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN int somtdiskFull(FILE *fp); SOMEXTERN int SOMLINK somtdiskFullSL(FILE *fp);
Note: somtdiskFull version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN int somtfclose(FILE *fp); SOMEXTERN int SOMLINK somtfcloseSL(FILE *fp);
Same as C fclose function.
Note: somtfclose version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN int somtisparent(Entry *cls, Entry *parent); SOMEXTERN int SOMLINK somtisparentSL(Entry *cls, Entry *parent);
Note: somtisparent version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN int somtmget(int setnum, int msgnum, char *msgbuf); SOMEXTERN int SOMLINK somtmgetSL(int setnum, int msgnum, char *msgbuf);
Note: somtmget version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN int somtmopen(char *filename); SOMEXTERN int SOMLINK somtmopenSL(char *filename);
Note: somtmopen version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN int somtmprintf(int setnum, int msgnum, ...); SOMEXTERN int SOMLINK somtmprintfSL(int setnum, int msgnum, ...);
Note: somtmprintf version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN int somtokremove(char *file); SOMEXTERN int SOMLINK somtokremoveSL(char *file);
Alias of C remove function.
Note: somtokremove version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN int somtunload(void *modHandle); SOMEXTERN int SOMLINK somtunloadSL(void *modHandle);
Note: somtunload version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN int somtwriteaccess(char *file); SOMEXTERN int SOMLINK somtwriteaccessSL(char *file);
Note: somtwriteaccess version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void * somtsmalloc(size_t nbytes, BYTE clear); SOMEXTERN void * SOMLINK somtsmallocSL(size_t nbytes, BYTE clear);
Allocate <nbytes> of memory and fill it by zeroes if <clear> flag is set.
Note: somtsmalloc version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtaddGAtt(MemBuf **membuf, AttList **ap, char *buf); SOMEXTERN void SOMLINK somtaddGAttSL(MemBuf **membuf, AttList **ap, char *buf);
Note: somtaddGAtt version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtcalcFileName(char *def, char *over, char *ext); SOMEXTERN void SOMLINK somtcalcFileNameSL(char *def, char *over, char *ext);
Note: somtcalcFileName version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtcleanFilesFatal(int status); SOMEXTERN void SOMLINK somtcleanFilesFatalSL(int status);
Delete temporary files (if emitted file opened) and exit.
Note: somtcleanFilesFatal version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtemitTypes(FILE *fp, Mlist *mp, Stab *stab); SOMEXTERN void SOMLINK somtemitTypesSL(FILE *fp, Mlist *mp, Stab *stab);
Note: somtemitTypes version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somterror(char *file, long lineno, char *fmt, ...); SOMEXTERN void SOMLINK somterrorSL(char *file, long lineno, char *fmt, ...);
Note: somterror version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtfatal(char *file, long lineno, char *fmt, ...); SOMEXTERN void SOMLINK somtfatalSL(char *file, long lineno, char *fmt, ...);
Note: somtfatal version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtinternal(char *file, long lineno, char *fmt, ...); SOMEXTERN void SOMLINK somtinternalSL(char *file, long lineno, char *fmt, ...);
Note: somtinternal version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtmclose(void); SOMEXTERN void SOMLINK somtmcloseSL(void);
Note: somtmclose version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtmsg(char *file, long lineno, char *fmt, ...); SOMEXTERN void SOMLINK somtmsgSL(char *file, long lineno, char *fmt, ...);
Note: somtmsg version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtreadDescFile(Stab *stab, char *file); SOMEXTERN void SOMLINK somtreadDescFileSL(Stab *stab, char *file);
Note: somtreadDescFile version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtsetDefaultDesc(Stab *stab); SOMEXTERN void SOMLINK somtsetDefaultDescSL(Stab *stab);
Note: somtsetDefaultDesc version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtsetEmitSignals(void(*cleanup) (int), void (*internal) (int)); SOMEXTERN void SOMLINK somtsetEmitSignalsSL(void(*cleanup) (int), void (*internal) (int));
Note: somtsetEmitSignals version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtsetTypeDefn(Entry *type, Entry *ep, char *ptrs, Entry *ret, BOOL array); SOMEXTERN void SOMLINK somtsetTypeDefnSL(Entry *type, Entry *ep, char *ptrs, Entry *ret, BOOL array);
Note: somtsetTypeDefn version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtshowVersion(char *s, char *progname, char *sccsid); SOMEXTERN void SOMLINK somtshowVersionSL(char *s, char *progname, char *sccsid);
Note: somtshowVersion version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtsmfree(void *first, ...); SOMEXTERN void SOMLINK somtsmfreeSL(void *first, ...);
Note: somtsmfree version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtunsetEmitSignals(void); SOMEXTERN void SOMLINK somtunsetEmitSignalsSL(void);
Note: somtunsetEmitSignals version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtwarn(char *file, long lineno, char *fmt, ...); SOMEXTERN void SOMLINK somtwarnSL(char *file, long lineno, char *fmt, ...);
Note: somtwarn version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtuppercase(char *s, char *buf); SOMEXTERN char * SOMLINK somtuppercaseSL(char *s, char *buf);
Convert <s> to upper case and return to <buf>.
Note: somtuppercase version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtlowercase(char *s, char *buf); SOMEXTERN char * SOMLINK somtlowercase(char *s, char *buf)
Convert <s> to lower case and return to <buf>.
Note: somtlowercase version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtdbcsuppercase(char *s, char *buf); SOMEXTERN char * SOMLINK somtdbcsuppercaseSL(char *s, char *buf);
Note: somtdbcsuppercase version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtdbcslowercase(char *s, char *buf); SOMEXTERN char * SOMLINK somtdbcslowercaseSL(char *s, char *buf);
Note: somtdbcslowercase version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtresetEmitSignals(void); SOMEXTERN void SOMLINK somtresetEmitSignalsSL(void);
Note: somtresetEmitSignals version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN size_t somtsizeofEntry(SOMTTypes type); SOMEXTERN size_t SOMLINK somtsizeofEntrySL(SOMTTypes type);
Return size of Entry structure for <type> of entry;
Note: somtsizeofEntry version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
Mapping of type to Entry.u type and nameis following:
Entry type | union struct | union name |
---|---|---|
SOMTClassE | Class | c |
SOMTMetaE | Meta | mt |
SOMTBaseE | Parent | p |
SOMTPassthruE | Passthru | pt |
SOMTNewMethodE | Method_OR_Data | m |
SOMTOverrideMethodE | Method_OR_Data | m |
SOMTOverriddenMethodE | Method_OR_Data | m |
SOMTDataE | Method_OR_Data | m |
SOMTArgumentE | Method_OR_Data | m |
SOMTTypedefBE | Method_OR_Data | m |
SOMTVoidPtrBE | Method_OR_Data | m |
SOMTStructE | Struct | struc |
SOMTTyDclE | Typedef | ty |
SOMTTypedefE | Typedef | ty |
SOMTUnionE | Union | un |
SOMTUnionSE | Union | un |
SOMTEnumE | Enumerator | enumerator |
SOMTConstE | Const | con |
SOMTAttE | Att | att |
SOMTSequenceE | Sequence | seq |
SOMTSequenceTDE | Sequence | seq |
SOMTStringE | String | str |
SOMTEnumBE | EnumName | enumN |
SOMTModuleE | Module | mod |
SOMEXTERN char * somtepname(Entry *ep, char *buf, BOOL suppressImpctxCheck); SOMEXTERN char * SOMLINK somtepnameSL(Entry *ep, char *buf, BOOL suppressImpctxCheck);
Note: somtepname version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtgenSeqName(long n, Entry *base, char *buf, BOOL fullname); SOMEXTERN char * SOMLINK somtgenSeqNameSL(long n, Entry *base, char *buf, BOOL fullname);
Note: somtgenSeqName version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtmrifatal(char *file, long lineno, int msgnum,...); SOMEXTERN void SOMLINK somtmrifatalSL(char *file, long lineno, int msgnum,...);
Note: somtmrifatal version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtmriinternal(char *file, long lineno, int msgnum,...); SOMEXTERN void SOMLINK somtmriinternalSL(char *file, long lineno, int msgnum,...);
Note: somtmriinternal version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtmrierror(char *file, long lineno, int msgnum,...); SOMEXTERN void SOMLINK somtmrierrorSL(char *file, long lineno, int msgnum,...);
Note: somtmrierror version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtmrimsg(char *file, long lineno, int msgnum,...); SOMEXTERN void SOMLINK somtmrimsgSL(char *file, long lineno, int msgnum,...);
Note: somtmrimsg version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtmriwarn(char *file, long lineno, int msgnum,...); SOMEXTERN void SOMLINK somtmriwarnSL(char *file, long lineno, int msgnum,...);
Note: somtmriwarn version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtsetInternalMessages(char *too_long, char *cant_continue, char *segv, char *bus); SOMEXTERN void SOMLINK somtsetInternalMessagesSL(char *too_long, char *cant_continue, char *segv, char *bus);
Note: somtsetInternalMessages version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN boolean somtisvoidSL(Entry *type, char *defn) SOMEXTERN BOOL SOMLINK somtisvoidSL(Entry *type, char *defn)
Return TRUE if type->type is SOMTVoidBE it defn equal to “void”, “VOID”, “PMVOID”.
Note: somtisvoid version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN BOOL somtreturnsStruct(Entry *ep); SOMEXTERN BOOL SOMLINK somtreturnsStructSL(Entry *ep);
Note: somtreturnsStruct version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN BOOL somtreturnsPtr(Entry *ep); SOMEXTERN BOOL SOMLINK somtreturnsPtrSL(Entry *ep);
Note: somtreturnsPtr version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtsimpleName(Entry *ep); SOMEXTERN char * SOMLINK somtsimpleNameSL(Entry *ep);
Note: somtsimpleName version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtqualifyNames(Stab * stab, BOOL fully); SOMEXTERN void SOMLINK somtqualifyNamesSL(Stab * stab, BOOL fully);
Note: somtqualifyNames version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN Entry * somtfindBaseEpNonPtr(Entry *ep); SOMEXTERN Entry * SOMLINK somtfindBaseEpNonPtrSL(Entry *ep);
Note: somtfindBaseEpNonPtr version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN BOOL somtprocessTraps(void); SOMEXTERN BOOL SOMLINK somtprocessTrapsSL(void);
Note: somtprocessTraps version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN Mlist * somtallocMlist(Entry * ep); SOMEXTERN Mlist * SOMLINK somtallocMlistSL(Entry * ep);
Note: somtallocMlist version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN Mlist * somtmlistend(Mlist * mp, char *name); SOMEXTERN Mlist * SOMLINK somtmlistendSL(Mlist * mp, char *name);
Note: somtmlistend version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN BOOL somtisMutRef(Entry *ep, Mlist *seen, BOOL isself, long level); SOMEXTERN BOOL SOMLINK somtisMutRefSL(Entry *ep, Mlist *seen, BOOL isself, long level);
Note: somtisMutRef version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN Mlist * somtfreeMlist(Mlist *mp); SOMEXTERN Mlist * SOMLINK somtfreeMlistSL(Mlist *mp);
Note: somtfreeMlist version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN Mlist * somtdupMlist(Mlist *mp, Entry *ep); SOMEXTERN Mlist * SOMLINK somtdupMlistSL(Mlist *mp, Entry *ep);
Note: somtdupMlist version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtfreeWorld(); SOMEXTERN void SOMLINK somtfreeWorldSL();
SOMEXTERN void somtinitMalloc(BOOL dynamic) SOMEXTERN void SOMLINK somtinitMallocSL(BOOL dynamic)
Initialize memory allocation/free functions.
Note: <dynamic> flag ignored in somFree version.
Note: somtinitMalloc version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtInitialiseEmitlib(void); SOMEXTERN void SOMLINK somtInitialiseEmitlibSL(void);
Note: somtInitialiseEmitlib version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtInitialiseSmmeta(void); SOMEXTERN void SOMLINK somtInitialiseSmmetaSL(void);
Note: somtInitialiseSmmeta version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtInitialiseCreatetc(void); SOMEXTERN void SOMLINK somtInitialiseCreatetcSL(void);
Note: somtInitialiseCreatetc version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtInitialiseSmtypes(void); SOMEXTERN void SOMLINK somtInitialiseSmtypesSL(void);
Note: somtInitialiseSmtypes version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtInitialiseSomc(void); SOMEXTERN void SOMLINK somtInitialiseSomcSL(void);
Note: somtInitialiseSomc version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtInitialiseSmsmall(void); SOMEXTERN void SOMLINK somtInitialiseSmsmallSL(void);
Note: somtInitialiseSmsmall version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtexit(SOMTExitBuf *ebuf, int status); SOMEXTERN void SOMLINK somtexitSL(SOMTExitBuf *ebuf, int status);
Note: somtexit version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtdymain(char *file, Entry *cls, EmitFn emitfn, char *emitter, int first, char *version, Stab *stab); SOMEXTERN void SOMLINK somtdymainSL(char *file, Entry *cls, EmitFn emitfn, char *emitter, int first, char *version, Stab *stab);
Note: somtdymain version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtaddHeader(char *file, FILE *fp, char *ext); SOMEXTERN void SOMLINK somtaddHeaderSL(char *file, FILE *fp, char *ext);
Note: somtaddHeader version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN Entry * somtnthArg(Entry * method, int n); SOMEXTERN Entry * SOMLINK somtnthArgSL(Entry * method, int n);
Note: somtnthArg version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN FILE * somtemitModule(char *file, Entry *cls, char *ext); SOMEXTERN FILE * SOMLINK somtemitModuleSL(char *file, Entry *cls, char *ext);
Same as somtopenEmitFile.
Note: somtemitModule version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN Mlist * somtallocDataList(Entry *cls); SOMEXTERN Mlist * SOMLINK somtallocDataListSL(Entry *cls);
Note: somtallocDataList version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN Mlist * somtallocMethodList(Entry *cls, boolean all); SOMEXTERN Mlist * SOMLINK somtallocMethodListSL(Entry *cls, boolean all);
Note: somtallocMethodList version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtclsfilename(Entry * cls); SOMEXTERN char * SOMLINK somtclsfilenameSL(Entry * cls);
Note: somtclsfilename version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtclsname(Entry * cls); SOMEXTERN char * SOMLINK somtclsnameSL(Entry * cls);
Return name of class <cls>.
Note: somclsname version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtfindMethodName(const char *bp, char *name); SOMEXTERN char * SOMLINK somtfindMethodNameSL(const char *bp, char *name);
Note: somtfindMethodName version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtfullPrototype(char *buf, Entry * method, char *sep, int varargs); SOMEXTERN char * SOMLINK somtfullPrototypeSL(char *buf, Entry * method, char *sep, int varargs);
Note: somtfullPrototype version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtfullTypedef(char *buf, Entry * cls, Entry * method); SOMEXTERN char * SOMLINK somtfullTypedefSL(char *buf, Entry * cls, Entry * method);
Note: somtfullTypedef version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtgetNonRepeatedParent(Entry *cls, int i); SOMEXTERN char * SOMLINK somtgetNonRepeatedParentSL(Entry *cls, int i);
Note: somtgetNonRepeatedParent version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtgetatt(Entry * ep, char *s); SOMEXTERN char * SOMLINK somtgetattSL(Entry * ep, char *s);
SOMEXTERN char * somtgetdatt(Entry * ep, char *s); SOMEXTERN char * SOMLINK somtgetdattSL(Entry * ep, char *s);
SOMEXTERN enum SOMTABIStyle somtgetAbistyle( Entry * ep ); SOMEXTERN enum SOMTABIStyle SOMLINK somtgetAbistyleSL( Entry * ep );
Return ABI style of Entry. At the current time returns always SOMTABIStyle_2
Note: somtgetABIStyle version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtimplicit(Entry *ep, boolean shortform, char *buf); SOMEXTERN char * SOMLINK somtimplicitSL(Entry *ep, boolean shortform, char *buf);
Note: somtimplicit version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtimplicitArgs(Entry *ep); SOMEXTERN char * SOMLINK somtimplicitArgsSL(Entry *ep);
Note: somtimplicitArgs version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtincludeOnceSL(Entry *cls, char *ext, char *buf); SOMEXTERN char * SOMLINK somtincludeOnceSL(Entry *cls, char *ext, char *buf);
Return token to <buf> for once include checks using name of class <cls> and extension <ext> in form SOM_classname_ext.
Note: somtincludeOnce version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtpclsfilename(Entry *parent); SOMEXTERN char * SOMLINK somtpclsfilenameSL(Entry *parent);
Note: somtpclsfilename version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtpclsname(Entry *parent); SOMEXTERN char * SOMLINK somtpclsnameSL(Entry *parent);
Note: somtpclsname version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtprefixedPrototype(char *buf, Entry * method, char *sep, int varargs, char *prefix); SOMEXTERN char * SOMLINK somtprefixedPrototypeSL(char *buf, Entry * method, char *sep, int varargs, char *prefix);
Note: somtprefixedPrototype version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtreplaceDataName(char *buf, Entry * data, char *replace); SOMEXTERN char * SOMLINK somtreplaceDataNameSL(char *buf, Entry * data, char *replace);
Note: somtreplaceDataName version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtrmSelf(char *str); SOMEXTERN char * SOMLINK somtrmSelfSL(char *str);
Note: somtrmSelf version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtshortArgList(char *buf, Entry * method, char *sep, boolean varargs, boolean addself); SOMEXTERN char * SOMLINK somtshortArgListSL(char *buf, Entry * method, char *sep, boolean varargs, boolean addself);
Note: somtshortArgList version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN int somtimplicitMeta(Entry *cls); SOMEXTERN int SOMLINK somtimplicitMetaSL(Entry *cls);
Note: somtimplicitMeta version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN int somtlistAttribute(FILE * fp, int n, AttList * ap, char *s, boolean value, boolean breakLine, boolean firstComma); SOMEXTERN int SOMLINK somtlistAttributeSL(FILE * fp, int n, AttList * ap, char *s, boolean value, boolean breakLine, boolean firstComma);
Note: somtlistAttribute version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN int somtnewMethodsCount(Entry * cls, int meta, boolean procflg); SOMEXTERN int SOMLINK somtnewMethodsCountSL(Entry * cls, int meta, boolean procflg);
Note: somtnewMethodsCount version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN int somtprivateMethodsCount(Entry * cls, int meta); SOMEXTERN int SOMLINK somtprivateMethodsCountSL(Entry * cls, int meta);
Note: somtprivateMethodsCount version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtaddHeader(char *file, FILE *fp, char *ext); SOMEXTERN void SOMLINK somtaddHeaderSL(char *file, FILE *fp, char *ext);
Note: somtaddHeader version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtcleanFiles(int status); SOMEXTERN void SOMLINK somtcleanFilesSL(int status);
Delete temporary files and exit.
Note: somtcleanFiles version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtdeclareIdlVarargs(FILE *fp, Entry *ep); SOMEXTERN void SOMLINK somtdeclareIdlVarargsSL(FILE *fp, Entry *ep);
Note: somtdeclareIdlVarargs version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtdymain(char *file, Entry *cls, EmitFn emitfn, char *emitter, int first, char *version, Stab *stab); SOMEXTERN void SOMLINK somtdymainSL(char *file, Entry *cls, EmitFn emitfn, char *emitter, int first, char *version, Stab *stab);
Note: somtdymain version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtemitModuleTypes(FILE *fp, Entry *ep, Stab *stab); SOMEXTERN void SOMLINK somtemitModuleTypesSL(FILE *fp, Entry *ep, Stab *stab);
Note: somtemitModuleTypes version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN long somtemitPassthru(FILE * fp, Entry * cls, char *name, int mode, char *att); SOMEXTERN long SOMLINK somtemitPassthruSL(FILE * fp, Entry * cls, char *name, int mode, char *att);
Note: somtemitPassthru version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtfreeDataList(Mlist *mlist); SOMEXTERN void SOMLINK somtfreeDataListSL(Mlist *mlist);
Note: somtfreeDataList version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtfreeMethodList(Mlist *mlist); SOMEXTERN void SOMLINK somtfreeMethodListSL(Mlist *mlist);
Note: somtfreeMethodList version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtfullCommentSL(FILE * fp, char *fmt,...); SOMEXTERN void SOMLINK somtfullCommentSL(FILE * fp, char *fmt,...);
Outout formatted string <fmt> to emitted file as comment using C-style comment via somtoidlComment function;
Note: somtfullComment version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somthandleDiskFull(FILE *fp); SOMEXTERN void SOMLINK somthandleDiskFullSL(FILE *fp);
Note: somthandleDiskFull version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtinitialiseMeta(Entry * cls, Stab * stab, boolean meta, int imp); SOMEXTERN void SOMLINK somtinitialiseMetaSL(Entry * cls, Stab * stab, boolean meta, int imp);
Note: somtinitialiseMeta version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtoidlComment(FILE * fp, int min, int max, char style, char *comment); SOMEXTERN void SOMLINK somtoidlCommentSL(FILE * fp, int min, int max, char style, char *comment);
Output oidl-<style> <comment> to file <fp> from colon <min> up to colon <max>.
Note: Seems IBM SOM ignores <max> value.
Style is one of following:
Other values forced to 'c' style.
<comment> can contains at offset 0 0x01 signature indicating comment style. If style is zero the used style from comment position 1. Two first symbols of comment are ignored if style signature is present.
Note: somtoidlComment version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtscmsg(Entry *cls, Entry *ep, char *fmt, ...); SOMEXTERN void SOMLINK somtscmsgSL(Entry *cls, Entry *ep, char *fmt, ...);
Note: somtscmsg version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtshortDefine(FILE *fp, Entry *ep, char *fmt, ...); SOMEXTERN void SOMLINK somtshortDefineSL(FILE *fp, Entry *ep, char *fmt, ...);
Note: somtshortDefine version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtuninitialiseMeta(Entry * cls); SOMEXTERN void SOMLINK somtuninitialiseMetaSL(Entry * cls);
Note: somtuninitialiseMeta version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN FILE * somtobseleteHeaderFile(char *file, Entry *cls, char *ext, char *newext); SOMEXTERN FILE * SOMLINK somtobseleteHeaderFileSL(char *file, Entry *cls, char *ext, char *newext);
Open emit file and write info about obsolete header. Return file pointer.
Note: somtoboleteHeaderFile version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtwidenType(Entry *ep, char *args, char *type); SOMEXTERN char * SOMLINK somtwidenTypeSL(Entry *ep, char *args, char *type);
Note: somtwidenType version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtgenAttStubs(FILE *fp, Entry *cls, char *prefix, char *classprefix); SOMEXTERN void SOMLINK somtgenAttStubsSL(FILE *fp, Entry *cls, char *prefix, char *classprefix);
Note: somtgenAttStubs version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtstrictidl(FILE *fp); SOMEXTERN void SOMLINK somtstrictidlSL(FILE *fp);
Output definition of SOM_STRICT_IDL macro if somadd variable is TRUE;
Note: somtstrictidl version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtcreateTypeCodes (Stab *stab); SOMEXTERN void SOMLINK somtcreateTypeCodesSL(Stab *stab);
Note: somtcreateTypeCodes version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN TypeCode * somtemitTcConstant(TypeCode t, FILE *f, char *name, TypeCode *alreadyDone); SOMEXTERN TypeCode * SOMLINK somtemitTcConstantSL(TypeCode t, FILE *f, char *name, TypeCode *alreadyDone);
Note: somtemitTcConstant version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtemitPredefinedTcConstants (FILE *f); SOMEXTERN void SOMLINK somtemitPredefinedTcConstantsSL(FILE *f);
Note: somtemitPredefinedTcConstants version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN Entry * somtAncestorClass(Entry *cls, char *name); SOMEXTERN Entry * SOMLINK somtAncestorClassSL(Entry *cls, char *name);
Note: somtAncestorClass version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN short somttcAlignment (TypeCode t, Environment *ev); SOMEXTERN short SOMLINK somttcAlignmentSL(TypeCode t, Environment *ev);
Note: somttcAlignment version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN long somttcSize (TypeCode t, Environment *ev); SOMEXTERN long SOMLINK somttcSizeSL(TypeCode t, Environment *ev);
Note: somttcSize version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN TCKind somttcKind (TypeCode t, Environment *ev); SOMEXTERN TCKind SOMLINK somttcKindSL(TypeCode t, Environment *ev);
Note: somttcKind version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN sequence(string) somttcSeqFromListString (string s); SOMEXTERN sequence(string) SOMLINK somttcSeqFromListStringSL(string s);
Note: somttcSeqFromListString version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN _IDL_SEQUENCE_EntryPtr somtGetReintroducedMethods(Entry *cls); SOMEXTERN _IDL_SEQUENCE_EntryPtr SOMLINK somtGetReintroducedMethodsSL(Entry *cls);
Note: somtGetReintroducedMethods version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
Note: somtallocBuf version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN char * somtuniqString(MemBuf *membuf, char *s); SOMEXTERN char * SOMLINK somtuniqStringSL(MemBuf *membuf, char *s);
Check is string unique and return NULL if not, or string itself if unique;
Note: somtuniqString version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN long somtkeyword(KeytabEntry *keytab, char *kword, long keytabsize); SOMEXTERN long SOMLINK somtkeywordSL(KeytabEntry *keytab, char *kword, long keytabsize);
Return token for keyword <kword> from keytaable <keytab> of <keytabsize> size.
Note: somtkeyword version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void * somtaddEntry(Stab *stab, char *name, void *ep); SOMEXTERN void * SOMLINK somtaddEntrySL(Stab *stab, char *name, void *ep);
Add entry <ep> with name <name> to symbol table <stab>. Buffer for entry allocated by function.
Note: somtaddEntry version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void * somtgetEntry(Stab *stab, char *name); SOMEXTERN void * SOMLINK somtgetEntrySL(Stab *stab, char *name);
Return pointer to entry structure with name equal to <name> from symbol table <stab>
Note: somtgetEntry version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void * somtstabFirst(Stab *stab, Sep **sepp); SOMEXTERN void * SOMLINK somtstabFirstSL(Stab *stab, Sep **sepp);
Return first entry from symbol table <stab> and, optionally, returns sep entry in <sepp>.
Note: somtstabFirst version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void * somtstabNext(Stab *stab, Sep **sepp); SOMEXTERN void * SOMLINK somtstabNextSL(Stab *stab, Sep **sepp);
Return next after last search entry from symbol table <stab> and, optionally, returns sep entry in <sepp>.
Note: somtstabNext version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void * somtstabFirstName(Stab *stab, char *name, Sep **sepp); SOMEXTERN void * SOMLINK somtstabFirstNameSL(Stab *stab, char *name, Sep **sepp);
Return first entry with <name> from symbol table <stab> and, optionally, returns sep entry in <sepp>.
Note: somtstabFirstName version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void * somtstabNextName(Stab *stab, Sep **sepp); SOMEXTERN void * SOMLINK somtstabNextNameSL(Stab *stab, Sep **sepp);
Return next after last search entry from symbol table <stab> and, optionally, returns sep entry in <sepp>.
Note: somtstabNextName version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtcreateMemBuf(MemBuf **membufp, size_t bufsize, long stabsize); SOMEXTERN void SOMLINK somtcreateMemBufSL(MemBuf **membufp, size_t bufsize, long stabsize);
Note: somtcreateMemBuf version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtcreateStab(Stab *stab, long stabsize, long entrysize); SOMEXTERN void SOMLINK somtcreateStabSL(Stab *stab, long stabsize, long entrysize);
Initialize symbol table structure <stab> using hash index size <stabsize> and entry size <entrysize>.
Note: somtcreateStab version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN int somticstrcmp(char *s, char *t) SOMEXTERN int SOMLINK somticstrcmpSL(char *s, char *t);
Alias of C stricmp.
Note: somticstrcmp version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void * somtaddEntryBuf(Stab *stab, char *name, void *ep, void *buf, size_t len); SOMEXTERN void * SOMLINK somtaddEntryBufSL(Stab *stab, char *name, void *ep, void *buf, size_t len);
Add entry <ep> with name <name> to symbol table <stab> to buffer <buf> with size <len>
Note: somtaddEntryBuf version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
SOMEXTERN void somtfreeStab(Stab *stab, BOOL freeEp); SOMEXTERN void SOMLINK somtfreeStabSL(Stab *stab, BOOL freeEp);
Note: somtfreeStab version uses default compiler calling convention. For IBM SOM 3.0 for NT it is Optlink.
readonly attribute boolean somtIsReadonly;
Whether the attribute is readonly.
readonly attribute SOMTEntryC somtAttribType;
The type of the attribute. This does not include pointer stars or array declarators. To get the “full” type, get each attribute declarator and get the somtType attribute.
SOMTDataEntryC somtGetFirstAttributeDeclarator();
The first attribute declarator for this attribute declaration.
SOMTDataEntryC somtGetNextAttributeDeclarator();
The next attribute declarator for this attribute declaration, relative to the previous call to this method or somtGetFirstAttributeDeclarator.
SOMTMethodEntryC somtGetFirstGetMethod();
The first get method for this attribute declaration.
SOMTMethodEntryC somtGetNextGetMethod();
The next get method for this attribute declaration, relative to the previous call to this method or somtGetFirstGetMethod.
SOMTMethodEntryC somtGetFirstSetMethod();
The first set method for this attribute declaration.
SOMTMethodEntryC somtGetNextSetMethod();
The next set method for this attribute declaration, relative to the previous call to this method or somtGetFirstSetMethod.
readonly attribute SOMTClassEntryC somtBaseClassDef;
Returns the class definition entry for the Base class named in this entry.
readonly attribute string somtSourceFileName;
Returns the name of file containing the definition of this class.
readonly attribute SOMTMetaClassEntryC somtMetaClassEntry;
Returns the entry for the meta class statement in class definition or NULL if there is no meta class statement.
Note: the SOM architecture requires that all classes have a meta class, however <SOMClass> is its own metaclass. Thus, any attempt to walk up the metaclass chain must terminate when it finds a class that is its own meta class, otherwise an infinite loop is possible.
readonly attribute SOMTModuleEntryC somtClassModule;
The module that contains this class, or NULL if there is not one.
readonly attribute long somtNewMethodCount;
Returns the number of new methods introduced in this class definition.
readonly attribute boolean somtLocalInclude;
Returns true if the header files associated with this class definition should be included using local search, eg, “name.h” instead of <name.h>
readonly attribute long somtPrivateMethodCount;
Returns number of new private methods in class.
readonly attribute long somtStaticMethodCount;
Returns number of new static methods in class.
readonly attribute long somtOverrideMethodCount;
Returns number of new override methods in class.
readonly attribute long somtProcMethodCount;
Returns number of procedure methods for class.
readonly attribute long somtVAMethodCount;
Returns number of VarArg methods for class.
readonly attribute long somtBaseCount;
Returns number of base classes for class.
readonly attribute long somtExternalDataCount;
Returns number of external (public or private) data members for class.
readonly attribute long somtPublicDataCount;
Returns number of public data members for class.
readonly attribute long somtPrivateDataCount;
Returns number of private data members for class.
readonly attribute SOMTClassEntryC somtMetaclassFor;
If this is a metaclass, the class for which it is a metaclass, else NULL.
readonly attribute boolean somtForwardRef;
Whether this is a forward reference or not.
SOMTBaseClassEntryC somtGetFirstBaseClass();
Returns the entry for the “left most” direct base class form for this class, if it has one and NULL otherwise.
Note: <SOMObject> does not have any base classes and therefore will terminate an attempt to walk up the base class chain.
SOMTBaseClassEntryC somtGetNextBaseClass();
Returns the entry for the next direct base class form of this class, if it has one and NULL otherwise. The direct base classes of a derived class are ordered from “left to right”.
string somtGetFirstReleaseName();
Returns the first name in the release order statement for this entry if it has one and NULL otherwise.
string somtGetNextReleaseName();
Returns the next name in the release order statement for this entry if it has one and NULL otherwise.
long somtGetReleaseNameList(in string buffer);
Puts all the release names in <buffer> in template output form, buffer must be large enough, no tests are made. The number of release names is returned.
SOMTPassthruEntryC somtGetFirstPassthru();
Returns the first passthru entry for this class definition if it has one and NULL otherwise.
SOMTPassthruEntryC somtGetNextPassthru();
Returns the next passthru entry for this class definition if it has one and NULL otherwise. The passthru entry will be returned in an order based on the appearence of passthru statements in the class definition.
SOMTDataEntryC somtGetFirstData();
Returns the first data entry for this class definition if it has one and NULL otherwise.
SOMTDataEntryC somtGetNextData();
Returns the next data entry for this class definition if it has one and NULL otherwise. The data entries will be returned in an order based on the appearence data member declarations in the class definition.
SOMTDataEntryC somtGetFirstStaticData();
Returns the first static data entry for this class definition if it has one and NULL otherwise. Static data is handled specialy in SOM so a different accessor method is provided.
SOMTDataEntryC somtGetNextStaticData();
Returns the next static data entry for this class definition if it has one and NULL otherwise. The data entries will be returned in an order based on the release order
SOMTMethodEntryC somtGetFirstMethod();
Returns the first method entry for this class definition if it has one and NULL otherwise. Method entries may be for new or overridden methods.
SOMTMethodEntryC somtGetNextMethod();
Returns the next method entry for this class definition if it has one and NULL otherwise. The method entries will be returned in an order based on the appearence method declarations in the class definition. Method entries may be for new or overridden methods.
SOMTMethodEntryC somtGetFirstInheritedMethod();
Returns the first inherited and not overridden method entry for this class definition if it has one and NULL otherwise.
SOMTMethodEntryC somtGetNextInheritedMethod();
Returns the next inherited and not overridden method entry for this class definition if it has one and NULL otherwise. The method entries will be returned in an unspecified, but constant order.
SOMTAttributeEntryC somtGetFirstAttribute();
SOMTAttributeEntryC somtGetNextAttribute();
SOMTStructEntryC somtGetFirstStruct();
SOMTStructEntryC somtGetNextStruct();
SOMTTypedefEntryC somtGetFirstTypedef();
SOMTTypedefEntryC somtGetNextTypedef();
SOMTUnionEntryC somtGetFirstUnion();
SOMTUnionEntryC somtGetNextUnion();
SOMTEnumEntryC somtGetFirstEnum();
SOMTEnumEntryC somtGetNextEnum();
SOMTConstEntryC somtGetFirstConstant();
SOMTConstEntryC somtGetNextConstant();
SOMTSequenceEntryC somtGetFirstSequence();
SOMTSequenceEntryC somtGetNextSequence();
SOMTEntryC somtGetFirstPubdef();
SOMTEntryC somtGetNextPubdef();
boolean somtFilterNew(in SOMTMethodEntryC entry);
Returns 1 if entry is new in the class.
boolean somtFilterOverridden(in SOMTMethodEntryC entry);
Returns 1 if entry is an overriding method of the class.
boolean somtFilterPrivOrPub(in SOMTCommonEntryC entry);
Returns TRUE if entry is Private or Public.
readonly attribute SOMTEntryC somtTypeObj;
The object representing the base type of the entry. This does not include pointer stars or array declarators.
readonly attribute string somtPtrs;
The string of stars associated with the entry's type. For example, an object of type “foo” would have somtPtrs = NULL, type “foo *” would have somtPtrs = “*”, type “foo **” would have somtPtrs = “**”, etc.
readonly attribute string somtArrayDimsString;
Array dimensions in string form.
unsigned long somtGetFirstArrayDimension();
The first array dimension, for items of type array. Zero indicates that the item is not an array.
unsigned long somtGetNextArrayDimension();
The next array dimension, for items of type array, relative to the previous call to this method or to somtGetFirstArrayDimension. Zero indicates no more dimensions.
readonly attribute string somtSourceText;
The un-parsed source text for this entry, with leading and trailing white space removed. For attribute/typedef declarators and for user-defined types, this attribute only provides the source text for the entry's name. For methods, arguments, and instance variables, however, this attribute provides the full definition.
readonly attribute string somtType;
The IDL type for this entry in string form. For methods this is the return type. For data or parameters this is the type of the data item or parameter. For user-defined types, this is the type specification. It is of the form: <typename><pointer-stars> <array-declarators>
readonly attribute somtVisibilityT somtVisibility;
The visibility of this entry. Note: the visibility of parameter entries will always be public, and methods can never be internal.
boolean somtIsArray(out long size);
Returns 1 (true) if the type involves an array. When the type involves an array then <size> is set to be the size of the array.
boolean somtIsPointer();
Returns 1 (true) if the type involves a pointer, and 0 (false) otherwise
readonly attribute SOMTEntryC somtConstTypeObj;
A pointer to an object representing the type of the const.
readonly attribute string somtConstType;
The type of the constant's value.
readonly attribute string somtConstStringVal;
The string value of the constant (unevaluated).
readonly attribute unsigned long somtConstNumVal;
The number value of the constant. This attribute is not valid if the value cannot be stored in an unsigned long (string, float, double, negative). The somtConstIsNegative attribute can be used to determine if the value is negative. The somtConstType attribute can be used to determine whether the value is a float or double.
readonly attribute long somtConstNumNegVal;
The number value of the constant, if negative.
readonly attribute boolean somtConstIsNegative;
Whether the constant's value is a negative integer and must be obtained using somtConstNumNegVal rather than somtConstNumVal.
readonly attribute string somtConstVal;
The string value of the constant (evaluated). The “get” method for this attribute returns a string whose ownership is transferred to the caller.
readonly attribute boolean somtIsSelfRef;
Whether a declarator of a struct is self-referential.
attribute SOMTTemplateOutputC somtTemplate;
The template is to provide template output and maintains a symbol table that provides a sort of global context for the emitter.
attribute FILE *somtTargetFile;
The target file is the one to which all emitter output is to be directed.
attribute SOMTClassEntryC somtTargetClass;
The target class is the class definition for which code is to be emitted.
attribute SOMTModuleEntryC somtTargetModule;
The target module is the module definition for which code is to be emitted.
attribute SOMTTargetTypeT somtTargetType;
The target type indicates what type of output file is being produced, public, private, or implementation. This allows the same emitter subclass to produce several different output files that generally differ only in how much of the class definition they cover. Eg, .csc, .sc, and .psc. This is attribute is for OIDL compatibility only.
attribute string somtEmitterName;
The short name of the emitter (the name used to invoke it via the SOM Compiler. Typically this is the file stem of the subclass of SOMTEmitC. This attribute should be set in the driver program that runs the emitter. It is used to filter passthrus so that only passthrus directed to a particular emitter are seen by it.
boolean somtGenerateSections();
Calls each of the section methods in order. The order is:
somtEmitProlog when emitting a class: somtEmitClass somtEmitBase somtEmitMeta somtEmitConstant somtEmitTypedef somtEmitStruct somtEmitUnion somtEmitEnum when emitting a class: somtEmitAttribute somtEmitMethod somtEmitRelease somtEmitPassthru somtEmitData when emitting a module: somtEmitInterface somtEmitModule somtEmitEpilog
This method will need to be overridden by many emitters in order to rearange the order of the sections and to add or delete sections.
Note: repeating sections such as methods, data, and passthru, have a prolog and epilog method as well. The prolog method is called before the first sections is processed and the epilog method is called after the last section is processed.
FILE* somtOpenSymbolsFile(in string file, in string mode);
This method attempts to open the symbols file. If file doesn't exist then it will attempt to find it in the directories specified in the SMINCLUDE environment variable. If the file can be found a FILE * pointer is returned, otherwise NULL is returned.
void somtSetPredefinedSymbols();
Set predefined symbols that are used for such things as section names etc.
void somtFileSymbols();
Symbols that are common to the file. This includes the target class symbols, and the metaclass symbols, and special symbols like <timeStamp>. IE, all symbols that have a single definition.
void somtEmitProlog();
void somtEmitBaseIncludesProlog();
void somtEmitBaseIncludes(in SOMTBaseClassEntryC base);
void somtEmitBaseIncludesEpilog();
void somtEmitMetaInclude();
void somtEmitClass();
void somtEmitMeta();
void somtEmitBaseProlog();
void somtEmitBase(in SOMTBaseClassEntryC base);
void somtEmitBaseEpilog();
void somtEmitPassthruProlog();
void somtEmitPassthru(in SOMTPassthruEntryC entry);
void somtEmitPassthruEpilog();
void somtEmitRelease();
void somtEmitDataProlog();
void somtEmitData(in SOMTDataEntryC entry);
void somtEmitDataEpilog();
void somtEmitAttributeProlog();
void somtEmitAttribute(in SOMTAttributeEntryC att);
void somtEmitAttributeEpilog();
void somtEmitConstantProlog();
void somtEmitConstant(in SOMTConstEntryC con);
void somtEmitConstantEpilog();
void somtEmitTypedefProlog();
void somtEmitTypedef(in SOMTTypedefEntryC td);
void somtEmitTypedefEpilog();
void somtEmitStructProlog();
void somtEmitStruct(in SOMTStructEntryC struc);
void somtEmitStructEpilog();
void somtEmitUnionProlog();
void somtEmitUnion(in SOMTUnionEntryC un);
void somtEmitUnionEpilog();
void somtEmitEnumProlog();
void somtEmitEnum(in SOMTEnumEntryC en);
void somtEmitEnumEpilog();
void somtEmitInterfaceProlog();
void somtEmitInterface(in SOMTClassEntryC intfc);
void somtEmitInterfaceEpilog();
void somtEmitModuleProlog();
void somtEmitModule(in SOMTModuleEntryC mod);
void somtEmitModuleEpilog();
void somtEmitMethodsProlog();
void somtEmitMethods(in SOMTMethodEntryC method);
void somtEmitMethodsEpilog();
void somtEmitMethod(in SOMTMethodEntryC entry);
void somtEmitEpilog();
boolean somtScanBases(in string prolog, in string each, in string epilog);
boolean somtScanBaseIncludes(in string prolog, in string each, in string epilog);
boolean somtCheckVisibility(in SOMTMethodEntryC entry);
Return 1 (true) if <entry> should be visible in the current target file. This method is used by each of the following filter methods that are concerned with visibility.
The default rule for visibility is:
boolean somtNew(in SOMTMethodEntryC entry);
Returns 1 (true) if <entry> is a method introduced by the target class and its visibility matches <somtTargetType> (somtImplementationE matches both private and public)
boolean somtImplemented(in SOMTMethodEntryC entry);
Returns 1 (true) if <entry> is a method introduced or overridden by the target class and its visibility matches <somtTargetType> (somtImplementationE matches both private and public)
boolean somtOverridden(in SOMTMethodEntryC entry);
Returns 1 (true) if <entry> is an overridding method of the target class and its visibility matches <somtTargetType> (somtImplementationE matches both private and public)
boolean somtInherited(in SOMTMethodEntryC entry);
Returns 1 (true) if <entry> is inherited by the target class and its visibility matches <somtTargetType> (somtImplementationE matches both private and public)
boolean somtAllVisible(in SOMTMethodEntryC entry);
Returns 1 (true) if <entry> is supported by the target class and its visibility matches <somtTargetType> (somtImplementationE matches both private and public)
boolean somtAll(in SOMTMethodEntryC entry);
Returns 1 (true) if <entry> is supported by the target class.
boolean somtNewNoProc(in SOMTEntryC entry);
Returns 1 (true) if somtNew does and the method IS NOT a direct call Procedure.
boolean somtPrivOrPub(in SOMTEntryC entry);
Returns 1 (true) if entry is Private or Public.
boolean somtNewProc(in SOMTEntryC entry);
Returns 1 (true) if somtNew does and the method IS a direct call Procedure.
boolean somtLink(in SOMTEntryC entry);
Returns 1 (true) if “nolink” is not set.
boolean somtVA(in SOMTEntryC entry);
Returns 1 (true) if entry is a VarArgs method.
boolean somtScanMethods(in string filter, in string prolog, in string each, in string epilog, in boolean forceProlog);
Will only call <each> on methods accepted by <filter>. If <forceProlog> is not true then the prolog and epilog emiters will be called only if there is at least one method that passes the filter.
boolean somtScanConstants(in string prolog, in string each, in string epilog);
boolean somtScanTypedefs(in string prolog, in string each, in string epilog);
boolean somtScanStructs(in string prolog, in string each, in string epilog);
boolean somtScanUnions(in string prolog, in string each, in string epilog);
boolean somtScanEnums(in string prolog, in string each, in string epilog);
boolean somtScanData(in string prolog, in string each, in string epilog);
boolean somtScanAttributes(in string prolog, in string each, in string epilog);
boolean somtScanInterfaces(in string prolog, in string each, in string epilog);
boolean somtScanModules(in string prolog, in string each, in string epilog);
boolean somtScanPassthru(in boolean before, in string prolog, in string each, in string epilog);
void somtEmitFullPassthru(in boolean before, in string language);
Emits each passthru section defined for the language and targetType, and the result of the somtIsBeforePassthru method is equal to the before parameter. (before = 1(true), or before = 0(false), i.e. after.)
boolean somtScanDataF(in string filter, in string prolog, in string each, in string epilog, in boolean forceProlog);
This method is like somtScanData but it also provides a paramater for a filter method.
boolean somtScanBasesF(in string filter, in string prolog, in string each, in string epilog, in boolean forceProlog);
This method is like somtScanBases but it also provides a paramater for a filter method.
string somtGetGlobalModifierValue(in string modifierName);
Returns the value of the specified global modifier.
Global modifiers are specified when the SOM Compiler is invoked, via the “-m” option. For example,
sc -m"foo=bar" file.idl
specifies to the SOM Compiler and the emitters being run that the global modifier “foo” has the value “bar.”
Values of global modifiers are transient; they last only for the duration of the compile for which they were specified.
If a modifier is specified in the “sc” command with no value, as in
sc -mfoo file.idl
then the result of this method will be non-NULL.
If no such modifier is specified, then the result is NULL.
Older SOM compiler version uses “-a” option which is same as “-m” option.
SOMTEntryC somtGetFirstGlobalDefinition();
Returns the first type or constant definition that is not associated with any interface or module.
These global definitions must be surrounded by the somemittypes pragmas for them to be visible via this method. E.g.,
#pragma somemittypes on .... #pragma someemittypes off
The list of global definitions returned by this method and the somtGetNextGlobalDefinition method may include entries for forward declarations as well as typedefs and constants.
Global structs and unions are also included in the list.
SOMTEntryC somtGetNextGlobalDefinition();
Returns the next type or constant definition that is not associated with any interface or module, relative to a previous call to somtGetFirstGlobalDefinition or somtGetNextGlobalDefinition.
attribute string somtEntryName;
The name associated with this entry. Eg, the name of the data item, the class, the method, the type, etc.
attribute SOMTTypes somtElementType;
Returns the type of this entry. This is not datatype, but entry type (method, class, passthru, etc.). The value is defined by SOMTTypes.
readonly attribute string somtElementTypeName;
String version of somtElementType.
readonly attribute string somtEntryComment;
Returns the comment associated with this entry, or NULL is this entry has no associated comment. Comments will have comment delimitors removed, but will retain newline characters as specified in the source file. (use smLookupComment)
readonly attribute unsigned long somtSourceLineNumber;
Returns the line number in the source file where this entry's syntactic form ended.
readonly attribute TypeCode somtTypeCode;
The typecode, if appropriate, or NULL.
readonly attribute boolean somtIsReference;
Whether the entry is just a reference to the real type (TRUE) rather than a declaration of it (FALSE).
readonly attribute string somtIDLScopedName;
The IDL scoped name of the entry (using double colon as delimiter).
readonly attribute string somtCScopedName;
The C scoped name of the entry (using underscore as delimiter).
string somtGetModifierValue(in string modifierName);
Returns the value of the named modifier if this entry has the named modifier and NULL otherwise. Note: if the modifier is present but does not have a value then a value of <'\1'> is returned.
boolean somtGetFirstModifier(inout string modifierName, inout string modifierValue);
Returns the first modifier associated with this entry. 1 (true) is returned if the entry has at least one modifier and 0 (false) otherwise.
boolean somtGetNextModifier(inout string modifierName, inout string modifierValue);
Returns the next modifier (with respect to the last call to <somtGetNextModifier> or <somtGetFirstModifier>) associated with this entry. 1 (true) is returned if the entry had another modifier and 0 (false) otherwise.
long somtFormatModifier(in string buffer, in string name, in string value);
Formats the indicated name/value pair into buffer. Buffer must be big enough to hold all the formatted pair, no checks are made. The number of characters added to buffer are returned (not including the trailing null character).
Note: value may be null
You will probably never call this method, it is provided so that you can override it to control the format returned in <somtGetModifierList>.
long somtGetModifierList(in string buffer);
The modifiers for this entry are placed in <buffer> in template list form (newline separated). Buffer must be big enough to hold all the modifiers, no checks are made. The number of modifiers is returned.
long somtSetSymbolsOnEntry(in SOMTEmitC emitter, in string prefix);
Places a number of symbol/value pairs in <t>. All the symbols will begin with <prefix>.
void somtSetEntryStruct(inout Entry es);
Sets the entry struct data member.
Note, when overridding this method, it is important to call the parent version of the method first and then do your processing.
SOMTEnumNameEntryC somtGetFirstEnumName();
SOMTEnumNameEntryC somtGetNextEnumName();
readonly attribute SOMTEnumEntryC somtEnumPtr;
A pointer to the enumerator.
readonly attribute unsigned long somtEnumVal;
The value of the enumeration.
readonly attribute string somtMetaFile;
Returns the name of the file containing the definition of the meta class named in this entry.
readonly attribute SOMTClassEntryC somtMetaClassDef;
Returns the class definition entry for the meta class named in this entry.
readonly attribute boolean somtIsVarargs;
Returns 1 (true) if this method definition has a variable length parameter list.
readonly attribute SOMTMethodEntryC somtOriginalMethod;
If this is an override method definition (<SOMTOverrideMethodE>) then this is the method definition entry that orginially introduced the method.
readonly attribute SOMTClassEntryC somtOriginalClass;
If this is an override method definition (<SOMTOverrideMethodE>) then this is the class definition entry that orginially introduced the method.
readonly attribute SOMTEntryC somtMethodGroup;
The group this method is defined in within a class definition.
readonly attribute boolean somtIsPrivateMethod;
Whether or not the method is private.
readonly attribute boolean somtIsOneway;
Whether or not the method is oneway.
readonly attribute short somtArgCount;
The number of arguments for the method.
SOMTParameterEntryC somtGetFirstParameter();
Returns the first formal parameter entry for this method if it has one and NULL otherwise. Note: the target object parameter is not included, therefore the first parameter is really the second parameter from a SOM runtime perspective.
SOMTParameterEntryC somtGetNextParameter();
Returns the next formal parameter entry for this method if it has one and NULL otherwise.
string somtGetIDLParamList(in string buffer);
Returns the formal parameter list (in IDL syntax) for this method. The parameter list is built in <buffer> and the address of <buffer> is returned.
Parameters are delimited with newlines.
The method receiver and any implicit method arguments are NOT included.
string somtGetShortCParamList(in string buffer, in string selfParm, in string varargsParm);
Returns the formal parameter list (in ANSI C function prototype form, with types) for this method. The parameter list is built in <buffer> and the address of <buffer> is returned.
Parameters are delimited with newlines.
If this method takes a variable number of arguments then the final parameter substring is replaced by <varargsParm>, unless <varargsParm> is NULL in which case the final parameter is removed.
If <selfParm> is not null then it is added as an initial parameter. (The <selfParm> string may actually contain multiple parameters, delimited by newline characters.)
The method receiver and any implicit method arguments are NOT included.
The types of the method parameters are given in C form (with pointer stars, where needed) rather than in the IDL form.
string somtGetFullCParamList(in string buffer, in string varargsParm);
Same as somtGetShortCParamList except that the method receiver and any implicit method arguments (Environment and Context) are included. The types of the method parameters are given in C form (with pointer stars, where needed) rather than in the IDL form.
string somtGetShortParamNameList(in string buffer, in string selfParm, in string varargsParm);
Returns the parameter list for this method in call form (without types). The argument list is built in <buffer> and the address of <buffer> is returned. Parameters are delimited with newlines.
If this method takes a variable number of arguments then the final parameter is replaced by <varargsParm>, unless <varargsParm> is NULL in which case the final parameter is removed.
If <selfParm> is not null then it is added as an initial parameter. (The <selfParm> string may actually contain multiple parameters, delimited by newline characters.)
The method receiver and any implicit method arguments are NOT included.
string somtGetFullParamNameList(in string buffer, in string varargsParm);
Same as somtGetParamNameList except that the method receiver and any implicit method arguments (Environment and Context) are included.
SOMTParameterEntryC somtGetNthParameter(in short n);
Returns the object representing the nth explicit method parameter.
SOMTStructEntryC somtGetFirstException();
The first exception this method raises.
SOMTStructEntryC somtGetNextException();
The next exception this method raises, relative to the previous call to this method or to somtGetFirstException.
readonly attribute string *somtContextArray;
An array of the context string-literals for the method.
readonly attribute string somtCReturnType;
The C datatype the method returns. This may not correspond to the IDL data type (in particular, pointer stars may be added).
readonly attribute SOMTModuleEntryC somtOuterModule;
The module enclosing this module, or NULL if there is none.
readonly attribute string somtModuleFile;
The name of the file in which the module appears.
SOMTStructEntryC somtGetFirstModuleStruct();
SOMTStructEntryC somtGetNextModuleStruct();
SOMTTypedefEntryC somtGetFirstModuleTypedef();
SOMTTypedefEntryC somtGetNextModuleTypedef();
SOMTUnionEntryC somtGetFirstModuleUnion();
SOMTUnionEntryC somtGetNextModuleUnion();
SOMTEnumEntryC somtGetFirstModuleEnum();
SOMTEnumEntryC somtGetNextModuleEnum();
SOMTConstEntryC somtGetFirstModuleConstant();
SOMTConstEntryC somtGetNextModuleConstant();
SOMTSequenceEntryC somtGetFirstModuleSequence();
SOMTSequenceEntryC somtGetNextModuleSequence();
SOMTClassEntryC somtGetFirstInterface();
SOMTClassEntryC somtGetNextInterface();
SOMTModuleEntryC somtGetFirstModule();
SOMTModuleEntryC somtGetNextModule();
SOMTEntryC somtGetFirstModuleDef();
SOMTEntryC somtGetNextModuleDef();
readonly attribute somtParameterDirectionT somtParameterDirection;
The direction for this parameter. (somtInE, somtOutE, or somtInOutE).
readonly attribute string somtIDLParameterDeclaration;
The IDL declaration of the parameter, including the type and name.
readonly attribute string somtCParameterDeclaration;
The declaration for the parameter within a C method procedure prototype. It includes the parameter's type and name. This may differ from the parameter's IDL declaration. In particular, pointer stars may be added.
readonly attribute string somtPascalParameterDeclaration;
The declaration for the parameter within a Pascal method procedure prototype. It includes the parameter's type and name. This may differ from the parameter's IDL declaration. In particular, pointer stars may be added.
readonly attribute string somtPassthruBody;
The source content text of this passthru entry without any modification. Newlines that were present in the source will still be present.
readonly attribute string somtPassthruLanguage;
Returns the name of the language for which this passthru entry is intended. Language names are always all upper case.
readonly attribute string somtPassthruTarget;
Returns the target for this passthru entry.
boolean somtIsBeforePassthru();
Returns 1 (true) if this passthru entry is to be put at the beginning of the file or 0 (false) if this passthru entry is to go later in the file.
readonly attribute long somtSeqLength;
The length of the sequence.
readonly attribute SOMTEntryC somtSeqType;
The type of the sequence.
readonly attribute long somtStringLength;
The length of the string.
SOMTTypedefEntryC somtGetFirstMember();
The first member of the struct.
SOMTTypedefEntryC somtGetNextMember();
The next member of the struct, relative to the previous call to this method or somtGetFirstMember.
readonly attribute SOMTClassEntryC somtStructClass;
The class in which the structure was defined.
readonly attribute boolean somtIsException;
Whether the structure is really an exception.
void somtAddSectionDefinitions(in string defString);
Add section definitions from <defString> buffer to Symbol table.
attribute somtCommentStyleT somtCommentStyle;
Set style of output comment. Supported styles are:
attribute long somtLineLength;
Line length limit. At least on list item will be output.
attribute boolean somtCommentNewline;
Output comment block from new line flag.
boolean somtCheckSymbol(in string name);
Return TRUE id symbol <name> exists in Symbol Table.
string somtExpandSymbol(in string s, in string buf);
string somtGetSymbol(in string name);
Return symbol value for <name> from Symbol table.
void somto(in string tmplt);
Outputs a template, <tmplt>, after substitution for any symbols that occur in it. Five substitutions are supported: simple, list, comment, tab, and conditional.
Substitutable items in the template are bracketed with angle brackets. (Backslash can be used to escape an angle bracket.)
Simple substitutions just replace a symbol with its value. If the symbol has no value in this template object then the symbol is replaced error string but no error is raised.
List substitution assumes that the symbol has a value in output template list form. This is a newline separated string of values. The list substitution specification consists of four parts, a prefix, a symbol, a separator, and a list indicator. prefixes and separators can only be composed of blanks, comma, colons, and semi-colons. The list indicator is “…” (three periods). For example, the list substitution specification “<, name, …> has a prefix of ”, “, a symbol of “name” and a separator of ”, “. The prefix will be used whenever there is at least one item in the list and the separator will be used between any two list items. After the first items of a list is placed each additional item is evaluated to see if it would begin after the line length limit (set by _set_somtLineLength), if it would then a new line is begun and the value is placed directly under the first item. Comment substitution assumes that the symbol has a value in output template list form. A comment specification consists of a comment indicator followed by a symbol name. The comment indicator is ”–“. Eg, <-- classComment> is a valid comment substitution specification. The lines of the comment are output according to the current comment style (see <somtCommentStyle>) and aligned with the starting column of the comment specification. Tab substitution is specified by <@dd> where “dd” is a valid positive integer. Blanks will be inserted into the output stream if necessary to position the next character of output at the column indicated by “dd”.
Conditional substitution is specified by putting a question mark, ”?“, in column one of the template line. The line will not be output at all unless at least one valid, non-blank, symbol substitution occurs on the line.
Note: Due design error in IBM SOM 3.0 this method can't be fully replaced. You can do some preprocessing of <templ> and call parent method. This is due direct usage of FILE structure in somto method. This means you can't write to file using standard C file functions because FILE structure is a compiler depended. But you don't know which compiler was used for. Header files contains compiler-independed file functions (somtok*), but no any of this functions, except two ones, exported in SOM DLLs. So, if you want to fully replace this method then you need also replace lot of other methods and functions of Emitter Framework and SOM Compiler library. For IBM SOM 2.1 all seems to be ok, but you must use somtok* functions from SOMC.DLL, not standard C runtime for file operations.
void somtOutputComment(in string comment);
Outputs comment using comment style settings.
Note: Due design error in IBM SOM 3.0 this method can't be fully replaced. You can do some preprocessing of <comment> and call parent or somto method. This is due direct usage of FILE structure in somto method. This means you can't write to file using standard C file functions because FILE structure is a compiler depended. But you don't know which compiler was used for. Header files contains compiler-independed file functions (somtok*), but no any of this functions, except two ones, exported in SOM DLLs. So, if you want to fully replace this method then you need also replace lot of other methods and functions of Emitter Framework and SOM Compiler library. For IBM SOM 2.1 all seems to be ok, but you must use somtok* functions from SOMC.DLL, not standard C runtime for file operations.
void somtOutputSection(in string sectionName);
Same as somto method, but template read from Symbol table with key equal to sectionName. Uses somto method for actual output.
void somtReadSectionDefinitions(inout FILE fp);
This method reads sections from template file and stores them in Symbol table. fp is a value returned by somtOpenSymbolsFile method of SOMTEmitC class.
Note: Due design error in IBM SOM 3.0 this method can't be replaced. This is due unknown structure of FILE type. This means you can't read file using standard C file functions because FILE structure is a compiler depended. But you don't know which compiler was used for. Header files contains compiler-independed file functions (somtok*), but no any of this functions, except two ones, exported in SOM DLLs. So, if you want to fully replace this method then you need also replace lot of other methods and functions of Emitter Framework and SOM Compiler library. For IBM SOM 2.1 all seems to be ok, but you must use somtok* functions from SOMC.DLL, not standard C runtime for file operations.
void somtSetOutputFile(inout FILE fp);
Pass FILE structure to object to use for file I/O. fp is a value returned by somtOpenEmitFile or somtOpenEmitFileSL.
Note: FILE structure must be same as in other I/O methods and functions.
void somtSetSymbol(in string name, in string value);
Set symbol name in Symbol table to value. name and value must be allocated using SOMMaloc function. It will be deallocated using SOMFree on object destroying.
void somtSetSymbolCopyBoth(in string name, in string value);
Same as somtSetSymbol but name and value will be copied to internally allocated buffer.
void somtSetSymbolCopyName(in string name, in string value);
Same as somtSetSymbol but name will be copied to internally allocated buffer.
void somtSetSymbolCopyValue(in string name, in string value);
Same as somtSetSymbol but value will be copied to internally allocated buffer.
readonly attribute SOMTEntryC somtTypedefType;
The type of the typedef. This does not include pointer stars or array declarators. These must be obtained by examining each of the declarators.
SOMTCommonEntryC somtGetFirstDeclarator();
The first declarator for this typedef. Declarators of struct members will be instances of SOMTDataEntryC, while declarators of typedefs will be instances of SOMTUserDefinedTypeEntryC.
SOMTCommonEntryC somtGetNextDeclarator();
The next declarator for this typedef, relative to the previous call to this method or somtGetFirstDeclarator. Declarators of struct members will be instances of SOMTDataEntryC, while declarators of typedefs will be instances of SOMTUserDefinedTypeEntryC.
readonly attribute SOMTEntryC somtSwitchType;
The switch type of the union.
somtCaseEntry *somtGetFirstCaseEntry();
The first case for the union.
somtCaseEntry *somtGetNextCaseEntry();
The next case for the union, relative to the previous call to this method or to somtGetFirstCaseEntry.
readonly attribute SOMTTypedefEntryC somtOriginalTypedef;
The typedef that defined the user-defined type.
readonly attribute SOMTEntryC somtBaseTypeObj;
The object representing the base type (eg. short, float, unsigned long) of a user-defined type, skipping over any intermediate user-defined types.
interface SOMStringTableC : SOMObject
Объектами класса SOMStringTableC являются символьные таблицы, которые отображают строки на строки (ключ-значение, ассоциативные массивы). Любой экземпляр класса может хранить неограниченное число элементов. При увеличении количества строк время поиска строки увеличивается. В отличие от IBM SOM в данной реализации не используются хэш-таблицы.
attribute unsigned long somstTargetCapacity;
Емкость ассоциативного массива. Значение не влияет на работу и сохранено для совместимости. В IBM SOM данный атрибут определял размер хэш-таблицы. Данный атрибут должен выставляться до вызова любого из методов данного класса
readonly attribute unsigned long somstAssociationsCount;
Текущее число ассоциаций в массиве
short somstAssociate(in string key, in string value);
Устанавливает связь <key> и <value>. Возвращает 0, если связь не может быть установлена (<key> нулевой или недостаточно памяти); -1 - ассоциация успешна выполнена, но <key> уже имел значение до вызова метода, 1 - ассоциация успешно выполнена и <key> не существовал. Замечание: массив сохраняет ссылки на <key> и <value>, передаваемые в аргументах. Копия значений <key> и <value> не создается. При уничтожении объекта память, занимаемая <key> и <value> освобождается с помощью SOMFree, т.е. память под <key> и <value> должна быть выделена с помощью SOMMalloc и аналогичных функций. Замечание: При замене <value> при имеющемся <key> старое <value> заменаяется, память не освобождается
short somstAssociateCopyKey(in string key, in string value);
То же, что и <somstAssociate>, но массив содержит копии значений <key>. Значение <key> копируется в выделяемую с помощью SOMMalloc память.
short somstAssociateCopyValue(in string key, in string value);
То же, что и <somstAssociate>, но массив содержит копии значений <value>. Значение <value> копируется в выделяемую с помощью SOMMalloc память.
short somstAssociateCopyBoth(in string key, in string value);
То же, что и <somstAssociate>, но массив содержит копии значений <key> и <value>. Значения <key> и <value> копируются в выделяемую с помощью SOMMalloc память.
string somstGetAssociation(in string key);
Возвращается строка, ассоциированная с <key>, или NULL, если нет ассоциации. Массив продолжает хранить указатель на значение.
boolean somstClearAssociation(in string key);
The association for <key>, if any, is removed.1 is returned if <key> had an association, and 0 is returned if it did not.
string somstGetIthKey(in unsigned long i);
Возвращает ключевую часть <i>-й по счету ассоциации. Если нет ассоциации, то возвращает NULL. Порядок ассоциации в массиве не определен, но остается постоянным до следующей модификации.
string somstGetIthValue(in unsigned long i);
Возвращает значимую часть <i>-й по счету ассоциации. Если нет ассоциации, то возвращает NULL. Порядок ассоциации в массиве не определен, но остается постоянным до следующей модификации.
SOMEXTERN char * SOMLINK somtStrDup(char *str);
Allocate memory and duplicate string str
SOMEXTERN char * SOMLINK somtEntryTypeName(SOMTTypes type);
Return string representation of type of Entry structure except special case SOMTEmitterBeginE and SOMTEmitterEndE types.
SOMEXTERN void SOMLINK somtShowEntry(Entry * ep);
Output using somPrintf information about Entry structure.
SOMEXTERN char * SOMLINK somtStrCat(int count,...);
Concatenate count of strings.
SOMEXTERN char * SOMLINK somtMakeIncludeStr(boolean local, char *stem, char *suffix);
Produce include string for local (include ”“) or global (include <>) using file stem as file name and suffix as file extension.
SOMEXTERN char * SOMLINK somtNewSymbol(char *prefix, char *stem);
Allocate memory and produce string from prefix and stem.
SOMEXTERN char * SOMLINK somtGetFileStem(char *fullName);
Allocate memory and return file stem from file name.
SOMEXTERN SOMTEntryC * SOMLINK somtGetObjectWrapper(Entry * ep);
Return SOMT*EntryC object for ep Entry structure.
Mapping of Entry types to SOMT*EntryC classes:
Entry type | Emitter Framework Class |
---|---|
SOMTArgumentE | SOMTParameterEntryC |
SOMTAttE | SOMTAttributeEntryC |
SOMTBadEntryE | Fatal error |
SOMTBaseE | SOMTBaseClassEntryC |
SOMTClassE | SOMTClassEntryC |
SOMTConstE | SOMTConstEntryC |
SOMTDataE | SOMTDataEntryC |
SOMTEnumBE | SOMTEnumNameEntryC |
SOMTEnumE | SOMTEnumEntryC |
SOMTEnumPE | SOMTEnumEntryC |
SOMTFloatBE | SOMTEntryC |
SOMTAnyBE | SOMTEntryC |
SOMTGroupE | SOMTEntryC |
SOMTCopyrightE | SOMTEntryC |
SOMTLongBE | SOMTEntryC |
SOMTNegativeBE | SOMTEntryC |
SOMTOctetBE | SOMTEntryC |
SOMTTypeCodeBE | SOMTEntryC |
SOMTBooleanBE | SOMTEntryC |
SOMTCaseEntryE | SOMTEntryC |
SOMTCaseListE | SOMTEntryC |
SOMTCaseSTME | SOMTEntryC |
SOMTCharBE | SOMTEntryC |
SOMTDclListE | SOMTEntryC |
SOMTDefaultE | SOMTEntryC |
SOMTDoubleBE | SOMTEntryC |
SOMTEBaseE | SOMTEntryC |
SOMTEEnumE | SOMTEntryC |
SOMTShortBE | SOMTEntryC |
SOMTStringBE | SOMTEntryC |
SOMTUnsignedLongBE | SOMTEntryC |
SOMTUnsignedShortBE | SOMTEntryC |
SOMTVoidBE | SOMTEntryC |
SOMTVoidPtrBE | SOMTEntryC |
SOMTMetaE | SOMTMetaClassEntryC |
SOMTModuleE | SOMTModuleEntryC |
SOMTNewMethodE | SOMTMethodEntryC |
SOMTOverriddenMethodE | SOMTMethodEntryC |
SOMTOverrideMethodE | SOMTMethodEntryC |
SOMTPassthruE | SOMTPassthruEntryC |
SOMTSequenceE | SOMTSequenceEntryC |
SOMTSequenceTDE | SOMTSequenceEntryC |
SOMTStringE | SOMTStringEntryC |
SOMTStructE | SOMTStructEntryC |
SOMTStructPE | SOMTStructEntryC |
SOMTStructSE | SOMTStructEntryC |
SOMTTyDclE | SOMTTypedefEntryC |
SOMTTypedefE | SOMTTypedefEntryC |
SOMTTypedefBE | SOMTUserDefinedTypeEntryC |
SOMTUnionE | SOMTUnionEntryC |
SOMTUnionPE | SOMTUnionEntryC |
SOMTUnionSE | SOMTUnionEntryC |
SOMTEmitterBeginE | Fatal error |
SOMTEmitterEndE | Fatal error |
Tools Reference |
MKMSGF MSGEXTRT MSGBIND BIND JWASM UNI IPFC |
somFree Compiler and Emitter framework |
User's Guide Programmer's Guide Programmer's Reference |