ppu.pas 19 KB

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