symppu.inc 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843
  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)
  473. {$ifndef EXTDEBUG}
  474. { if we don't have the sources why tell }
  475. and current_module^.sources_avail
  476. {$endif ndef EXTDEBUG}
  477. then
  478. begin
  479. if not was_defined_at_startup and was_used and
  480. mac^.defined_at_startup then
  481. Comment(V_Hint,'Conditional '+hs+' was not set at startup '+
  482. 'in last compilation of '+current_module^.mainsource^);
  483. end
  484. else { not assigned }
  485. if was_defined_at_startup and was_used then
  486. Comment(V_Hint,'Conditional '+hs+' was set at startup '+
  487. 'in last compilation of '+current_module^.mainsource^);
  488. end;
  489. end;
  490. procedure readsourcefiles;
  491. var
  492. temp,hs : string;
  493. {$ifdef ORDERSOURCES}
  494. main_dir : string;
  495. {$endif ORDERSOURCES}
  496. incfile_found,
  497. main_found,
  498. is_main : boolean;
  499. ppufiletime,
  500. source_time : longint;
  501. hp : pinputfile;
  502. begin
  503. ppufiletime:=getnamedfiletime(current_module^.ppufilename^);
  504. current_module^.sources_avail:=true;
  505. {$ifdef ORDERSOURCES}
  506. is_main:=true;
  507. main_dir:='';
  508. {$endif ORDERSOURCES}
  509. while not current_ppu^.endofentry do
  510. begin
  511. hs:=current_ppu^.getstring;
  512. {$ifndef ORDERSOURCES}
  513. is_main:=current_ppu^.endofentry;
  514. {$endif ORDERSOURCES}
  515. temp:='';
  516. if (current_module^.flags and uf_in_library)<>0 then
  517. begin
  518. current_module^.sources_avail:=false;
  519. temp:=' library';
  520. end
  521. else if pos('Macro ',hs)=1 then
  522. begin
  523. { we don't want to find this file }
  524. { but there is a problem with file indexing !! }
  525. temp:='';
  526. end
  527. else
  528. begin
  529. { check the date of the source files }
  530. Source_Time:=GetNamedFileTime(current_module^.path^+hs);
  531. incfile_found:=false;
  532. if Source_Time<>-1 then
  533. hs:=current_module^.path^+hs
  534. {$ifdef ORDERSOURCES}
  535. else if not(is_main) then
  536. begin
  537. Source_Time:=GetNamedFileTime(main_dir+hs);
  538. if Source_Time<>-1 then
  539. hs:=main_dir+hs;
  540. end
  541. {$endif def ORDERSOURCES}
  542. ;
  543. if (Source_Time=-1) then
  544. begin
  545. if is_main then
  546. temp:=unitsearchpath.FindFile(hs,main_found)
  547. else
  548. temp:=includesearchpath.FindFile(hs,incfile_found);
  549. {$ifdef ORDERSOURCES}
  550. if is_main then
  551. begin
  552. stringdispose(current_module^.mainsource);
  553. current_module^.mainsource:=stringdup(hs);
  554. if main_found then
  555. main_dir:=temp;
  556. end;
  557. {$endif ORDERSOURCES}
  558. if incfile_found or main_found then
  559. begin
  560. hs:=temp+hs;
  561. Source_Time:=GetNamedFileTime(hs);
  562. end
  563. end;
  564. if Source_Time=-1 then
  565. begin
  566. current_module^.sources_avail:=false;
  567. temp:=' not found';
  568. end
  569. else
  570. begin
  571. { time newer? But only allow if the file is not searched
  572. in the include path (PFV), else you've problems with
  573. units which use the same includefile names }
  574. if incfile_found then
  575. temp:=' found'
  576. else
  577. begin
  578. temp:=' time '+filetimestring(source_time);
  579. if (source_time>ppufiletime) then
  580. begin
  581. current_module^.do_compile:=true;
  582. current_module^.recompile_reason:=rr_sourcenewer;
  583. temp:=temp+' *'
  584. end;
  585. end;
  586. end;
  587. new(hp,init(hs));
  588. { the indexing is wrong here PM }
  589. current_module^.sourcefiles^.register_file(hp);
  590. end;
  591. Message1(unit_u_ppu_source,hs+temp);
  592. {$ifdef ORDERSOURCES}
  593. is_main:=false;
  594. {$endif ORDERSOURCES}
  595. end;
  596. {$ifndef ORDERSOURCES}
  597. { main source is always the last }
  598. stringdispose(current_module^.mainsource);
  599. current_module^.mainsource:=stringdup(hs);
  600. { the indexing is corrected here PM }
  601. current_module^.sourcefiles^.inverse_register_indexes;
  602. {$endif ORDERSOURCES}
  603. { check if we want to rebuild every unit, only if the sources are
  604. available }
  605. if do_build and current_module^.sources_avail then
  606. begin
  607. current_module^.do_compile:=true;
  608. current_module^.recompile_reason:=rr_build;
  609. end;
  610. end;
  611. procedure readloadunit;
  612. var
  613. hs : string;
  614. intfchecksum,
  615. checksum : longint;
  616. in_interface : boolean;
  617. begin
  618. while not current_ppu^.endofentry do
  619. begin
  620. hs:=current_ppu^.getstring;
  621. checksum:=current_ppu^.getlongint;
  622. intfchecksum:=current_ppu^.getlongint;
  623. in_interface:=(current_ppu^.getbyte<>0);
  624. current_module^.used_units.concat(new(pused_unit,init_to_load(hs,checksum,intfchecksum,in_interface)));
  625. end;
  626. end;
  627. procedure readlinkcontainer(var p:tlinkcontainer);
  628. var
  629. s : string;
  630. m : longint;
  631. begin
  632. while not current_ppu^.endofentry do
  633. begin
  634. s:=current_ppu^.getstring;
  635. m:=current_ppu^.getlongint;
  636. p.insert(s,m);
  637. end;
  638. end;
  639. procedure load_interface;
  640. var
  641. b : byte;
  642. newmodulename : pstring;
  643. begin
  644. { read interface part }
  645. repeat
  646. b:=current_ppu^.readentry;
  647. case b of
  648. ibmodulename :
  649. begin
  650. newmodulename:=stringdup(current_ppu^.getstring);
  651. if newmodulename^<>current_module^.modulename^ then
  652. Message2(unit_f_unit_name_error,current_module^.modulename^,newmodulename^);
  653. stringdispose(current_module^.modulename);
  654. current_module^.modulename:=newmodulename;
  655. end;
  656. ibsourcefiles :
  657. readsourcefiles;
  658. ibusedmacros :
  659. readusedmacros;
  660. ibloadunit :
  661. readloadunit;
  662. iblinkunitofiles :
  663. readlinkcontainer(current_module^.LinkUnitOFiles);
  664. iblinkunitstaticlibs :
  665. readlinkcontainer(current_module^.LinkUnitStaticLibs);
  666. iblinkunitsharedlibs :
  667. readlinkcontainer(current_module^.LinkUnitSharedLibs);
  668. iblinkotherofiles :
  669. readlinkcontainer(current_module^.LinkotherOFiles);
  670. iblinkotherstaticlibs :
  671. readlinkcontainer(current_module^.LinkotherStaticLibs);
  672. iblinkothersharedlibs :
  673. readlinkcontainer(current_module^.LinkotherSharedLibs);
  674. ibendinterface :
  675. break;
  676. else
  677. Message1(unit_f_ppu_invalid_entry,tostr(b));
  678. end;
  679. until false;
  680. end;
  681. {
  682. $Log$
  683. Revision 1.54 1999-11-12 11:03:50 peter
  684. * searchpaths changed to stringqueue object
  685. Revision 1.53 1999/11/06 14:34:27 peter
  686. * truncated log to 20 revs
  687. Revision 1.52 1999/11/05 17:18:03 pierre
  688. * local browsing works at first level
  689. ie for function defined in interface or implementation
  690. not yet for functions inside other functions
  691. Revision 1.51 1999/09/16 13:27:08 pierre
  692. + error if PPU modulename is different from what is searched
  693. (8+3 limitations!)
  694. + cond ORDERSOURCES to allow recompilation of FP
  695. if symppu.inc is changed (need PPUversion change!)
  696. Revision 1.50 1999/09/12 15:45:11 florian
  697. * tnamedindexobject._name should be never accessed direct! Use the
  698. function name instead
  699. Revision 1.49 1999/09/03 10:54:22 pierre
  700. * message about conditionals changed to Hint
  701. Revision 1.48 1999/08/31 15:47:56 pierre
  702. + startup conditionals stored in PPU file for debug info
  703. Revision 1.47 1999/08/27 10:54:45 pierre
  704. * some code adapted to CRC_only computation
  705. + main file is search in unitspathlist
  706. and triggers do_compile flag
  707. * some changes to get identical CRC vaules after
  708. interface and after implementation
  709. Revision 1.46 1999/08/13 21:33:12 peter
  710. * support for array constructors extended and more error checking
  711. Revision 1.45 1999/08/03 22:03:17 peter
  712. * moved bitmask constants to sets
  713. * some other type/const renamings
  714. Revision 1.44 1999/07/14 21:19:12 florian
  715. + implemented a better error message if a PPU file isn't found as suggested
  716. by Lee John
  717. Revision 1.43 1999/07/03 00:30:00 peter
  718. * new link writing to the ppu, one .ppu is needed for all link types,
  719. static (.o) is now always created also when smartlinking is used
  720. Revision 1.42 1999/06/22 16:24:47 pierre
  721. * local browser stuff corrected
  722. Revision 1.41 1999/05/14 17:52:28 peter
  723. * new deref code
  724. Revision 1.40 1999/05/13 21:59:44 peter
  725. * removed oldppu code
  726. * warning if objpas is loaded from uses
  727. * first things for new deref writing
  728. Revision 1.39 1999/05/04 21:45:06 florian
  729. * changes to compile it with Delphi 4.0
  730. Revision 1.38 1999/04/26 13:31:51 peter
  731. * release storenumber,double_checksum
  732. Revision 1.37 1999/04/21 09:43:53 peter
  733. * storenumber works
  734. * fixed some typos in double_checksum
  735. + incompatible types type1 and type2 message (with storenumber)
  736. Revision 1.36 1999/04/14 09:15:01 peter
  737. * first things to store the symbol/def number in the ppu
  738. Revision 1.35 1999/04/07 15:39:35 pierre
  739. + double_checksum code added
  740. Revision 1.34 1999/03/02 13:49:19 peter
  741. * renamed loadunit_int -> loadunit
  742. Revision 1.33 1999/02/23 18:29:25 pierre
  743. * win32 compilation error fix
  744. + some work for local browser (not cl=omplete yet)
  745. }