ppu.pas 19 KB

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