files.pas 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847
  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,ppu;
  23. const
  24. {$ifdef FPC}
  25. maxunits = 1024;
  26. InputFileBufSize=32*1024;
  27. {$else}
  28. maxunits = 128;
  29. InputFileBufSize=1024;
  30. {$endif}
  31. type
  32. pinputfile = ^tinputfile;
  33. tinputfile = object
  34. path,name : pstring; { path and filename }
  35. next : pinputfile; { next file for reading }
  36. f : file; { current file handle }
  37. is_macro,
  38. endoffile, { still bytes left to read }
  39. closed : boolean; { is the file closed }
  40. inputbufsize : longint; { max size of the input buffer }
  41. savebufstart, { save fields for scanner }
  42. savebufsize,
  43. savelastlinepos,
  44. saveline_no : longint;
  45. saveinputbuffer,
  46. saveinputpointer : pchar;
  47. linebuf : plongint; { line buffer to retrieve lines }
  48. maxlinebuf : longint;
  49. ref_count : longint; { to handle the browser refs }
  50. ref_index : longint;
  51. ref_next : pinputfile;
  52. constructor init(const fn:string);
  53. destructor done;
  54. {$ifdef SourceLine}
  55. function getlinestr(l:longint):string;
  56. {$endif SourceLine}
  57. end;
  58. pfilemanager = ^tfilemanager;
  59. tfilemanager = object
  60. files : pinputfile;
  61. last_ref_index : longint;
  62. constructor init;
  63. destructor done;
  64. procedure register_file(f : pinputfile);
  65. function get_file(l:longint) : pinputfile;
  66. function get_file_name(l :longint):string;
  67. function get_file_path(l :longint):string;
  68. end;
  69. type
  70. tunitmap = array[0..maxunits-1] of pointer;
  71. punitmap = ^tunitmap;
  72. pmodule = ^tmodule;
  73. tmodule = object(tlinkedlist_item)
  74. ppufile : pppufile; { the PPU file }
  75. crc,
  76. flags : longint; { the PPU flags }
  77. compiled, { unit is already compiled }
  78. do_assemble, { only assemble the object, don't recompile }
  79. do_compile, { need to compile the sources }
  80. sources_avail, { if all sources are reachable }
  81. is_unit,
  82. in_implementation, { processing the implementation part? }
  83. in_global : boolean; { allow global settings }
  84. map : punitmap; { mapping of all used units }
  85. unitcount : word; { local unit counter }
  86. unit_index : word; { global counter for browser }
  87. symtable : pointer; { pointer to the psymtable of this unit }
  88. uses_imports : boolean; { Set if the module imports from DLL's.}
  89. imports : plinkedlist;
  90. sourcefiles : tfilemanager;
  91. linksharedlibs,
  92. linkstaticlibs,
  93. linkofiles : tstringcontainer;
  94. used_units : tlinkedlist;
  95. { used in firstpass for faster settings }
  96. scanner : pointer;
  97. current_index : word;
  98. path, { path where the module is find/created }
  99. modulename, { name of the module in uppercase }
  100. objfilename, { fullname of the objectfile }
  101. asmfilename, { fullname of the assemblerfile }
  102. ppufilename, { fullname of the ppufile }
  103. staticlibfilename, { fullname of the static libraryfile }
  104. sharedlibfilename, { fullname of the shared libraryfile }
  105. exefilename, { fullname of the exefile }
  106. asmprefix, { prefix for the smartlink asmfiles }
  107. mainsource : pstring; { name of the main sourcefile }
  108. constructor init(const s:string;_is_unit:boolean);
  109. destructor done;virtual;
  110. procedure setfilename(const fn:string);
  111. function openppu:boolean;
  112. function search_unit(const n : string):boolean;
  113. end;
  114. pused_unit = ^tused_unit;
  115. tused_unit = object(tlinkedlist_item)
  116. unitid : word;
  117. name : pstring;
  118. checksum : longint;
  119. loaded : boolean;
  120. in_uses,
  121. in_interface,
  122. is_stab_written : boolean;
  123. u : pmodule;
  124. constructor init(_u : pmodule;intface:boolean);
  125. constructor init_to_load(const n:string;c:longint;intface:boolean);
  126. destructor done;virtual;
  127. end;
  128. var
  129. main_module : pmodule; { Main module of the program }
  130. current_module : pmodule; { Current module which is compiled }
  131. current_ppu : pppufile; { Current ppufile which is read }
  132. global_unit_count : word;
  133. usedunits : tlinkedlist; { Used units for this program }
  134. loaded_units : tlinkedlist; { All loaded units }
  135. implementation
  136. uses
  137. dos,verbose,systems;
  138. {****************************************************************************
  139. TINPUTFILE
  140. ****************************************************************************}
  141. constructor tinputfile.init(const fn:string);
  142. var
  143. p,n,e : string;
  144. begin
  145. FSplit(fn,p,n,e);
  146. name:=stringdup(n+e);
  147. path:=stringdup(p);
  148. next:=nil;
  149. { file info }
  150. is_macro:=false;
  151. endoffile:=false;
  152. closed:=true;
  153. inputbufsize:=InputFileBufSize;
  154. saveinputbuffer:=nil;
  155. saveinputpointer:=nil;
  156. savebufstart:=0;
  157. savebufsize:=0;
  158. saveline_no:=0;
  159. savelastlinepos:=0;
  160. { indexing refs }
  161. ref_next:=nil;
  162. ref_count:=0;
  163. ref_index:=0;
  164. {$ifdef SourceLine}
  165. { line buffer }
  166. linebuf:=nil;
  167. maxlinebuf:=0;
  168. {$endif SourceLine}
  169. end;
  170. destructor tinputfile.done;
  171. begin
  172. stringdispose(path);
  173. stringdispose(name);
  174. {$ifdef SourceLine}
  175. { free memory }
  176. if assigned(linebuf) then
  177. freemem(linebuf,maxlinebuf shl 2);
  178. {$endif SourceLine}
  179. end;
  180. {$ifdef SourceLine}
  181. function tinputfile.getlinestr(l:longint):string;
  182. var
  183. c : char;
  184. i,fpos : longint;
  185. begin
  186. getlinestr:='';
  187. if l<maxlinebuf then
  188. begin
  189. fpos:=plongint(longint(linebuf)+line_no*2)^;
  190. { in current buf ? }
  191. if (fpos<bufstart) or (fpos>bufstart+bufsize) then
  192. begin
  193. seekbuf(fpos);
  194. readbuf;
  195. end;
  196. { the begin is in the buf now simply read until #13,#10 }
  197. i:=0;
  198. inputpointer:=inputbuffer;
  199. c:=inputpointer^;
  200. while (i<255) and not(c in [#13,#10]) do
  201. begin
  202. inc(i);
  203. getlinestr[i]:=c;
  204. c:=inputpointer^;
  205. if c=#0 then
  206. reload
  207. else
  208. inc(longint(inputpointer));
  209. end;
  210. getlinestr[0]:=chr(i);
  211. end;
  212. end;
  213. {$endif SourceLine}
  214. {****************************************************************************
  215. TFILEMANAGER
  216. ****************************************************************************}
  217. constructor tfilemanager.init;
  218. begin
  219. files:=nil;
  220. last_ref_index:=0;
  221. end;
  222. destructor tfilemanager.done;
  223. var
  224. hp : pinputfile;
  225. begin
  226. hp:=files;
  227. while assigned(hp) do
  228. begin
  229. files:=files^.ref_next;
  230. dispose(hp,done);
  231. hp:=files;
  232. end;
  233. last_ref_index:=0;
  234. end;
  235. procedure tfilemanager.register_file(f : pinputfile);
  236. begin
  237. inc(last_ref_index);
  238. f^.ref_next:=files;
  239. f^.ref_index:=last_ref_index;
  240. files:=f;
  241. end;
  242. function tfilemanager.get_file(l :longint) : pinputfile;
  243. var
  244. ff : pinputfile;
  245. begin
  246. ff:=files;
  247. while assigned(ff) and (ff^.ref_index<>l) do
  248. ff:=ff^.ref_next;
  249. get_file:=ff;
  250. end;
  251. function tfilemanager.get_file_name(l :longint):string;
  252. var
  253. hp : pinputfile;
  254. begin
  255. hp:=get_file(l);
  256. if assigned(hp) then
  257. get_file_name:=hp^.name^
  258. else
  259. get_file_name:='';
  260. end;
  261. function tfilemanager.get_file_path(l :longint):string;
  262. var
  263. hp : pinputfile;
  264. begin
  265. hp:=get_file(l);
  266. if assigned(hp) then
  267. get_file_path:=hp^.path^
  268. else
  269. get_file_path:='';
  270. end;
  271. {****************************************************************************
  272. TMODULE
  273. ****************************************************************************}
  274. procedure tmodule.setfilename(const fn:string);
  275. var
  276. p : dirstr;
  277. n : NameStr;
  278. e : ExtStr;
  279. begin
  280. stringdispose(objfilename);
  281. stringdispose(asmfilename);
  282. stringdispose(ppufilename);
  283. stringdispose(staticlibfilename);
  284. stringdispose(sharedlibfilename);
  285. stringdispose(exefilename);
  286. stringdispose(path);
  287. { Create names }
  288. fsplit(fn,p,n,e);
  289. p:=FixPath(p);
  290. n:=FixFileName(n);
  291. { set path and obj,asm,ppu names }
  292. path:=stringdup(p);
  293. objfilename:=stringdup(p+n+target_info.objext);
  294. asmfilename:=stringdup(p+n+target_info.asmext);
  295. ppufilename:=stringdup(p+n+target_info.unitext);
  296. { lib and exe could be loaded with a file specified with -o }
  297. if OutputFile<>'' then
  298. n:=OutputFile;
  299. staticlibfilename:=stringdup(p+target_os.libprefix+n+target_os.staticlibext);
  300. sharedlibfilename:=stringdup(p+target_os.libprefix+n+target_os.sharedlibext);
  301. exefilename:=stringdup(p+n+target_os.exeext);
  302. end;
  303. function tmodule.openppu:boolean;
  304. var
  305. objfiletime,
  306. ppufiletime,
  307. asmfiletime : longint;
  308. begin
  309. openppu:=false;
  310. { Get ppufile time (also check if the file exists) }
  311. ppufiletime:=getnamedfiletime(ppufilename^);
  312. if ppufiletime=-1 then
  313. exit;
  314. { Open the ppufile }
  315. Message1(unit_u_ppu_loading,ppufilename^);
  316. ppufile:=new(pppufile,init(ppufilename^));
  317. if not ppufile^.open then
  318. begin
  319. dispose(ppufile,done);
  320. Message(unit_d_ppu_file_too_short);
  321. exit;
  322. end;
  323. { check for a valid PPU file }
  324. if not ppufile^.CheckPPUId then
  325. begin
  326. dispose(ppufile,done);
  327. Message(unit_d_ppu_invalid_header);
  328. exit;
  329. end;
  330. { check for allowed PPU versions }
  331. if not (ppufile^.GetPPUVersion in [15]) then
  332. begin
  333. dispose(ppufile,done);
  334. Message1(unit_d_ppu_invalid_version,tostr(ppufile^.GetPPUVersion));
  335. exit;
  336. end;
  337. { check the target processor }
  338. if ttargetcpu(ppufile^.header.cpu)<>target_cpu then
  339. begin
  340. dispose(ppufile,done);
  341. Comment(V_Debug,'unit is compiled for an other processor');
  342. exit;
  343. end;
  344. { check target }
  345. if ttarget(ppufile^.header.target)<>target_info.target then
  346. begin
  347. dispose(ppufile,done);
  348. Comment(V_Debug,'unit is compiled for an other target');
  349. exit;
  350. end;
  351. {!!!!!!!!!!!!!!!!!!! }
  352. { Load values to be access easier }
  353. flags:=ppufile^.header.flags;
  354. crc:=ppufile^.header.checksum;
  355. { Show Debug info }
  356. Message1(unit_d_ppu_time,filetimestring(ppufiletime));
  357. Message1(unit_d_ppu_flags,tostr(flags));
  358. Message1(unit_d_ppu_crc,tostr(ppufile^.header.checksum));
  359. { check the object and assembler file to see if we need only to
  360. assemble, only if it's not in a library }
  361. do_compile:=false;
  362. if (flags and uf_in_library)=0 then
  363. begin
  364. if ((flags and uf_static_linked)<>0) or
  365. ((flags and uf_smartlink)<>0) then
  366. begin
  367. objfiletime:=getnamedfiletime(staticlibfilename^);
  368. if (ppufiletime<0) or (objfiletime<0) or (ppufiletime>objfiletime) then
  369. do_compile:=true;
  370. end
  371. else
  372. if (flags and uf_shared_linked)<>0 then
  373. begin
  374. objfiletime:=getnamedfiletime(sharedlibfilename^);
  375. if (ppufiletime<0) or (objfiletime<0) or (ppufiletime>objfiletime) then
  376. do_compile:=true;
  377. end
  378. else
  379. begin
  380. { the objectfile should be newer than the ppu file }
  381. objfiletime:=getnamedfiletime(objfilename^);
  382. if (ppufiletime<0) or (objfiletime<0) or (ppufiletime>objfiletime) then
  383. begin
  384. { check if assembler file is older than ppu file }
  385. asmfileTime:=GetNamedFileTime(asmfilename^);
  386. if (asmfiletime<0) or (ppufiletime>asmfiletime) then
  387. begin
  388. Message(unit_d_obj_and_asm_are_older_than_ppu);
  389. do_compile:=true;
  390. { we should try to get the source file }
  391. exit;
  392. end
  393. else
  394. begin
  395. Message(unit_d_obj_is_older_than_asm);
  396. exit;
  397. end;
  398. end;
  399. end;
  400. end;
  401. openppu:=true;
  402. end;
  403. function tmodule.search_unit(const n : string):boolean;
  404. var
  405. ext : string[8];
  406. singlepathstring,
  407. unitPath,
  408. filename : string;
  409. found : boolean;
  410. start,i : longint;
  411. Function UnitExists(const ext:string):boolean;
  412. begin
  413. Message1(unit_t_unitsearch,Singlepathstring+filename+ext);
  414. UnitExists:=FileExists(Singlepathstring+FileName+ext);
  415. end;
  416. begin
  417. start:=1;
  418. filename:=FixFileName(n);
  419. unitpath:=UnitSearchPath;
  420. Found:=false;
  421. repeat
  422. { Create current path to check }
  423. i:=pos(';',unitpath);
  424. if i=0 then
  425. i:=length(unitpath)+1;
  426. singlepathstring:=FixPath(copy(unitpath,start,i-start));
  427. delete(unitpath,start,i-start+1);
  428. { Check for PPL file }
  429. if not Found then
  430. begin
  431. Found:=UnitExists(target_info.unitlibext);
  432. if Found then
  433. Begin
  434. SetFileName(SinglePathString+FileName);
  435. Found:=OpenPPU;
  436. End;
  437. end;
  438. { Check for PPU file }
  439. if not Found then
  440. begin
  441. Found:=UnitExists(target_info.unitext);
  442. if Found then
  443. Begin
  444. SetFileName(SinglePathString+FileName);
  445. Found:=OpenPPU;
  446. End;
  447. end;
  448. { Check for Sources }
  449. if not Found then
  450. begin
  451. ppufile:=nil;
  452. do_compile:=true;
  453. {Check for .pp file}
  454. Found:=UnitExists(target_os.sourceext);
  455. if Found then
  456. Ext:=target_os.sourceext
  457. else
  458. begin
  459. {Check for .pas}
  460. Found:=UnitExists(target_os.pasext);
  461. if Found then
  462. Ext:=target_os.pasext;
  463. end;
  464. stringdispose(mainsource);
  465. if Found then
  466. begin
  467. sources_avail:=true;
  468. {Load Filenames when found}
  469. mainsource:=StringDup(SinglePathString+FileName+Ext);
  470. SetFileName(SinglePathString+FileName);
  471. end
  472. else
  473. sources_avail:=false;
  474. end;
  475. until Found or (unitpath='');
  476. search_unit:=Found;
  477. end;
  478. constructor tmodule.init(const s:string;_is_unit:boolean);
  479. var
  480. p : dirstr;
  481. n : namestr;
  482. e : extstr;
  483. begin
  484. FSplit(s,p,n,e);
  485. { Programs have the name program to don't conflict with dup id's }
  486. if _is_unit then
  487. modulename:=stringdup(Upper(n))
  488. else
  489. modulename:=stringdup('PROGRAM');
  490. mainsource:=stringdup(s);
  491. ppufilename:=nil;
  492. objfilename:=nil;
  493. asmfilename:=nil;
  494. staticlibfilename:=nil;
  495. sharedlibfilename:=nil;
  496. exefilename:=nil;
  497. { go32v2 has the famous 8.3 limit ;) }
  498. {$ifdef go32v2}
  499. asmprefix:=stringdup(FixFileName('as'));
  500. {$else}
  501. asmprefix:=stringdup(FixFileName(n));
  502. {$endif}
  503. path:=nil;
  504. setfilename(p+n);
  505. used_units.init;
  506. sourcefiles.init;
  507. linkofiles.init;
  508. linkstaticlibs.init;
  509. linksharedlibs.init;
  510. current_index:=0;
  511. ppufile:=nil;
  512. scanner:=nil;
  513. map:=nil;
  514. symtable:=nil;
  515. flags:=0;
  516. crc:=0;
  517. unitcount:=1;
  518. inc(global_unit_count);
  519. unit_index:=global_unit_count;
  520. do_assemble:=false;
  521. do_compile:=false;
  522. sources_avail:=true;
  523. compiled:=false;
  524. in_implementation:=false;
  525. in_global:=true;
  526. is_unit:=_is_unit;
  527. uses_imports:=false;
  528. imports:=new(plinkedlist,init);
  529. { set smartlink flag }
  530. if (cs_smartlink in aktmoduleswitches) then
  531. flags:=flags or uf_smartlink;
  532. { search the PPU file if it is an unit }
  533. if is_unit then
  534. begin
  535. if (not search_unit(modulename^)) and (length(modulename^)>8) then
  536. search_unit(copy(modulename^,1,8));
  537. end;
  538. end;
  539. destructor tmodule.done;
  540. begin
  541. if assigned(map) then
  542. dispose(map);
  543. if assigned(ppufile) then
  544. dispose(ppufile,done);
  545. if assigned(imports) then
  546. dispose(imports,done);
  547. used_units.done;
  548. sourcefiles.done;
  549. linkofiles.done;
  550. linkstaticlibs.done;
  551. linksharedlibs.done;
  552. stringdispose(objfilename);
  553. stringdispose(asmfilename);
  554. stringdispose(ppufilename);
  555. stringdispose(staticlibfilename);
  556. stringdispose(sharedlibfilename);
  557. stringdispose(exefilename);
  558. stringdispose(path);
  559. stringdispose(modulename);
  560. stringdispose(mainsource);
  561. stringdispose(asmprefix);
  562. inherited done;
  563. end;
  564. {****************************************************************************
  565. TUSED_UNIT
  566. ****************************************************************************}
  567. constructor tused_unit.init(_u : pmodule;intface:boolean);
  568. begin
  569. u:=_u;
  570. in_interface:=intface;
  571. in_uses:=false;
  572. is_stab_written:=false;
  573. loaded:=true;
  574. name:=stringdup(_u^.modulename^);
  575. checksum:=_u^.crc;
  576. unitid:=0;
  577. end;
  578. constructor tused_unit.init_to_load(const n:string;c:longint;intface:boolean);
  579. begin
  580. u:=nil;
  581. in_interface:=intface;
  582. in_uses:=false;
  583. is_stab_written:=false;
  584. loaded:=false;
  585. name:=stringdup(n);
  586. checksum:=c;
  587. unitid:=0;
  588. end;
  589. destructor tused_unit.done;
  590. begin
  591. stringdispose(name);
  592. inherited done;
  593. end;
  594. end.
  595. {
  596. $Log$
  597. Revision 1.41 1998-08-26 15:35:30 peter
  598. * fixed scannerfiles for macros
  599. + $I %<environment>%
  600. Revision 1.40 1998/08/26 10:08:48 peter
  601. * fixed problem with libprefix at the wrong place
  602. * fixed lib generation with smartlinking and no -CS used
  603. Revision 1.39 1998/08/25 16:44:16 pierre
  604. * openppu was true even if the object file is missing
  605. this lead to trying to open a filename without extension
  606. and prevented the 'make cycle' to work for win32
  607. Revision 1.38 1998/08/19 10:06:12 peter
  608. * fixed filenames and removedir which supports slash at the end
  609. Revision 1.37 1998/08/18 20:52:19 peter
  610. * renamed in_main to in_global which is more logical
  611. Revision 1.36 1998/08/17 10:10:07 peter
  612. - removed OLDPPU
  613. Revision 1.35 1998/08/17 09:17:44 peter
  614. * static/shared linking updates
  615. Revision 1.34 1998/08/14 21:56:31 peter
  616. * setting the outputfile using -o works now to create static libs
  617. Revision 1.33 1998/08/11 14:09:08 peter
  618. * fixed some messages and smaller msgtxt.inc
  619. Revision 1.32 1998/08/10 14:49:58 peter
  620. + localswitches, moduleswitches, globalswitches splitting
  621. Revision 1.31 1998/07/14 14:46:48 peter
  622. * released NEWINPUT
  623. Revision 1.30 1998/07/07 11:19:55 peter
  624. + NEWINPUT for a better inputfile and scanner object
  625. Revision 1.29 1998/06/25 10:51:00 pierre
  626. * removed a remaining ifndef NEWPPU
  627. replaced by ifdef OLDPPU
  628. * added uf_finalize to ppu unit
  629. Revision 1.28 1998/06/25 08:48:12 florian
  630. * first version of rtti support
  631. Revision 1.27 1998/06/24 14:48:34 peter
  632. * ifdef newppu -> ifndef oldppu
  633. Revision 1.26 1998/06/17 14:36:19 peter
  634. * forgot an $ifndef OLDPPU :(
  635. Revision 1.25 1998/06/17 14:10:11 peter
  636. * small os2 fixes
  637. * fixed interdependent units with newppu (remake3 under linux works now)
  638. Revision 1.24 1998/06/16 08:56:20 peter
  639. + targetcpu
  640. * cleaner pmodules for newppu
  641. Revision 1.23 1998/06/15 14:44:36 daniel
  642. * BP updates.
  643. Revision 1.22 1998/06/14 18:25:41 peter
  644. * small fix with crc in newppu
  645. Revision 1.21 1998/06/13 00:10:05 peter
  646. * working browser and newppu
  647. * some small fixes against crashes which occured in bp7 (but not in
  648. fpc?!)
  649. Revision 1.20 1998/06/12 14:50:48 peter
  650. * removed the tree dependency to types.pas
  651. * long_fil.pas support (not fully tested yet)
  652. Revision 1.19 1998/06/12 10:32:26 pierre
  653. * column problem hopefully solved
  654. + C vars declaration changed
  655. Revision 1.18 1998/06/11 13:58:07 peter
  656. * small fix to let newppu compile
  657. Revision 1.17 1998/06/09 16:01:40 pierre
  658. + added procedure directive parsing for procvars
  659. (accepted are popstack cdecl and pascal)
  660. + added C vars with the following syntax
  661. var C calias 'true_c_name';(can be followed by external)
  662. reason is that you must add the Cprefix
  663. which is target dependent
  664. Revision 1.16 1998/06/04 10:42:19 pierre
  665. * small bug fix in load_ppu or openppu
  666. Revision 1.15 1998/05/28 14:37:53 peter
  667. * default programname is PROGRAM (like TP7) to avoid dup id's
  668. Revision 1.14 1998/05/27 19:45:02 peter
  669. * symtable.pas splitted into includefiles
  670. * symtable adapted for $ifndef OLDPPU
  671. Revision 1.13 1998/05/23 01:21:05 peter
  672. + aktasmmode, aktoptprocessor, aktoutputformat
  673. + smartlink per module $SMARTLINK-/+ (like MMX) and moved to aktswitches
  674. + $LIBNAME to set the library name where the unit will be put in
  675. * splitted cgi386 a bit (codeseg to large for bp7)
  676. * nasm, tasm works again. nasm moved to ag386nsm.pas
  677. Revision 1.12 1998/05/20 09:42:33 pierre
  678. + UseTokenInfo now default
  679. * unit in interface uses and implementation uses gives error now
  680. * only one error for unknown symbol (uses lastsymknown boolean)
  681. the problem came from the label code !
  682. + first inlined procedures and function work
  683. (warning there might be allowed cases were the result is still wrong !!)
  684. * UseBrower updated gives a global list of all position of all used symbols
  685. with switch -gb
  686. Revision 1.11 1998/05/12 10:46:59 peter
  687. * moved printstatus to verb_def
  688. + V_Normal which is between V_Error and V_Warning and doesn't have a
  689. prefix like error: warning: and is included in V_Default
  690. * fixed some messages
  691. * first time parameter scan is only for -v and -T
  692. - removed old style messages
  693. Revision 1.10 1998/05/11 13:07:53 peter
  694. + $ifndef OLDPPU for the new ppuformat
  695. + $define GDB not longer required
  696. * removed all warnings and stripped some log comments
  697. * no findfirst/findnext anymore to remove smartlink *.o files
  698. Revision 1.9 1998/05/06 15:04:20 pierre
  699. + when trying to find source files of a ppufile
  700. check the includepathlist for included files
  701. the main file must still be in the same directory
  702. Revision 1.8 1998/05/04 17:54:25 peter
  703. + smartlinking works (only case jumptable left todo)
  704. * redesign of systems.pas to support assemblers and linkers
  705. + Unitname is now also in the PPU-file, increased version to 14
  706. Revision 1.7 1998/05/01 16:38:44 florian
  707. * handling of private and protected fixed
  708. + change_keywords_to_tp implemented to remove
  709. keywords which aren't supported by tp
  710. * break and continue are now symbols of the system unit
  711. + widestring, longstring and ansistring type released
  712. Revision 1.6 1998/05/01 07:43:53 florian
  713. + basics for rtti implemented
  714. + switch $m (generate rtti for published sections)
  715. Revision 1.5 1998/04/30 15:59:40 pierre
  716. * GDB works again better :
  717. correct type info in one pass
  718. + UseTokenInfo for better source position
  719. * fixed one remaining bug in scanner for line counts
  720. * several little fixes
  721. Revision 1.4 1998/04/29 10:33:52 pierre
  722. + added some code for ansistring (not complete nor working yet)
  723. * corrected operator overloading
  724. * corrected nasm output
  725. + started inline procedures
  726. + added starstarn : use ** for exponentiation (^ gave problems)
  727. + started UseTokenInfo cond to get accurate positions
  728. Revision 1.3 1998/04/27 23:10:28 peter
  729. + new scanner
  730. * $makelib -> if smartlink
  731. * small filename fixes pmodule.setfilename
  732. * moved import from files.pas -> import.pas
  733. Revision 1.2 1998/04/21 10:16:47 peter
  734. * patches from strasbourg
  735. * objects is not used anymore in the fpc compiled version
  736. }