files.pas 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818
  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. s : string;
  264. begin
  265. stringdispose(objfilename);
  266. stringdispose(asmfilename);
  267. stringdispose(ppufilename);
  268. stringdispose(staticlibfilename);
  269. stringdispose(sharedlibfilename);
  270. stringdispose(exefilename);
  271. stringdispose(path);
  272. fsplit(fn,p,n,e);
  273. path:=stringdup(FixPath(p));
  274. s:=FixFileName(FixPath(p)+n);
  275. objfilename:=stringdup(s+target_info.objext);
  276. asmfilename:=stringdup(s+target_info.asmext);
  277. ppufilename:=stringdup(s+target_info.unitext);
  278. { lib and exe could be loaded with a file specified with -o }
  279. if OutputFile<>'' then
  280. s:=OutputFile;
  281. staticlibfilename:=stringdup(target_os.libprefix+s+target_os.staticlibext);
  282. sharedlibfilename:=stringdup(target_os.libprefix+s+target_os.sharedlibext);
  283. exefilename:=stringdup(s+target_os.exeext);
  284. end;
  285. function tmodule.openppu:boolean;
  286. var
  287. objfiletime,
  288. ppufiletime,
  289. asmfiletime : longint;
  290. begin
  291. openppu:=false;
  292. { Get ppufile time (also check if the file exists) }
  293. ppufiletime:=getnamedfiletime(ppufilename^);
  294. if ppufiletime=-1 then
  295. exit;
  296. { Open the ppufile }
  297. Message1(unit_u_ppu_loading,ppufilename^);
  298. ppufile:=new(pppufile,init(ppufilename^));
  299. if not ppufile^.open then
  300. begin
  301. dispose(ppufile,done);
  302. Message(unit_d_ppu_file_too_short);
  303. exit;
  304. end;
  305. { check for a valid PPU file }
  306. if not ppufile^.CheckPPUId then
  307. begin
  308. dispose(ppufile,done);
  309. Message(unit_d_ppu_invalid_header);
  310. exit;
  311. end;
  312. { check for allowed PPU versions }
  313. if not (ppufile^.GetPPUVersion in [15]) then
  314. begin
  315. dispose(ppufile,done);
  316. Message1(unit_d_ppu_invalid_version,tostr(ppufile^.GetPPUVersion));
  317. exit;
  318. end;
  319. { check the target processor }
  320. if ttargetcpu(ppufile^.header.cpu)<>target_cpu then
  321. begin
  322. dispose(ppufile,done);
  323. Comment(V_Debug,'unit is compiled for an other processor');
  324. exit;
  325. end;
  326. { check target }
  327. if ttarget(ppufile^.header.target)<>target_info.target then
  328. begin
  329. dispose(ppufile,done);
  330. Comment(V_Debug,'unit is compiled for an other target');
  331. exit;
  332. end;
  333. {!!!!!!!!!!!!!!!!!!! }
  334. { Load values to be access easier }
  335. flags:=ppufile^.header.flags;
  336. crc:=ppufile^.header.checksum;
  337. { Show Debug info }
  338. Message1(unit_d_ppu_time,filetimestring(ppufiletime));
  339. Message1(unit_d_ppu_flags,tostr(flags));
  340. Message1(unit_d_ppu_crc,tostr(ppufile^.header.checksum));
  341. { check the object and assembler file to see if we need only to
  342. assemble, only if it's not in a library }
  343. do_compile:=false;
  344. if (flags and uf_in_library)=0 then
  345. begin
  346. if (flags and uf_static_linked)<>0 then
  347. begin
  348. objfiletime:=getnamedfiletime(staticlibfilename^);
  349. if (ppufiletime<0) or (objfiletime<0) or (ppufiletime>objfiletime) then
  350. do_compile:=true;
  351. end
  352. else
  353. if (flags and uf_shared_linked)<>0 then
  354. begin
  355. objfiletime:=getnamedfiletime(sharedlibfilename^);
  356. if (ppufiletime<0) or (objfiletime<0) or (ppufiletime>objfiletime) then
  357. do_compile:=true;
  358. end
  359. else
  360. begin
  361. { the objectfile should be newer than the ppu file }
  362. objfiletime:=getnamedfiletime(objfilename^);
  363. if (ppufiletime<0) or (objfiletime<0) or (ppufiletime>objfiletime) then
  364. begin
  365. { check if assembler file is older than ppu file }
  366. asmfileTime:=GetNamedFileTime(asmfilename^);
  367. if (asmfiletime<0) or (ppufiletime>asmfiletime) then
  368. begin
  369. Message(unit_d_obj_and_asm_are_older_than_ppu);
  370. do_compile:=true;
  371. { we should try to get the source file }
  372. exit;
  373. end
  374. else
  375. begin
  376. Message(unit_d_obj_is_older_than_asm);
  377. exit;
  378. end;
  379. end;
  380. end;
  381. end;
  382. openppu:=true;
  383. end;
  384. function tmodule.search_unit(const n : string):boolean;
  385. var
  386. ext : string[8];
  387. singlepathstring,
  388. unitPath,
  389. filename : string;
  390. found : boolean;
  391. start,i : longint;
  392. Function UnitExists(const ext:string):boolean;
  393. begin
  394. Message1(unit_t_unitsearch,Singlepathstring+filename+ext);
  395. UnitExists:=FileExists(Singlepathstring+FileName+ext);
  396. end;
  397. begin
  398. start:=1;
  399. filename:=FixFileName(n);
  400. unitpath:=UnitSearchPath;
  401. Found:=false;
  402. repeat
  403. { Create current path to check }
  404. i:=pos(';',unitpath);
  405. if i=0 then
  406. i:=length(unitpath)+1;
  407. singlepathstring:=FixPath(copy(unitpath,start,i-start));
  408. delete(unitpath,start,i-start+1);
  409. { Check for PPL file }
  410. if not Found then
  411. begin
  412. Found:=UnitExists(target_info.unitlibext);
  413. if Found then
  414. Begin
  415. SetFileName(SinglePathString+FileName);
  416. Found:=OpenPPU;
  417. End;
  418. end;
  419. { Check for PPU file }
  420. if not Found then
  421. begin
  422. Found:=UnitExists(target_info.unitext);
  423. if Found then
  424. Begin
  425. SetFileName(SinglePathString+FileName);
  426. Found:=OpenPPU;
  427. End;
  428. end;
  429. { Check for Sources }
  430. if not Found then
  431. begin
  432. ppufile:=nil;
  433. do_compile:=true;
  434. {Check for .pp file}
  435. Found:=UnitExists(target_os.sourceext);
  436. if Found then
  437. Ext:=target_os.sourceext
  438. else
  439. begin
  440. {Check for .pas}
  441. Found:=UnitExists(target_os.pasext);
  442. if Found then
  443. Ext:=target_os.pasext;
  444. end;
  445. stringdispose(mainsource);
  446. if Found then
  447. begin
  448. sources_avail:=true;
  449. {Load Filenames when found}
  450. mainsource:=StringDup(SinglePathString+FileName+Ext);
  451. SetFileName(SinglePathString+FileName);
  452. end
  453. else
  454. sources_avail:=false;
  455. end;
  456. until Found or (unitpath='');
  457. search_unit:=Found;
  458. end;
  459. constructor tmodule.init(const s:string;_is_unit:boolean);
  460. var
  461. p : dirstr;
  462. n : namestr;
  463. e : extstr;
  464. begin
  465. FSplit(s,p,n,e);
  466. { Programs have the name program to don't conflict with dup id's }
  467. if _is_unit then
  468. modulename:=stringdup(Upper(n))
  469. else
  470. modulename:=stringdup('PROGRAM');
  471. mainsource:=stringdup(s);
  472. ppufilename:=nil;
  473. objfilename:=nil;
  474. asmfilename:=nil;
  475. staticlibfilename:=nil;
  476. sharedlibfilename:=nil;
  477. exefilename:=nil;
  478. { go32v2 has the famous 8.3 limit ;) }
  479. {$ifdef go32v2}
  480. asmprefix:=stringdup(FixFileName('as'));
  481. {$else}
  482. asmprefix:=stringdup(FixFileName(n));
  483. {$endif}
  484. path:=nil;
  485. setfilename(p+n);
  486. used_units.init;
  487. sourcefiles.init;
  488. linkofiles.init;
  489. linkstaticlibs.init;
  490. linksharedlibs.init;
  491. current_index:=0;
  492. ppufile:=nil;
  493. scanner:=nil;
  494. map:=nil;
  495. symtable:=nil;
  496. flags:=0;
  497. crc:=0;
  498. unitcount:=1;
  499. inc(global_unit_count);
  500. unit_index:=global_unit_count;
  501. do_assemble:=false;
  502. do_compile:=false;
  503. sources_avail:=true;
  504. compiled:=false;
  505. in_implementation:=false;
  506. in_global:=true;
  507. is_unit:=_is_unit;
  508. uses_imports:=false;
  509. imports:=new(plinkedlist,init);
  510. { set smartlink flag }
  511. if (cs_smartlink in aktmoduleswitches) then
  512. flags:=flags or uf_smartlink;
  513. { search the PPU file if it is an unit }
  514. if is_unit then
  515. begin
  516. if (not search_unit(modulename^)) and (length(modulename^)>8) then
  517. search_unit(copy(modulename^,1,8));
  518. end;
  519. end;
  520. destructor tmodule.done;
  521. begin
  522. if assigned(map) then
  523. dispose(map);
  524. if assigned(ppufile) then
  525. dispose(ppufile,done);
  526. if assigned(imports) then
  527. dispose(imports,done);
  528. used_units.done;
  529. sourcefiles.done;
  530. linkofiles.done;
  531. linkstaticlibs.done;
  532. linksharedlibs.done;
  533. stringdispose(objfilename);
  534. stringdispose(asmfilename);
  535. stringdispose(ppufilename);
  536. stringdispose(staticlibfilename);
  537. stringdispose(sharedlibfilename);
  538. stringdispose(exefilename);
  539. stringdispose(path);
  540. stringdispose(modulename);
  541. stringdispose(mainsource);
  542. stringdispose(asmprefix);
  543. inherited done;
  544. end;
  545. {****************************************************************************
  546. TUSED_UNIT
  547. ****************************************************************************}
  548. constructor tused_unit.init(_u : pmodule;intface:boolean);
  549. begin
  550. u:=_u;
  551. in_interface:=intface;
  552. in_uses:=false;
  553. is_stab_written:=false;
  554. loaded:=true;
  555. name:=stringdup(_u^.modulename^);
  556. checksum:=_u^.crc;
  557. unitid:=0;
  558. end;
  559. constructor tused_unit.init_to_load(const n:string;c:longint;intface:boolean);
  560. begin
  561. u:=nil;
  562. in_interface:=intface;
  563. in_uses:=false;
  564. is_stab_written:=false;
  565. loaded:=false;
  566. name:=stringdup(n);
  567. checksum:=c;
  568. unitid:=0;
  569. end;
  570. destructor tused_unit.done;
  571. begin
  572. stringdispose(name);
  573. inherited done;
  574. end;
  575. end.
  576. {
  577. $Log$
  578. Revision 1.39 1998-08-25 16:44:16 pierre
  579. * openppu was true even if the object file is missing
  580. this lead to trying to open a filename without extension
  581. and prevented the 'make cycle' to work for win32
  582. Revision 1.38 1998/08/19 10:06:12 peter
  583. * fixed filenames and removedir which supports slash at the end
  584. Revision 1.37 1998/08/18 20:52:19 peter
  585. * renamed in_main to in_global which is more logical
  586. Revision 1.36 1998/08/17 10:10:07 peter
  587. - removed OLDPPU
  588. Revision 1.35 1998/08/17 09:17:44 peter
  589. * static/shared linking updates
  590. Revision 1.34 1998/08/14 21:56:31 peter
  591. * setting the outputfile using -o works now to create static libs
  592. Revision 1.33 1998/08/11 14:09:08 peter
  593. * fixed some messages and smaller msgtxt.inc
  594. Revision 1.32 1998/08/10 14:49:58 peter
  595. + localswitches, moduleswitches, globalswitches splitting
  596. Revision 1.31 1998/07/14 14:46:48 peter
  597. * released NEWINPUT
  598. Revision 1.30 1998/07/07 11:19:55 peter
  599. + NEWINPUT for a better inputfile and scanner object
  600. Revision 1.29 1998/06/25 10:51:00 pierre
  601. * removed a remaining ifndef NEWPPU
  602. replaced by ifdef OLDPPU
  603. * added uf_finalize to ppu unit
  604. Revision 1.28 1998/06/25 08:48:12 florian
  605. * first version of rtti support
  606. Revision 1.27 1998/06/24 14:48:34 peter
  607. * ifdef newppu -> ifndef oldppu
  608. Revision 1.26 1998/06/17 14:36:19 peter
  609. * forgot an $ifndef OLDPPU :(
  610. Revision 1.25 1998/06/17 14:10:11 peter
  611. * small os2 fixes
  612. * fixed interdependent units with newppu (remake3 under linux works now)
  613. Revision 1.24 1998/06/16 08:56:20 peter
  614. + targetcpu
  615. * cleaner pmodules for newppu
  616. Revision 1.23 1998/06/15 14:44:36 daniel
  617. * BP updates.
  618. Revision 1.22 1998/06/14 18:25:41 peter
  619. * small fix with crc in newppu
  620. Revision 1.21 1998/06/13 00:10:05 peter
  621. * working browser and newppu
  622. * some small fixes against crashes which occured in bp7 (but not in
  623. fpc?!)
  624. Revision 1.20 1998/06/12 14:50:48 peter
  625. * removed the tree dependency to types.pas
  626. * long_fil.pas support (not fully tested yet)
  627. Revision 1.19 1998/06/12 10:32:26 pierre
  628. * column problem hopefully solved
  629. + C vars declaration changed
  630. Revision 1.18 1998/06/11 13:58:07 peter
  631. * small fix to let newppu compile
  632. Revision 1.17 1998/06/09 16:01:40 pierre
  633. + added procedure directive parsing for procvars
  634. (accepted are popstack cdecl and pascal)
  635. + added C vars with the following syntax
  636. var C calias 'true_c_name';(can be followed by external)
  637. reason is that you must add the Cprefix
  638. which is target dependent
  639. Revision 1.16 1998/06/04 10:42:19 pierre
  640. * small bug fix in load_ppu or openppu
  641. Revision 1.15 1998/05/28 14:37:53 peter
  642. * default programname is PROGRAM (like TP7) to avoid dup id's
  643. Revision 1.14 1998/05/27 19:45:02 peter
  644. * symtable.pas splitted into includefiles
  645. * symtable adapted for $ifndef OLDPPU
  646. Revision 1.13 1998/05/23 01:21:05 peter
  647. + aktasmmode, aktoptprocessor, aktoutputformat
  648. + smartlink per module $SMARTLINK-/+ (like MMX) and moved to aktswitches
  649. + $LIBNAME to set the library name where the unit will be put in
  650. * splitted cgi386 a bit (codeseg to large for bp7)
  651. * nasm, tasm works again. nasm moved to ag386nsm.pas
  652. Revision 1.12 1998/05/20 09:42:33 pierre
  653. + UseTokenInfo now default
  654. * unit in interface uses and implementation uses gives error now
  655. * only one error for unknown symbol (uses lastsymknown boolean)
  656. the problem came from the label code !
  657. + first inlined procedures and function work
  658. (warning there might be allowed cases were the result is still wrong !!)
  659. * UseBrower updated gives a global list of all position of all used symbols
  660. with switch -gb
  661. Revision 1.11 1998/05/12 10:46:59 peter
  662. * moved printstatus to verb_def
  663. + V_Normal which is between V_Error and V_Warning and doesn't have a
  664. prefix like error: warning: and is included in V_Default
  665. * fixed some messages
  666. * first time parameter scan is only for -v and -T
  667. - removed old style messages
  668. Revision 1.10 1998/05/11 13:07:53 peter
  669. + $ifndef OLDPPU for the new ppuformat
  670. + $define GDB not longer required
  671. * removed all warnings and stripped some log comments
  672. * no findfirst/findnext anymore to remove smartlink *.o files
  673. Revision 1.9 1998/05/06 15:04:20 pierre
  674. + when trying to find source files of a ppufile
  675. check the includepathlist for included files
  676. the main file must still be in the same directory
  677. Revision 1.8 1998/05/04 17:54:25 peter
  678. + smartlinking works (only case jumptable left todo)
  679. * redesign of systems.pas to support assemblers and linkers
  680. + Unitname is now also in the PPU-file, increased version to 14
  681. Revision 1.7 1998/05/01 16:38:44 florian
  682. * handling of private and protected fixed
  683. + change_keywords_to_tp implemented to remove
  684. keywords which aren't supported by tp
  685. * break and continue are now symbols of the system unit
  686. + widestring, longstring and ansistring type released
  687. Revision 1.6 1998/05/01 07:43:53 florian
  688. + basics for rtti implemented
  689. + switch $m (generate rtti for published sections)
  690. Revision 1.5 1998/04/30 15:59:40 pierre
  691. * GDB works again better :
  692. correct type info in one pass
  693. + UseTokenInfo for better source position
  694. * fixed one remaining bug in scanner for line counts
  695. * several little fixes
  696. Revision 1.4 1998/04/29 10:33:52 pierre
  697. + added some code for ansistring (not complete nor working yet)
  698. * corrected operator overloading
  699. * corrected nasm output
  700. + started inline procedures
  701. + added starstarn : use ** for exponentiation (^ gave problems)
  702. + started UseTokenInfo cond to get accurate positions
  703. Revision 1.3 1998/04/27 23:10:28 peter
  704. + new scanner
  705. * $makelib -> if smartlink
  706. * small filename fixes pmodule.setfilename
  707. * moved import from files.pas -> import.pas
  708. Revision 1.2 1998/04/21 10:16:47 peter
  709. * patches from strasbourg
  710. * objects is not used anymore in the fpc compiled version
  711. }