files.pas 43 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429
  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. {$ifdef TP}
  21. {$V+}
  22. {$endif}
  23. interface
  24. uses
  25. globtype,
  26. cobjects,globals,ppu;
  27. const
  28. {$ifdef FPC}
  29. maxunits = 1024;
  30. InputFileBufSize=32*1024;
  31. linebufincrease=512;
  32. {$else}
  33. maxunits = 128;
  34. InputFileBufSize=1024;
  35. linebufincrease=64;
  36. {$endif}
  37. type
  38. {$ifdef FPC}
  39. tlongintarr = array[0..1000000] of longint;
  40. {$else}
  41. tlongintarr = array[0..16000] of longint;
  42. {$endif}
  43. plongintarr = ^tlongintarr;
  44. pinputfile = ^tinputfile;
  45. tinputfile = object
  46. path,name : pstring; { path and filename }
  47. next : pinputfile; { next file for reading }
  48. f : file; { current file handle }
  49. is_macro,
  50. endoffile, { still bytes left to read }
  51. closed : boolean; { is the file closed }
  52. buf : pchar; { buffer }
  53. bufstart, { buffer start position in the file }
  54. bufsize, { amount of bytes in the buffer }
  55. maxbufsize : longint; { size in memory for the buffer }
  56. saveinputpointer : pchar; { save fields for scanner variables }
  57. savelastlinepos,
  58. saveline_no : longint;
  59. linebuf : plongintarr; { line buffer to retrieve lines }
  60. maxlinebuf : longint;
  61. ref_count : longint; { to handle the browser refs }
  62. ref_index : longint;
  63. ref_next : pinputfile;
  64. constructor init(const fn:string);
  65. destructor done;
  66. procedure setpos(l:longint);
  67. procedure seekbuf(fpos:longint);
  68. procedure readbuf;
  69. function open:boolean;
  70. procedure close;
  71. procedure tempclose;
  72. function tempopen:boolean;
  73. procedure setmacro(p:pchar;len:longint);
  74. procedure setline(line,linepos:longint);
  75. function getlinestr(l:longint):string;
  76. end;
  77. pfilemanager = ^tfilemanager;
  78. tfilemanager = object
  79. files : pinputfile;
  80. last_ref_index : longint;
  81. constructor init;
  82. destructor done;
  83. procedure register_file(f : pinputfile);
  84. procedure inverse_register_indexes;
  85. function get_file(l:longint) : pinputfile;
  86. function get_file_name(l :longint):string;
  87. function get_file_path(l :longint):string;
  88. end;
  89. type
  90. {$ifndef NEWMAP}
  91. tunitmap = array[0..maxunits-1] of pointer;
  92. punitmap = ^tunitmap;
  93. pmodule = ^tmodule;
  94. {$else NEWMAP}
  95. pmodule = ^tmodule;
  96. tunitmap = array[0..maxunits-1] of pmodule;
  97. punitmap = ^tunitmap;
  98. {$endif NEWMAP}
  99. tmodule = object(tlinkedlist_item)
  100. ppufile : pppufile; { the PPU file }
  101. crc,
  102. flags : longint; { the PPU flags }
  103. compiled, { unit is already compiled }
  104. do_assemble, { only assemble the object, don't recompile }
  105. do_compile, { need to compile the sources }
  106. sources_avail, { if all sources are reachable }
  107. is_unit,
  108. in_second_compile, { is this unit being compiled for the 2nd time? }
  109. in_implementation, { processing the implementation part? }
  110. in_global : boolean; { allow global settings }
  111. islibrary : boolean; { if it is a library (win32 dll) }
  112. map : punitmap; { mapping of all used units }
  113. unitcount : word; { local unit counter }
  114. unit_index : word; { global counter for browser }
  115. globalsymtable, { pointer to the local/static symtable of this unit }
  116. localsymtable : pointer; { pointer to the psymtable of this unit }
  117. scanner : pointer; { scanner object used }
  118. loaded_from : pmodule;
  119. uses_imports : boolean; { Set if the module imports from DLL's.}
  120. imports : plinkedlist;
  121. _exports : plinkedlist;
  122. sourcefiles : pfilemanager;
  123. resourcefiles,
  124. linksharedlibs,
  125. linkstaticlibs,
  126. linkofiles : tstringcontainer;
  127. used_units : tlinkedlist;
  128. path, { path where the module is find/created }
  129. outpath,
  130. modulename, { name of the module in uppercase }
  131. objfilename, { fullname of the objectfile }
  132. asmfilename, { fullname of the assemblerfile }
  133. ppufilename, { fullname of the ppufile }
  134. staticlibfilename, { fullname of the static libraryfile }
  135. sharedlibfilename, { fullname of the shared libraryfile }
  136. exefilename, { fullname of the exefile }
  137. asmprefix, { prefix for the smartlink asmfiles }
  138. mainsource : pstring; { name of the main sourcefile }
  139. constructor init(const s:string;_is_unit:boolean);
  140. destructor done;virtual;
  141. procedure reset;
  142. procedure setfilename(const fn:string;allowoutput:boolean);
  143. function openppu:boolean;
  144. function search_unit(const n : string;onlysource:boolean):boolean;
  145. end;
  146. pused_unit = ^tused_unit;
  147. tused_unit = object(tlinkedlist_item)
  148. unitid : word;
  149. name : pstring;
  150. checksum : longint;
  151. loaded : boolean;
  152. in_uses,
  153. in_interface,
  154. is_stab_written : boolean;
  155. u : pmodule;
  156. constructor init(_u : pmodule;intface:boolean);
  157. constructor init_to_load(const n:string;c:longint;intface:boolean);
  158. destructor done;virtual;
  159. end;
  160. var
  161. main_module : pmodule; { Main module of the program }
  162. current_module : pmodule; { Current module which is compiled }
  163. current_ppu : pppufile; { Current ppufile which is read }
  164. global_unit_count : word;
  165. usedunits : tlinkedlist; { Used units for this program }
  166. loaded_units : tlinkedlist; { All loaded units }
  167. function get_source_file(moduleindex,fileindex : word) : pinputfile;
  168. implementation
  169. uses
  170. dos,verbose,systems,
  171. symtable,scanner;
  172. {****************************************************************************
  173. TINPUTFILE
  174. ****************************************************************************}
  175. constructor tinputfile.init(const fn:string);
  176. var
  177. p:dirstr;
  178. n:namestr;
  179. e:extstr;
  180. begin
  181. FSplit(fn,p,n,e);
  182. name:=stringdup(n+e);
  183. path:=stringdup(p);
  184. next:=nil;
  185. { file info }
  186. is_macro:=false;
  187. endoffile:=false;
  188. closed:=true;
  189. buf:=nil;
  190. bufstart:=0;
  191. bufsize:=0;
  192. maxbufsize:=InputFileBufSize;
  193. { save fields }
  194. saveinputpointer:=nil;
  195. saveline_no:=0;
  196. savelastlinepos:=0;
  197. { indexing refs }
  198. ref_next:=nil;
  199. ref_count:=0;
  200. ref_index:=0;
  201. { line buffer }
  202. linebuf:=nil;
  203. maxlinebuf:=0;
  204. end;
  205. destructor tinputfile.done;
  206. begin
  207. if not closed then
  208. close;
  209. stringdispose(path);
  210. stringdispose(name);
  211. { free memory }
  212. if assigned(linebuf) then
  213. freemem(linebuf,maxlinebuf shl 2);
  214. end;
  215. procedure tinputfile.setpos(l:longint);
  216. begin
  217. bufstart:=l;
  218. end;
  219. procedure tinputfile.seekbuf(fpos:longint);
  220. begin
  221. if closed then
  222. exit;
  223. seek(f,fpos);
  224. bufstart:=fpos;
  225. bufsize:=0;
  226. end;
  227. procedure tinputfile.readbuf;
  228. {$ifdef TP}
  229. var
  230. w : word;
  231. {$endif}
  232. begin
  233. if is_macro then
  234. endoffile:=true;
  235. if closed then
  236. exit;
  237. inc(bufstart,bufsize);
  238. {$ifdef TP}
  239. blockread(f,buf^,maxbufsize-1,w);
  240. bufsize:=w;
  241. {$else}
  242. blockread(f,buf^,maxbufsize-1,bufsize);
  243. {$endif}
  244. buf[bufsize]:=#0;
  245. endoffile:=eof(f);
  246. end;
  247. function tinputfile.open:boolean;
  248. var
  249. ofm : byte;
  250. begin
  251. open:=false;
  252. if not closed then
  253. Close;
  254. ofm:=filemode;
  255. filemode:=0;
  256. Assign(f,path^+name^);
  257. {$I-}
  258. reset(f,1);
  259. {$I+}
  260. filemode:=ofm;
  261. if ioresult<>0 then
  262. exit;
  263. { file }
  264. endoffile:=false;
  265. closed:=false;
  266. Getmem(buf,MaxBufsize);
  267. bufstart:=0;
  268. bufsize:=0;
  269. open:=true;
  270. end;
  271. procedure tinputfile.close;
  272. var
  273. i : word;
  274. begin
  275. if is_macro then
  276. begin
  277. if assigned(buf) then
  278. Freemem(buf,maxbufsize);
  279. buf:=nil;
  280. {is_macro:=false;
  281. still needed for dispose in scanner PM }
  282. closed:=true;
  283. exit;
  284. end;
  285. if not closed then
  286. begin
  287. {$I-}
  288. system.close(f);
  289. {$I+}
  290. i:=ioresult;
  291. closed:=true;
  292. end;
  293. if assigned(buf) then
  294. begin
  295. Freemem(buf,maxbufsize);
  296. buf:=nil;
  297. end;
  298. bufstart:=0;
  299. end;
  300. procedure tinputfile.tempclose;
  301. var
  302. i : word;
  303. begin
  304. if is_macro then
  305. exit;
  306. if not closed then
  307. begin
  308. {$I-}
  309. system.close(f);
  310. {$I+}
  311. i:=ioresult;
  312. Freemem(buf,maxbufsize);
  313. buf:=nil;
  314. closed:=true;
  315. end;
  316. end;
  317. function tinputfile.tempopen:boolean;
  318. var
  319. ofm : byte;
  320. begin
  321. tempopen:=false;
  322. if is_macro then
  323. begin
  324. tempopen:=true;
  325. exit;
  326. end;
  327. if not closed then
  328. exit;
  329. ofm:=filemode;
  330. filemode:=0;
  331. Assign(f,path^+name^);
  332. {$I-}
  333. reset(f,1);
  334. {$I+}
  335. filemode:=ofm;
  336. if ioresult<>0 then
  337. exit;
  338. closed:=false;
  339. { get new mem }
  340. Getmem(buf,maxbufsize);
  341. { restore state }
  342. seek(f,BufStart);
  343. bufsize:=0;
  344. readbuf;
  345. tempopen:=true;
  346. end;
  347. procedure tinputfile.setmacro(p:pchar;len:longint);
  348. begin
  349. { create new buffer }
  350. getmem(buf,len+1);
  351. move(p^,buf^,len);
  352. buf[len]:=#0;
  353. { reset }
  354. bufstart:=0;
  355. bufsize:=len;
  356. maxbufsize:=len+1;
  357. is_macro:=true;
  358. endoffile:=true;
  359. closed:=true;
  360. end;
  361. procedure tinputfile.setline(line,linepos:longint);
  362. var
  363. oldlinebuf : plongintarr;
  364. begin
  365. if line<1 then
  366. exit;
  367. while (line>=maxlinebuf) do
  368. begin
  369. oldlinebuf:=linebuf;
  370. { create new linebuf and move old info }
  371. getmem(linebuf,(maxlinebuf+linebufincrease) shl 2);
  372. if assigned(oldlinebuf) then
  373. begin
  374. move(oldlinebuf^,linebuf^,maxlinebuf shl 2);
  375. freemem(oldlinebuf,maxlinebuf shl 2);
  376. end;
  377. fillchar(linebuf^[maxlinebuf],linebufincrease shl 2,0);
  378. inc(maxlinebuf,linebufincrease);
  379. end;
  380. linebuf^[line]:=linepos;
  381. end;
  382. function tinputfile.getlinestr(l:longint):string;
  383. var
  384. c : char;
  385. i,
  386. fpos : longint;
  387. p : pchar;
  388. begin
  389. getlinestr:='';
  390. if l<maxlinebuf then
  391. begin
  392. fpos:=linebuf^[l];
  393. { fpos is set negativ if the line was already written }
  394. { but we still know the correct value }
  395. if fpos<0 then
  396. fpos:=-fpos+1;
  397. if closed then
  398. open;
  399. { in current buf ? }
  400. if (fpos<bufstart) or (fpos>bufstart+bufsize) then
  401. begin
  402. seekbuf(fpos);
  403. readbuf;
  404. end;
  405. { the begin is in the buf now simply read until #13,#10 }
  406. i:=0;
  407. p:=@buf[fpos-bufstart];
  408. repeat
  409. c:=p^;
  410. if c=#0 then
  411. begin
  412. if endoffile then
  413. break;
  414. readbuf;
  415. p:=buf;
  416. c:=p^;
  417. end;
  418. if c in [#10,#13] then
  419. break;
  420. inc(i);
  421. getlinestr[i]:=c;
  422. inc(longint(p));
  423. until (i=255);
  424. {$ifndef TP}
  425. {$ifopt H+}
  426. setlength(getlinestr,i);
  427. {$else}
  428. getlinestr[0]:=chr(i);
  429. {$endif}
  430. {$else}
  431. getlinestr[0]:=chr(i);
  432. {$endif}
  433. end;
  434. end;
  435. {****************************************************************************
  436. TFILEMANAGER
  437. ****************************************************************************}
  438. constructor tfilemanager.init;
  439. begin
  440. files:=nil;
  441. last_ref_index:=0;
  442. end;
  443. destructor tfilemanager.done;
  444. var
  445. hp : pinputfile;
  446. begin
  447. hp:=files;
  448. while assigned(hp) do
  449. begin
  450. files:=files^.ref_next;
  451. dispose(hp,done);
  452. hp:=files;
  453. end;
  454. last_ref_index:=0;
  455. end;
  456. procedure tfilemanager.register_file(f : pinputfile);
  457. begin
  458. inc(last_ref_index);
  459. f^.ref_next:=files;
  460. f^.ref_index:=last_ref_index;
  461. files:=f;
  462. {$ifdef FPC}
  463. {$ifdef heaptrc}
  464. writeln(stderr,f^.name^,' index ',current_module^.unit_index*100000+f^.ref_index);
  465. {$endif heaptrc}
  466. {$endif FPC}
  467. end;
  468. { this procedure is necessary after loading the
  469. sources files from a PPU file PM }
  470. procedure tfilemanager.inverse_register_indexes;
  471. var
  472. f : pinputfile;
  473. begin
  474. f:=files;
  475. while assigned(f) do
  476. begin
  477. f^.ref_index:=last_ref_index-f^.ref_index+1;
  478. f:=f^.ref_next;
  479. end;
  480. end;
  481. function tfilemanager.get_file(l :longint) : pinputfile;
  482. var
  483. ff : pinputfile;
  484. begin
  485. ff:=files;
  486. while assigned(ff) and (ff^.ref_index<>l) do
  487. ff:=ff^.ref_next;
  488. get_file:=ff;
  489. end;
  490. function tfilemanager.get_file_name(l :longint):string;
  491. var
  492. hp : pinputfile;
  493. begin
  494. hp:=get_file(l);
  495. if assigned(hp) then
  496. get_file_name:=hp^.name^
  497. else
  498. get_file_name:='';
  499. end;
  500. function tfilemanager.get_file_path(l :longint):string;
  501. var
  502. hp : pinputfile;
  503. begin
  504. hp:=get_file(l);
  505. if assigned(hp) then
  506. get_file_path:=hp^.path^
  507. else
  508. get_file_path:='';
  509. end;
  510. function get_source_file(moduleindex,fileindex : word) : pinputfile;
  511. var
  512. hp : pmodule;
  513. f : pinputfile;
  514. begin
  515. hp:=pmodule(loaded_units.first);
  516. while assigned(hp) and (hp^.unit_index<>moduleindex) do
  517. hp:=pmodule(hp^.next);
  518. get_source_file:=nil;
  519. if not assigned(hp) then
  520. exit;
  521. f:=pinputfile(hp^.sourcefiles^.files);
  522. while assigned(f) do
  523. begin
  524. if f^.ref_index=fileindex then
  525. begin
  526. get_source_file:=f;
  527. exit;
  528. end;
  529. f:=pinputfile(f^.ref_next);
  530. end;
  531. end;
  532. {****************************************************************************
  533. TMODULE
  534. ****************************************************************************}
  535. procedure tmodule.setfilename(const fn:string;allowoutput:boolean);
  536. var
  537. p : dirstr;
  538. n : NameStr;
  539. e : ExtStr;
  540. begin
  541. stringdispose(objfilename);
  542. stringdispose(asmfilename);
  543. stringdispose(ppufilename);
  544. stringdispose(staticlibfilename);
  545. stringdispose(sharedlibfilename);
  546. stringdispose(exefilename);
  547. stringdispose(outpath);
  548. stringdispose(path);
  549. { Create names }
  550. fsplit(fn,p,n,e);
  551. n:=FixFileName(n);
  552. { set path }
  553. path:=stringdup(FixPath(p,false));
  554. { obj,asm,ppu names }
  555. p:=path^;
  556. if AllowOutput then
  557. begin
  558. if (OutputUnitDir<>'') then
  559. p:=OutputUnitDir
  560. else
  561. if (OutputExeDir<>'') then
  562. p:=OutputExeDir;
  563. end;
  564. outpath:=stringdup(p);
  565. objfilename:=stringdup(p+n+target_info.objext);
  566. asmfilename:=stringdup(p+n+target_info.asmext);
  567. ppufilename:=stringdup(p+n+target_info.unitext);
  568. { lib and exe could be loaded with a file specified with -o }
  569. if AllowOutput and (OutputFile<>'') then
  570. n:=OutputFile;
  571. staticlibfilename:=stringdup(p+target_os.libprefix+n+target_os.staticlibext);
  572. if target_info.target=target_i386_WIN32 then
  573. sharedlibfilename:=stringdup(p+n+target_os.sharedlibext)
  574. else
  575. sharedlibfilename:=stringdup(p+target_os.libprefix+n+target_os.sharedlibext);
  576. { output dir of exe can be specified separatly }
  577. if AllowOutput and (OutputExeDir<>'') then
  578. p:=OutputExeDir
  579. else
  580. p:=path^;
  581. exefilename:=stringdup(p+n+target_os.exeext);
  582. end;
  583. function tmodule.openppu:boolean;
  584. var
  585. objfiletime,
  586. ppufiletime,
  587. asmfiletime : longint;
  588. begin
  589. openppu:=false;
  590. Message1(unit_t_ppu_loading,ppufilename^);
  591. { Get ppufile time (also check if the file exists) }
  592. ppufiletime:=getnamedfiletime(ppufilename^);
  593. if ppufiletime=-1 then
  594. exit;
  595. { Open the ppufile }
  596. Message1(unit_u_ppu_name,ppufilename^);
  597. ppufile:=new(pppufile,init(ppufilename^));
  598. ppufile^.change_endian:=source_os.endian<>target_os.endian;
  599. if not ppufile^.open then
  600. begin
  601. dispose(ppufile,done);
  602. Message(unit_u_ppu_file_too_short);
  603. exit;
  604. end;
  605. { check for a valid PPU file }
  606. if not ppufile^.CheckPPUId then
  607. begin
  608. dispose(ppufile,done);
  609. Message(unit_u_ppu_invalid_header);
  610. exit;
  611. end;
  612. { check for allowed PPU versions }
  613. if not (ppufile^.GetPPUVersion = 15) then
  614. begin
  615. dispose(ppufile,done);
  616. Message1(unit_u_ppu_invalid_version,tostr(ppufile^.GetPPUVersion));
  617. exit;
  618. end;
  619. { check the target processor }
  620. if ttargetcpu(ppufile^.header.cpu)<>target_cpu then
  621. begin
  622. dispose(ppufile,done);
  623. Message(unit_u_ppu_invalid_processor);
  624. exit;
  625. end;
  626. { check target }
  627. if ttarget(ppufile^.header.target)<>target_info.target then
  628. begin
  629. dispose(ppufile,done);
  630. Message(unit_u_ppu_invalid_target);
  631. exit;
  632. end;
  633. { Load values to be access easier }
  634. flags:=ppufile^.header.flags;
  635. crc:=ppufile^.header.checksum;
  636. { Show Debug info }
  637. Message1(unit_u_ppu_time,filetimestring(ppufiletime));
  638. Message1(unit_u_ppu_flags,tostr(flags));
  639. Message1(unit_u_ppu_crc,tostr(ppufile^.header.checksum));
  640. { check the object and assembler file to see if we need only to
  641. assemble, only if it's not in a library }
  642. do_compile:=false;
  643. if (flags and uf_in_library)=0 then
  644. begin
  645. if ((flags and uf_static_linked)<>0) or
  646. ((flags and uf_smartlink)<>0) then
  647. begin
  648. objfiletime:=getnamedfiletime(staticlibfilename^);
  649. Message2(unit_u_check_time,staticlibfilename^,filetimestring(objfiletime));
  650. if (ppufiletime<0) or (objfiletime<0) or (ppufiletime>objfiletime) then
  651. begin
  652. Message(unit_u_recompile_staticlib_is_older);
  653. do_compile:=true;
  654. exit;
  655. end;
  656. end
  657. else
  658. if (flags and uf_shared_linked)<>0 then
  659. begin
  660. objfiletime:=getnamedfiletime(sharedlibfilename^);
  661. Message2(unit_u_check_time,sharedlibfilename^,filetimestring(objfiletime));
  662. if (ppufiletime<0) or (objfiletime<0) or (ppufiletime>objfiletime) then
  663. begin
  664. Message(unit_u_recompile_sharedlib_is_older);
  665. do_compile:=true;
  666. exit;
  667. end;
  668. end
  669. else
  670. begin
  671. { the objectfile should be newer than the ppu file }
  672. objfiletime:=getnamedfiletime(objfilename^);
  673. Message2(unit_u_check_time,objfilename^,filetimestring(objfiletime));
  674. if (ppufiletime<0) or (objfiletime<0) or (ppufiletime>objfiletime) then
  675. begin
  676. { check if assembler file is older than ppu file }
  677. asmfileTime:=GetNamedFileTime(asmfilename^);
  678. Message2(unit_u_check_time,asmfilename^,filetimestring(asmfiletime));
  679. if (asmfiletime<0) or (ppufiletime>asmfiletime) then
  680. begin
  681. Message(unit_u_recompile_obj_and_asm_older);
  682. do_compile:=true;
  683. exit;
  684. end
  685. else
  686. begin
  687. Message(unit_u_recompile_obj_older_than_asm);
  688. if not(cs_asm_extern in aktglobalswitches) then
  689. begin
  690. do_compile:=true;
  691. exit;
  692. end;
  693. end;
  694. end;
  695. end;
  696. end;
  697. openppu:=true;
  698. end;
  699. function tmodule.search_unit(const n : string;onlysource:boolean):boolean;
  700. var
  701. ext : string[8];
  702. singlepathstring,
  703. unitPath,
  704. filename : string;
  705. found : boolean;
  706. start,i : longint;
  707. Function UnitExists(const ext:string):boolean;
  708. begin
  709. Message1(unit_t_unitsearch,Singlepathstring+filename+ext);
  710. UnitExists:=FileExists(Singlepathstring+FileName+ext);
  711. end;
  712. begin
  713. start:=1;
  714. filename:=FixFileName(n);
  715. unitpath:=UnitSearchPath;
  716. Found:=false;
  717. repeat
  718. { Create current path to check }
  719. i:=pos(';',unitpath);
  720. if i=0 then
  721. i:=length(unitpath)+1;
  722. singlepathstring:=FixPath(copy(unitpath,start,i-start),false);
  723. delete(unitpath,start,i-start+1);
  724. if not onlysource then
  725. begin
  726. { Check for PPL file }
  727. if not Found then
  728. begin
  729. Found:=UnitExists(target_info.unitlibext);
  730. if Found then
  731. Begin
  732. SetFileName(SinglePathString+FileName,false);
  733. Found:=OpenPPU;
  734. End;
  735. end;
  736. { Check for PPU file }
  737. if not Found then
  738. begin
  739. Found:=UnitExists(target_info.unitext);
  740. if Found then
  741. Begin
  742. SetFileName(SinglePathString+FileName,false);
  743. Found:=OpenPPU;
  744. End;
  745. end;
  746. end;
  747. { Check for Sources }
  748. if not Found then
  749. begin
  750. ppufile:=nil;
  751. do_compile:=true;
  752. {Check for .pp file}
  753. Found:=UnitExists(target_os.sourceext);
  754. if Found then
  755. Ext:=target_os.sourceext
  756. else
  757. begin
  758. {Check for .pas}
  759. Found:=UnitExists(target_os.pasext);
  760. if Found then
  761. Ext:=target_os.pasext;
  762. end;
  763. stringdispose(mainsource);
  764. if Found then
  765. begin
  766. sources_avail:=true;
  767. {Load Filenames when found}
  768. mainsource:=StringDup(SinglePathString+FileName+Ext);
  769. SetFileName(SinglePathString+FileName,false);
  770. end
  771. else
  772. sources_avail:=false;
  773. end;
  774. until Found or (unitpath='');
  775. search_unit:=Found;
  776. end;
  777. procedure tmodule.reset;
  778. begin
  779. if assigned(scanner) then
  780. pscannerfile(scanner)^.invalid:=true;
  781. if assigned(globalsymtable) then
  782. begin
  783. dispose(punitsymtable(globalsymtable),done);
  784. globalsymtable:=nil;
  785. end;
  786. if assigned(localsymtable) then
  787. begin
  788. dispose(punitsymtable(localsymtable),done);
  789. localsymtable:=nil;
  790. end;
  791. if assigned(map) then
  792. begin
  793. dispose(map);
  794. map:=nil;
  795. end;
  796. if assigned(ppufile) then
  797. begin
  798. dispose(ppufile,done);
  799. ppufile:=nil;
  800. end;
  801. sourcefiles^.done;
  802. sourcefiles^.init;
  803. imports^.done;
  804. imports^.init;
  805. _exports^.done;
  806. _exports^.init;
  807. used_units.done;
  808. used_units.init;
  809. resourcefiles.done;
  810. resourcefiles.init_no_double;
  811. linkofiles.done;
  812. linkofiles.init_no_double;
  813. linkstaticlibs.done;
  814. linkstaticlibs.init_no_double;
  815. linksharedlibs.done;
  816. linksharedlibs.init_no_double;
  817. uses_imports:=false;
  818. do_assemble:=false;
  819. do_compile:=false;
  820. { sources_avail:=true;
  821. should not be changed PM }
  822. compiled:=false;
  823. in_implementation:=false;
  824. in_global:=true;
  825. loaded_from:=nil;
  826. flags:=0;
  827. crc:=0;
  828. unitcount:=1;
  829. end;
  830. constructor tmodule.init(const s:string;_is_unit:boolean);
  831. var
  832. p : dirstr;
  833. n : namestr;
  834. e : extstr;
  835. begin
  836. FSplit(s,p,n,e);
  837. { Programs have the name program to don't conflict with dup id's }
  838. if _is_unit then
  839. modulename:=stringdup(Upper(n))
  840. else
  841. modulename:=stringdup('PROGRAM');
  842. mainsource:=stringdup(s);
  843. ppufilename:=nil;
  844. objfilename:=nil;
  845. asmfilename:=nil;
  846. staticlibfilename:=nil;
  847. sharedlibfilename:=nil;
  848. exefilename:=nil;
  849. outpath:=nil;
  850. { Dos has the famous 8.3 limit :( }
  851. {$ifdef tp}
  852. asmprefix:=stringdup(FixFileName('as'));
  853. {$else}
  854. {$ifdef go32v2}
  855. asmprefix:=stringdup(FixFileName('as'));
  856. {$else}
  857. {$ifdef OS2}
  858. {Allthough OS/2 supports long filenames I play it safe and
  859. use 8.3 filenames, because this allows the compiler to run
  860. on a FAT partition. (DM)}
  861. asmprefix:=stringdup(FixFileName('as'));
  862. {$else}
  863. asmprefix:=stringdup(FixFileName(n));
  864. {$endif}
  865. {$endif}
  866. {$endif tp}
  867. path:=nil;
  868. setfilename(p+n,true);
  869. used_units.init;
  870. new(sourcefiles,init);
  871. resourcefiles.init_no_double;
  872. linkofiles.init_no_double;
  873. linkstaticlibs.init_no_double;
  874. linksharedlibs.init_no_double;
  875. ppufile:=nil;
  876. scanner:=nil;
  877. map:=nil;
  878. globalsymtable:=nil;
  879. localsymtable:=nil;
  880. loaded_from:=nil;
  881. flags:=0;
  882. crc:=0;
  883. unitcount:=1;
  884. inc(global_unit_count);
  885. unit_index:=global_unit_count;
  886. do_assemble:=false;
  887. do_compile:=false;
  888. sources_avail:=true;
  889. compiled:=false;
  890. in_second_compile:=false;
  891. in_implementation:=false;
  892. in_global:=true;
  893. is_unit:=_is_unit;
  894. islibrary:=false;
  895. uses_imports:=false;
  896. imports:=new(plinkedlist,init);
  897. _exports:=new(plinkedlist,init);
  898. { search the PPU file if it is an unit }
  899. if is_unit then
  900. begin
  901. if (not search_unit(modulename^,false)) and (length(modulename^)>8) then
  902. search_unit(copy(modulename^,1,8),false);
  903. end;
  904. end;
  905. destructor tmodule.done;
  906. begin
  907. if assigned(map) then
  908. dispose(map);
  909. if assigned(ppufile) then
  910. dispose(ppufile,done);
  911. ppufile:=nil;
  912. if assigned(imports) then
  913. dispose(imports,done);
  914. imports:=nil;
  915. if assigned(_exports) then
  916. dispose(_exports,done);
  917. _exports:=nil;
  918. if assigned(scanner) then
  919. pscannerfile(scanner)^.invalid:=true;
  920. if assigned(sourcefiles) then
  921. dispose(sourcefiles,done);
  922. sourcefiles:=nil;
  923. used_units.done;
  924. resourcefiles.done;
  925. linkofiles.done;
  926. linkstaticlibs.done;
  927. linksharedlibs.done;
  928. stringdispose(objfilename);
  929. stringdispose(asmfilename);
  930. stringdispose(ppufilename);
  931. stringdispose(staticlibfilename);
  932. stringdispose(sharedlibfilename);
  933. stringdispose(exefilename);
  934. stringdispose(outpath);
  935. stringdispose(path);
  936. stringdispose(modulename);
  937. stringdispose(mainsource);
  938. stringdispose(asmprefix);
  939. if assigned(globalsymtable) then
  940. dispose(punitsymtable(globalsymtable),done);
  941. globalsymtable:=nil;
  942. if assigned(localsymtable) then
  943. dispose(punitsymtable(localsymtable),done);
  944. localsymtable:=nil;
  945. inherited done;
  946. end;
  947. {****************************************************************************
  948. TUSED_UNIT
  949. ****************************************************************************}
  950. constructor tused_unit.init(_u : pmodule;intface:boolean);
  951. begin
  952. u:=_u;
  953. in_interface:=intface;
  954. in_uses:=false;
  955. is_stab_written:=false;
  956. loaded:=true;
  957. name:=stringdup(_u^.modulename^);
  958. checksum:=_u^.crc;
  959. unitid:=0;
  960. end;
  961. constructor tused_unit.init_to_load(const n:string;c:longint;intface:boolean);
  962. begin
  963. u:=nil;
  964. in_interface:=intface;
  965. in_uses:=false;
  966. is_stab_written:=false;
  967. loaded:=false;
  968. name:=stringdup(n);
  969. checksum:=c;
  970. unitid:=0;
  971. end;
  972. destructor tused_unit.done;
  973. begin
  974. stringdispose(name);
  975. inherited done;
  976. end;
  977. end.
  978. {
  979. $Log$
  980. Revision 1.83 1999-01-13 15:02:00 daniel
  981. * Tinputfile.readbuf eof bugfix
  982. Revision 1.82 1999/01/12 14:25:26 peter
  983. + BrowserLog for browser.log generation
  984. + BrowserCol for browser info in TCollections
  985. * released all other UseBrowser
  986. Revision 1.81 1998/12/28 23:26:14 peter
  987. + resource file handling ($R directive) for Win32
  988. Revision 1.80 1998/12/16 00:27:19 peter
  989. * removed some obsolete version checks
  990. Revision 1.79 1998/12/11 00:03:14 peter
  991. + globtype,tokens,version unit splitted from globals
  992. Revision 1.78 1998/12/04 10:18:07 florian
  993. * some stuff for procedures of object added
  994. * bug with overridden virtual constructors fixed (reported by Italo Gomes)
  995. Revision 1.77 1998/12/02 16:23:37 jonas
  996. * changed "if longintvar in set" to case or "if () or () .." statements
  997. * tree.pas: changed inlinenumber (and associated constructor/vars) to a byte
  998. Revision 1.76 1998/12/01 12:51:19 peter
  999. * fixed placing of ppas.sh and link.res when using -FE
  1000. Revision 1.75 1998/11/16 15:41:40 peter
  1001. * tp7 didn't like my ifopt H+ :(
  1002. Revision 1.74 1998/11/16 12:18:01 peter
  1003. * H+ fixes
  1004. Revision 1.73 1998/11/16 11:28:58 pierre
  1005. * stackcheck removed for i386_win32
  1006. * exportlist does not crash at least !!
  1007. (was need for tests dir !)z
  1008. Revision 1.72 1998/11/15 16:32:35 florian
  1009. * some stuff of Pavel implement (win32 dll creation)
  1010. * bug with ansistring function results fixed
  1011. Revision 1.71 1998/11/06 09:45:40 pierre
  1012. * bug on errors (file used after dispose !) fixed
  1013. Revision 1.70 1998/11/03 11:33:14 peter
  1014. + search_unit arg to only search for sources
  1015. Revision 1.69 1998/10/29 11:35:44 florian
  1016. * some dll support for win32
  1017. * fixed assembler writing for PalmOS
  1018. Revision 1.68 1998/10/27 10:22:34 florian
  1019. + First things for win32 export sections
  1020. Revision 1.67 1998/10/26 22:23:29 peter
  1021. + fixpath() has an extra option to allow a ./ as path
  1022. Revision 1.66 1998/10/19 18:07:11 peter
  1023. + external dll_name name func support for linux
  1024. Revision 1.65 1998/10/15 12:22:25 pierre
  1025. * close include files immediately after end reading
  1026. instead of waiting until unit compilation ended !
  1027. Revision 1.64 1998/10/14 13:38:19 peter
  1028. * fixed path with staticlib/objects in ppufiles
  1029. Revision 1.63 1998/10/14 11:02:49 daniel
  1030. * Stupid typo fixed.
  1031. Revision 1.62 1998/10/14 10:59:37 daniel
  1032. * Staticlibfilename now doesn't include path.
  1033. Revision 1.61 1998/10/14 10:57:25 daniel
  1034. * Dirstr, namestr, extstr.
  1035. * $V+ to prevent Peter from forgetting this.
  1036. * OS/2 compiler uses 8.3 filenames to support running the compiler on an old
  1037. DOS FAT partition.
  1038. Revision 1.60 1998/10/14 10:45:07 pierre
  1039. * ppu problems for m68k fixed (at least in cross compiling)
  1040. * one last memory leak for sysamiga fixed
  1041. * the amiga RTL compiles now completely !!
  1042. Revision 1.59 1998/10/13 14:01:07 peter
  1043. * fixed -al
  1044. Revision 1.58 1998/10/12 11:59:00 peter
  1045. + show name and date of .o and .s files which the compiler checks
  1046. Revision 1.57 1998/10/09 16:36:03 pierre
  1047. * some memory leaks specific to usebrowser define fixed
  1048. * removed tmodule.implsymtable (was like tmodule.localsymtable)
  1049. Revision 1.56 1998/10/09 08:56:26 pierre
  1050. * several memory leaks fixed
  1051. Revision 1.55 1998/10/08 23:28:54 peter
  1052. * -vu shows unit info, -vt shows tried/used files
  1053. Revision 1.54 1998/10/08 17:17:19 pierre
  1054. * current_module old scanner tagged as invalid if unit is recompiled
  1055. + added ppheap for better info on tracegetmem of heaptrc
  1056. (adds line column and file index)
  1057. * several memory leaks removed ith help of heaptrc !!
  1058. Revision 1.53 1998/10/08 13:48:43 peter
  1059. * fixed memory leaks for do nothing source
  1060. * fixed unit interdependency
  1061. Revision 1.52 1998/10/06 22:09:48 peter
  1062. * fixed for compiling with 0.99.8 due circular units
  1063. Revision 1.51 1998/10/06 17:16:47 pierre
  1064. * some memory leaks fixed (thanks to Peter for heaptrc !)
  1065. Revision 1.50 1998/09/30 16:43:34 peter
  1066. * fixed unit interdependency with circular uses
  1067. Revision 1.49 1998/09/28 16:57:20 pierre
  1068. * changed all length(p^.value_str^) into str_length(p)
  1069. to get it work with and without ansistrings
  1070. * changed sourcefiles field of tmodule to a pointer
  1071. Revision 1.48 1998/09/24 23:46:34 peter
  1072. + outputdir support
  1073. Revision 1.47 1998/09/22 17:13:43 pierre
  1074. + browsing updated and developed
  1075. records and objects fields are also stored
  1076. Revision 1.46 1998/09/21 08:45:10 pierre
  1077. + added vmt_offset in tobjectdef.write for fututre use
  1078. (first steps to have objects without vmt if no virtual !!)
  1079. + added fpu_used field for tabstractprocdef :
  1080. sets this level to 2 if the functions return with value in FPU
  1081. (is then set to correct value at parsing of implementation)
  1082. THIS MIGHT refuse some code with FPU expression too complex
  1083. that were accepted before and even in some cases
  1084. that don't overflow in fact
  1085. ( like if f : float; is a forward that finally in implementation
  1086. only uses one fpu register !!)
  1087. Nevertheless I think that it will improve security on
  1088. FPU operations !!
  1089. * most other changes only for UseBrowser code
  1090. (added symtable references for record and objects)
  1091. local switch for refs to args and local of each function
  1092. (static symtable still missing)
  1093. UseBrowser still not stable and probably broken by
  1094. the definition hash array !!
  1095. Revision 1.45 1998/09/18 09:58:51 peter
  1096. * -s doesn't require the .o to be available, this allows compiling of
  1097. everything on other platforms (profiling the windows.pp loading ;)
  1098. Revision 1.44 1998/09/10 13:51:32 peter
  1099. * tp compiler also uses 'as' as asmprefix
  1100. Revision 1.43 1998/09/03 17:08:45 pierre
  1101. * better lines for stabs
  1102. (no scroll back to if before else part
  1103. no return to case line at jump outside case)
  1104. + source lines also if not in order
  1105. Revision 1.42 1998/09/03 11:24:00 peter
  1106. * moved more inputfile things from tscannerfile to tinputfile
  1107. * changed ifdef Sourceline to cs_asm_source
  1108. Revision 1.41 1998/08/26 15:35:30 peter
  1109. * fixed scannerfiles for macros
  1110. + $I %<environment>%
  1111. Revision 1.40 1998/08/26 10:08:48 peter
  1112. * fixed problem with libprefix at the wrong place
  1113. * fixed lib generation with smartlinking and no -CS used
  1114. Revision 1.39 1998/08/25 16:44:16 pierre
  1115. * openppu was true even if the object file is missing
  1116. this lead to trying to open a filename without extension
  1117. and prevented the 'make cycle' to work for win32
  1118. Revision 1.38 1998/08/19 10:06:12 peter
  1119. * fixed filenames and removedir which supports slash at the end
  1120. Revision 1.37 1998/08/18 20:52:19 peter
  1121. * renamed in_main to in_global which is more logical
  1122. Revision 1.36 1998/08/17 10:10:07 peter
  1123. - removed OLDPPU
  1124. Revision 1.35 1998/08/17 09:17:44 peter
  1125. * static/shared linking updates
  1126. Revision 1.34 1998/08/14 21:56:31 peter
  1127. * setting the outputfile using -o works now to create static libs
  1128. Revision 1.33 1998/08/11 14:09:08 peter
  1129. * fixed some messages and smaller msgtxt.inc
  1130. Revision 1.32 1998/08/10 14:49:58 peter
  1131. + localswitches, moduleswitches, globalswitches splitting
  1132. Revision 1.31 1998/07/14 14:46:48 peter
  1133. * released NEWINPUT
  1134. Revision 1.30 1998/07/07 11:19:55 peter
  1135. + NEWINPUT for a better inputfile and scanner object
  1136. Revision 1.29 1998/06/25 10:51:00 pierre
  1137. * removed a remaining ifndef NEWPPU
  1138. replaced by ifdef OLDPPU
  1139. * added uf_finalize to ppu unit
  1140. Revision 1.28 1998/06/25 08:48:12 florian
  1141. * first version of rtti support
  1142. Revision 1.27 1998/06/24 14:48:34 peter
  1143. * ifdef newppu -> ifndef oldppu
  1144. Revision 1.26 1998/06/17 14:36:19 peter
  1145. * forgot an $ifndef OLDPPU :(
  1146. Revision 1.25 1998/06/17 14:10:11 peter
  1147. * small os2 fixes
  1148. * fixed interdependent units with newppu (remake3 under linux works now)
  1149. Revision 1.24 1998/06/16 08:56:20 peter
  1150. + targetcpu
  1151. * cleaner pmodules for newppu
  1152. Revision 1.23 1998/06/15 14:44:36 daniel
  1153. * BP updates.
  1154. Revision 1.22 1998/06/14 18:25:41 peter
  1155. * small fix with crc in newppu
  1156. Revision 1.21 1998/06/13 00:10:05 peter
  1157. * working browser and newppu
  1158. * some small fixes against crashes which occured in bp7 (but not in
  1159. fpc?!)
  1160. Revision 1.20 1998/06/12 14:50:48 peter
  1161. * removed the tree dependency to types.pas
  1162. * long_fil.pas support (not fully tested yet)
  1163. Revision 1.19 1998/06/12 10:32:26 pierre
  1164. * column problem hopefully solved
  1165. + C vars declaration changed
  1166. Revision 1.18 1998/06/11 13:58:07 peter
  1167. * small fix to let newppu compile
  1168. Revision 1.17 1998/06/09 16:01:40 pierre
  1169. + added procedure directive parsing for procvars
  1170. (accepted are popstack cdecl and pascal)
  1171. + added C vars with the following syntax
  1172. var C calias 'true_c_name';(can be followed by external)
  1173. reason is that you must add the Cprefix
  1174. which is target dependent
  1175. Revision 1.16 1998/06/04 10:42:19 pierre
  1176. * small bug fix in load_ppu or openppu
  1177. Revision 1.15 1998/05/28 14:37:53 peter
  1178. * default programname is PROGRAM (like TP7) to avoid dup id's
  1179. Revision 1.14 1998/05/27 19:45:02 peter
  1180. * symtable.pas splitted into includefiles
  1181. * symtable adapted for $ifndef OLDPPU
  1182. Revision 1.13 1998/05/23 01:21:05 peter
  1183. + aktasmmode, aktoptprocessor, aktoutputformat
  1184. + smartlink per module $SMARTLINK-/+ (like MMX) and moved to aktswitches
  1185. + $LIBNAME to set the library name where the unit will be put in
  1186. * splitted cgi386 a bit (codeseg to large for bp7)
  1187. * nasm, tasm works again. nasm moved to ag386nsm.pas
  1188. Revision 1.12 1998/05/20 09:42:33 pierre
  1189. + UseTokenInfo now default
  1190. * unit in interface uses and implementation uses gives error now
  1191. * only one error for unknown symbol (uses lastsymknown boolean)
  1192. the problem came from the label code !
  1193. + first inlined procedures and function work
  1194. (warning there might be allowed cases were the result is still wrong !!)
  1195. * UseBrower updated gives a global list of all position of all used symbols
  1196. with switch -gb
  1197. Revision 1.11 1998/05/12 10:46:59 peter
  1198. * moved printstatus to verb_def
  1199. + V_Normal which is between V_Error and V_Warning and doesn't have a
  1200. prefix like error: warning: and is included in V_Default
  1201. * fixed some messages
  1202. * first time parameter scan is only for -v and -T
  1203. - removed old style messages
  1204. Revision 1.10 1998/05/11 13:07:53 peter
  1205. + $ifndef OLDPPU for the new ppuformat
  1206. + $define GDB not longer required
  1207. * removed all warnings and stripped some log comments
  1208. * no findfirst/findnext anymore to remove smartlink *.o files
  1209. Revision 1.9 1998/05/06 15:04:20 pierre
  1210. + when trying to find source files of a ppufile
  1211. check the includepathlist for included files
  1212. the main file must still be in the same directory
  1213. Revision 1.8 1998/05/04 17:54:25 peter
  1214. + smartlinking works (only case jumptable left todo)
  1215. * redesign of systems.pas to support assemblers and linkers
  1216. + Unitname is now also in the PPU-file, increased version to 14
  1217. Revision 1.7 1998/05/01 16:38:44 florian
  1218. * handling of private and protected fixed
  1219. + change_keywords_to_tp implemented to remove
  1220. keywords which aren't supported by tp
  1221. * break and continue are now symbols of the system unit
  1222. + widestring, longstring and ansistring type released
  1223. Revision 1.6 1998/05/01 07:43:53 florian
  1224. + basics for rtti implemented
  1225. + switch $m (generate rtti for published sections)
  1226. Revision 1.5 1998/04/30 15:59:40 pierre
  1227. * GDB works again better :
  1228. correct type info in one pass
  1229. + UseTokenInfo for better source position
  1230. * fixed one remaining bug in scanner for line counts
  1231. * several little fixes
  1232. Revision 1.4 1998/04/29 10:33:52 pierre
  1233. + added some code for ansistring (not complete nor working yet)
  1234. * corrected operator overloading
  1235. * corrected nasm output
  1236. + started inline procedures
  1237. + added starstarn : use ** for exponentiation (^ gave problems)
  1238. + started UseTokenInfo cond to get accurate positions
  1239. Revision 1.3 1998/04/27 23:10:28 peter
  1240. + new scanner
  1241. * $makelib -> if smartlink
  1242. * small filename fixes pmodule.setfilename
  1243. * moved import from files.pas -> import.pas
  1244. Revision 1.2 1998/04/21 10:16:47 peter
  1245. * patches from strasbourg
  1246. * objects is not used anymore in the fpc compiled version
  1247. }