IF $(argc) = 5,6 ELSE ERROR Falsche Parameteranzahl: Syntax aisc xxx.pa xxx.aisc outfile exeternfile [import_proto] ENDIF # ************** LOAD DATA ************** DATA AISC { $(#FILE $(argv[2])) }; OPEN save $(argv[3]) # ************** TABSTOPS *************** TABSTOP 8 CREATE $(i) FOR $(i) = 0 TO 9 TAB $(i) $(* 8,$(i)) ENDFOR # ************** SET CURSOR ********** MOVETO $(AISC/PROJECT) OUT save MOVETO $(DATA/.) P /********************************************************************* P * Created automagically from $(argv[2]) P * using aisc-script 'aisc_debug_globals.pa' P * DO NOT EDIT THIS FILE!!! P *********************************************************************/$n # ************** PRINT INCLUDES ********** #P #include P #include P #include P #include P extern int aisc_core_on_error; P extern aisc_com *aisc_client_link; P #ifdef __cplusplus P extern "C" { P char *aisc_debug_local(aisc_com *,enum Attributes_Header_List, void *,const char *, ...); P } P #else P char *aisc_debug_local(); P #endif # ************** BUILD CALLING FUNCTION FOR EACH STRUCTURE ********** CREATE $(str) 0 CREATE $(keys) FOR $(STRUCT) IF $(SKEY) P $n$n/* ********** $(SDOCU|$(STRUCT)) ***************/ P static char *aisc_debug_$(STRUCT)(aisc_com *link,void *object) P { PUSH SET $(keys) # ************** BUILD KEY_LIST ********** CALL struct_attr,$(SKEY)_ POP P $1return aisc_debug_local(link,$(OBJECT_KEY)_$(SKEY),object, P $1"$(keys)undef", P $1$(keys)(long)0); P }$n ENDIF ENDFOR # ************** BUILD MAIN DEBUG FUNCTION ********** P const char *md2(void *object) P { P $1static int key;$n$1char *s;$n$1aisc_com *link; P $1link = aisc_client_link;aisc_core_on_error = 0; P $1if (aisc_get(link,$(OBJECT_KEY)_COMMON, (long)object, P $1COMMON_KEY, &key,NULL)) P $2{ aisc_core_on_error = 1; P $2return "unknown object"; P $1}; P $1switch(key) { FOR $(STRUCT) IF $(JOINED) ELSEIF $(SKEY) P $2 case $(OBJECT_KEY)_$(SKEY):$5s=aisc_debug_$(STRUCT)(link,object);break; ENDIF ENDFOR P $2 default:$5s = 0; break; P $1}; P $1 aisc_core_on_error = 1; P $1 return s; P } CLOSE save EXIT # ************** BUILD KEY_LIST ********** FUNCTION struct_attr,s FOR $({/TYPE) IF $(KEY) IF $(REF) ~ %,*,v ELSEIF $(TYPE) = dllh SET $(keys) $(keys)$(s)PRED,$(s)NEXT, SET $(str) $(s)$(KEY) PUSH MOVETO $(/AISC/DATA/STRUCT.dll_header) CALL struct_attr $(str) POP ELSEIF $(REF) ~ s SET $(str) $(s)$(KEY) PUSH MOVETO $(/AISC/DATA/STRUCT.$(TYPE)) CALL struct_attr $(str) POP ELSEIF $(REF) ~ e,t,d SET $(keys) $(keys)$(s)$(KEY), ENDIF ENDIF ENDFOR RETURN