files.pas 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825
  1. {
  2. $Id$
  3. Copyright (c) 1996-98 by Florian Klaempfl
  4. This unit implements an extended file management and the first loading
  5. and searching of the modules (ppufiles)
  6. This program is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2 of the License, or
  9. (at your option) any later version.
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with this program; if not, write to the Free Software
  16. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17. ****************************************************************************
  18. }
  19. unit files;
  20. interface
  21. uses
  22. cobjects,globals;
  23. const
  24. {$ifdef FPC}
  25. maxunits = 1024;
  26. extbufsize = 65535;
  27. {$else}
  28. maxunits = 128;
  29. extbufsize = 2000;
  30. {$endif}
  31. type
  32. { this isn't a text file, this is t-ext-file }
  33. { which means a extended file this files can }
  34. { be handled by a file manager }
  35. pextfile = ^textfile;
  36. textfile = object(tbufferedfile)
  37. path,name,ext : pstring;
  38. _next : pextfile; { else conflicts with tinputstack }
  39. ref_index : word; { 65000 input files for a unit should be enough !! }
  40. { p must be the complete path (with ending \ (or / for unix ...) }
  41. constructor init(const p,n,e : string);
  42. destructor done;virtual;
  43. end;
  44. pinputfile = ^tinputfile;
  45. tinputfile = object(textfile)
  46. filenotatend : boolean;
  47. line_no : longint;
  48. line_count : longint; { second counter for unimportant tokens }
  49. next : pinputfile; { next input file in the stack of input files }
  50. ref_count : longint; { to handle the browser refs }
  51. constructor init(const p,n,e : string);
  52. procedure write_file_line(var t : text); { writes the file name and line number to t }
  53. function get_file_line : string;
  54. end;
  55. pfilemanager = ^tfilemanager;
  56. tfilemanager = object
  57. files : pextfile;
  58. last_ref_index : word;
  59. constructor init;
  60. destructor done;
  61. procedure close_all;
  62. procedure register_file(f : pextfile);
  63. end;
  64. type
  65. tunitmap = array[0..maxunits-1] of pointer;
  66. punitmap = ^tunitmap;
  67. pmodule = ^tmodule;
  68. tmodule = object(tlinkedlist_item)
  69. ppufile : pextfile; { the PPU file }
  70. ppuversion, { PPU version, handle different versions }
  71. crc, { check sum written to the file }
  72. flags : longint; { flags }
  73. compiled, { unit is already compiled }
  74. do_assemble, { only assemble the object, don't recompile }
  75. do_compile, { need to compile the sources }
  76. sources_avail, { if all sources are reachable }
  77. in_implementation, { processing the implementation part? }
  78. in_main : boolean; { global, after uses else false }
  79. map : punitmap; { mapping of all used units }
  80. unitcount : word; { local unit counter }
  81. symtable : pointer; { pointer to the psymtable of this unit }
  82. output_format : tof; { how to write this file }
  83. uses_imports : boolean; { Set if the module imports from DLL's.}
  84. imports : plinkedlist;
  85. sourcefiles : tfilemanager;
  86. linklibfiles,
  87. linkofiles : tstringcontainer;
  88. used_units : tlinkedlist;
  89. current_inputfile : pinputfile;
  90. unitname, { name of the (unit) module in uppercase }
  91. objfilename, { fullname of the objectfile }
  92. asmfilename, { fullname of the assemblerfile }
  93. ppufilename, { fullname of the ppufile }
  94. arfilename, { fullname of the archivefile }
  95. mainsource : pstring; { name of the main sourcefile }
  96. constructor init(const s:string;is_unit:boolean);
  97. destructor special_done;virtual; { this is to be called only when compiling again }
  98. procedure setfilename(const path,name:string);
  99. function load_ppu(const unit_path,n,ext:string):boolean;
  100. procedure search_unit(const n : string);
  101. end;
  102. pused_unit = ^tused_unit;
  103. tused_unit = object(tlinkedlist_item)
  104. u : pmodule;
  105. in_uses,
  106. in_interface,
  107. is_stab_written : boolean;
  108. unitid : word;
  109. constructor init(_u : pmodule;f : byte);
  110. destructor done;virtual;
  111. end;
  112. tunitheader = array[0..19] of char;
  113. const
  114. { compiler version }
  115. { format | }
  116. { signature | | }
  117. { | | | }
  118. { /-------\ /-------\ /----\ }
  119. unitheader : tunitheader = ('P','P','U','0','1','3',#0,#99,
  120. #0,#0,#0,#0,#0,#0,#255,#255,
  121. { | | \---------/ \-------/ }
  122. { | | | | }
  123. { | | check sum | }
  124. { | \--flags unused }
  125. { target system }
  126. #0,#0,#0,#0);
  127. {\---------/ }
  128. { | }
  129. { start of machine language }
  130. ibloadunit = 1;
  131. iborddef = 2;
  132. ibpointerdef = 3;
  133. ibtypesym = 4;
  134. ibarraydef = 5;
  135. ibprocdef = 6;
  136. ibprocsym = 7;
  137. iblinkofile = 8;
  138. ibstringdef = 9;
  139. ibvarsym = 10;
  140. ibconstsym = 11;
  141. ibinitunit = 12;
  142. ibaufzaehlsym = 13;
  143. ibtypedconstsym = 14;
  144. ibrecorddef = 15;
  145. ibfiledef = 16;
  146. ibformaldef = 17;
  147. ibobjectdef = 18;
  148. ibenumdef = 19;
  149. ibsetdef = 20;
  150. ibprocvardef = 21;
  151. ibsourcefile = 22;
  152. ibdbxcount = 23;
  153. ibfloatdef = 24;
  154. ibref = 25;
  155. ibextsymref = 26;
  156. ibextdefref = 27;
  157. ibabsolutesym = 28;
  158. ibclassrefdef = 29;
  159. ibpropertysym = 30;
  160. iblibraries = 31;
  161. iblongstringdef = 32;
  162. ibansistringdef = 33;
  163. ibunitname = 34;
  164. ibend = 255;
  165. { unit flags }
  166. uf_init = $1;
  167. uf_uses_dbx = $2;
  168. uf_uses_browser = $4;
  169. uf_in_library = $8;
  170. uf_shared_library = $10;
  171. uf_big_endian = $20;
  172. uf_smartlink = $40;
  173. const
  174. main_module : pmodule = nil;
  175. current_module : pmodule = nil;
  176. var
  177. loaded_units : tlinkedlist;
  178. implementation
  179. uses
  180. dos,verbose,systems;
  181. {****************************************************************************
  182. TFILE
  183. ****************************************************************************}
  184. constructor textfile.init(const p,n,e : string);
  185. begin
  186. inherited init(p+n+e,extbufsize);
  187. path:=stringdup(p);
  188. name:=stringdup(n);
  189. ext:=stringdup(e);
  190. end;
  191. destructor textfile.done;
  192. begin
  193. inherited done;
  194. end;
  195. {****************************************************************************
  196. TINPUTFILE
  197. ****************************************************************************}
  198. constructor tinputfile.init(const p,n,e : string);
  199. begin
  200. inherited init(p,n,e);
  201. filenotatend:=true;
  202. line_no:=1;
  203. line_count:=0;
  204. next:=nil;
  205. end;
  206. procedure tinputfile.write_file_line(var t : text);
  207. begin
  208. write(t,get_file_line);
  209. end;
  210. function tinputfile.get_file_line : string;
  211. begin
  212. {$ifdef USE_RHIDE}
  213. get_file_line:=lowercase(name^+ext^)+':'+tostr(line_no)+':'
  214. {$else USE_RHIDE}
  215. get_file_line:=name^+ext^+'('+tostr(line_no)+')'
  216. {$endif USE_RHIDE}
  217. end;
  218. {****************************************************************************
  219. TFILEMANAGER
  220. ****************************************************************************}
  221. constructor tfilemanager.init;
  222. begin
  223. files:=nil;
  224. last_ref_index:=0;
  225. end;
  226. destructor tfilemanager.done;
  227. var
  228. hp : pextfile;
  229. begin
  230. hp:=files;
  231. while assigned(hp) do
  232. begin
  233. files:=files^._next;
  234. dispose(hp,done);
  235. hp:=files;
  236. end;
  237. end;
  238. procedure tfilemanager.close_all;
  239. begin
  240. end;
  241. procedure tfilemanager.register_file(f : pextfile);
  242. begin
  243. inc(last_ref_index);
  244. f^._next:=files;
  245. f^.ref_index:=last_ref_index;
  246. files:=f;
  247. end;
  248. {****************************************************************************
  249. TMODULE
  250. ****************************************************************************}
  251. procedure tmodule.setfilename(const path,name:string);
  252. var
  253. s : string;
  254. begin
  255. stringdispose(objfilename);
  256. stringdispose(asmfilename);
  257. stringdispose(ppufilename);
  258. stringdispose(arfilename);
  259. s:=FixFileName(FixPath(path)+name);
  260. objfilename:=stringdup(s+target_info.objext);
  261. asmfilename:=stringdup(s+target_info.asmext);
  262. ppufilename:=stringdup(s+target_info.unitext);
  263. arfilename:=stringdup(s+target_info.arext);
  264. end;
  265. function tmodule.load_ppu(const unit_path,n,ext : string):boolean;
  266. var
  267. header : tunitheader;
  268. count : longint;
  269. temp,hs : string;
  270. b : byte;
  271. code : word;
  272. objfiletime,
  273. ppufiletime,
  274. asmfiletime,
  275. source_time : longint;
  276. {$ifdef UseBrowser}
  277. hp : pextfile;
  278. _d : dirstr;
  279. _n : namestr;
  280. _e : extstr;
  281. {$endif UseBrowser}
  282. begin
  283. load_ppu:=false;
  284. Message1(unit_u_ppu_loading,ppufilename^);
  285. ppufile:=new(pextfile,init(unit_path,n,ext));
  286. ppufile^.reset;
  287. ppufile^.flush;
  288. {Get ppufile time}
  289. ppufiletime:=getnamedfiletime(ppufilename^);
  290. Message1(unit_d_ppu_time,filetimestring(ppufiletime));
  291. { load the header }
  292. ppufile^.read_data(header,sizeof(header),count);
  293. if count<>sizeof(header) then
  294. begin
  295. ppufile^.done;
  296. Message(unit_d_ppu_file_too_short);
  297. exit;
  298. end;
  299. { check for a valid PPU file }
  300. if (header[0]<>'P') or (header[1]<>'P') or (header[2]<>'U') then
  301. begin
  302. ppufile^.done;
  303. Message(unit_d_ppu_invalid_header);
  304. exit;
  305. end;
  306. { load ppu version }
  307. val(header[3]+header[4]+header[5],ppuversion,code);
  308. if ppuversion<>13 then
  309. begin
  310. ppufile^.done;
  311. Message1(unit_d_ppu_invalid_version,tostr(ppuversion));
  312. exit;
  313. end;
  314. flags:=byte(header[9]);
  315. Message1(unit_d_ppu_flags,tostr(flags));
  316. crc:=plongint(@header[10])^;
  317. Message1(unit_d_ppu_crc,tostr(crc));
  318. { read name if its there }
  319. ppufile^.read_data(b,1,count);
  320. {$IFDEF UNITNAME}
  321. if b=ibunitname then
  322. begin
  323. ppufile^.read_data(hs[0],1,count);
  324. ppufile^.read_data(hs[1],ord(hs[0]),count);
  325. stringdispose(unitname);
  326. unitname:=stringdup(hs);
  327. ppufile^.read_data(b,1,count);
  328. end;
  329. {$ENDIF UNITNAME}
  330. { search source files there is at least one source file }
  331. do_compile:=false;
  332. sources_avail:=true;
  333. while b<>ibend do
  334. begin
  335. ppufile^.read_data(hs[0],1,count);
  336. ppufile^.read_data(hs[1],ord(hs[0]),count);
  337. if (flags and uf_in_library)<>0 then
  338. begin
  339. sources_avail:=false;
  340. temp:=' library';
  341. end
  342. else
  343. begin
  344. { check the date of the source files }
  345. Source_Time:=GetNamedFileTime(unit_path+hs);
  346. if Source_Time=-1 then
  347. begin
  348. sources_avail:=false;
  349. temp:=' not found';
  350. end
  351. else
  352. begin
  353. temp:=' time '+filetimestring(source_time);
  354. if (source_time>ppufiletime) then
  355. begin
  356. do_compile:=true;
  357. temp:=temp+' *'
  358. end;
  359. end;
  360. end;
  361. Message1(unit_t_ppu_source,unit_path+hs+temp);
  362. {$ifdef UseBrowser}
  363. fsplit(unit_path+hs,_d,_n,_e);
  364. new(hp,init(_d,_n,_e));
  365. { the indexing should match what is done in writeasunit }
  366. sourcefiles.register_file(hp);
  367. {$endif UseBrowser}
  368. ppufile^.read_data(b,1,count);
  369. end;
  370. { main source is always the last }
  371. stringdispose(mainsource);
  372. mainsource:=stringdup(ppufile^.path^+hs);
  373. { check the object and assembler file if not a library }
  374. if (flags and uf_in_library)=0 then
  375. begin
  376. { the objectfile should be newer than the ppu file }
  377. objfiletime:=getnamedfiletime(objfilename^);
  378. if (ppufiletime<0) or (objfiletime<0) or (ppufiletime>objfiletime) then
  379. begin
  380. { check if assembler file is older than ppu file }
  381. asmfileTime:=GetNamedFileTime(asmfilename^);
  382. if (asmfiletime<0) or (ppufiletime>asmfiletime) then
  383. begin
  384. Message(unit_d_obj_and_asm_are_older_than_ppu);
  385. do_compile:=true;
  386. end
  387. else
  388. begin
  389. Message(unit_d_obj_is_older_than_asm);
  390. do_assemble:=true;
  391. end;
  392. end;
  393. end;
  394. load_ppu:=true;
  395. end;
  396. procedure tmodule.search_unit(const n : string);
  397. var
  398. ext : string[8];
  399. singlepathstring,
  400. Path,
  401. filename : string;
  402. found : boolean;
  403. start,i : longint;
  404. Function UnitExists(const ext:string):boolean;
  405. begin
  406. Message1(unit_t_unitsearch,Singlepathstring+filename+ext);
  407. UnitExists:=FileExists(Singlepathstring+FileName+ext);
  408. end;
  409. begin
  410. start:=1;
  411. filename:=FixFileName(n);
  412. path:=UnitSearchPath;
  413. Found:=false;
  414. repeat
  415. {Create current path to check}
  416. i:=pos(';',path);
  417. if i=0 then
  418. i:=length(path)+1;
  419. singlepathstring:=FixPath(copy(path,start,i-start));
  420. delete(path,start,i-start+1);
  421. { Check for PPL file }
  422. if not (cs_link_static in aktswitches) then
  423. begin
  424. Found:=UnitExists(target_info.libext);
  425. if Found then
  426. Begin
  427. SetFileName(SinglePathString,FileName);
  428. Found:=Load_PPU(singlepathstring,filename,target_info.libext);
  429. End;
  430. end;
  431. { Check for PPU file }
  432. if not (cs_link_dynamic in aktswitches) and not Found then
  433. begin
  434. Found:=UnitExists(target_info.unitext);
  435. if Found then
  436. Begin
  437. SetFileName(SinglePathString,FileName);
  438. Found:=Load_PPU(singlepathstring,filename,target_info.unitext);
  439. End;
  440. end;
  441. { Check for Sources }
  442. if not Found then
  443. begin
  444. ppufile:=nil;
  445. do_compile:=true;
  446. {Check for .pp file}
  447. Found:=UnitExists(target_info.sourceext);
  448. if Found then
  449. Ext:=target_info.sourceext
  450. else
  451. begin
  452. {Check for .pas}
  453. Found:=UnitExists(target_info.pasext);
  454. if Found then
  455. Ext:=target_info.pasext;
  456. end;
  457. stringdispose(mainsource);
  458. if Found then
  459. begin
  460. sources_avail:=true;
  461. {Load Filenames when found}
  462. mainsource:=StringDup(SinglePathString+FileName+Ext);
  463. SetFileName(SinglePathString,FileName);
  464. end
  465. else
  466. sources_avail:=false;
  467. end;
  468. until Found or (path='');
  469. end;
  470. constructor tmodule.init(const s:string;is_unit:boolean);
  471. var
  472. p : dirstr;
  473. n : namestr;
  474. e : extstr;
  475. begin
  476. FSplit(s,p,n,e);
  477. unitname:=stringdup(Upper(n));
  478. mainsource:=stringdup(s);
  479. objfilename:=nil;
  480. asmfilename:=nil;
  481. arfilename:=nil;
  482. ppufilename:=nil;
  483. setfilename(p,n);
  484. used_units.init;
  485. sourcefiles.init;
  486. linkofiles.init;
  487. linklibfiles.init;
  488. ppufile:=nil;
  489. current_inputfile:=nil;
  490. map:=nil;
  491. symtable:=nil;
  492. flags:=0;
  493. unitcount:=1;
  494. do_assemble:=false;
  495. do_compile:=false;
  496. sources_avail:=true;
  497. compiled:=false;
  498. in_implementation:=false;
  499. in_main:=false;
  500. uses_imports:=false;
  501. imports:=new(plinkedlist,init);
  502. output_format:=commandline_output_format;
  503. { search the PPU file if it is an unit }
  504. if is_unit then
  505. search_unit(unitname^);
  506. end;
  507. destructor tmodule.special_done;
  508. begin
  509. if assigned(map) then
  510. dispose(map);
  511. { cannot remove that because it is linked
  512. in the global chain of used_objects
  513. used_units.done; }
  514. sourcefiles.done;
  515. linkofiles.done;
  516. linklibfiles.done;
  517. if assigned(ppufile) then
  518. dispose(ppufile,done);
  519. if assigned(imports) then
  520. dispose(imports,done);
  521. inherited done;
  522. end;
  523. {****************************************************************************
  524. TUSED_UNIT
  525. ****************************************************************************}
  526. constructor tused_unit.init(_u : pmodule;f : byte);
  527. begin
  528. u:=_u;
  529. in_interface:=false;
  530. in_uses:=false;
  531. is_stab_written:=false;
  532. unitid:=f;
  533. end;
  534. destructor tused_unit.done;
  535. begin
  536. inherited done;
  537. end;
  538. end.
  539. {
  540. $Log$
  541. Revision 1.3 1998-04-27 23:10:28 peter
  542. + new scanner
  543. * $makelib -> if smartlink
  544. * small filename fixes pmodule.setfilename
  545. * moved import from files.pas -> import.pas
  546. Revision 1.2 1998/04/21 10:16:47 peter
  547. * patches from strasbourg
  548. * objects is not used anymore in the fpc compiled version
  549. Revision 1.1.1.1 1998/03/25 11:18:12 root
  550. * Restored version
  551. Revision 1.37 1998/03/13 22:45:58 florian
  552. * small bug fixes applied
  553. Revision 1.36 1998/03/11 22:22:52 florian
  554. * Fixed circular unit uses, when the units are not in the current dir (from Peter)
  555. * -i shows correct info, not <lf> anymore (from Peter)
  556. * linking with shared libs works again (from Peter)
  557. Revision 1.35 1998/03/10 16:27:38 pierre
  558. * better line info in stabs debug
  559. * symtabletype and lexlevel separated into two fields of tsymtable
  560. + ifdef MAKELIB for direct library output, not complete
  561. + ifdef CHAINPROCSYMS for overloaded seach across units, not fully
  562. working
  563. + ifdef TESTFUNCRET for setting func result in underfunction, not
  564. working
  565. Revision 1.34 1998/03/10 01:17:18 peter
  566. * all files have the same header
  567. * messages are fully implemented, EXTDEBUG uses Comment()
  568. + AG... files for the Assembler generation
  569. Revision 1.33 1998/03/04 17:33:44 michael
  570. + Changed ifdef FPK to ifdef FPC
  571. Revision 1.32 1998/03/04 01:35:03 peter
  572. * messages for unit-handling and assembler/linker
  573. * the compiler compiles without -dGDB, but doesn't work yet
  574. + -vh for Hint
  575. Revision 1.31 1998/02/28 14:43:47 florian
  576. * final implemenation of win32 imports
  577. * extended tai_align to allow 8 and 16 byte aligns
  578. Revision 1.30 1998/02/28 09:30:57 florian
  579. + writing of win32 import section added
  580. Revision 1.29 1998/02/28 00:20:23 florian
  581. * more changes to get import libs for Win32 working
  582. Revision 1.28 1998/02/26 11:57:06 daniel
  583. * New assembler optimizations commented out, because of bugs.
  584. * Use of dir-/name- and extstr.
  585. Revision 1.27 1998/02/24 14:20:51 peter
  586. + tstringcontainer.empty
  587. * ld -T option restored for linux
  588. * libraries are placed before the objectfiles in a .PPU file
  589. * removed 'uses link' from files.pas
  590. Revision 1.26 1998/02/24 10:29:13 peter
  591. * -a works again
  592. Revision 1.25 1998/02/24 00:19:09 peter
  593. * makefile works again (btw. linux does like any char after a \ )
  594. * removed circular unit with assemble and files
  595. * fixed a sigsegv in pexpr
  596. * pmodule init unit/program is the almost the same, merged them
  597. Revision 1.24 1998/02/22 23:03:17 peter
  598. * renamed msource->mainsource and name->unitname
  599. * optimized filename handling, filename is not seperate anymore with
  600. path+name+ext, this saves stackspace and a lot of fsplit()'s
  601. * recompiling of some units in libraries fixed
  602. * shared libraries are working again
  603. + $LINKLIB <lib> to support automatic linking to libraries
  604. + libraries are saved/read from the ppufile, also allows more libraries
  605. per ppufile
  606. Revision 1.23 1998/02/17 21:20:48 peter
  607. + Script unit
  608. + __EXIT is called again to exit a program
  609. - target_info.link/assembler calls
  610. * linking works again for dos
  611. * optimized a few filehandling functions
  612. * fixed stabs generation for procedures
  613. Revision 1.22 1998/02/16 12:51:30 michael
  614. + Implemented linker object
  615. Revision 1.21 1998/02/13 10:34:58 daniel
  616. * Made Motorola version compilable.
  617. * Fixed optimizer
  618. Revision 1.20 1998/02/12 11:50:04 daniel
  619. Yes! Finally! After three retries, my patch!
  620. Changes:
  621. Complete rewrite of psub.pas.
  622. Added support for DLL's.
  623. Compiler requires less memory.
  624. Platform units for each platform.
  625. Revision 1.19 1998/02/06 23:08:33 florian
  626. + endian to targetinfo and sourceinfo added
  627. + endian independed writing of ppu file (reading missed), a PPU file
  628. is written with the target endian
  629. Revision 1.18 1998/02/02 13:13:27 pierre
  630. * line_count transfered to tinputfile, to avoid crosscounting
  631. Revision 1.17 1998/01/30 17:31:20 pierre
  632. * bug of cyclic symtablestack fixed
  633. Revision 1.16 1998/01/26 18:51:18 peter
  634. * ForceSlash() changed to FixPath() which also removes a trailing './'
  635. Revision 1.15 1998/01/23 17:12:11 pierre
  636. * added some improvements for as and ld :
  637. - doserror and dosexitcode treated separately
  638. - PATH searched if doserror=2
  639. + start of long and ansi string (far from complete)
  640. in conditionnal UseLongString and UseAnsiString
  641. * options.pas cleaned (some variables shifted to globals)gl
  642. Revision 1.14 1998/01/22 08:57:54 peter
  643. + added target_info.pasext and target_info.libext
  644. Revision 1.13 1998/01/21 00:11:35 peter
  645. * files in a ppl will now not recompile
  646. * better info about source files of a ppu, a * after the time will
  647. indicate that the file is changed
  648. Revision 1.12 1998/01/20 13:16:29 michael
  649. + Added flag for static/shared libs.
  650. Revision 1.11 1998/01/17 01:57:32 michael
  651. + Start of shared library support. First working version.
  652. Revision 1.10 1998/01/16 12:52:09 michael
  653. + Path treatment and file searching should now be more or less in their
  654. definite form:
  655. - Using now modified AddPathToList everywhere.
  656. - File Searching mechanism is uniform for all files.
  657. - Include path is working now !!
  658. All fixes by Peter Vreman. Tested with remake3 target.
  659. Revision 1.9 1998/01/16 00:00:54 michael
  660. + Better and more modular searching and loading of units.
  661. - searching in tmodule.search_unit.
  662. - initial Loading in tmpodule.load_ppu.
  663. - tmodule.init now calls search_unit.
  664. * Case sensitivity problem of unix hopefully solved now forever.
  665. (All from Peter Vreman, checked with remake3)
  666. Revision 1.8 1998/01/15 13:07:46 michael
  667. + added library treating stuff
  668. Revision 1.7 1998/01/15 12:01:19 michael
  669. * Linux prints now that actual name of the file being loaded.
  670. Revision 1.6 1998/01/13 23:39:26 michael
  671. * changed mechanism to look for unit file.
  672. + added iblibraries constant to implement shared libraries.
  673. Revision 1.5 1998/01/13 23:05:51 florian
  674. + unit format 013 (change of options size, see symtable.pas log)
  675. Revision 1.4 1998/01/13 17:13:06 michael
  676. * File time handling and file searching is now done in an OS-independent way,
  677. using the new file treating functions in globals.pas.
  678. Revision 1.3 1998/01/07 00:16:49 michael
  679. Restored released version (plus fixes) as current
  680. Revision 1.2 1997/11/28 18:14:31 pierre
  681. working version with several bug fixes
  682. Revision 1.1.1.1 1997/11/27 08:32:56 michael
  683. FPC Compiler CVS start
  684. Pre-CVS log:
  685. CEC Carl-Eric Codere
  686. FK Florian Klaempfl
  687. + feature added
  688. - removed
  689. * bug fixed or changed
  690. History (started with version 0.9.0):
  691. 2th december 1996:
  692. + unit started (FK)
  693. 22th december 1996:
  694. + tinputfile added (FK)
  695. 7th september 1997:
  696. + moved main_module and current_module to const section
  697. line ~319 and ~416: in_main initialized - added in_main
  698. field to tmodule object (CEC)
  699. }