symppu.inc 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845
  1. {
  2. $Id$
  3. Copyright (c) 1993-98 by Florian Klaempfl, Pierre Muller
  4. Implementation of the reading of PPU Files for the symtable
  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. const
  19. {$ifdef FPC}
  20. ppubufsize=32768;
  21. {$ELSE}
  22. {$IFDEF USEOVERLAY}
  23. ppubufsize=512;
  24. {$ELSE}
  25. ppubufsize=4096;
  26. {$ENDIF}
  27. {$ENDIF}
  28. { define ORDERSOURCES}
  29. {*****************************************************************************
  30. PPU Writing
  31. *****************************************************************************}
  32. procedure writebyte(b:byte);
  33. begin
  34. current_ppu^.putbyte(b);
  35. end;
  36. procedure writeword(w:word);
  37. begin
  38. current_ppu^.putword(w);
  39. end;
  40. procedure writelong(l:longint);
  41. begin
  42. current_ppu^.putlongint(l);
  43. end;
  44. procedure writereal(d:bestreal);
  45. begin
  46. current_ppu^.putreal(d);
  47. end;
  48. procedure writestring(const s:string);
  49. begin
  50. current_ppu^.putstring(s);
  51. end;
  52. procedure writenormalset(var s); {You cannot pass an array[0..31] of byte!}
  53. begin
  54. current_ppu^.putdata(s,sizeof(tnormalset));
  55. end;
  56. procedure writesmallset(var s);
  57. begin
  58. current_ppu^.putdata(s,4);
  59. end;
  60. { posinfo is not relevant for changes in PPU }
  61. procedure writeposinfo(const p:tfileposinfo);
  62. var
  63. oldcrc : boolean;
  64. begin
  65. oldcrc:=current_ppu^.do_crc;
  66. current_ppu^.do_crc:=false;
  67. current_ppu^.putword(p.fileindex);
  68. current_ppu^.putlongint(p.line);
  69. current_ppu^.putword(p.column);
  70. current_ppu^.do_crc:=oldcrc;
  71. end;
  72. procedure writederef(p : psymtableentry);
  73. begin
  74. if p=nil then
  75. current_ppu^.putbyte(ord(derefnil))
  76. else
  77. begin
  78. { Static symtable ? }
  79. if p^.owner^.symtabletype=staticsymtable then
  80. begin
  81. current_ppu^.putbyte(ord(derefaktstaticindex));
  82. current_ppu^.putword(p^.indexnr);
  83. end
  84. { Local record/object symtable ? }
  85. else if (p^.owner=aktrecordsymtable) then
  86. begin
  87. current_ppu^.putbyte(ord(derefaktrecordindex));
  88. current_ppu^.putword(p^.indexnr);
  89. end
  90. { Local local/para symtable ? }
  91. else if (p^.owner=aktlocalsymtable) then
  92. begin
  93. current_ppu^.putbyte(ord(derefaktlocal));
  94. current_ppu^.putword(p^.indexnr);
  95. end
  96. else
  97. begin
  98. current_ppu^.putbyte(ord(derefindex));
  99. current_ppu^.putword(p^.indexnr);
  100. { Current unit symtable ? }
  101. repeat
  102. if not assigned(p) then
  103. internalerror(556655);
  104. case p^.owner^.symtabletype of
  105. { when writing the pseudo PPU file
  106. to get CRC values the globalsymtable is not yet
  107. a unitsymtable PM }
  108. {$ifndef Dont_use_double_checksum}
  109. globalsymtable,
  110. {$endif Dont_use_double_checksum}
  111. unitsymtable :
  112. begin
  113. current_ppu^.putbyte(ord(derefunit));
  114. current_ppu^.putword(p^.owner^.unitid);
  115. break;
  116. end;
  117. staticsymtable :
  118. begin
  119. current_ppu^.putbyte(ord(derefaktstaticindex));
  120. current_ppu^.putword(p^.indexnr);
  121. break;
  122. end;
  123. localsymtable :
  124. begin
  125. p:=p^.owner^.defowner;
  126. current_ppu^.putbyte(ord(dereflocal));
  127. current_ppu^.putword(p^.indexnr);
  128. end;
  129. parasymtable :
  130. begin
  131. p:=p^.owner^.defowner;
  132. current_ppu^.putbyte(ord(derefpara));
  133. current_ppu^.putword(p^.indexnr);
  134. end;
  135. objectsymtable,
  136. recordsymtable :
  137. begin
  138. p:=p^.owner^.defowner;
  139. current_ppu^.putbyte(ord(derefrecord));
  140. current_ppu^.putword(p^.indexnr);
  141. end;
  142. else
  143. internalerror(556656);
  144. end;
  145. until false;
  146. end;
  147. end;
  148. end;
  149. procedure writedefref(p : pdef);
  150. begin
  151. writederef(p);
  152. end;
  153. procedure writesymref(p : psym);
  154. begin
  155. writederef(p);
  156. end;
  157. procedure writesourcefiles;
  158. var
  159. hp : pinputfile;
  160. {$ifdef ORDERSOURCES}
  161. i,j : longint;
  162. {$endif ORDERSOURCES}
  163. begin
  164. { second write the used source files }
  165. current_ppu^.do_crc:=false;
  166. hp:=current_module^.sourcefiles^.files;
  167. {$ifdef ORDERSOURCES}
  168. { write source files directly in good order }
  169. j:=0;
  170. while assigned(hp) do
  171. begin
  172. inc(j);
  173. hp:=hp^.ref_next;
  174. end;
  175. while j>0 do
  176. begin
  177. hp:=current_module^.sourcefiles^.files;
  178. for i:=1 to j-1 do
  179. hp:=hp^.ref_next;
  180. current_ppu^.putstring(hp^.name^);
  181. dec(j);
  182. end;
  183. {$else not ORDERSOURCES}
  184. while assigned(hp) do
  185. begin
  186. { only name and extension }
  187. current_ppu^.putstring(hp^.name^);
  188. hp:=hp^.ref_next;
  189. end;
  190. {$endif ORDERSOURCES}
  191. current_ppu^.writeentry(ibsourcefiles);
  192. current_ppu^.do_crc:=true;
  193. end;
  194. procedure writeusedmacros;
  195. var
  196. hp : pmacrosym;
  197. i : longint;
  198. begin
  199. { second write the used source files }
  200. current_ppu^.do_crc:=false;
  201. for i:=1 to macros^.symindex^.count do
  202. begin
  203. hp:=pmacrosym(macros^.symindex^.search(i));
  204. { only used or init defined macros are stored }
  205. if hp^.is_used or hp^.defined_at_startup then
  206. begin
  207. current_ppu^.putstring(hp^.name);
  208. current_ppu^.putbyte(byte(hp^.defined_at_startup));
  209. current_ppu^.putbyte(byte(hp^.is_used));
  210. end;
  211. end;
  212. current_ppu^.writeentry(ibusedmacros);
  213. current_ppu^.do_crc:=true;
  214. end;
  215. procedure writeusedunit;
  216. var
  217. hp : pused_unit;
  218. begin
  219. numberunits;
  220. hp:=pused_unit(current_module^.used_units.first);
  221. while assigned(hp) do
  222. begin
  223. { implementation units should not change
  224. the CRC PM }
  225. current_ppu^.do_crc:=hp^.in_interface;
  226. current_ppu^.putstring(hp^.name^);
  227. { the checksum should not affect the crc of this unit ! (PFV) }
  228. current_ppu^.do_crc:=false;
  229. current_ppu^.putlongint(hp^.checksum);
  230. current_ppu^.putlongint(hp^.interface_checksum);
  231. current_ppu^.putbyte(byte(hp^.in_interface));
  232. current_ppu^.do_crc:=true;
  233. hp:=pused_unit(hp^.next);
  234. end;
  235. current_ppu^.do_interface_crc:=true;
  236. current_ppu^.writeentry(ibloadunit);
  237. end;
  238. procedure writelinkcontainer(var p:tlinkcontainer;id:byte;strippath:boolean);
  239. var
  240. hcontainer : tlinkcontainer;
  241. s : string;
  242. mask : longint;
  243. begin
  244. hcontainer.init;
  245. while not p.empty do
  246. begin
  247. s:=p.get(mask);
  248. if strippath then
  249. current_ppu^.putstring(SplitFileName(s))
  250. else
  251. current_ppu^.putstring(s);
  252. current_ppu^.putlongint(mask);
  253. hcontainer.insert(s,mask);
  254. end;
  255. current_ppu^.writeentry(id);
  256. p:=hcontainer;
  257. end;
  258. procedure writeunitas(const s : string;unittable : punitsymtable;only_crc : boolean);
  259. begin
  260. Message1(unit_u_ppu_write,s);
  261. { create unit flags }
  262. with Current_Module^ do
  263. begin
  264. {$ifdef GDB}
  265. if cs_gdb_dbx in aktglobalswitches then
  266. flags:=flags or uf_has_dbx;
  267. {$endif GDB}
  268. if target_os.endian=endian_big then
  269. flags:=flags or uf_big_endian;
  270. if cs_browser in aktmoduleswitches then
  271. flags:=flags or uf_has_browser;
  272. if cs_local_browser in aktmoduleswitches then
  273. flags:=flags or uf_local_browser;
  274. end;
  275. {$ifdef Test_Double_checksum_write}
  276. If only_crc then
  277. Assign(CRCFile,s+'.INT')
  278. else
  279. Assign(CRCFile,s+'.IMP');
  280. Rewrite(CRCFile);
  281. {$endif def Test_Double_checksum_write}
  282. { open ppufile }
  283. current_ppu:=new(pppufile,init(s));
  284. current_ppu^.crc_only:=only_crc;
  285. if not current_ppu^.create then
  286. Message(unit_f_ppu_cannot_write);
  287. {$ifdef Test_Double_checksum}
  288. if only_crc then
  289. begin
  290. new(current_ppu^.crc_test);
  291. new(current_ppu^.crc_test2);
  292. end
  293. else
  294. begin
  295. current_ppu^.crc_test:=Current_Module^.crc_array;
  296. current_ppu^.crc_index:=Current_Module^.crc_size;
  297. current_ppu^.crc_test2:=Current_Module^.crc_array2;
  298. current_ppu^.crc_index2:=Current_Module^.crc_size2;
  299. end;
  300. {$endif def Test_Double_checksum}
  301. current_ppu^.change_endian:=source_os.endian<>target_os.endian;
  302. { write symbols and definitions }
  303. unittable^.writeasunit;
  304. { flush to be sure }
  305. current_ppu^.flush;
  306. { create and write header }
  307. current_ppu^.header.size:=current_ppu^.size;
  308. current_ppu^.header.checksum:=current_ppu^.crc;
  309. current_ppu^.header.interface_checksum:=current_ppu^.interface_crc;
  310. current_ppu^.header.compiler:=wordversion;
  311. current_ppu^.header.cpu:=word(target_cpu);
  312. current_ppu^.header.target:=word(target_info.target);
  313. current_ppu^.header.flags:=current_module^.flags;
  314. If not only_crc then
  315. current_ppu^.writeheader;
  316. { save crc in current_module also }
  317. current_module^.crc:=current_ppu^.crc;
  318. current_module^.interface_crc:=current_ppu^.interface_crc;
  319. if only_crc then
  320. begin
  321. {$ifdef Test_Double_checksum}
  322. Current_Module^.crc_array:=current_ppu^.crc_test;
  323. current_ppu^.crc_test:=nil;
  324. Current_Module^.crc_size:=current_ppu^.crc_index2;
  325. Current_Module^.crc_array2:=current_ppu^.crc_test2;
  326. current_ppu^.crc_test2:=nil;
  327. Current_Module^.crc_size2:=current_ppu^.crc_index2;
  328. {$endif def Test_Double_checksum}
  329. closecurrentppu;
  330. end;
  331. {$ifdef Test_Double_checksum_write}
  332. close(CRCFile);
  333. {$endif Test_Double_checksum_write}
  334. end;
  335. procedure closecurrentppu;
  336. begin
  337. {$ifdef Test_Double_checksum}
  338. if assigned(current_ppu^.crc_test) then
  339. dispose(current_ppu^.crc_test);
  340. if assigned(current_ppu^.crc_test2) then
  341. dispose(current_ppu^.crc_test2);
  342. {$endif Test_Double_checksum}
  343. { close }
  344. current_ppu^.close;
  345. dispose(current_ppu,done);
  346. current_ppu:=nil;
  347. end;
  348. {*****************************************************************************
  349. PPU Reading
  350. *****************************************************************************}
  351. function readbyte:byte;
  352. begin
  353. readbyte:=current_ppu^.getbyte;
  354. if current_ppu^.error then
  355. Message(unit_f_ppu_read_error);
  356. end;
  357. function readword:word;
  358. begin
  359. readword:=current_ppu^.getword;
  360. if current_ppu^.error then
  361. Message(unit_f_ppu_read_error);
  362. end;
  363. function readlong:longint;
  364. begin
  365. readlong:=current_ppu^.getlongint;
  366. if current_ppu^.error then
  367. Message(unit_f_ppu_read_error);
  368. end;
  369. function readreal : bestreal;
  370. begin
  371. readreal:=current_ppu^.getreal;
  372. if current_ppu^.error then
  373. Message(unit_f_ppu_read_error);
  374. end;
  375. function readstring : string;
  376. begin
  377. readstring:=current_ppu^.getstring;
  378. if current_ppu^.error then
  379. Message(unit_f_ppu_read_error);
  380. end;
  381. procedure readnormalset(var s); {You cannot pass an array [0..31] of byte.}
  382. begin
  383. current_ppu^.getdata(s,sizeof(tnormalset));
  384. if current_ppu^.error then
  385. Message(unit_f_ppu_read_error);
  386. end;
  387. procedure readsmallset(var s);
  388. begin
  389. current_ppu^.getdata(s,4);
  390. if current_ppu^.error then
  391. Message(unit_f_ppu_read_error);
  392. end;
  393. procedure readposinfo(var p:tfileposinfo);
  394. begin
  395. p.fileindex:=current_ppu^.getword;
  396. p.line:=current_ppu^.getlongint;
  397. p.column:=current_ppu^.getword;
  398. end;
  399. {$ifndef OLDDEREF}
  400. function readderef : pderef;
  401. var
  402. hp,p : pderef;
  403. b : tdereftype;
  404. begin
  405. p:=nil;
  406. repeat
  407. hp:=p;
  408. b:=tdereftype(current_ppu^.getbyte);
  409. case b of
  410. derefnil :
  411. break;
  412. derefunit,
  413. derefaktrecordindex,
  414. derefaktlocal,
  415. derefaktstaticindex :
  416. begin
  417. new(p,init(b,current_ppu^.getword));
  418. p^.next:=hp;
  419. break;
  420. end;
  421. derefindex,
  422. dereflocal,
  423. derefpara,
  424. derefrecord :
  425. begin
  426. new(p,init(b,current_ppu^.getword));
  427. p^.next:=hp;
  428. end;
  429. end;
  430. until false;
  431. readderef:=p;
  432. end;
  433. function readdefref : pdef;
  434. begin
  435. readdefref:=pdef(readderef);
  436. end;
  437. function readsymref : psym;
  438. begin
  439. readsymref:=psym(readderef);
  440. end;
  441. {$else}
  442. function readdefref : pdef;
  443. var
  444. hd : pdef;
  445. begin
  446. longint(hd):=current_ppu^.getword;
  447. longint(hd):=longint(hd) or (longint(current_ppu^.getword) shl 16);
  448. readdefref:=hd;
  449. end;
  450. function readsymref : psym;
  451. var
  452. hd : psym;
  453. begin
  454. longint(hd):=current_ppu^.getword;
  455. longint(hd):=longint(hd) or (longint(current_ppu^.getword) shl 16);
  456. readsymref:=hd;
  457. end;
  458. {$endif}
  459. procedure readusedmacros;
  460. var
  461. hs : string;
  462. mac : pmacrosym;
  463. was_defined_at_startup,
  464. was_used : boolean;
  465. begin
  466. while not current_ppu^.endofentry do
  467. begin
  468. hs:=current_ppu^.getstring;
  469. was_defined_at_startup:=boolean(current_ppu^.getbyte);
  470. was_used:=boolean(current_ppu^.getbyte);
  471. mac:=pmacrosym(macros^.search(hs));
  472. if assigned(mac) then
  473. begin
  474. {$ifndef EXTDEBUG}
  475. { if we don't have the sources why tell }
  476. if current_module^.sources_avail then
  477. {$endif ndef EXTDEBUG}
  478. if not was_defined_at_startup and was_used and
  479. mac^.defined_at_startup then
  480. Comment(V_Hint,'Conditional '+hs+' was not set at startup '+
  481. 'in last compilation of '+current_module^.mainsource^);
  482. end
  483. else { not assigned }
  484. if was_defined_at_startup and was_used then
  485. Comment(V_Hint,'Conditional '+hs+' was set at startup '+
  486. 'in last compilation of '+current_module^.mainsource^);
  487. end;
  488. end;
  489. procedure readsourcefiles;
  490. var
  491. temp,hs : string;
  492. {$ifdef ORDERSOURCES}
  493. main_dir : string;
  494. {$endif ORDERSOURCES}
  495. incfile_found,
  496. main_found,
  497. is_main : boolean;
  498. ppufiletime,
  499. source_time : longint;
  500. hp : pinputfile;
  501. begin
  502. ppufiletime:=getnamedfiletime(current_module^.ppufilename^);
  503. current_module^.sources_avail:=true;
  504. {$ifdef ORDERSOURCES}
  505. is_main:=true;
  506. main_dir:='';
  507. {$endif ORDERSOURCES}
  508. while not current_ppu^.endofentry do
  509. begin
  510. hs:=current_ppu^.getstring;
  511. {$ifndef ORDERSOURCES}
  512. is_main:=current_ppu^.endofentry;
  513. {$endif ORDERSOURCES}
  514. temp:='';
  515. if (current_module^.flags and uf_in_library)<>0 then
  516. begin
  517. current_module^.sources_avail:=false;
  518. temp:=' library';
  519. end
  520. else if pos('Macro ',hs)=1 then
  521. begin
  522. { we don't want to find this file }
  523. { but there is a problem with file indexing !! }
  524. temp:='';
  525. end
  526. else
  527. begin
  528. { check the date of the source files }
  529. Source_Time:=GetNamedFileTime(current_module^.path^+hs);
  530. incfile_found:=false;
  531. if Source_Time<>-1 then
  532. hs:=current_module^.path^+hs
  533. {$ifdef ORDERSOURCES}
  534. else if not(is_main) then
  535. begin
  536. Source_Time:=GetNamedFileTime(main_dir+hs);
  537. if Source_Time<>-1 then
  538. hs:=main_dir+hs;
  539. end
  540. {$endif def ORDERSOURCES}
  541. ;
  542. if (Source_Time=-1) then
  543. begin
  544. if is_main then
  545. temp:=unitsearchpath.FindFile(hs,main_found)
  546. else
  547. temp:=includesearchpath.FindFile(hs,incfile_found);
  548. {$ifdef ORDERSOURCES}
  549. if is_main then
  550. begin
  551. stringdispose(current_module^.mainsource);
  552. current_module^.mainsource:=stringdup(hs);
  553. if main_found then
  554. main_dir:=temp;
  555. end;
  556. {$endif ORDERSOURCES}
  557. if incfile_found or main_found then
  558. begin
  559. hs:=temp+hs;
  560. Source_Time:=GetNamedFileTime(hs);
  561. end
  562. end;
  563. if Source_Time=-1 then
  564. begin
  565. current_module^.sources_avail:=false;
  566. temp:=' not found';
  567. end
  568. else
  569. begin
  570. { time newer? But only allow if the file is not searched
  571. in the include path (PFV), else you've problems with
  572. units which use the same includefile names }
  573. if incfile_found then
  574. temp:=' found'
  575. else
  576. begin
  577. temp:=' time '+filetimestring(source_time);
  578. if (source_time>ppufiletime) then
  579. begin
  580. current_module^.do_compile:=true;
  581. current_module^.recompile_reason:=rr_sourcenewer;
  582. temp:=temp+' *'
  583. end;
  584. end;
  585. end;
  586. new(hp,init(hs));
  587. { the indexing is wrong here PM }
  588. current_module^.sourcefiles^.register_file(hp);
  589. end;
  590. Message1(unit_u_ppu_source,hs+temp);
  591. {$ifdef ORDERSOURCES}
  592. is_main:=false;
  593. {$endif ORDERSOURCES}
  594. end;
  595. {$ifndef ORDERSOURCES}
  596. { main source is always the last }
  597. stringdispose(current_module^.mainsource);
  598. current_module^.mainsource:=stringdup(hs);
  599. { the indexing is corrected here PM }
  600. current_module^.sourcefiles^.inverse_register_indexes;
  601. {$endif ORDERSOURCES}
  602. { check if we want to rebuild every unit, only if the sources are
  603. available }
  604. if do_build and current_module^.sources_avail then
  605. begin
  606. current_module^.do_compile:=true;
  607. current_module^.recompile_reason:=rr_build;
  608. end;
  609. end;
  610. procedure readloadunit;
  611. var
  612. hs : string;
  613. intfchecksum,
  614. checksum : longint;
  615. in_interface : boolean;
  616. begin
  617. while not current_ppu^.endofentry do
  618. begin
  619. hs:=current_ppu^.getstring;
  620. checksum:=current_ppu^.getlongint;
  621. intfchecksum:=current_ppu^.getlongint;
  622. in_interface:=(current_ppu^.getbyte<>0);
  623. current_module^.used_units.concat(new(pused_unit,init_to_load(hs,checksum,intfchecksum,in_interface)));
  624. end;
  625. end;
  626. procedure readlinkcontainer(var p:tlinkcontainer);
  627. var
  628. s : string;
  629. m : longint;
  630. begin
  631. while not current_ppu^.endofentry do
  632. begin
  633. s:=current_ppu^.getstring;
  634. m:=current_ppu^.getlongint;
  635. p.insert(s,m);
  636. end;
  637. end;
  638. procedure load_interface;
  639. var
  640. b : byte;
  641. newmodulename : pstring;
  642. begin
  643. { read interface part }
  644. repeat
  645. b:=current_ppu^.readentry;
  646. case b of
  647. ibmodulename :
  648. begin
  649. newmodulename:=stringdup(current_ppu^.getstring);
  650. if newmodulename^<>current_module^.modulename^ then
  651. Message2(unit_f_unit_name_error,current_module^.modulename^,newmodulename^);
  652. stringdispose(current_module^.modulename);
  653. current_module^.modulename:=newmodulename;
  654. end;
  655. ibsourcefiles :
  656. readsourcefiles;
  657. ibusedmacros :
  658. readusedmacros;
  659. ibloadunit :
  660. readloadunit;
  661. iblinkunitofiles :
  662. readlinkcontainer(current_module^.LinkUnitOFiles);
  663. iblinkunitstaticlibs :
  664. readlinkcontainer(current_module^.LinkUnitStaticLibs);
  665. iblinkunitsharedlibs :
  666. readlinkcontainer(current_module^.LinkUnitSharedLibs);
  667. iblinkotherofiles :
  668. readlinkcontainer(current_module^.LinkotherOFiles);
  669. iblinkotherstaticlibs :
  670. readlinkcontainer(current_module^.LinkotherStaticLibs);
  671. iblinkothersharedlibs :
  672. readlinkcontainer(current_module^.LinkotherSharedLibs);
  673. ibendinterface :
  674. break;
  675. else
  676. Message1(unit_f_ppu_invalid_entry,tostr(b));
  677. end;
  678. until false;
  679. end;
  680. {
  681. $Log$
  682. Revision 1.55 1999-11-17 17:05:04 pierre
  683. * Notes/hints changes
  684. Revision 1.54 1999/11/12 11:03:50 peter
  685. * searchpaths changed to stringqueue object
  686. Revision 1.53 1999/11/06 14:34:27 peter
  687. * truncated log to 20 revs
  688. Revision 1.52 1999/11/05 17:18:03 pierre
  689. * local browsing works at first level
  690. ie for function defined in interface or implementation
  691. not yet for functions inside other functions
  692. Revision 1.51 1999/09/16 13:27:08 pierre
  693. + error if PPU modulename is different from what is searched
  694. (8+3 limitations!)
  695. + cond ORDERSOURCES to allow recompilation of FP
  696. if symppu.inc is changed (need PPUversion change!)
  697. Revision 1.50 1999/09/12 15:45:11 florian
  698. * tnamedindexobject._name should be never accessed direct! Use the
  699. function name instead
  700. Revision 1.49 1999/09/03 10:54:22 pierre
  701. * message about conditionals changed to Hint
  702. Revision 1.48 1999/08/31 15:47:56 pierre
  703. + startup conditionals stored in PPU file for debug info
  704. Revision 1.47 1999/08/27 10:54:45 pierre
  705. * some code adapted to CRC_only computation
  706. + main file is search in unitspathlist
  707. and triggers do_compile flag
  708. * some changes to get identical CRC vaules after
  709. interface and after implementation
  710. Revision 1.46 1999/08/13 21:33:12 peter
  711. * support for array constructors extended and more error checking
  712. Revision 1.45 1999/08/03 22:03:17 peter
  713. * moved bitmask constants to sets
  714. * some other type/const renamings
  715. Revision 1.44 1999/07/14 21:19:12 florian
  716. + implemented a better error message if a PPU file isn't found as suggested
  717. by Lee John
  718. Revision 1.43 1999/07/03 00:30:00 peter
  719. * new link writing to the ppu, one .ppu is needed for all link types,
  720. static (.o) is now always created also when smartlinking is used
  721. Revision 1.42 1999/06/22 16:24:47 pierre
  722. * local browser stuff corrected
  723. Revision 1.41 1999/05/14 17:52:28 peter
  724. * new deref code
  725. Revision 1.40 1999/05/13 21:59:44 peter
  726. * removed oldppu code
  727. * warning if objpas is loaded from uses
  728. * first things for new deref writing
  729. Revision 1.39 1999/05/04 21:45:06 florian
  730. * changes to compile it with Delphi 4.0
  731. Revision 1.38 1999/04/26 13:31:51 peter
  732. * release storenumber,double_checksum
  733. Revision 1.37 1999/04/21 09:43:53 peter
  734. * storenumber works
  735. * fixed some typos in double_checksum
  736. + incompatible types type1 and type2 message (with storenumber)
  737. Revision 1.36 1999/04/14 09:15:01 peter
  738. * first things to store the symbol/def number in the ppu
  739. Revision 1.35 1999/04/07 15:39:35 pierre
  740. + double_checksum code added
  741. Revision 1.34 1999/03/02 13:49:19 peter
  742. * renamed loadunit_int -> loadunit
  743. Revision 1.33 1999/02/23 18:29:25 pierre
  744. * win32 compilation error fix
  745. + some work for local browser (not cl=omplete yet)
  746. }