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