gCAD3D 2.35
xa_ed_mem.h File Reference

Go to the source code of this file.

Functions

 typedef_MemTab (ObjSRC)
 
int APED_find_dep__ (MemTab(ObjSRC)*oa, int typ, long dbi)
 
char * APED_onam_search (char *ps, char *pe)
 
char * APED_nxt_obj (char *cps)
 
char * APED_lNr_objNam (long *lNr, long *lLen, char **oNam, char *wTab[], long lSta)
 
int APED_search_defLn (char **lSta, long *lNr, int *lLen, char *otx, long lNEnd, int src)
 
int APED_objID_defLn (char *oid, char *defLn)
 

Function Documentation

typedef_MemTab ( ObjSRC  )
int APED_find_dep__ ( MemTab(ObjSRC)*  oa,
int  typ,
long  dbi 
)
APED_find_dep__ find all depending sourceObjs
Example:
#include "../ut/ut_memTab.h" // MemTab
MemTab(ObjSRC) delTab = MemTab_empty;
APED_find_dep__ (&delTab, typ, dbi);
printf(" nr of dep.objs = %d\n",delTab.rNr);
MemTab_free (&delTab);
char* APED_onam_search ( char *  ps,
char *  pe 
)
APED_onam_search search objName between ps and pe
returns position of 1.char after " #" or NULL
char* APED_nxt_obj ( char *  cps)
find next obj in string; skip brackets.
InPut:
cps startpos (previous obj)
OutPut:
RetCod startpos of next obj or NULL (end of string)
if it is '(' then skip brackets;
if its ' ' or ',' then skip this char; nxt obj found.
char* APED_lNr_objNam ( long *  lNr,
long *  lLen,
char **  oNam,
char *  wTab[],
long  lSta 
)
get next line with objName containing all filterwords (OR)
if wTab is empty, next srcline is returned.
Input:
wTab filtertext (a list of words, terminated with NULL)
lSta first sourcelinNr where to search;
Output:
lNr sourcelinNr found
lLen length of sourceline (incl name)
oNam pointer to found objName
RetCod:
NULL no (more) line found
!= NULL OK, startpos of sourceline found
wTab: use UTX_wTab_str
int APED_search_defLn ( char **  lSta,
long *  lNr,
int *  lLen,
char *  otx,
long  lNEnd,
int  src 
)
Search last DefinitionLine
In:
otx zu suchendes Obj; zB "L20"
lNEnd ab (incl) dieser Zeile nicht mehr suchen. -1: bis zum Ende.
src 0=UTF_FilBuf0; 1=UTF_FilBuf1
Out:
lSta Posi, wo spaeter weitergesucht wird ..
ist Pointer auf den beginn der gefundenen Zeile ..
lNr gefundene zeilenNummer; erste Zeile == 1.
lLen Laenge der Zeile incl \n (und bei MS-Win \r)
RetCod:
-1 Error, def.line does not exist.
0 OK, def.line found
1 OK, def.line found, but without ending '\n'
see also:
AP_search_def
AP_search_obj / UTF_GetLinNr
UTF_del_rest
int APED_objID_defLn ( char *  oid,
char *  defLn 
)
APED_objID_defLn copy definitionHdr out (left of '=')
maxSiz of oid = 32 chars