ppu.pas 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920
  1. {
  2. $Id$
  3. Copyright (c) 1993-98 by Florian Klaempfl
  4. Routines to read/write ppu files
  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. }
  18. {$ifdef TP}
  19. {$N+,E+}
  20. {$endif}
  21. unit ppu;
  22. interface
  23. const
  24. { buffer sizes }
  25. maxentrysize = 1024;
  26. {$ifdef TP}
  27. ppubufsize = 1024;
  28. {$else}
  29. ppubufsize = 16384;
  30. {$endif}
  31. {ppu entries}
  32. mainentryid = 1;
  33. subentryid = 2;
  34. {special}
  35. iberror = 0;
  36. ibstartdefs = 248;
  37. ibenddefs = 249;
  38. ibstartsyms = 250;
  39. ibendsyms = 251;
  40. ibendinterface = 252;
  41. ibendimplementation = 253;
  42. ibendbrowser = 254;
  43. ibend = 255;
  44. {general}
  45. ibmodulename = 1;
  46. ibsourcefiles = 2;
  47. ibloadunit_int = 3;
  48. ibloadunit_imp = 4;
  49. ibinitunit = 5;
  50. iblinkofiles = 6;
  51. iblinksharedlibs = 7;
  52. iblinkstaticlibs = 8;
  53. ibdbxcount = 9;
  54. ibsymref = 10;
  55. ibdefref = 11;
  56. ibendsymtablebrowser = 12;
  57. ibbeginsymtablebrowser = 13;
  58. iblinkunitfiles = 14;
  59. {syms}
  60. ibtypesym = 20;
  61. ibprocsym = 21;
  62. ibvarsym = 22;
  63. ibconstsym = 23;
  64. ibenumsym = 24;
  65. ibtypedconstsym = 25;
  66. ibabsolutesym = 26;
  67. ibpropertysym = 27;
  68. ibvarsym_C = 28;
  69. ibunitsym = 29; { needed for browser }
  70. iblabelsym = 30;
  71. ibfuncretsym = 31;
  72. {definitions}
  73. iborddef = 40;
  74. ibpointerdef = 41;
  75. ibarraydef = 42;
  76. ibprocdef = 43;
  77. ibstringdef = 44;
  78. ibrecorddef = 45;
  79. ibfiledef = 46;
  80. ibformaldef = 47;
  81. ibobjectdef = 48;
  82. ibenumdef = 49;
  83. ibsetdef = 50;
  84. ibprocvardef = 51;
  85. ibfloatdef = 52;
  86. ibclassrefdef = 53;
  87. iblongstringdef = 54;
  88. ibansistringdef = 55;
  89. ibwidestringdef = 56;
  90. ibfarpointerdef = 57;
  91. { unit flags }
  92. uf_init = $1;
  93. uf_finalize = $2;
  94. uf_big_endian = $4;
  95. uf_has_dbx = $8;
  96. uf_has_browser = $10;
  97. uf_smartlink = $20; { the ppu is smartlinked }
  98. uf_in_library = $40; { is the file in another file than <ppufile>.* ? }
  99. uf_static_linked = $80; { the ppu is linked in a static library }
  100. uf_shared_linked = $100; { the ppu is linked in a shared library }
  101. uf_local_browser = $200;
  102. uf_obj_linked = $400; { the ppu is linked in a object file }
  103. type
  104. {$ifdef m68k}
  105. ppureal=single;
  106. {$else}
  107. ppureal=extended;
  108. {$endif}
  109. tppuerror=(ppuentrytoobig,ppuentryerror);
  110. tppuheader=packed record
  111. id : array[1..3] of char; { = 'PPU' }
  112. ver : array[1..3] of char;
  113. compiler : word;
  114. cpu : word;
  115. target : word;
  116. flags : longint;
  117. size : longint; { size of the ppufile without header }
  118. checksum : longint; { checksum for this ppufile }
  119. end;
  120. tppuentry=packed record
  121. id : byte;
  122. nr : byte;
  123. size : longint;
  124. end;
  125. pppufile=^tppufile;
  126. tppufile=object
  127. f : file;
  128. mode : byte; {0 - Closed, 1 - Reading, 2 - Writing}
  129. error : boolean;
  130. fname : string;
  131. fsize : longint;
  132. header : tppuheader;
  133. size,crc : longint;
  134. do_crc,
  135. change_endian : boolean;
  136. buf : pchar;
  137. bufstart,
  138. bufsize,
  139. bufidx : longint;
  140. entrybufstart,
  141. entrystart,
  142. entryidx : longint;
  143. entry : tppuentry;
  144. entrytyp : byte;
  145. constructor init(fn:string);
  146. destructor done;
  147. procedure flush;
  148. procedure close;
  149. function CheckPPUId:boolean;
  150. function GetPPUVersion:longint;
  151. procedure NewHeader;
  152. procedure NewEntry;
  153. {read}
  154. function open:boolean;
  155. procedure reloadbuf;
  156. procedure readdata(var b;len:longint);
  157. procedure skipdata(len:longint);
  158. function readentry:byte;
  159. function EndOfEntry:boolean;
  160. procedure getdatabuf(var b;len:longint;var result:longint);
  161. procedure getdata(var b;len:longint);
  162. function getbyte:byte;
  163. function getword:word;
  164. function getlongint:longint;
  165. function getreal:ppureal;
  166. function getstring:string;
  167. function skipuntilentry(untilb:byte):boolean;
  168. {write}
  169. function create:boolean;
  170. procedure writeheader;
  171. procedure writebuf;
  172. procedure writedata(var b;len:longint);
  173. procedure writeentry(ibnr:byte);
  174. procedure putdata(var b;len:longint);
  175. procedure putbyte(b:byte);
  176. procedure putword(w:word);
  177. procedure putlongint(l:longint);
  178. procedure putreal(d:ppureal);
  179. procedure putstring(s:string);
  180. end;
  181. implementation
  182. {*****************************************************************************
  183. Crc 32
  184. *****************************************************************************}
  185. var
  186. Crc32Tbl : array[0..255] of longint;
  187. procedure MakeCRC32Tbl;
  188. var
  189. crc : longint;
  190. i,n : byte;
  191. begin
  192. for i:=0 to 255 do
  193. begin
  194. crc:=i;
  195. for n:=1 to 8 do
  196. if odd(crc) then
  197. crc:=(crc shr 1) xor $edb88320
  198. else
  199. crc:=crc shr 1;
  200. Crc32Tbl[i]:=crc;
  201. end;
  202. end;
  203. {$ifopt R+}
  204. {$define Range_check_on}
  205. {$endif opt R+}
  206. {$R- needed here }
  207. {CRC 32}
  208. Function Crc32(Const HStr:String):longint;
  209. var
  210. i,InitCrc : longint;
  211. begin
  212. if Crc32Tbl[1]=0 then
  213. MakeCrc32Tbl;
  214. InitCrc:=$ffffffff;
  215. for i:=1to Length(Hstr) do
  216. InitCrc:=Crc32Tbl[byte(InitCrc) xor ord(Hstr[i])] xor (InitCrc shr 8);
  217. Crc32:=InitCrc;
  218. end;
  219. Function UpdateCrc32(InitCrc:longint;var InBuf;InLen:Longint):longint;
  220. var
  221. i : word;
  222. p : pchar;
  223. begin
  224. if Crc32Tbl[1]=0 then
  225. MakeCrc32Tbl;
  226. p:=@InBuf;
  227. for i:=1to InLen do
  228. begin
  229. InitCrc:=Crc32Tbl[byte(InitCrc) xor byte(p^)] xor (InitCrc shr 8);
  230. inc(longint(p));
  231. end;
  232. UpdateCrc32:=InitCrc;
  233. end;
  234. Function UpdCrc32(InitCrc:longint;b:byte):longint;
  235. begin
  236. if Crc32Tbl[1]=0 then
  237. MakeCrc32Tbl;
  238. UpdCrc32:=Crc32Tbl[byte(InitCrc) xor b] xor (InitCrc shr 8);
  239. end;
  240. {$ifdef Range_check_on}
  241. {$R+}
  242. {$undef Range_check_on}
  243. {$endif Range_check_on}
  244. {*****************************************************************************
  245. TPPUFile
  246. *****************************************************************************}
  247. constructor tppufile.init(fn:string);
  248. begin
  249. fname:=fn;
  250. change_endian:=false;
  251. Mode:=0;
  252. NewHeader;
  253. Error:=false;
  254. getmem(buf,ppubufsize);
  255. end;
  256. destructor tppufile.done;
  257. begin
  258. close;
  259. freemem(buf,ppubufsize);
  260. end;
  261. procedure tppufile.flush;
  262. begin
  263. if Mode=2 then
  264. writebuf;
  265. end;
  266. procedure tppufile.close;
  267. var
  268. i : word;
  269. begin
  270. if Mode<>0 then
  271. begin
  272. Flush;
  273. {$I-}
  274. system.close(f);
  275. {$I+}
  276. i:=ioresult;
  277. Mode:=0;
  278. end;
  279. end;
  280. function tppufile.CheckPPUId:boolean;
  281. begin
  282. CheckPPUId:=((Header.Id[1]='P') and (Header.Id[2]='P') and (Header.Id[3]='U'));
  283. end;
  284. function tppufile.GetPPUVersion:longint;
  285. var
  286. l : longint;
  287. code : word;
  288. begin
  289. Val(header.ver[1]+header.ver[2]+header.ver[3],l,code);
  290. if code=0 then
  291. GetPPUVersion:=l
  292. else
  293. GetPPUVersion:=0;
  294. end;
  295. procedure tppufile.NewHeader;
  296. begin
  297. fillchar(header,sizeof(tppuheader),0);
  298. with header do
  299. begin
  300. Id[1]:='P';
  301. Id[2]:='P';
  302. Id[3]:='U';
  303. Ver[1]:='0';
  304. Ver[2]:='1';
  305. Ver[3]:='5';
  306. end;
  307. end;
  308. {*****************************************************************************
  309. TPPUFile Reading
  310. *****************************************************************************}
  311. function tppufile.open:boolean;
  312. var
  313. ofmode : byte;
  314. i : word;
  315. begin
  316. open:=false;
  317. assign(f,fname);
  318. ofmode:=filemode;
  319. filemode:=$0;
  320. {$I-}
  321. reset(f,1);
  322. {$I+}
  323. filemode:=ofmode;
  324. if ioresult<>0 then
  325. exit;
  326. {read ppuheader}
  327. fsize:=filesize(f);
  328. if fsize<sizeof(tppuheader) then
  329. exit;
  330. blockread(f,header,sizeof(tppuheader),i);
  331. {reset buffer}
  332. bufstart:=i;
  333. bufsize:=0;
  334. bufidx:=0;
  335. Mode:=1;
  336. FillChar(entry,sizeof(tppuentry),0);
  337. entryidx:=0;
  338. entrystart:=0;
  339. entrybufstart:=0;
  340. Error:=false;
  341. open:=true;
  342. end;
  343. procedure tppufile.reloadbuf;
  344. {$ifdef TP}
  345. var
  346. i : word;
  347. {$endif}
  348. begin
  349. inc(bufstart,bufsize);
  350. {$ifdef TP}
  351. blockread(f,buf^,ppubufsize,i);
  352. bufsize:=i;
  353. {$else}
  354. blockread(f,buf^,ppubufsize,bufsize);
  355. {$endif}
  356. bufidx:=0;
  357. end;
  358. procedure tppufile.readdata(var b;len:longint);
  359. var
  360. p : pchar;
  361. left,
  362. idx : longint;
  363. begin
  364. p:=pchar(@b);
  365. idx:=0;
  366. while len>0 do
  367. begin
  368. left:=bufsize-bufidx;
  369. if len>left then
  370. begin
  371. move(buf[bufidx],p[idx],left);
  372. dec(len,left);
  373. inc(idx,left);
  374. reloadbuf;
  375. if bufsize=0 then
  376. exit;
  377. end
  378. else
  379. begin
  380. move(buf[bufidx],p[idx],len);
  381. inc(bufidx,len);
  382. exit;
  383. end;
  384. end;
  385. end;
  386. procedure tppufile.skipdata(len:longint);
  387. var
  388. left : longint;
  389. begin
  390. while len>0 do
  391. begin
  392. left:=bufsize-bufidx;
  393. if len>left then
  394. begin
  395. dec(len,left);
  396. reloadbuf;
  397. if bufsize=0 then
  398. exit;
  399. end
  400. else
  401. begin
  402. inc(bufidx,len);
  403. exit;
  404. end;
  405. end;
  406. end;
  407. function tppufile.readentry:byte;
  408. begin
  409. if entryidx<entry.size then
  410. skipdata(entry.size-entryidx);
  411. readdata(entry,sizeof(tppuentry));
  412. entrystart:=bufstart+bufidx;
  413. entryidx:=0;
  414. if not(entry.id in [mainentryid,subentryid]) then
  415. begin
  416. readentry:=iberror;
  417. error:=true;
  418. exit;
  419. end;
  420. readentry:=entry.nr;
  421. end;
  422. function tppufile.endofentry:boolean;
  423. begin
  424. endofentry:=(entryidx>=entry.size);
  425. end;
  426. procedure tppufile.getdatabuf(var b;len:longint;var result:longint);
  427. begin
  428. if entryidx+len>entry.size then
  429. result:=entry.size-entryidx
  430. else
  431. result:=len;
  432. readdata(b,result);
  433. inc(entryidx,result);
  434. end;
  435. procedure tppufile.getdata(var b;len:longint);
  436. begin
  437. if entryidx+len>entry.size then
  438. begin
  439. error:=true;
  440. exit;
  441. end;
  442. readdata(b,len);
  443. inc(entryidx,len);
  444. end;
  445. function tppufile.getbyte:byte;
  446. var
  447. b : byte;
  448. begin
  449. if entryidx+1>entry.size then
  450. begin
  451. error:=true;
  452. getbyte:=0;
  453. exit;
  454. end;
  455. readdata(b,1);
  456. getbyte:=b;
  457. inc(entryidx);
  458. end;
  459. function tppufile.getword:word;
  460. type
  461. pword = ^word;
  462. var
  463. w : word;
  464. begin
  465. if entryidx+2>entry.size then
  466. begin
  467. error:=true;
  468. getword:=0;
  469. exit;
  470. end;
  471. readdata(w,2);
  472. if change_endian then
  473. getword:=swap(w)
  474. else
  475. getword:=w;
  476. inc(entryidx,2);
  477. end;
  478. function tppufile.getlongint:longint;
  479. type
  480. plongint = ^longint;
  481. var
  482. l : longint;
  483. begin
  484. if entryidx+4>entry.size then
  485. begin
  486. error:=true;
  487. getlongint:=0;
  488. exit;
  489. end;
  490. readdata(l,4);
  491. if change_endian then
  492. { someone added swap(l : longint) in system unit
  493. this broke the following code !! }
  494. getlongint:=swap(word(l shr 16)) or (longint(swap(word(l and $ffff))) shl 16)
  495. else
  496. getlongint:=l;
  497. inc(entryidx,4);
  498. end;
  499. function tppufile.getreal:ppureal;
  500. type
  501. pppureal = ^ppureal;
  502. var
  503. d : ppureal;
  504. begin
  505. if entryidx+sizeof(ppureal)>entry.size then
  506. begin
  507. error:=true;
  508. getreal:=0;
  509. exit;
  510. end;
  511. readdata(d,sizeof(ppureal));
  512. getreal:=d;
  513. inc(entryidx,sizeof(ppureal));
  514. end;
  515. function tppufile.getstring:string;
  516. var
  517. s : string;
  518. begin
  519. {$ifndef TP}
  520. {$ifopt H+}
  521. setlength(s,getbyte);
  522. {$else}
  523. s[0]:=chr(getbyte);
  524. {$endif}
  525. {$else}
  526. s[0]:=chr(getbyte);
  527. {$endif}
  528. if entryidx+length(s)>entry.size then
  529. begin
  530. error:=true;
  531. exit;
  532. end;
  533. ReadData(s[1],length(s));
  534. getstring:=s;
  535. inc(entryidx,length(s));
  536. end;
  537. function tppufile.skipuntilentry(untilb:byte):boolean;
  538. var
  539. b : byte;
  540. begin
  541. repeat
  542. b:=readentry;
  543. until (b in [ibend,iberror]) or ((b=untilb) and (entry.id=mainentryid));
  544. skipuntilentry:=(b=untilb);
  545. end;
  546. {*****************************************************************************
  547. TPPUFile Writing
  548. *****************************************************************************}
  549. function tppufile.create:boolean;
  550. begin
  551. create:=false;
  552. assign(f,fname);
  553. {$I-}
  554. rewrite(f,1);
  555. {$I+}
  556. if ioresult<>0 then
  557. exit;
  558. Mode:=2;
  559. {write header for sure}
  560. blockwrite(f,header,sizeof(tppuheader));
  561. bufsize:=ppubufsize;
  562. bufstart:=sizeof(tppuheader);
  563. bufidx:=0;
  564. {reset}
  565. crc:=$ffffffff;
  566. Error:=false;
  567. do_crc:=true;
  568. size:=0;
  569. entrytyp:=mainentryid;
  570. {start}
  571. NewEntry;
  572. create:=true;
  573. end;
  574. procedure tppufile.writeheader;
  575. var
  576. opos : longint;
  577. begin
  578. { flush buffer }
  579. writebuf;
  580. { update size (w/o header!) in the header }
  581. header.size:=bufstart-sizeof(tppuheader);
  582. { write header and restore filepos after it }
  583. opos:=filepos(f);
  584. seek(f,0);
  585. blockwrite(f,header,sizeof(tppuheader));
  586. seek(f,opos);
  587. end;
  588. procedure tppufile.writebuf;
  589. begin
  590. blockwrite(f,buf^,bufidx);
  591. inc(bufstart,bufidx);
  592. bufidx:=0;
  593. end;
  594. procedure tppufile.writedata(var b;len:longint);
  595. var
  596. p : pchar;
  597. left,
  598. idx : longint;
  599. begin
  600. p:=pchar(@b);
  601. idx:=0;
  602. while len>0 do
  603. begin
  604. left:=bufsize-bufidx;
  605. if len>left then
  606. begin
  607. move(p[idx],buf[bufidx],left);
  608. dec(len,left);
  609. inc(idx,left);
  610. inc(bufidx,left);
  611. writebuf;
  612. end
  613. else
  614. begin
  615. move(p[idx],buf[bufidx],len);
  616. inc(bufidx,len);
  617. exit;
  618. end;
  619. end;
  620. end;
  621. procedure tppufile.NewEntry;
  622. begin
  623. with entry do
  624. begin
  625. id:=entrytyp;
  626. nr:=ibend;
  627. size:=0;
  628. end;
  629. {Reset Entry State}
  630. entryidx:=0;
  631. entrybufstart:=bufstart;
  632. entrystart:=bufstart+bufidx;
  633. {Alloc in buffer}
  634. writedata(entry,sizeof(tppuentry));
  635. end;
  636. procedure tppufile.writeentry(ibnr:byte);
  637. var
  638. opos : longint;
  639. begin
  640. {create entry}
  641. entry.id:=entrytyp;
  642. entry.nr:=ibnr;
  643. entry.size:=entryidx;
  644. {it's already been sent to disk ?}
  645. if entrybufstart<>bufstart then
  646. begin
  647. {flush to be sure}
  648. WriteBuf;
  649. {write entry}
  650. opos:=filepos(f);
  651. seek(f,entrystart);
  652. blockwrite(f,entry,sizeof(tppuentry));
  653. seek(f,opos);
  654. entrybufstart:=bufstart;
  655. end
  656. else
  657. move(entry,buf[entrystart-bufstart],sizeof(entry));
  658. {Add New Entry, which is ibend by default}
  659. entrystart:=bufstart+bufidx; {next entry position}
  660. NewEntry;
  661. end;
  662. procedure tppufile.putdata(var b;len:longint);
  663. begin
  664. if do_crc then
  665. crc:=UpdateCrc32(crc,b,len);
  666. writedata(b,len);
  667. inc(entryidx,len);
  668. end;
  669. procedure tppufile.putbyte(b:byte);
  670. begin
  671. writedata(b,1);
  672. inc(entryidx);
  673. end;
  674. procedure tppufile.putword(w:word);
  675. begin
  676. if change_endian then
  677. w:=swap(w);
  678. putdata(w,2);
  679. end;
  680. procedure tppufile.putlongint(l:longint);
  681. begin
  682. if change_endian then
  683. { someone added swap(l : longint) in system unit
  684. this broke the following code !! }
  685. l:=swap(word(l shr 16)) or (longint(swap(word(l and $ffff))) shl 16);
  686. putdata(l,4);
  687. end;
  688. procedure tppufile.putreal(d:ppureal);
  689. begin
  690. putdata(d,sizeof(ppureal));
  691. end;
  692. procedure tppufile.putstring(s:string);
  693. begin
  694. putdata(s,length(s)+1);
  695. end;
  696. end.
  697. {
  698. $Log$
  699. Revision 1.24 1999-02-22 13:07:00 pierre
  700. + -b and -bl options work !
  701. + cs_local_browser ($L+) is disabled if cs_browser ($Y+)
  702. is not enabled when quitting global section
  703. * local vars and procedures are not yet stored into PPU
  704. Revision 1.23 1999/02/16 00:48:24 peter
  705. * save in the ppu if linked with obj file instead of using the
  706. library flag, so the .inc files are also checked
  707. Revision 1.22 1999/02/05 08:54:29 pierre
  708. + linkofiles splitted inot linkofiles and linkunitfiles
  709. because linkofiles must be stored with directory
  710. to enabled linking of different objects with same name
  711. in a different directory
  712. Revision 1.21 1998/12/30 22:15:50 peter
  713. + farpointer type
  714. * absolutesym now also stores if its far
  715. Revision 1.20 1998/11/30 16:34:45 pierre
  716. * corrected problems with rangecheck
  717. + added needed code for no rangecheck in CRC32 functions in ppu unit
  718. * enumdef lso need its rangenr reset to zero
  719. when calling reset_global_defs
  720. Revision 1.19 1998/11/16 15:41:42 peter
  721. * tp7 didn't like my ifopt H+ :(
  722. Revision 1.18 1998/11/16 12:18:03 peter
  723. * H+ fixes
  724. Revision 1.17 1998/10/14 10:45:08 pierre
  725. * ppu problems for m68k fixed (at least in cross compiling)
  726. * one last memory leak for sysamiga fixed
  727. * the amiga RTL compiles now completely !!
  728. Revision 1.16 1998/09/24 23:49:14 peter
  729. + aktmodeswitches
  730. Revision 1.15 1998/09/23 15:39:10 pierre
  731. * browser bugfixes
  732. was adding a reference when looking for the symbol
  733. if -bSYM_NAME was used
  734. Revision 1.14 1998/09/21 10:00:07 peter
  735. * store number of defs in ppu file
  736. Revision 1.13 1998/09/21 08:45:18 pierre
  737. + added vmt_offset in tobjectdef.write for fututre use
  738. (first steps to have objects without vmt if no virtual !!)
  739. + added fpu_used field for tabstractprocdef :
  740. sets this level to 2 if the functions return with value in FPU
  741. (is then set to correct value at parsing of implementation)
  742. THIS MIGHT refuse some code with FPU expression too complex
  743. that were accepted before and even in some cases
  744. that don't overflow in fact
  745. ( like if f : float; is a forward that finally in implementation
  746. only uses one fpu register !!)
  747. Nevertheless I think that it will improve security on
  748. FPU operations !!
  749. * most other changes only for UseBrowser code
  750. (added symtable references for record and objects)
  751. local switch for refs to args and local of each function
  752. (static symtable still missing)
  753. UseBrowser still not stable and probably broken by
  754. the definition hash array !!
  755. Revision 1.12 1998/09/18 08:01:37 pierre
  756. + improvement on the usebrowser part
  757. (does not work correctly for now)
  758. Revision 1.11 1998/09/11 15:16:47 peter
  759. * merge fixes
  760. Revision 1.10.2.1 1998/09/11 15:15:04 peter
  761. * fixed not in [] bug
  762. Revision 1.10 1998/08/31 12:26:30 peter
  763. * m68k and palmos updates from surebugfixes
  764. Revision 1.9 1998/08/17 09:17:51 peter
  765. * static/shared linking updates
  766. Revision 1.8 1998/08/11 15:31:40 peter
  767. * write extended to ppu file
  768. * new version 0.99.7
  769. Revision 1.7 1998/06/25 10:51:01 pierre
  770. * removed a remaining ifndef NEWPPU
  771. replaced by ifdef OLDPPU
  772. * added uf_finalize to ppu unit
  773. Revision 1.6 1998/06/16 08:56:26 peter
  774. + targetcpu
  775. * cleaner pmodules for newppu
  776. Revision 1.5 1998/06/13 00:10:12 peter
  777. * working browser and newppu
  778. * some small fixes against crashes which occured in bp7 (but not in
  779. fpc?!)
  780. Revision 1.4 1998/06/09 16:01:48 pierre
  781. + added procedure directive parsing for procvars
  782. (accepted are popstack cdecl and pascal)
  783. + added C vars with the following syntax
  784. var C calias 'true_c_name';(can be followed by external)
  785. reason is that you must add the Cprefix
  786. which is target dependent
  787. Revision 1.3 1998/05/28 14:40:26 peter
  788. * fixes for newppu, remake3 works now with it
  789. Revision 1.2 1998/05/27 19:45:08 peter
  790. * symtable.pas splitted into includefiles
  791. * symtable adapted for $ifdef NEWPPU
  792. Revision 1.1 1998/05/12 10:56:07 peter
  793. + the ppufile object unit
  794. }