ppudump.pp 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506
  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 1.10';
  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. write(space,' Default : ');
  458. readsymref;
  459. dec(params);
  460. until params=0;
  461. end;
  462. end;
  463. procedure readcommonsym(const s:string);
  464. type
  465. tsymoption=(sp_none,
  466. sp_public,
  467. sp_private,
  468. sp_published,
  469. sp_protected,
  470. sp_forwarddef,
  471. sp_static,
  472. sp_primary_typesym { this is for typesym, to know who is the primary symbol of a def }
  473. );
  474. tsymoptions=set of tsymoption;
  475. tsymopt=record
  476. mask : tsymoption;
  477. str : string[30];
  478. end;
  479. const
  480. symopts=7;
  481. symopt : array[1..symopts] of tsymopt=(
  482. (mask:sp_public; str:'Public'),
  483. (mask:sp_private; str:'Private'),
  484. (mask:sp_published; str:'Published'),
  485. (mask:sp_protected; str:'Protected'),
  486. (mask:sp_forwarddef; str:'ForwardDef'),
  487. (mask:sp_static; str:'Static'),
  488. (mask:sp_primary_typesym;str:'PrimaryTypeSym')
  489. );
  490. var
  491. symoptions : tsymoptions;
  492. i : longint;
  493. first : boolean;
  494. begin
  495. writeln(space,'** Symbol Nr. ',ppufile^.getword,' **');
  496. writeln(space,s,ppufile^.getstring);
  497. ppufile^.getsmallset(symoptions);
  498. if symoptions<>[] then
  499. begin
  500. write(space,' File Pos: ');
  501. readposinfo;
  502. write(space,' Options: ');
  503. first:=true;
  504. for i:=1to symopts do
  505. if (symopt[i].mask in symoptions) then
  506. begin
  507. if first then
  508. first:=false
  509. else
  510. write(', ');
  511. write(symopt[i].str);
  512. end;
  513. writeln;
  514. end;
  515. end;
  516. procedure readcommondef(const s:string);
  517. begin
  518. writeln(space,'** Definition Nr. ',ppufile^.getword,' **');
  519. writeln(space,s);
  520. write (space,' Type symbol : ');
  521. readsymref;
  522. end;
  523. {****************************************************************************
  524. Read Symbols Part
  525. ****************************************************************************}
  526. procedure readsymbols;
  527. Const
  528. vo_is_C_var = 2;
  529. Type
  530. absolutetyp = (tovar,toasm,toaddr);
  531. tconsttyp = (constnone,
  532. constord,conststring,constreal,constbool,
  533. constint,constchar,constset,constpointer,constnil,
  534. constresourcestring
  535. );
  536. var
  537. b : byte;
  538. pc : pchar;
  539. totalsyms,
  540. symcnt,
  541. i,j,len : longint;
  542. begin
  543. symcnt:=1;
  544. with ppufile^ do
  545. begin
  546. if space<>'' then
  547. Writeln(space,'-----------------------------');
  548. if readentry=ibstartsyms then
  549. begin
  550. totalsyms:=getlongint;
  551. Writeln(space,'Number of symbols : ',totalsyms);
  552. Writeln(space,'Symtable datasize : ',getlongint);
  553. Writeln(space,'Symtable alignment: ',getlongint);
  554. end
  555. else
  556. begin
  557. totalsyms:=-1;
  558. Writeln('!! ibstartsym not found');
  559. end;
  560. repeat
  561. b:=readentry;
  562. if not (b in [iberror,ibendsyms]) then
  563. inc(symcnt);
  564. case b of
  565. ibunitsym :
  566. readcommonsym('Unit symbol ');
  567. iblabelsym :
  568. readcommonsym('Label symbol ');
  569. ibtypesym :
  570. begin
  571. readcommonsym('Type symbol ');
  572. write(space,' Result Type: ');
  573. readtype;
  574. end;
  575. ibprocsym :
  576. begin
  577. readcommonsym('Procedure symbol ');
  578. write(space,' Definition: ');
  579. readdefref;
  580. end;
  581. ibconstsym :
  582. begin
  583. readcommonsym('Constant symbol ');
  584. b:=getbyte;
  585. case tconsttyp(b) of
  586. constord :
  587. begin
  588. write (space,' Ordinal Type : ');
  589. readtype;
  590. writeln (space,' Value : ',getlongint)
  591. end;
  592. constpointer :
  593. begin
  594. write (space,' Pointer Type : ');
  595. readtype;
  596. writeln (space,' Value : ',getlongint)
  597. end;
  598. conststring,
  599. constresourcestring :
  600. begin
  601. len:=getlongint;
  602. getmem(pc,len+1);
  603. getdata(pc^,len);
  604. writeln(space,' Length : ',len);
  605. writeln(space,' Value : "',pc,'"');
  606. freemem(pc,len+1);
  607. if tconsttyp(b)=constresourcestring then
  608. writeln(space,' Index : ',getlongint);
  609. end;
  610. constreal :
  611. writeln(space,' Value : ',getreal);
  612. constbool :
  613. if getlongint<>0 then
  614. writeln (space,' Value : True')
  615. else
  616. writeln (space,' Value : False');
  617. constint :
  618. writeln(space,' Value : ',getlongint);
  619. constchar :
  620. writeln(space,' Value : "'+chr(getlongint)+'"');
  621. constset :
  622. begin
  623. write (space,' Set Type : ');
  624. readtype;
  625. for i:=1to 4 do
  626. begin
  627. write (space,' Value : ');
  628. for j:=1to 8 do
  629. begin
  630. if j>1 then
  631. write(',');
  632. write(hexb(getbyte));
  633. end;
  634. writeln;
  635. end;
  636. end;
  637. else
  638. Writeln ('!! Invalid unit format : Invalid const type encountered: ',b);
  639. end;
  640. end;
  641. ibvarsym :
  642. begin
  643. readcommonsym('Variable symbol ');
  644. writeln(space,' Type: ',getbyte);
  645. if read_member then
  646. writeln(space,' Address: ',getlongint);
  647. write (space,' Var Type: ');
  648. readtype;
  649. i:=getlongint;
  650. writeln(space,' Options: ',i);
  651. if (i and vo_is_C_var)<>0 then
  652. writeln(space,' Mangledname: ',getstring);
  653. end;
  654. ibenumsym :
  655. begin
  656. readcommonsym('Enumeration symbol ');
  657. write (space,' Definition: ');
  658. readdefref;
  659. writeln(space,' Value: ',getlongint);
  660. end;
  661. ibsyssym :
  662. begin
  663. readcommonsym('Internal system symbol ');
  664. writeln(space,' Internal Nr: ',getlongint);
  665. end;
  666. ibtypedconstsym :
  667. begin
  668. readcommonsym('Typed constant ');
  669. write (space,' Constant Type: ');
  670. readtype;
  671. writeln(space,' Label: ',getstring);
  672. writeln(space,' ReallyConst: ',(getbyte<>0));
  673. end;
  674. ibabsolutesym :
  675. begin
  676. readcommonsym('Absolute variable symbol ');
  677. writeln(space,' Type: ',getbyte);
  678. if read_member then
  679. writeln(space,' Address: ',getlongint);
  680. write (space,' Var Type: ');
  681. readtype;
  682. writeln(space,' Options: ',getlongint);
  683. Write (space,' Relocated to ');
  684. b:=getbyte;
  685. case absolutetyp(b) of
  686. tovar :
  687. Writeln('Name : ',getstring);
  688. toasm :
  689. Writeln('Assembler name : ',getstring);
  690. toaddr :
  691. begin
  692. Write('Address : ',getlongint);
  693. WriteLn(' (Far: ',getbyte<>0,')');
  694. end;
  695. else
  696. Writeln ('!! Invalid unit format : Invalid absolute type encountered: ',b);
  697. end;
  698. end;
  699. ibpropertysym :
  700. begin
  701. readcommonsym('Property ');
  702. write (space,' Prop Type: ');
  703. readtype;
  704. writeln(space,' Options: ',getlongint);
  705. writeln(space,' Index: ',getlongint);
  706. writeln(space,' Default: ',getlongint);
  707. write (space,' Index Type: ');
  708. readtype;
  709. write (space,' Read access: ');
  710. readsymlist(space+' Sym: ');
  711. write (space,' Write access: ');
  712. readsymlist(space+' Sym: ');
  713. write (space,' Stored access: ');
  714. readsymlist(space+' Sym: ');
  715. end;
  716. ibfuncretsym :
  717. begin
  718. readcommonsym('Func return value ');
  719. write (space,' Return Type: ');
  720. readtype;
  721. writeln(space,' Address: ',getlongint);
  722. end;
  723. iberror :
  724. begin
  725. Writeln('!! Error in PPU');
  726. exit;
  727. end;
  728. ibendsyms :
  729. break;
  730. else
  731. WriteLn('!! Skipping unsupported PPU Entry in Symbols: ',b);
  732. end;
  733. if not EndOfEntry then
  734. Writeln('!! Entry has more information stored');
  735. until false;
  736. if (totalsyms<>-1) and (symcnt-1<>totalsyms) then
  737. Writeln('!! Only read ',symcnt-1,' of ',totalsyms,' symbols');
  738. end;
  739. end;
  740. {****************************************************************************
  741. Read defintions Part
  742. ****************************************************************************}
  743. procedure readdefinitions(start_read : boolean);
  744. type
  745. tsettype = (normset,smallset,varset);
  746. tbasetype = (uauto,uvoid,uchar,
  747. u8bit,u16bit,u32bit,
  748. s8bit,s16bit,s32bit,
  749. bool8bit,bool16bit,bool32bit,
  750. u64bit,s64bit);
  751. var
  752. b : byte;
  753. oldread_member : boolean;
  754. totaldefs,
  755. defcnt : longint;
  756. begin
  757. defcnt:=0;
  758. with ppufile^ do
  759. begin
  760. if space<>'' then
  761. Writeln(space,'-----------------------------');
  762. if not start_read then
  763. if readentry=ibstartdefs then
  764. begin
  765. totaldefs:=getlongint;
  766. Writeln(space,'Number of definitions: ',totaldefs);
  767. end
  768. else
  769. begin
  770. totaldefs:=-1;
  771. Writeln('!! ibstartdef not found');
  772. end;
  773. repeat
  774. b:=readentry;
  775. if not (b in [iberror,ibenddefs]) then
  776. inc(defcnt);
  777. case b of
  778. ibpointerdef :
  779. begin
  780. readcommondef('Pointer definition');
  781. write (space,' Pointed Type : ');
  782. readtype;
  783. writeln(space,' Is Far : ',(getbyte<>0));
  784. end;
  785. iborddef :
  786. begin
  787. readcommondef('Ordinal definition');
  788. write (space,' Base type : ');
  789. b:=getbyte;
  790. case tbasetype(b) of
  791. uauto : writeln('uauto');
  792. uvoid : writeln('uvoid');
  793. uchar : writeln('uchar');
  794. u8bit : writeln('u8bit');
  795. u16bit : writeln('u16bit');
  796. u32bit : writeln('s32bit');
  797. s8bit : writeln('s8bit');
  798. s16bit : writeln('s16bit');
  799. s32bit : writeln('s32bit');
  800. bool8bit : writeln('bool8bit');
  801. bool16bit : writeln('bool16bit');
  802. bool32bit : writeln('bool32bit');
  803. u64bit : writeln('u64bit');
  804. s64bit : writeln('s64bit');
  805. else writeln('!! Warning: Invalid base type ',b);
  806. end;
  807. writeln(space,' Range : ',getlongint,' to ',getlongint);
  808. end;
  809. ibfloatdef :
  810. begin
  811. readcommondef('Float definition');
  812. writeln(space,' Float type : ',getbyte);
  813. end;
  814. ibarraydef :
  815. begin
  816. readcommondef('Array definition');
  817. write (space,' Element type : ');
  818. readtype;
  819. write (space,' Range Type : ');
  820. readtype;
  821. writeln(space,' Range : ',getlongint,' to ',getlongint);
  822. writeln(space,' Is Constructor : ',(getbyte<>0));
  823. end;
  824. ibprocdef :
  825. begin
  826. readcommondef('Procedure definition');
  827. read_abstract_proc_def;
  828. writeln(space,' Used Register : ',getbyte);
  829. writeln(space,' Mangled name : ',getstring);
  830. writeln(space,' Number : ',getlongint);
  831. write (space,' Next : ');
  832. readdefref;
  833. write (space,' Class : ');
  834. readdefref;
  835. write (space,' File Pos : ');
  836. readposinfo;
  837. space:=' '+space;
  838. { parast }
  839. readdefinitions(false);
  840. readsymbols;
  841. { localst }
  842. {readdefinitions(false);
  843. readsymbols;}
  844. delete(space,1,4);
  845. end;
  846. ibprocvardef :
  847. begin
  848. readcommondef('Procedural type (ProcVar) definition');
  849. read_abstract_proc_def;
  850. end;
  851. ibshortstringdef :
  852. begin
  853. readcommondef('ShortString definition');
  854. writeln(space,' Length : ',getbyte);
  855. end;
  856. ibwidestringdef :
  857. begin
  858. readcommondef('WideString definition');
  859. writeln(space,' Length : ',getlongint);
  860. end;
  861. ibansistringdef :
  862. begin
  863. readcommondef('AnsiString definition');
  864. writeln(space,' Length : ',getlongint);
  865. end;
  866. iblongstringdef :
  867. begin
  868. readcommondef('Longstring definition');
  869. writeln(space,' Length : ',getlongint);
  870. end;
  871. ibrecorddef :
  872. begin
  873. readcommondef('Record definition');
  874. writeln(space,' Size : ',getlongint);
  875. {read the record definitions and symbols}
  876. space:=' '+space;
  877. oldread_member:=read_member;
  878. read_member:=true;
  879. readdefinitions(false);
  880. readsymbols;
  881. read_member:=oldread_member;
  882. Delete(space,1,4);
  883. end;
  884. ibobjectdef :
  885. begin
  886. readcommondef('Object/Class definition');
  887. writeln(space,' Size : ',getlongint);
  888. writeln(space,' Vmt offset : ',getlongint);
  889. writeln(space,' Name of Class : ',getstring);
  890. write(space, ' Ancestor Class : ');
  891. readdefref;
  892. writeln(space,' Options : ',getlongint);
  893. {read the record definitions and symbols}
  894. space:=' '+space;
  895. oldread_member:=read_member;
  896. read_member:=true;
  897. readdefinitions(false);
  898. readsymbols;
  899. read_member:=oldread_member;
  900. Delete(space,1,4);
  901. end;
  902. ibfiledef :
  903. begin
  904. ReadCommonDef('File definition');
  905. write (space,' Type : ');
  906. case getbyte of
  907. 0 : writeln('Text');
  908. 1 : begin
  909. writeln('Typed');
  910. write (space,' File of Type : ');
  911. Readtype;
  912. end;
  913. 2 : writeln('Untyped');
  914. end;
  915. end;
  916. ibformaldef :
  917. readcommondef('Generic Definition (void-typ)');
  918. ibenumdef :
  919. begin
  920. readcommondef('Enumeration type definition');
  921. write(space,'Base enumeration type : ');
  922. readdefref;
  923. writeln(space,' Smallest element : ',getlongint);
  924. writeln(space,' Largest element : ',getlongint);
  925. writeln(space,' Size : ',getlongint);
  926. end;
  927. ibclassrefdef :
  928. begin
  929. readcommondef('Class reference definition');
  930. write (space,' Pointed Type : ');
  931. readtype;
  932. end;
  933. ibsetdef :
  934. begin
  935. readcommondef('Set definition');
  936. write (space,' Element type : ');
  937. readtype;
  938. b:=getbyte;
  939. case tsettype(b) of
  940. smallset : writeln(space,' Set with 32 Elements');
  941. normset : writeln(space,' Set with 256 Elements');
  942. varset : writeln(space,' Set with ',getlongint,' Elements');
  943. else writeln('!! Warning: Invalid set type ',b);
  944. end;
  945. end;
  946. iberror :
  947. begin
  948. Writeln('!! Error in PPU');
  949. exit;
  950. end;
  951. ibenddefs :
  952. break;
  953. else
  954. WriteLn('!! Skipping unsupported PPU Entry in definitions: ',b);
  955. end;
  956. if not EndOfEntry then
  957. Writeln('!! Entry has more information stored');
  958. until false;
  959. if (totaldefs<>-1) and (defcnt<>totaldefs) then
  960. Writeln('!! Only read ',defcnt,' of ',totaldefs,' definitions');
  961. end;
  962. end;
  963. {****************************************************************************
  964. Read General Part
  965. ****************************************************************************}
  966. procedure readinterface;
  967. var
  968. b : byte;
  969. sourcenumber,
  970. unitnumber : word;
  971. ucrc,uintfcrc : longint;
  972. begin
  973. with ppufile^ do
  974. begin
  975. repeat
  976. b:=readentry;
  977. case b of
  978. ibmodulename :
  979. Writeln('Module Name: ',getstring);
  980. ibsourcefiles :
  981. begin
  982. sourcenumber:=1;
  983. while not EndOfEntry do
  984. begin
  985. Writeln('Source file ',sourcenumber,' : ',getstring);
  986. inc(sourcenumber);
  987. end;
  988. end;
  989. ibusedmacros :
  990. begin
  991. while not EndOfEntry do
  992. begin
  993. Write('Conditional ',getstring);
  994. b:=getbyte;
  995. if boolean(b)=true then
  996. write(' defined at startup')
  997. else
  998. write(' not defined at startup');
  999. b:=getbyte;
  1000. if boolean(b)=true then
  1001. writeln(' was used')
  1002. else
  1003. writeln;
  1004. end;
  1005. end;
  1006. ibloadunit :
  1007. begin
  1008. unitnumber:=1;
  1009. while not EndOfEntry do
  1010. begin
  1011. write('Uses unit: ',getstring,' (Number: ',unitnumber,')');
  1012. ucrc:=getlongint;
  1013. uintfcrc:=getlongint;
  1014. write(' (Crc: ',ucrc,', IntfcCrc: ',uintfcrc,')');
  1015. if getbyte<>0 then
  1016. writeln(' (interface)')
  1017. else
  1018. writeln(' (implementation)');
  1019. inc(unitnumber);
  1020. end;
  1021. end;
  1022. iblinkunitofiles :
  1023. ReadLinkContainer('Link unit object file: ');
  1024. iblinkunitstaticlibs :
  1025. ReadLinkContainer('Link unit static lib: ');
  1026. iblinkunitsharedlibs :
  1027. ReadLinkContainer('Link unit shared lib: ');
  1028. iblinkotherofiles :
  1029. ReadLinkContainer('Link other object file: ');
  1030. iblinkotherstaticlibs :
  1031. ReadLinkContainer('Link other static lib: ');
  1032. iblinkothersharedlibs :
  1033. ReadLinkContainer('Link other shared lib: ');
  1034. iberror :
  1035. begin
  1036. Writeln('Error in PPU');
  1037. exit;
  1038. end;
  1039. ibendinterface :
  1040. break;
  1041. else
  1042. WriteLn('!! Skipping unsupported PPU Entry in General Part: ',b);
  1043. end;
  1044. until false;
  1045. end;
  1046. end;
  1047. {****************************************************************************
  1048. Read Implementation Part
  1049. ****************************************************************************}
  1050. procedure readimplementation;
  1051. var
  1052. b : byte;
  1053. begin
  1054. with ppufile^ do
  1055. begin
  1056. repeat
  1057. b:=readentry;
  1058. case b of
  1059. iberror :
  1060. begin
  1061. Writeln('Error in PPU');
  1062. exit;
  1063. end;
  1064. ibendimplementation :
  1065. break;
  1066. else
  1067. WriteLn('!! Skipping unsupported PPU Entry in Implementation: ',b);
  1068. end;
  1069. until false;
  1070. end;
  1071. end;
  1072. {****************************************************************************
  1073. Read Browser Part
  1074. ****************************************************************************}
  1075. procedure readbrowser;
  1076. var
  1077. b : byte;
  1078. const indent : string = '';
  1079. begin
  1080. Writeln(indent,'Start of symtable browser');
  1081. indent:=indent+'**';
  1082. with ppufile^ do
  1083. begin
  1084. repeat
  1085. b:=readentry;
  1086. case b of
  1087. ibbeginsymtablebrowser :
  1088. { here we must read object and record symtables !! }
  1089. begin
  1090. indent:=indent+' ';
  1091. Writeln(indent,'Record/Object symtable');
  1092. readbrowser;
  1093. Indent:=Copy(Indent,1,Length(Indent)-2);
  1094. end;
  1095. ibsymref : begin
  1096. readsymref;
  1097. readref;
  1098. end;
  1099. ibdefref : begin
  1100. readdefref;
  1101. readref;
  1102. if (ppufile^.header.flags and uf_local_browser)<>0 then
  1103. begin
  1104. { parast and localst }
  1105. indent:=indent+' ';
  1106. Writeln(indent,'Parasymtable for function');
  1107. readdefinitions(false);
  1108. readsymbols;
  1109. b:=ppufile^.readentry;
  1110. if b=ibbeginsymtablebrowser then
  1111. readbrowser;
  1112. Writeln(indent,'Localsymtable for function');
  1113. readdefinitions(false);
  1114. readsymbols;
  1115. b:=ppufile^.readentry;
  1116. if b=ibbeginsymtablebrowser then
  1117. readbrowser;
  1118. Indent:=Copy(Indent,1,Length(Indent)-2);
  1119. end;
  1120. end;
  1121. iberror : begin
  1122. Writeln('Error in PPU');
  1123. exit;
  1124. end;
  1125. ibendsymtablebrowser : break;
  1126. else
  1127. begin
  1128. WriteLn('!! Skipping unsupported PPU Entry in Browser: ',b);
  1129. Halt;
  1130. end;
  1131. end;
  1132. until false;
  1133. end;
  1134. Indent:=Copy(Indent,1,Length(Indent)-2);
  1135. Writeln(Indent,'End of symtable browser');
  1136. end;
  1137. procedure dofile (filename : string);
  1138. var
  1139. b,unitindex : byte;
  1140. begin
  1141. { reset }
  1142. space:='';
  1143. { fix filename }
  1144. if pos('.',filename)=0 then
  1145. filename:=filename+'.ppu';
  1146. ppufile:=new(pppufile,Init(filename));
  1147. if not ppufile^.open then
  1148. begin
  1149. writeln ('IO-Error when opening : ',filename,', Skipping');
  1150. exit;
  1151. end;
  1152. { PPU File is open, check for PPU Id }
  1153. if not ppufile^.CheckPPUID then
  1154. begin
  1155. writeln(Filename,' : Not a valid PPU file, Skipping');
  1156. exit;
  1157. end;
  1158. { Check PPU Version }
  1159. Writeln('Analyzing ',filename,' (v',ppufile^.GetPPUVersion,')');
  1160. if ppufile^.GetPPUVersion<16 then
  1161. begin
  1162. writeln(Filename,' : Old PPU Formats (<v16) are not supported, Skipping');
  1163. exit;
  1164. end;
  1165. { Write PPU Header Information }
  1166. if (verbose and v_header)<>0 then
  1167. begin
  1168. Writeln;
  1169. Writeln('Header');
  1170. Writeln('-------');
  1171. with ppufile^.header do
  1172. begin
  1173. Writeln('Compiler version : ',hi(ppufile^.header.compiler and $ff),'.',lo(ppufile^.header.compiler));
  1174. WriteLn('Target processor : ',Cpu2Str(cpu));
  1175. WriteLn('Target operating system : ',Target2Str(target));
  1176. Writeln('Unit flags : ',PPUFlags2Str(flags));
  1177. Writeln('FileSize (w/o header) : ',size);
  1178. Writeln('Checksum : ',checksum);
  1179. Writeln('Interface Checksum : ',interface_checksum);
  1180. end;
  1181. end;
  1182. {read the general stuff}
  1183. if (verbose and v_interface)<>0 then
  1184. begin
  1185. Writeln;
  1186. Writeln('Interface section');
  1187. Writeln('------------------');
  1188. readinterface;
  1189. end
  1190. else
  1191. ppufile^.skipuntilentry(ibendinterface);
  1192. {read the definitions}
  1193. if (verbose and v_defs)<>0 then
  1194. begin
  1195. Writeln;
  1196. Writeln('Interface definitions');
  1197. Writeln('----------------------');
  1198. readdefinitions(false);
  1199. end
  1200. else
  1201. ppufile^.skipuntilentry(ibenddefs);
  1202. {read the symbols}
  1203. if (verbose and v_syms)<>0 then
  1204. begin
  1205. Writeln;
  1206. Writeln('Interface Symbols');
  1207. Writeln('------------------');
  1208. readsymbols;
  1209. end
  1210. else
  1211. ppufile^.skipuntilentry(ibendsyms);
  1212. {read the implementation stuff}
  1213. { Not used at the moment (PFV)
  1214. if (verbose and v_implementation)<>0 then
  1215. begin
  1216. Writeln;
  1217. Writeln('Implementation section');
  1218. Writeln('-----------------------');
  1219. readimplementation;
  1220. end
  1221. else}
  1222. ppufile^.skipuntilentry(ibendimplementation);
  1223. {read the static browser units stuff}
  1224. if (ppufile^.header.flags and uf_local_browser)<>0 then
  1225. begin
  1226. if (verbose and v_defs)<>0 then
  1227. begin
  1228. Writeln;
  1229. Writeln('Static definitions');
  1230. Writeln('----------------------');
  1231. readdefinitions(false);
  1232. end
  1233. else
  1234. ppufile^.skipuntilentry(ibenddefs);
  1235. {read the symbols}
  1236. if (verbose and v_syms)<>0 then
  1237. begin
  1238. Writeln;
  1239. Writeln('Static Symbols');
  1240. Writeln('------------------');
  1241. readsymbols;
  1242. end;
  1243. end;
  1244. {read the browser units stuff}
  1245. if (ppufile^.header.flags and uf_has_browser)<>0 then
  1246. begin
  1247. if (verbose and v_browser)<>0 then
  1248. begin
  1249. Writeln;
  1250. Writeln('Browser section');
  1251. Writeln('---------------');
  1252. UnitIndex:=0;
  1253. repeat
  1254. b:=ppufile^.readentry;
  1255. if b = ibendbrowser then break;
  1256. if b=ibbeginsymtablebrowser then
  1257. begin
  1258. Writeln('Unit ',UnitIndex);
  1259. readbrowser;
  1260. Inc(UnitIndex);
  1261. end
  1262. else
  1263. Writeln('Wrong end browser entry ',b,' should be ',ibendbrowser);
  1264. until false;
  1265. end;
  1266. end;
  1267. {read the static browser units stuff}
  1268. if (ppufile^.header.flags and uf_local_browser)<>0 then
  1269. begin
  1270. if (verbose and v_browser)<>0 then
  1271. begin
  1272. Writeln;
  1273. Writeln('Static browser section');
  1274. Writeln('---------------');
  1275. b:=ppufile^.readentry;
  1276. if b=ibbeginsymtablebrowser then
  1277. begin
  1278. Writeln('Unit ',UnitIndex);
  1279. readbrowser;
  1280. Inc(UnitIndex);
  1281. end
  1282. else
  1283. Writeln('Wrong end browser entry ',b,' should be ',ibendbrowser);
  1284. end;
  1285. end;
  1286. {shutdown ppufile}
  1287. ppufile^.close;
  1288. dispose(ppufile,done);
  1289. Writeln;
  1290. end;
  1291. procedure help;
  1292. begin
  1293. writeln('usage: ppudump [options] <filename1> <filename2>...');
  1294. writeln;
  1295. writeln('[options] can be:');
  1296. writeln(' -V<verbose> Set verbosity to <verbose>');
  1297. writeln(' H - Show header info');
  1298. writeln(' I - Show interface');
  1299. writeln(' M - Show implementation');
  1300. writeln(' S - Show interface symbols');
  1301. writeln(' D - Show interface definitions');
  1302. writeln(' B - Show browser info');
  1303. writeln(' A - Show all');
  1304. writeln(' -? This helpscreen');
  1305. halt;
  1306. end;
  1307. var
  1308. startpara,
  1309. nrfile,i : longint;
  1310. para : string;
  1311. begin
  1312. writeln(Title+' '+Version);
  1313. writeln(Copyright);
  1314. writeln;
  1315. if paramcount<1 then
  1316. begin
  1317. writeln('usage: dumpppu [options] <filename1> <filename2>...');
  1318. halt(1);
  1319. end;
  1320. { turn verbose on by default }
  1321. verbose:=v_all;
  1322. { read options }
  1323. startpara:=1;
  1324. while copy(paramstr(startpara),1,1)='-' do
  1325. begin
  1326. para:=paramstr(startpara);
  1327. case upcase(para[2]) of
  1328. 'V' : begin
  1329. verbose:=0;
  1330. for i:=3to length(para) do
  1331. case upcase(para[i]) of
  1332. 'H' : verbose:=verbose or v_header;
  1333. 'I' : verbose:=verbose or v_interface;
  1334. 'M' : verbose:=verbose or v_implementation;
  1335. 'D' : verbose:=verbose or v_defs;
  1336. 'S' : verbose:=verbose or v_syms;
  1337. 'B' : verbose:=verbose or v_browser;
  1338. 'A' : verbose:=verbose or v_all;
  1339. end;
  1340. end;
  1341. '?' : help;
  1342. end;
  1343. inc(startpara);
  1344. end;
  1345. { process files }
  1346. for nrfile:=startpara to paramcount do
  1347. dofile (paramstr(nrfile));
  1348. if has_errors then
  1349. Halt(1);
  1350. end.
  1351. {
  1352. $Log$
  1353. Revision 1.3 2000-09-09 19:46:40 peter
  1354. * show dataalignment
  1355. Revision 1.2 2000/08/13 12:58:06 peter
  1356. * updated for ppu additions
  1357. Revision 1.1 2000/07/13 10:16:22 michael
  1358. + Initial import
  1359. Revision 1.15 2000/07/04 19:05:54 peter
  1360. * be optimistic: version 1.00 for some utils
  1361. Revision 1.14 2000/02/09 16:44:14 peter
  1362. * log truncated
  1363. Revision 1.13 2000/01/23 16:34:36 peter
  1364. * updated for new aktlocalindex
  1365. Revision 1.12 2000/01/07 16:46:03 daniel
  1366. * copyright 2000
  1367. Revision 1.11 1999/11/30 10:35:37 peter
  1368. * support new readtype
  1369. Revision 1.10 1999/11/08 14:06:45 florian
  1370. + indexref of propertysym is handle too now
  1371. Revision 1.9 1999/08/31 16:07:37 pierre
  1372. + support for writeusedmacros
  1373. Revision 1.8 1999/08/15 10:47:14 peter
  1374. * updates for new options
  1375. Revision 1.7 1999/08/13 21:25:35 peter
  1376. * updated flags
  1377. Revision 1.6 1999/07/27 23:45:29 peter
  1378. * updated for typesym writing
  1379. }