ppudump.pp 42 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483
  1. {
  2. $Id$
  3. Copyright (c) 1998-2000 by the FPC Development Team
  4. Dumps the contents of a FPC unit file (PPU File)
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16. ****************************************************************************}
  17. {$ifdef TP}
  18. {$N+,E+}
  19. {$endif}
  20. program pppdump;
  21. uses
  22. {$ifdef go32v2}
  23. dpmiexcp,
  24. {$endif go32v2}
  25. ppu;
  26. const
  27. Version = 'Version 0.99.13';
  28. Title = 'PPU-Analyser';
  29. Copyright = 'Copyright (c) 1998-2000 by the Free Pascal Development Team';
  30. { verbosity }
  31. v_none = $0;
  32. v_header = $1;
  33. v_defs = $2;
  34. v_syms = $4;
  35. v_interface = $8;
  36. v_implementation = $10;
  37. v_browser = $20;
  38. v_all = $ff;
  39. var
  40. ppufile : pppufile;
  41. space : string;
  42. read_member : boolean;
  43. verbose : longint;
  44. {****************************************************************************
  45. Helper Routines
  46. ****************************************************************************}
  47. const has_errors : boolean = false;
  48. Procedure Error(const S : string);
  49. Begin
  50. Writeln(S);
  51. has_errors:=true;
  52. End;
  53. Function Target2Str(w:longint):string;
  54. type
  55. ttarget = (target_none
  56. ,target_i386_GO32V1,target_i386_GO32V2,target_i386_linux,
  57. target_i386_OS2,target_i386_Win32
  58. ,target_m68k_Amiga,target_m68k_Atari,target_m68k_Mac,
  59. target_m68k_linux,target_m68k_PalmOS
  60. );
  61. const
  62. Targets : array[ttarget] of string[10]=('none',
  63. 'GO32V1','GO32V2','Linux-i386','OS/2','Win32',
  64. 'Amiga','Mac68k','Atari','Linux-m68k','PalmOs');
  65. begin
  66. if w<=ord(high(ttarget)) then
  67. Target2Str:=Targets[ttarget(w)]
  68. else
  69. Target2Str:='<Unknown>';
  70. end;
  71. Function Cpu2Str(w:longint):string;
  72. type
  73. ttargetcpu=(no_cpu
  74. ,i386,m68k,alpha
  75. );
  76. const
  77. CpuTxt : array[ttargetcpu] of string[5]=
  78. ('none','i386','m68k','alpha');
  79. begin
  80. if w<=ord(high(ttargetcpu)) then
  81. Cpu2Str:=CpuTxt[ttargetcpu(w)]
  82. else
  83. Cpu2Str:='<Unknown>';
  84. end;
  85. function PPUFlags2Str(flags:longint):string;
  86. type
  87. tflagopt=record
  88. mask : longint;
  89. str : string[30];
  90. end;
  91. const
  92. flagopts=11;
  93. flagopt : array[1..flagopts] of tflagopt=(
  94. (mask: $1 ;str:'init'),
  95. (mask: $2 ;str:'final'),
  96. (mask: $4 ;str:'big_endian'),
  97. (mask: $8 ;str:'dbx'),
  98. (mask: $10 ;str:'browser'),
  99. (mask: $20 ;str:'in_library'),
  100. (mask: $40 ;str:'smart_linked'),
  101. (mask: $80 ;str:'static_linked'),
  102. (mask: $100 ;str:'shared_linked'),
  103. (mask: $200 ;str:'local_browser'),
  104. (mask: $400 ;str:'no_link')
  105. );
  106. var
  107. i : longint;
  108. first : boolean;
  109. s : string;
  110. begin
  111. s:='';
  112. if flags<>0 then
  113. begin
  114. first:=true;
  115. for i:=1to flagopts do
  116. if (flags and flagopt[i].mask)<>0 then
  117. begin
  118. if first then
  119. first:=false
  120. else
  121. s:=s+', ';
  122. s:=s+flagopt[i].str;
  123. end;
  124. end
  125. else
  126. s:='none';
  127. PPUFlags2Str:=s;
  128. end;
  129. const
  130. HexTbl : array[0..15] of char='0123456789ABCDEF';
  131. function HexB(b:byte):string;
  132. begin
  133. HexB[0]:=#2;
  134. HexB[1]:=HexTbl[b shr 4];
  135. HexB[2]:=HexTbl[b and $f];
  136. end;
  137. {****************************************************************************
  138. Read Routines
  139. ****************************************************************************}
  140. Procedure ReadLinkContainer(const prefix:string);
  141. {
  142. Read a serie of strings and write to the screen starting every line
  143. with prefix
  144. }
  145. function maskstr(m:longint):string;
  146. const
  147. { link options }
  148. link_none = $0;
  149. link_allways = $1;
  150. link_static = $2;
  151. link_smart = $4;
  152. link_shared = $8;
  153. var
  154. s : string;
  155. begin
  156. s:='';
  157. if (m and link_allways)<>0 then
  158. s:=s+'always ';
  159. if (m and link_static)<>0 then
  160. s:=s+'static ';
  161. if (m and link_smart)<>0 then
  162. s:=s+'smart ';
  163. if (m and link_shared)<>0 then
  164. s:=s+'shared ';
  165. maskstr:=s;
  166. end;
  167. var
  168. s : string;
  169. m : longint;
  170. begin
  171. while not ppufile^.endofentry do
  172. begin
  173. s:=ppufile^.getstring;
  174. m:=ppufile^.getlongint;
  175. WriteLn(prefix,s,' (',maskstr(m),')');
  176. end;
  177. end;
  178. Procedure ReadContainer(const prefix:string);
  179. {
  180. Read a serie of strings and write to the screen starting every line
  181. with prefix
  182. }
  183. begin
  184. while not ppufile^.endofentry do
  185. WriteLn(prefix,ppufile^.getstring);
  186. end;
  187. Procedure ReadRef;
  188. begin
  189. if (verbose and v_browser)=0 then
  190. exit;
  191. while (not ppufile^.endofentry) and (not ppufile^.error) do
  192. Writeln(space,' - Refered : ',ppufile^.getword,', (',ppufile^.getlongint,',',ppufile^.getword,')');
  193. end;
  194. Procedure ReadPosInfo;
  195. begin
  196. Writeln(ppufile^.getword,' (',ppufile^.getlongint,',',ppufile^.getword,')');
  197. end;
  198. function readderef(const s:string;skipnil:boolean):boolean;
  199. type
  200. tdereftype = (derefnil,derefaktrecordindex,derefaktstaticindex,
  201. derefunit,derefrecord,derefindex,
  202. dereflocal,derefpara,derefaktlocalindex);
  203. var
  204. b : tdereftype;
  205. begin
  206. readderef:=true;
  207. repeat
  208. b:=tdereftype(ppufile^.getbyte);
  209. case b of
  210. derefnil :
  211. begin
  212. if not skipnil then
  213. writeln('nil');
  214. readderef:=false;
  215. break;
  216. end;
  217. derefaktrecordindex :
  218. begin
  219. writeln('AktRecord ',s,' ',ppufile^.getword);
  220. break;
  221. end;
  222. derefaktstaticindex :
  223. begin
  224. writeln('AktStatic ',s,' ',ppufile^.getword);
  225. break;
  226. end;
  227. derefaktlocalindex :
  228. begin
  229. writeln('AktLocal ',s,' ',ppufile^.getword);
  230. break;
  231. end;
  232. derefunit :
  233. begin
  234. writeln('Unit ',ppufile^.getword);
  235. break;
  236. end;
  237. derefrecord :
  238. begin
  239. write('RecordDef ',ppufile^.getword,', ');
  240. end;
  241. derefpara :
  242. begin
  243. write('Parameter of procdef ',ppufile^.getword,', ');
  244. end;
  245. dereflocal :
  246. begin
  247. write('Local of procdef ',ppufile^.getword,', ');
  248. end;
  249. derefindex :
  250. begin
  251. write(s,' ',ppufile^.getword,', ');
  252. end;
  253. else
  254. begin
  255. writeln('!! unsupported dereftyp: ',ord(derefindex));
  256. break;
  257. end;
  258. end;
  259. until false;
  260. end;
  261. function readdefref:boolean;
  262. begin
  263. readdefref:=readderef('Definition',false);
  264. end;
  265. function readsymref:boolean;
  266. begin
  267. readsymref:=readderef('Symbol',false);
  268. end;
  269. procedure readtype;
  270. var
  271. b1,b2 : boolean;
  272. begin
  273. b1:=readderef('Definition',true);
  274. b2:=readderef('Symbol',true);
  275. if not(b1 or b2) then
  276. Writeln('nil')
  277. else
  278. if (b1 and b2) then
  279. Writeln('!! Type has both definition and symbol stored');
  280. end;
  281. procedure readsymlist(const s:string);
  282. begin
  283. readdefref;
  284. repeat
  285. write(s);
  286. if not readsymref then
  287. break;
  288. until false;
  289. end;
  290. procedure read_abstract_proc_def;
  291. type
  292. tproccalloption=(pocall_none,
  293. pocall_clearstack, { Use IBM flat calling convention. (Used by GCC.) }
  294. pocall_leftright, { Push parameters from left to right }
  295. pocall_cdecl, { procedure uses C styled calling }
  296. pocall_register, { procedure uses register (fastcall) calling }
  297. pocall_stdcall, { procedure uses stdcall call }
  298. pocall_safecall, { safe call calling conventions }
  299. pocall_palmossyscall, { procedure is a PalmOS system call }
  300. pocall_system,
  301. pocall_inline, { Procedure is an assembler macro }
  302. pocall_internproc, { Procedure has compiler magic}
  303. pocall_internconst { procedure has constant evaluator intern }
  304. );
  305. tproccalloptions=set of tproccalloption;
  306. tproctypeoption=(potype_none,
  307. potype_proginit, { Program initialization }
  308. potype_unitinit, { unit initialization }
  309. potype_unitfinalize, { unit finalization }
  310. potype_constructor, { Procedure is a constructor }
  311. potype_destructor, { Procedure is a destructor }
  312. potype_operator { Procedure defines an operator }
  313. );
  314. tproctypeoptions=set of tproctypeoption;
  315. tprocoption=(po_none,
  316. po_classmethod, { class method }
  317. po_virtualmethod, { Procedure is a virtual method }
  318. po_abstractmethod, { Procedure is an abstract method }
  319. po_staticmethod, { static method }
  320. po_overridingmethod, { method with override directive }
  321. po_methodpointer, { method pointer, only in procvardef, also used for 'with object do' }
  322. po_containsself, { self is passed explicit to the compiler }
  323. po_interrupt, { Procedure is an interrupt handler }
  324. po_iocheck, { IO checking should be done after a call to the procedure }
  325. po_assembler, { Procedure is written in assembler }
  326. po_msgstr, { method for string message handling }
  327. po_msgint, { method for int message handling }
  328. po_exports, { Procedure has export directive (needed for OS/2) }
  329. po_external, { Procedure is external (in other object or lib)}
  330. po_savestdregs, { save std regs cdecl and stdcall need that ! }
  331. po_saveregisters { save all registers }
  332. );
  333. tprocoptions=set of tprocoption;
  334. type
  335. tproccallopt=record
  336. mask : tproccalloption;
  337. str : string[30];
  338. end;
  339. tproctypeopt=record
  340. mask : tproctypeoption;
  341. str : string[30];
  342. end;
  343. tprocopt=record
  344. mask : tprocoption;
  345. str : string[30];
  346. end;
  347. const
  348. proccallopts=12;
  349. proccallopt : array[1..proccallopts] of tproccallopt=(
  350. (mask:pocall_none; str:''),
  351. (mask:pocall_clearstack; str:'ClearStack'),
  352. (mask:pocall_leftright; str:'LeftRight'),
  353. (mask:pocall_cdecl; str:'Cdecl'),
  354. (mask:pocall_register; str:'Register'),
  355. (mask:pocall_stdcall; str:'StdCall'),
  356. (mask:pocall_safecall; str:'SafeCall'),
  357. (mask:pocall_palmossyscall;str:'PalmOSSysCall'),
  358. (mask:pocall_system; str:'System'),
  359. (mask:pocall_inline; str:'Inline'),
  360. (mask:pocall_internproc; str:'InternProc'),
  361. (mask:pocall_internconst; str:'InternConst')
  362. );
  363. proctypeopts=6;
  364. proctypeopt : array[1..proctypeopts] of tproctypeopt=(
  365. (mask:potype_proginit; str:'ProgInit'),
  366. (mask:potype_unitinit; str:'UnitInit'),
  367. (mask:potype_unitfinalize;str:'UnitFinalize'),
  368. (mask:potype_constructor; str:'Constructor'),
  369. (mask:potype_destructor; str:'Destructor'),
  370. (mask:potype_operator; str:'Operator')
  371. );
  372. procopts=16;
  373. procopt : array[1..procopts] of tprocopt=(
  374. (mask:po_classmethod; str:'ClassMethod'),
  375. (mask:po_virtualmethod; str:'VirtualMethod'),
  376. (mask:po_abstractmethod; str:'AbstractMethod'),
  377. (mask:po_staticmethod; str:'StaticMethod'),
  378. (mask:po_overridingmethod;str:'OverridingMethod'),
  379. (mask:po_methodpointer; str:'MethodPointer'),
  380. (mask:po_containsself; str:'ContainsSelf'),
  381. (mask:po_interrupt; str:'Interrupt'),
  382. (mask:po_iocheck; str:'IOCheck'),
  383. (mask:po_assembler; str:'Assembler'),
  384. (mask:po_msgstr; str:'MsgStr'),
  385. (mask:po_msgint; str:'MsgInt'),
  386. (mask:po_exports; str:'Exports'),
  387. (mask:po_external; str:'External'),
  388. (mask:po_savestdregs; str:'SaveStdRegs'),
  389. (mask:po_saveregisters; str:'SaveRegisters')
  390. );
  391. tvarspez : array[0..2] of string[5]=('Value','Const','Var ');
  392. var
  393. proctypeoption : tproctypeoption;
  394. proccalloptions : tproccalloptions;
  395. procoptions : tprocoptions;
  396. i,params : longint;
  397. first : boolean;
  398. begin
  399. write(space,' Return type : ');
  400. readtype;
  401. writeln(space,' Fpu used : ',ppufile^.getbyte);
  402. proctypeoption:=tproctypeoption(ppufile^.getlongint);
  403. if proctypeoption<>potype_none then
  404. begin
  405. write(space,' TypeOption : ');
  406. first:=true;
  407. for i:=1to proctypeopts do
  408. if (proctypeopt[i].mask=proctypeoption) then
  409. begin
  410. if first then
  411. first:=false
  412. else
  413. write(', ');
  414. write(proctypeopt[i].str);
  415. end;
  416. writeln;
  417. end;
  418. ppufile^.getsmallset(proccalloptions);
  419. if proccalloptions<>[] then
  420. begin
  421. write(space,' CallOptions : ');
  422. first:=true;
  423. for i:=1to proccallopts do
  424. if (proccallopt[i].mask in proccalloptions) then
  425. begin
  426. if first then
  427. first:=false
  428. else
  429. write(', ');
  430. write(proccallopt[i].str);
  431. end;
  432. writeln;
  433. end;
  434. ppufile^.getsmallset(procoptions);
  435. if procoptions<>[] then
  436. begin
  437. write(space,' Options : ');
  438. first:=true;
  439. for i:=1to procopts do
  440. if (procopt[i].mask in procoptions) then
  441. begin
  442. if first then
  443. first:=false
  444. else
  445. write(', ');
  446. write(procopt[i].str);
  447. end;
  448. writeln;
  449. end;
  450. params:=ppufile^.getword;
  451. writeln(space,' Nr of parameters : ',params);
  452. if params>0 then
  453. begin
  454. repeat
  455. write(space,' - ',tvarspez[ppufile^.getbyte],' : ');
  456. readtype;
  457. dec(params);
  458. until params=0;
  459. end;
  460. end;
  461. procedure readcommonsym(const s:string);
  462. type
  463. tsymoption=(sp_none,
  464. sp_public,
  465. sp_private,
  466. sp_published,
  467. sp_protected,
  468. sp_forwarddef,
  469. sp_static,
  470. sp_primary_typesym { this is for typesym, to know who is the primary symbol of a def }
  471. );
  472. tsymoptions=set of tsymoption;
  473. tsymopt=record
  474. mask : tsymoption;
  475. str : string[30];
  476. end;
  477. const
  478. symopts=7;
  479. symopt : array[1..symopts] of tsymopt=(
  480. (mask:sp_public; str:'Public'),
  481. (mask:sp_private; str:'Private'),
  482. (mask:sp_published; str:'Published'),
  483. (mask:sp_protected; str:'Protected'),
  484. (mask:sp_forwarddef; str:'ForwardDef'),
  485. (mask:sp_static; str:'Static'),
  486. (mask:sp_primary_typesym;str:'PrimaryTypeSym')
  487. );
  488. var
  489. symoptions : tsymoptions;
  490. i : longint;
  491. first : boolean;
  492. begin
  493. writeln(space,'** Symbol Nr. ',ppufile^.getword,' **');
  494. writeln(space,s,ppufile^.getstring);
  495. ppufile^.getsmallset(symoptions);
  496. if symoptions<>[] then
  497. begin
  498. write(space,' File Pos: ');
  499. readposinfo;
  500. write(space,' Options: ');
  501. first:=true;
  502. for i:=1to symopts do
  503. if (symopt[i].mask in symoptions) then
  504. begin
  505. if first then
  506. first:=false
  507. else
  508. write(', ');
  509. write(symopt[i].str);
  510. end;
  511. writeln;
  512. end;
  513. end;
  514. procedure readcommondef(const s:string);
  515. begin
  516. writeln(space,'** Definition Nr. ',ppufile^.getword,' **');
  517. writeln(space,s);
  518. write (space,' Type symbol : ');
  519. readsymref;
  520. end;
  521. {****************************************************************************
  522. Read Symbols Part
  523. ****************************************************************************}
  524. procedure readsymbols;
  525. Const
  526. vo_is_C_var = 2;
  527. Type
  528. absolutetyp = (tovar,toasm,toaddr);
  529. tconsttyp = (constnone,
  530. constord,conststring,constreal,constbool,
  531. constint,constchar,constset,constpointer,constnil,
  532. constresourcestring
  533. );
  534. var
  535. b : byte;
  536. pc : pchar;
  537. totalsyms,
  538. symcnt,
  539. i,j,len : longint;
  540. begin
  541. symcnt:=1;
  542. with ppufile^ do
  543. begin
  544. if space<>'' then
  545. Writeln(space,'-----------------------------');
  546. if readentry=ibstartsyms then
  547. begin
  548. totalsyms:=getlongint;
  549. Writeln(space,'Number of symbols: ',totalsyms);
  550. Writeln(space,'Symtable datasize: ',getlongint);
  551. end
  552. else
  553. begin
  554. totalsyms:=-1;
  555. Writeln('!! ibstartsym not found');
  556. end;
  557. repeat
  558. b:=readentry;
  559. if not (b in [iberror,ibendsyms]) then
  560. inc(symcnt);
  561. case b of
  562. ibunitsym :
  563. readcommonsym('Unit symbol ');
  564. iblabelsym :
  565. readcommonsym('Label symbol ');
  566. ibtypesym :
  567. begin
  568. readcommonsym('Type symbol ');
  569. write(space,' Result Type: ');
  570. readtype;
  571. end;
  572. ibprocsym :
  573. begin
  574. readcommonsym('Procedure symbol ');
  575. write(space,' Definition: ');
  576. readdefref;
  577. end;
  578. ibconstsym :
  579. begin
  580. readcommonsym('Constant symbol ');
  581. b:=getbyte;
  582. case tconsttyp(b) of
  583. constord :
  584. begin
  585. write (space,' Ordinal Type : ');
  586. readtype;
  587. writeln (space,' Value : ',getlongint)
  588. end;
  589. constpointer :
  590. begin
  591. write (space,' Pointer Type : ');
  592. readtype;
  593. writeln (space,' Value : ',getlongint)
  594. end;
  595. conststring,
  596. constresourcestring :
  597. begin
  598. len:=getlongint;
  599. getmem(pc,len+1);
  600. getdata(pc^,len);
  601. writeln(space,' Length : ',len);
  602. writeln(space,' Value : "',pc,'"');
  603. freemem(pc,len+1);
  604. if tconsttyp(b)=constresourcestring then
  605. writeln(space,' Index : ',getlongint);
  606. end;
  607. constreal :
  608. writeln(space,' Value : ',getreal);
  609. constbool :
  610. if getlongint<>0 then
  611. writeln (space,' Value : True')
  612. else
  613. writeln (space,' Value : False');
  614. constint :
  615. writeln(space,' Value : ',getlongint);
  616. constchar :
  617. writeln(space,' Value : "'+chr(getlongint)+'"');
  618. constset :
  619. begin
  620. write (space,' Set Type : ');
  621. readtype;
  622. for i:=1to 4 do
  623. begin
  624. write (space,' Value : ');
  625. for j:=1to 8 do
  626. begin
  627. if j>1 then
  628. write(',');
  629. write(hexb(getbyte));
  630. end;
  631. writeln;
  632. end;
  633. end;
  634. else
  635. Writeln ('!! Invalid unit format : Invalid const type encountered: ',b);
  636. end;
  637. end;
  638. ibvarsym :
  639. begin
  640. readcommonsym('Variable symbol ');
  641. writeln(space,' Type: ',getbyte);
  642. if read_member then
  643. writeln(space,' Address: ',getlongint);
  644. write (space,' Var Type: ');
  645. readtype;
  646. i:=getlongint;
  647. writeln(space,' Options: ',i);
  648. if (i and vo_is_C_var)<>0 then
  649. writeln(space,' Mangledname: ',getstring);
  650. end;
  651. ibenumsym :
  652. begin
  653. readcommonsym('Enumeration symbol ');
  654. write (space,' Definition: ');
  655. readdefref;
  656. writeln(space,' Value: ',getlongint);
  657. end;
  658. ibsyssym :
  659. begin
  660. readcommonsym('Internal system symbol ');
  661. writeln(space,' Internal Nr: ',getlongint);
  662. end;
  663. ibtypedconstsym :
  664. begin
  665. readcommonsym('Typed constant ');
  666. write (space,' Constant Type: ');
  667. readtype;
  668. writeln(space,' Label: ',getstring);
  669. writeln(space,' ReallyConst: ',(getbyte<>0));
  670. end;
  671. ibabsolutesym :
  672. begin
  673. readcommonsym('Absolute variable symbol ');
  674. writeln(space,' Type: ',getbyte);
  675. if read_member then
  676. writeln(space,' Address: ',getlongint);
  677. write (space,' Var Type: ');
  678. readtype;
  679. writeln(space,' Options: ',getlongint);
  680. Write (space,' Relocated to ');
  681. b:=getbyte;
  682. case absolutetyp(b) of
  683. tovar :
  684. Writeln('Name : ',getstring);
  685. toasm :
  686. Writeln('Assembler name : ',getstring);
  687. toaddr :
  688. begin
  689. Write('Address : ',getlongint);
  690. WriteLn(' (Far: ',getbyte<>0,')');
  691. end;
  692. else
  693. Writeln ('!! Invalid unit format : Invalid absolute type encountered: ',b);
  694. end;
  695. end;
  696. ibpropertysym :
  697. begin
  698. readcommonsym('Property ');
  699. write (space,' Prop Type: ');
  700. readtype;
  701. writeln(space,' Options: ',getlongint);
  702. writeln(space,' Index: ',getlongint);
  703. writeln(space,' Default: ',getlongint);
  704. write (space,' Index Type: ');
  705. readtype;
  706. write (space,' Read access: ');
  707. readsymlist(space+' Sym: ');
  708. write (space,' Write access: ');
  709. readsymlist(space+' Sym: ');
  710. write (space,' Stored access: ');
  711. readsymlist(space+' Sym: ');
  712. end;
  713. ibfuncretsym :
  714. begin
  715. readcommonsym('Func return value ');
  716. write (space,' Return Type: ');
  717. readtype;
  718. writeln(space,' Address: ',getlongint);
  719. end;
  720. iberror :
  721. begin
  722. Writeln('!! Error in PPU');
  723. exit;
  724. end;
  725. ibendsyms :
  726. break;
  727. else
  728. WriteLn('!! Skipping unsupported PPU Entry in Symbols: ',b);
  729. end;
  730. if not EndOfEntry then
  731. Writeln('!! Entry has more information stored');
  732. until false;
  733. if (totalsyms<>-1) and (symcnt-1<>totalsyms) then
  734. Writeln('!! Only read ',symcnt-1,' of ',totalsyms,' symbols');
  735. end;
  736. end;
  737. {****************************************************************************
  738. Read defintions Part
  739. ****************************************************************************}
  740. procedure readdefinitions(start_read : boolean);
  741. type
  742. tsettype = (normset,smallset,varset);
  743. tbasetype = (uauto,uvoid,uchar,
  744. u8bit,u16bit,u32bit,
  745. s8bit,s16bit,s32bit,
  746. bool8bit,bool16bit,bool32bit,
  747. u64bit,s64bit);
  748. var
  749. b : byte;
  750. oldread_member : boolean;
  751. totaldefs,
  752. defcnt : longint;
  753. begin
  754. defcnt:=0;
  755. with ppufile^ do
  756. begin
  757. if space<>'' then
  758. Writeln(space,'-----------------------------');
  759. if not start_read then
  760. if readentry=ibstartdefs then
  761. begin
  762. totaldefs:=getlongint;
  763. Writeln(space,'Number of definitions: ',totaldefs);
  764. end
  765. else
  766. begin
  767. totaldefs:=-1;
  768. Writeln('!! ibstartdef not found');
  769. end;
  770. repeat
  771. b:=readentry;
  772. if not (b in [iberror,ibenddefs]) then
  773. inc(defcnt);
  774. case b of
  775. ibpointerdef :
  776. begin
  777. readcommondef('Pointer definition');
  778. write (space,' Pointed Type : ');
  779. readtype;
  780. writeln(space,' Is Far : ',(getbyte<>0));
  781. end;
  782. iborddef :
  783. begin
  784. readcommondef('Ordinal definition');
  785. write (space,' Base type : ');
  786. b:=getbyte;
  787. case tbasetype(b) of
  788. uauto : writeln('uauto');
  789. uvoid : writeln('uvoid');
  790. uchar : writeln('uchar');
  791. u8bit : writeln('u8bit');
  792. u16bit : writeln('u16bit');
  793. u32bit : writeln('s32bit');
  794. s8bit : writeln('s8bit');
  795. s16bit : writeln('s16bit');
  796. s32bit : writeln('s32bit');
  797. bool8bit : writeln('bool8bit');
  798. bool16bit : writeln('bool16bit');
  799. bool32bit : writeln('bool32bit');
  800. u64bit : writeln('u64bit');
  801. s64bit : writeln('s64bit');
  802. else writeln('!! Warning: Invalid base type ',b);
  803. end;
  804. writeln(space,' Range : ',getlongint,' to ',getlongint);
  805. end;
  806. ibfloatdef :
  807. begin
  808. readcommondef('Float definition');
  809. writeln(space,' Float type : ',getbyte);
  810. end;
  811. ibarraydef :
  812. begin
  813. readcommondef('Array definition');
  814. write (space,' Element type : ');
  815. readtype;
  816. write (space,' Range Type : ');
  817. readtype;
  818. writeln(space,' Range : ',getlongint,' to ',getlongint);
  819. writeln(space,' Is Constructor : ',(getbyte<>0));
  820. end;
  821. ibprocdef :
  822. begin
  823. readcommondef('Procedure definition');
  824. read_abstract_proc_def;
  825. writeln(space,' Used Register : ',getbyte);
  826. writeln(space,' Mangled name : ',getstring);
  827. writeln(space,' Number : ',getlongint);
  828. write (space,' Next : ');
  829. readdefref;
  830. write (space,' Class : ');
  831. readdefref;
  832. write (space,' File Pos : ');
  833. readposinfo;
  834. end;
  835. ibprocvardef :
  836. begin
  837. readcommondef('Procedural type (ProcVar) definition');
  838. read_abstract_proc_def;
  839. end;
  840. ibshortstringdef :
  841. begin
  842. readcommondef('ShortString definition');
  843. writeln(space,' Length : ',getbyte);
  844. end;
  845. ibwidestringdef :
  846. begin
  847. readcommondef('WideString definition');
  848. writeln(space,' Length : ',getlongint);
  849. end;
  850. ibansistringdef :
  851. begin
  852. readcommondef('AnsiString definition');
  853. writeln(space,' Length : ',getlongint);
  854. end;
  855. iblongstringdef :
  856. begin
  857. readcommondef('Longstring definition');
  858. writeln(space,' Length : ',getlongint);
  859. end;
  860. ibrecorddef :
  861. begin
  862. readcommondef('Record definition');
  863. writeln(space,' Size : ',getlongint);
  864. {read the record definitions and symbols}
  865. space:=' '+space;
  866. oldread_member:=read_member;
  867. read_member:=true;
  868. readdefinitions(false);
  869. readsymbols;
  870. read_member:=oldread_member;
  871. Delete(space,1,4);
  872. end;
  873. ibobjectdef :
  874. begin
  875. readcommondef('Object/Class definition');
  876. writeln(space,' Size : ',getlongint);
  877. writeln(space,' Vmt offset : ',getlongint);
  878. writeln(space,' Name of Class : ',getstring);
  879. write(space, ' Ancestor Class : ');
  880. readdefref;
  881. writeln(space,' Options : ',getlongint);
  882. {read the record definitions and symbols}
  883. space:=' '+space;
  884. oldread_member:=read_member;
  885. read_member:=true;
  886. readdefinitions(false);
  887. readsymbols;
  888. read_member:=oldread_member;
  889. Delete(space,1,4);
  890. end;
  891. ibfiledef :
  892. begin
  893. ReadCommonDef('File definition');
  894. write (space,' Type : ');
  895. case getbyte of
  896. 0 : writeln('Text');
  897. 1 : begin
  898. writeln('Typed');
  899. write (space,' File of Type : ');
  900. Readtype;
  901. end;
  902. 2 : writeln('Untyped');
  903. end;
  904. end;
  905. ibformaldef :
  906. readcommondef('Generic Definition (void-typ)');
  907. ibenumdef :
  908. begin
  909. readcommondef('Enumeration type definition');
  910. write(space,'Base enumeration type : ');
  911. readdefref;
  912. writeln(space,' Smallest element : ',getlongint);
  913. writeln(space,' Largest element : ',getlongint);
  914. writeln(space,' Size : ',getlongint);
  915. end;
  916. ibclassrefdef :
  917. begin
  918. readcommondef('Class reference definition');
  919. write (space,' Pointed Type : ');
  920. readtype;
  921. end;
  922. ibsetdef :
  923. begin
  924. readcommondef('Set definition');
  925. write (space,' Element type : ');
  926. readtype;
  927. b:=getbyte;
  928. case tsettype(b) of
  929. smallset : writeln(space,' Set with 32 Elements');
  930. normset : writeln(space,' Set with 256 Elements');
  931. varset : writeln(space,' Set with ',getlongint,' Elements');
  932. else writeln('!! Warning: Invalid set type ',b);
  933. end;
  934. end;
  935. iberror :
  936. begin
  937. Writeln('!! Error in PPU');
  938. exit;
  939. end;
  940. ibenddefs :
  941. break;
  942. else
  943. WriteLn('!! Skipping unsupported PPU Entry in definitions: ',b);
  944. end;
  945. if not EndOfEntry then
  946. Writeln('!! Entry has more information stored');
  947. until false;
  948. if (totaldefs<>-1) and (defcnt<>totaldefs) then
  949. Writeln('!! Only read ',defcnt,' of ',totaldefs,' definitions');
  950. end;
  951. end;
  952. {****************************************************************************
  953. Read General Part
  954. ****************************************************************************}
  955. procedure readinterface;
  956. var
  957. b : byte;
  958. sourcenumber,
  959. unitnumber : word;
  960. ucrc,uintfcrc : longint;
  961. begin
  962. with ppufile^ do
  963. begin
  964. repeat
  965. b:=readentry;
  966. case b of
  967. ibmodulename :
  968. Writeln('Module Name: ',getstring);
  969. ibsourcefiles :
  970. begin
  971. sourcenumber:=1;
  972. while not EndOfEntry do
  973. begin
  974. Writeln('Source file ',sourcenumber,' : ',getstring);
  975. inc(sourcenumber);
  976. end;
  977. end;
  978. ibusedmacros :
  979. begin
  980. while not EndOfEntry do
  981. begin
  982. Write('Conditional ',getstring);
  983. b:=getbyte;
  984. if boolean(b)=true then
  985. write(' defined at startup')
  986. else
  987. write(' not defined at startup');
  988. b:=getbyte;
  989. if boolean(b)=true then
  990. writeln(' was used')
  991. else
  992. writeln;
  993. end;
  994. end;
  995. ibloadunit :
  996. begin
  997. unitnumber:=1;
  998. while not EndOfEntry do
  999. begin
  1000. write('Uses unit: ',getstring,' (Number: ',unitnumber,')');
  1001. ucrc:=getlongint;
  1002. uintfcrc:=getlongint;
  1003. write(' (Crc: ',ucrc,', IntfcCrc: ',uintfcrc,')');
  1004. if getbyte<>0 then
  1005. writeln(' (interface)')
  1006. else
  1007. writeln(' (implementation)');
  1008. inc(unitnumber);
  1009. end;
  1010. end;
  1011. iblinkunitofiles :
  1012. ReadLinkContainer('Link unit object file: ');
  1013. iblinkunitstaticlibs :
  1014. ReadLinkContainer('Link unit static lib: ');
  1015. iblinkunitsharedlibs :
  1016. ReadLinkContainer('Link unit shared lib: ');
  1017. iblinkotherofiles :
  1018. ReadLinkContainer('Link other object file: ');
  1019. iblinkotherstaticlibs :
  1020. ReadLinkContainer('Link other static lib: ');
  1021. iblinkothersharedlibs :
  1022. ReadLinkContainer('Link other shared lib: ');
  1023. iberror :
  1024. begin
  1025. Writeln('Error in PPU');
  1026. exit;
  1027. end;
  1028. ibendinterface :
  1029. break;
  1030. else
  1031. WriteLn('!! Skipping unsupported PPU Entry in General Part: ',b);
  1032. end;
  1033. until false;
  1034. end;
  1035. end;
  1036. {****************************************************************************
  1037. Read Implementation Part
  1038. ****************************************************************************}
  1039. procedure readimplementation;
  1040. var
  1041. b : byte;
  1042. begin
  1043. with ppufile^ do
  1044. begin
  1045. repeat
  1046. b:=readentry;
  1047. case b of
  1048. iberror :
  1049. begin
  1050. Writeln('Error in PPU');
  1051. exit;
  1052. end;
  1053. ibendimplementation :
  1054. break;
  1055. else
  1056. WriteLn('!! Skipping unsupported PPU Entry in Implementation: ',b);
  1057. end;
  1058. until false;
  1059. end;
  1060. end;
  1061. {****************************************************************************
  1062. Read Browser Part
  1063. ****************************************************************************}
  1064. procedure readbrowser;
  1065. var
  1066. b : byte;
  1067. const indent : string = '';
  1068. begin
  1069. Writeln(indent,'Start of symtable browser');
  1070. indent:=indent+'**';
  1071. with ppufile^ do
  1072. begin
  1073. repeat
  1074. b:=readentry;
  1075. case b of
  1076. ibbeginsymtablebrowser :
  1077. { here we must read object and record symtables !! }
  1078. begin
  1079. indent:=indent+' ';
  1080. Writeln(indent,'Record/Object symtable');
  1081. readbrowser;
  1082. Indent:=Copy(Indent,1,Length(Indent)-2);
  1083. end;
  1084. ibsymref : begin
  1085. readsymref;
  1086. readref;
  1087. end;
  1088. ibdefref : begin
  1089. readdefref;
  1090. readref;
  1091. if (ppufile^.header.flags and uf_local_browser)<>0 then
  1092. begin
  1093. { parast and localst }
  1094. indent:=indent+' ';
  1095. Writeln(indent,'Parasymtable for function');
  1096. readdefinitions(false);
  1097. readsymbols;
  1098. b:=ppufile^.readentry;
  1099. if b=ibbeginsymtablebrowser then
  1100. readbrowser;
  1101. Writeln(indent,'Localsymtable for function');
  1102. readdefinitions(false);
  1103. readsymbols;
  1104. b:=ppufile^.readentry;
  1105. if b=ibbeginsymtablebrowser then
  1106. readbrowser;
  1107. Indent:=Copy(Indent,1,Length(Indent)-2);
  1108. end;
  1109. end;
  1110. iberror : begin
  1111. Writeln('Error in PPU');
  1112. exit;
  1113. end;
  1114. ibendsymtablebrowser : break;
  1115. else
  1116. begin
  1117. WriteLn('!! Skipping unsupported PPU Entry in Browser: ',b);
  1118. Halt;
  1119. end;
  1120. end;
  1121. until false;
  1122. end;
  1123. Indent:=Copy(Indent,1,Length(Indent)-2);
  1124. Writeln(Indent,'End of symtable browser');
  1125. end;
  1126. procedure dofile (filename : string);
  1127. var
  1128. b,unitindex : byte;
  1129. begin
  1130. { reset }
  1131. space:='';
  1132. { fix filename }
  1133. if pos('.',filename)=0 then
  1134. filename:=filename+'.ppu';
  1135. ppufile:=new(pppufile,Init(filename));
  1136. if not ppufile^.open then
  1137. begin
  1138. writeln ('IO-Error when opening : ',filename,', Skipping');
  1139. exit;
  1140. end;
  1141. { PPU File is open, check for PPU Id }
  1142. if not ppufile^.CheckPPUID then
  1143. begin
  1144. writeln(Filename,' : Not a valid PPU file, Skipping');
  1145. exit;
  1146. end;
  1147. { Check PPU Version }
  1148. Writeln('Analyzing ',filename,' (v',ppufile^.GetPPUVersion,')');
  1149. if ppufile^.GetPPUVersion<16 then
  1150. begin
  1151. writeln(Filename,' : Old PPU Formats (<v16) are not supported, Skipping');
  1152. exit;
  1153. end;
  1154. { Write PPU Header Information }
  1155. if (verbose and v_header)<>0 then
  1156. begin
  1157. Writeln;
  1158. Writeln('Header');
  1159. Writeln('-------');
  1160. with ppufile^.header do
  1161. begin
  1162. Writeln('Compiler version : ',hi(ppufile^.header.compiler and $ff),'.',lo(ppufile^.header.compiler));
  1163. WriteLn('Target processor : ',Cpu2Str(cpu));
  1164. WriteLn('Target operating system : ',Target2Str(target));
  1165. Writeln('Unit flags : ',PPUFlags2Str(flags));
  1166. Writeln('FileSize (w/o header) : ',size);
  1167. Writeln('Checksum : ',checksum);
  1168. Writeln('Interface Checksum : ',interface_checksum);
  1169. end;
  1170. end;
  1171. {read the general stuff}
  1172. if (verbose and v_interface)<>0 then
  1173. begin
  1174. Writeln;
  1175. Writeln('Interface section');
  1176. Writeln('------------------');
  1177. readinterface;
  1178. end
  1179. else
  1180. ppufile^.skipuntilentry(ibendinterface);
  1181. {read the definitions}
  1182. if (verbose and v_defs)<>0 then
  1183. begin
  1184. Writeln;
  1185. Writeln('Interface definitions');
  1186. Writeln('----------------------');
  1187. readdefinitions(false);
  1188. end
  1189. else
  1190. ppufile^.skipuntilentry(ibenddefs);
  1191. {read the symbols}
  1192. if (verbose and v_syms)<>0 then
  1193. begin
  1194. Writeln;
  1195. Writeln('Interface Symbols');
  1196. Writeln('------------------');
  1197. readsymbols;
  1198. end
  1199. else
  1200. ppufile^.skipuntilentry(ibendsyms);
  1201. {read the implementation stuff}
  1202. { Not used at the moment (PFV)
  1203. if (verbose and v_implementation)<>0 then
  1204. begin
  1205. Writeln;
  1206. Writeln('Implementation section');
  1207. Writeln('-----------------------');
  1208. readimplementation;
  1209. end
  1210. else}
  1211. ppufile^.skipuntilentry(ibendimplementation);
  1212. {read the static browser units stuff}
  1213. if (ppufile^.header.flags and uf_local_browser)<>0 then
  1214. begin
  1215. if (verbose and v_defs)<>0 then
  1216. begin
  1217. Writeln;
  1218. Writeln('Static definitions');
  1219. Writeln('----------------------');
  1220. readdefinitions(false);
  1221. end
  1222. else
  1223. ppufile^.skipuntilentry(ibenddefs);
  1224. {read the symbols}
  1225. if (verbose and v_syms)<>0 then
  1226. begin
  1227. Writeln;
  1228. Writeln('Static Symbols');
  1229. Writeln('------------------');
  1230. readsymbols;
  1231. end;
  1232. end;
  1233. {read the browser units stuff}
  1234. if (ppufile^.header.flags and uf_has_browser)<>0 then
  1235. begin
  1236. if (verbose and v_browser)<>0 then
  1237. begin
  1238. Writeln;
  1239. Writeln('Browser section');
  1240. Writeln('---------------');
  1241. UnitIndex:=0;
  1242. repeat
  1243. b:=ppufile^.readentry;
  1244. if b = ibendbrowser then break;
  1245. if b=ibbeginsymtablebrowser then
  1246. begin
  1247. Writeln('Unit ',UnitIndex);
  1248. readbrowser;
  1249. Inc(UnitIndex);
  1250. end
  1251. else
  1252. Writeln('Wrong end browser entry ',b,' should be ',ibendbrowser);
  1253. until false;
  1254. end;
  1255. end;
  1256. {read the static browser units stuff}
  1257. if (ppufile^.header.flags and uf_local_browser)<>0 then
  1258. begin
  1259. if (verbose and v_browser)<>0 then
  1260. begin
  1261. Writeln;
  1262. Writeln('Static browser section');
  1263. Writeln('---------------');
  1264. b:=ppufile^.readentry;
  1265. if b=ibbeginsymtablebrowser then
  1266. begin
  1267. Writeln('Unit ',UnitIndex);
  1268. readbrowser;
  1269. Inc(UnitIndex);
  1270. end
  1271. else
  1272. Writeln('Wrong end browser entry ',b,' should be ',ibendbrowser);
  1273. end;
  1274. end;
  1275. {shutdown ppufile}
  1276. ppufile^.close;
  1277. dispose(ppufile,done);
  1278. Writeln;
  1279. end;
  1280. procedure help;
  1281. begin
  1282. writeln('usage: ppudump [options] <filename1> <filename2>...');
  1283. writeln;
  1284. writeln('[options] can be:');
  1285. writeln(' -V<verbose> Set verbosity to <verbose>');
  1286. writeln(' H - Show header info');
  1287. writeln(' I - Show interface');
  1288. writeln(' M - Show implementation');
  1289. writeln(' S - Show interface symbols');
  1290. writeln(' D - Show interface definitions');
  1291. writeln(' B - Show browser info');
  1292. writeln(' A - Show all');
  1293. writeln(' -? This helpscreen');
  1294. halt;
  1295. end;
  1296. var
  1297. startpara,
  1298. nrfile,i : longint;
  1299. para : string;
  1300. begin
  1301. writeln(Title+' '+Version);
  1302. writeln(Copyright);
  1303. writeln;
  1304. if paramcount<1 then
  1305. begin
  1306. writeln('usage: dumpppu [options] <filename1> <filename2>...');
  1307. halt(1);
  1308. end;
  1309. { turn verbose on by default }
  1310. verbose:=v_all;
  1311. { read options }
  1312. startpara:=1;
  1313. while copy(paramstr(startpara),1,1)='-' do
  1314. begin
  1315. para:=paramstr(startpara);
  1316. case upcase(para[2]) of
  1317. 'V' : begin
  1318. verbose:=0;
  1319. for i:=3to length(para) do
  1320. case upcase(para[i]) of
  1321. 'H' : verbose:=verbose or v_header;
  1322. 'I' : verbose:=verbose or v_interface;
  1323. 'M' : verbose:=verbose or v_implementation;
  1324. 'D' : verbose:=verbose or v_defs;
  1325. 'S' : verbose:=verbose or v_syms;
  1326. 'B' : verbose:=verbose or v_browser;
  1327. 'A' : verbose:=verbose or v_all;
  1328. end;
  1329. end;
  1330. '?' : help;
  1331. end;
  1332. inc(startpara);
  1333. end;
  1334. { process files }
  1335. for nrfile:=startpara to paramcount do
  1336. dofile (paramstr(nrfile));
  1337. if has_errors then
  1338. Halt(1);
  1339. end.
  1340. {
  1341. $Log$
  1342. Revision 1.14 2000-02-09 16:44:14 peter
  1343. * log truncated
  1344. Revision 1.13 2000/01/23 16:34:36 peter
  1345. * updated for new aktlocalindex
  1346. Revision 1.12 2000/01/07 16:46:03 daniel
  1347. * copyright 2000
  1348. Revision 1.11 1999/11/30 10:35:37 peter
  1349. * support new readtype
  1350. Revision 1.10 1999/11/08 14:06:45 florian
  1351. + indexref of propertysym is handle too now
  1352. Revision 1.9 1999/08/31 16:07:37 pierre
  1353. + support for writeusedmacros
  1354. Revision 1.8 1999/08/15 10:47:14 peter
  1355. * updates for new options
  1356. Revision 1.7 1999/08/13 21:25:35 peter
  1357. * updated flags
  1358. Revision 1.6 1999/07/27 23:45:29 peter
  1359. * updated for typesym writing
  1360. }