scandir.inc 41 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355
  1. {
  2. $Id$
  3. Copyright (c) 1998-2000 by Peter Vreman
  4. This unit implements directive parsing for the scanner
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16. ****************************************************************************
  17. }
  18. const
  19. directivelen=15;
  20. type
  21. directivestr=string[directivelen];
  22. tdirectivetoken=(
  23. _DIR_NONE,
  24. _DIR_ALIGN,_DIR_APPTYPE,_DIR_ASMMODE,_DIR_ASSERTIONS,
  25. _DIR_BOOLEVAL,
  26. _DIR_D,_DIR_DEBUGINFO,_DIR_DEFINE,_DIR_DESCRIPTION,
  27. _DIR_ELSE,_DIR_ENDIF,_DIR_ERROR,_DIR_EXTENDEDSYNTAX,
  28. _DIR_FATAL,
  29. _DIR_GOTO,
  30. _DIR_HINT,_DIR_HINTS,
  31. _DIR_I,_DIR_I386_ATT,_DIR_I386_DIRECT,_DIR_I386_INTEL,_DIR_IOCHECKS,
  32. _DIR_IF,_DIR_IFDEF,_DIR_IFNDEF,_DIR_IFOPT,_DIR_INCLUDE,_DIR_INCLUDEPATH,
  33. _DIR_INFO,_DIR_INLINE,
  34. _DIR_L,_DIR_LIBRARYPATH,_DIR_LINK,_DIR_LINKLIB,_DIR_LOCALSYMBOLS,
  35. _DIR_LONGSTRINGS,
  36. _DIR_M,_DIR_MACRO,_DIR_MAXFPUREGISTERS,_DIR_MEMORY,_DIR_MESSAGE,_DIR_MINENUMSIZE,_DIR_MMX,_DIR_MODE,
  37. _DIR_NOTE,_DIR_NOTES,
  38. _DIR_OBJECTPATH,_DIR_OPENSTRINGS,_DIR_OUTPUT_FORMAT,_DIR_OVERFLOWCHECKS,
  39. _DIR_PACKENUM,_DIR_PACKRECORDS,
  40. _DIR_R,_DIR_RANGECHECKS,_DIR_REFERENCEINFO,
  41. _DIR_SATURATION,_DIR_SMARTLINK,_DIR_STACKFRAMES,_DIR_STATIC,_DIR_STOP,
  42. _DIR_TYPEDADDRESS,_DIR_TYPEINFO,
  43. _DIR_UNDEF,_DIR_UNITPATH,
  44. _DIR_VARSTRINGCHECKS,_DIR_VERSION,
  45. _DIR_WAIT,_DIR_WARNING,_DIR_WARNINGS,
  46. _DIR_Z1,_DIR_Z2,_DIR_Z4
  47. );
  48. const
  49. firstdirective=_DIR_NONE;
  50. lastdirective=_DIR_Z4;
  51. directive:array[tdirectivetoken] of directivestr=(
  52. {12345678901234567890 (To determine longest string.)}
  53. '',
  54. 'ALIGN',
  55. 'APPTYPE',
  56. 'ASMMODE',
  57. 'ASSERTIONS',
  58. 'BOOLEVAL',
  59. 'D',
  60. 'DEBUGINFO',
  61. 'DEFINE',
  62. 'DESCRIPTION',
  63. 'ELSE',
  64. 'ENDIF',
  65. 'ERROR',
  66. 'EXTENDEDSYNTAX',
  67. 'FATAL',
  68. 'GOTO',
  69. 'HINT',
  70. 'HINTS',
  71. 'I',
  72. {12345678901234567890 (To determine longest string.)}
  73. 'I386_ATT',
  74. 'I386_DIRECT',
  75. 'I386_INTEL',
  76. 'IOCHECKS',
  77. 'IF',
  78. 'IFDEF',
  79. 'IFNDEF',
  80. 'IFOPT',
  81. 'INCLUDE',
  82. 'INCLUDEPATH',
  83. 'INFO',
  84. 'INLINE',
  85. 'L',
  86. 'LIBRARYPATH',
  87. 'LINK',
  88. 'LINKLIB',
  89. 'LOCALSYMBOLS',
  90. 'LONGSTRINGS',
  91. 'M',
  92. {12345678901234567890 (To determine longest string.)}
  93. 'MACRO',
  94. 'MAXFPUREGISTERS',
  95. 'MEMORY',
  96. 'MESSAGE',
  97. 'MINENUMSIZE',
  98. 'MMX',
  99. 'MODE',
  100. 'NOTE',
  101. 'NOTES',
  102. 'OBJECTPATH',
  103. 'OPENSTRINGS',
  104. 'OUTPUT_FORMAT',
  105. 'OVERFLOWCHECKS',
  106. 'PACKENUM',
  107. 'PACKRECORDS',
  108. 'R',
  109. 'RANGECHECKS',
  110. 'REFERENCEINFO',
  111. 'SATURATION',
  112. 'SMARTLINK',
  113. {12345678901234567890 (To determine longest string.)}
  114. 'STACKFRAMES',
  115. 'STATIC',
  116. 'STOP',
  117. 'TYPEDADDRESS',
  118. 'TYPEINFO',
  119. 'UNDEF',
  120. 'UNITPATH',
  121. 'VARSTRINGCHECKS',
  122. 'VERSION',
  123. 'WAIT',
  124. 'WARNING',
  125. 'WARNINGS',
  126. 'Z1',
  127. 'Z2',
  128. 'Z4'
  129. );
  130. function Get_Directive(const hs:string):tdirectivetoken;
  131. var
  132. i : tdirectivetoken;
  133. begin
  134. for i:=firstdirective to lastdirective do
  135. if directive[i]=hs then
  136. begin
  137. Get_Directive:=i;
  138. exit;
  139. end;
  140. Get_Directive:=_DIR_NONE;
  141. end;
  142. {-------------------------------------------
  143. IF Conditional Handling
  144. -------------------------------------------}
  145. var
  146. preprocpat : string;
  147. preproc_token : ttoken;
  148. procedure preproc_consume(t : ttoken);
  149. begin
  150. if t<>preproc_token then
  151. Message(scan_e_preproc_syntax_error);
  152. preproc_token:=current_scanner^.readpreproc;
  153. end;
  154. function read_expr : string;forward;
  155. function read_factor : string;
  156. var
  157. hs : string;
  158. mac : pmacrosym;
  159. len : byte;
  160. begin
  161. if preproc_token=_ID then
  162. begin
  163. if preprocpat='NOT' then
  164. begin
  165. preproc_consume(_ID);
  166. hs:=read_expr;
  167. if hs='0' then
  168. read_factor:='1'
  169. else
  170. read_factor:='0';
  171. end
  172. else
  173. begin
  174. mac:=pmacrosym(macros^.search(hs));
  175. hs:=preprocpat;
  176. preproc_consume(_ID);
  177. if assigned(mac) then
  178. begin
  179. if mac^.defined and assigned(mac^.buftext) then
  180. begin
  181. if mac^.buflen>255 then
  182. begin
  183. len:=255;
  184. Message(scan_w_marco_cut_after_255_chars);
  185. end
  186. else
  187. len:=mac^.buflen;
  188. {$ifndef TP}
  189. {$ifopt H+}
  190. setlength(hs,len);
  191. {$else}
  192. hs[0]:=char(len);
  193. {$endif}
  194. {$else}
  195. hs[0]:=char(len);
  196. {$endif}
  197. move(mac^.buftext^,hs[1],len);
  198. end
  199. else
  200. read_factor:='';
  201. end
  202. else
  203. read_factor:=hs;
  204. end
  205. end
  206. else if preproc_token=_LKLAMMER then
  207. begin
  208. preproc_consume(_LKLAMMER);
  209. read_factor:=read_expr;
  210. preproc_consume(_RKLAMMER);
  211. end
  212. else
  213. Message(scan_e_error_in_preproc_expr);
  214. end;
  215. function read_term : string;
  216. var
  217. hs1,hs2 : string;
  218. begin
  219. hs1:=read_factor;
  220. while true do
  221. begin
  222. if (preproc_token=_ID) then
  223. begin
  224. if preprocpat='AND' then
  225. begin
  226. preproc_consume(_ID);
  227. hs2:=read_factor;
  228. if (hs1<>'0') and (hs2<>'0') then
  229. hs1:='1';
  230. end
  231. else
  232. break;
  233. end
  234. else
  235. break;
  236. end;
  237. read_term:=hs1;
  238. end;
  239. function read_simple_expr : string;
  240. var
  241. hs1,hs2 : string;
  242. begin
  243. hs1:=read_term;
  244. while true do
  245. begin
  246. if (preproc_token=_ID) then
  247. begin
  248. if preprocpat='OR' then
  249. begin
  250. preproc_consume(_ID);
  251. hs2:=read_term;
  252. if (hs1<>'0') or (hs2<>'0') then
  253. hs1:='1';
  254. end
  255. else
  256. break;
  257. end
  258. else
  259. break;
  260. end;
  261. read_simple_expr:=hs1;
  262. end;
  263. function read_expr : string;
  264. var
  265. hs1,hs2 : string;
  266. b : boolean;
  267. t : ttoken;
  268. w : integer;
  269. l1,l2 : longint;
  270. begin
  271. hs1:=read_simple_expr;
  272. t:=preproc_token;
  273. if not(t in [_EQUAL,_UNEQUAL,_LT,_GT,_LTE,_GTE]) then
  274. begin
  275. read_expr:=hs1;
  276. exit;
  277. end;
  278. preproc_consume(t);
  279. hs2:=read_simple_expr;
  280. if is_number(hs1) and is_number(hs2) then
  281. begin
  282. valint(hs1,l1,w);
  283. valint(hs2,l2,w);
  284. case t of
  285. _EQUAL : b:=l1=l2;
  286. _UNEQUAL : b:=l1<>l2;
  287. _LT : b:=l1<l2;
  288. _GT : b:=l1>l2;
  289. _GTE : b:=l1>=l2;
  290. _LTE : b:=l1<=l2;
  291. end;
  292. end
  293. else
  294. begin
  295. case t of
  296. _EQUAL : b:=hs1=hs2;
  297. _UNEQUAL : b:=hs1<>hs2;
  298. _LT : b:=hs1<hs2;
  299. _GT : b:=hs1>hs2;
  300. _GTE : b:=hs1>=hs2;
  301. _LTE : b:=hs1<=hs2;
  302. end;
  303. end;
  304. if b then
  305. read_expr:='1'
  306. else
  307. read_expr:='0';
  308. end;
  309. {-------------------------------------------
  310. Directives
  311. -------------------------------------------}
  312. function is_conditional(t:tdirectivetoken):boolean;
  313. begin
  314. is_conditional:=(t in [_DIR_ENDIF,_DIR_IFDEF,_DIR_IFNDEF,_DIR_IFOPT,_DIR_IF,_DIR_ELSE]);
  315. end;
  316. procedure dir_conditional(t:tdirectivetoken);
  317. var
  318. hs : string;
  319. mac : pmacrosym;
  320. found : boolean;
  321. state : char;
  322. oldaktfilepos : tfileposinfo;
  323. begin
  324. oldaktfilepos:=aktfilepos;
  325. while true do
  326. begin
  327. current_scanner^.gettokenpos;
  328. case t of
  329. _DIR_ENDIF : begin
  330. current_scanner^.poppreprocstack;
  331. end;
  332. _DIR_ELSE : begin
  333. current_scanner^.elsepreprocstack;
  334. end;
  335. _DIR_IFDEF : begin
  336. current_scanner^.skipspace;
  337. hs:=current_scanner^.readid;
  338. mac:=pmacrosym(macros^.search(hs));
  339. if assigned(mac) then
  340. mac^.is_used:=true;
  341. current_scanner^.addpreprocstack(pp_ifdef,assigned(mac) and mac^.defined,hs,scan_c_ifdef_found);
  342. end;
  343. _DIR_IFOPT : begin
  344. current_scanner^.skipspace;
  345. hs:=current_scanner^.readid;
  346. if (length(hs)>1) then
  347. Message(scan_w_illegal_switch)
  348. else
  349. begin
  350. state:=current_scanner^.ReadState;
  351. if state in ['-','+'] then
  352. found:=CheckSwitch(hs[1],state);
  353. end;
  354. current_scanner^.addpreprocstack(pp_ifopt,found,hs,scan_c_ifopt_found);
  355. end;
  356. _DIR_IF : begin
  357. current_scanner^.skipspace;
  358. { start preproc expression scanner }
  359. preproc_token:=current_scanner^.readpreproc;
  360. hs:=read_expr;
  361. current_scanner^.addpreprocstack(pp_if,hs<>'0',hs,scan_c_if_found);
  362. end;
  363. _DIR_IFNDEF : begin
  364. current_scanner^.skipspace;
  365. hs:=current_scanner^.readid;
  366. mac:=pmacrosym(macros^.search(hs));
  367. if assigned(mac) then
  368. mac^.is_used:=true;
  369. current_scanner^.addpreprocstack(pp_ifndef,not(assigned(mac) and mac^.defined),hs,scan_c_ifndef_found);
  370. end;
  371. end;
  372. { accept the text ? }
  373. if (current_scanner^.preprocstack=nil) or current_scanner^.preprocstack^.accept then
  374. break
  375. else
  376. begin
  377. current_scanner^.gettokenpos;
  378. Message(scan_c_skipping_until);
  379. repeat
  380. current_scanner^.skipuntildirective;
  381. t:=Get_Directive(current_scanner^.readid);
  382. until is_conditional(t);
  383. current_scanner^.gettokenpos;
  384. Message1(scan_d_handling_switch,'$'+directive[t]);
  385. end;
  386. end;
  387. aktfilepos:=oldaktfilepos;
  388. end;
  389. procedure dir_define(t:tdirectivetoken);
  390. var
  391. hs : string;
  392. bracketcount : longint;
  393. mac : pmacrosym;
  394. macropos : longint;
  395. macrobuffer : pmacrobuffer;
  396. begin
  397. current_scanner^.skipspace;
  398. hs:=current_scanner^.readid;
  399. mac:=pmacrosym(macros^.search(hs));
  400. if not assigned(mac) then
  401. begin
  402. mac:=new(pmacrosym,init(hs));
  403. mac^.defined:=true;
  404. Message1(parser_m_macro_defined,mac^.name);
  405. macros^.insert(mac);
  406. end
  407. else
  408. begin
  409. Message1(parser_m_macro_defined,mac^.name);
  410. mac^.defined:=true;
  411. { delete old definition }
  412. if assigned(mac^.buftext) then
  413. begin
  414. freemem(mac^.buftext,mac^.buflen);
  415. mac^.buftext:=nil;
  416. end;
  417. end;
  418. mac^.is_used:=true;
  419. if (cs_support_macro in aktmoduleswitches) then
  420. begin
  421. { key words are never substituted }
  422. if is_keyword(hs) then
  423. Message(scan_e_keyword_cant_be_a_macro);
  424. { !!!!!! handle macro params, need we this? }
  425. current_scanner^.skipspace;
  426. { may be a macro? }
  427. if c=':' then
  428. begin
  429. current_scanner^.readchar;
  430. if c='=' then
  431. begin
  432. new(macrobuffer);
  433. macropos:=0;
  434. { parse macro, brackets are counted so it's possible
  435. to have a $ifdef etc. in the macro }
  436. bracketcount:=0;
  437. repeat
  438. current_scanner^.readchar;
  439. case c of
  440. '}' :
  441. if (bracketcount=0) then
  442. break
  443. else
  444. dec(bracketcount);
  445. '{' :
  446. inc(bracketcount);
  447. #26 :
  448. current_scanner^.end_of_file;
  449. end;
  450. macrobuffer^[macropos]:=c;
  451. inc(macropos);
  452. if macropos>maxmacrolen then
  453. Message(scan_f_macro_buffer_overflow);
  454. until false;
  455. { free buffer of macro ?}
  456. if assigned(mac^.buftext) then
  457. freemem(mac^.buftext,mac^.buflen);
  458. { get new mem }
  459. getmem(mac^.buftext,macropos);
  460. mac^.buflen:=macropos;
  461. { copy the text }
  462. move(macrobuffer^,mac^.buftext^,macropos);
  463. dispose(macrobuffer);
  464. end;
  465. end;
  466. end;
  467. end;
  468. procedure dir_undef(t:tdirectivetoken);
  469. var
  470. hs : string;
  471. mac : pmacrosym;
  472. begin
  473. current_scanner^.skipspace;
  474. hs:=current_scanner^.readid;
  475. mac:=pmacrosym(macros^.search(hs));
  476. if not assigned(mac) then
  477. begin
  478. mac:=new(pmacrosym,init(hs));
  479. Message1(parser_m_macro_undefined,mac^.name);
  480. mac^.defined:=false;
  481. macros^.insert(mac);
  482. end
  483. else
  484. begin
  485. Message1(parser_m_macro_undefined,mac^.name);
  486. mac^.defined:=false;
  487. { delete old definition }
  488. if assigned(mac^.buftext) then
  489. begin
  490. freemem(mac^.buftext,mac^.buflen);
  491. mac^.buftext:=nil;
  492. end;
  493. end;
  494. mac^.is_used:=true;
  495. end;
  496. procedure dir_message(t:tdirectivetoken);
  497. var
  498. w : tmsgconst;
  499. begin
  500. case t of
  501. _DIR_STOP,
  502. _DIR_FATAL : w:=scan_f_user_defined;
  503. _DIR_ERROR : w:=scan_e_user_defined;
  504. _DIR_WARNING : w:=scan_w_user_defined;
  505. _DIR_HINT : w:=scan_h_user_defined;
  506. _DIR_NOTE : w:=scan_n_user_defined;
  507. _DIR_MESSAGE,
  508. _DIR_INFO : w:=scan_i_user_defined;
  509. end;
  510. current_scanner^.skipspace;
  511. Message1(w,current_scanner^.readcomment);
  512. end;
  513. procedure dir_moduleswitch(t:tdirectivetoken);
  514. var
  515. sw : tmoduleswitch;
  516. state : char;
  517. begin
  518. sw:=cs_modulenone;
  519. case t of
  520. _DIR_GOTO : sw:=cs_support_goto;
  521. _DIR_MACRO : sw:=cs_support_macro;
  522. _DIR_INLINE : sw:=cs_support_inline;
  523. _DIR_SMARTLINK : sw:=cs_create_smart;
  524. _DIR_STATIC : sw:=cs_static_keyword;
  525. end;
  526. state:=current_scanner^.readstate;
  527. if (sw<>cs_modulenone) and (state in ['-','+']) then
  528. begin
  529. if state='-' then
  530. aktmoduleswitches:=aktmoduleswitches-[sw]
  531. else
  532. aktmoduleswitches:=aktmoduleswitches+[sw];
  533. end;
  534. end;
  535. procedure dir_localswitch(t:tdirectivetoken);
  536. var
  537. sw : tlocalswitch;
  538. state : char;
  539. begin
  540. sw:=cs_localnone;
  541. {$ifdef SUPPORT_MMX}
  542. case t of
  543. _DIR_MMX : sw:=cs_mmx;
  544. _DIR_SATURATION : sw:=cs_mmx_saturation;
  545. end;
  546. {$endif}
  547. state:=current_scanner^.readstate;
  548. if (sw<>cs_localnone) and (state in ['-','+']) then
  549. begin
  550. if state='-' then
  551. aktlocalswitches:=aktlocalswitches-[sw]
  552. else
  553. aktlocalswitches:=aktlocalswitches+[sw];
  554. end;
  555. end;
  556. procedure dir_include(t:tdirectivetoken);
  557. var
  558. hs : string;
  559. path : dirstr;
  560. name : namestr;
  561. ext : extstr;
  562. hp : pinputfile;
  563. i : longint;
  564. found : boolean;
  565. begin
  566. current_scanner^.skipspace;
  567. hs:=current_scanner^.readcomment;
  568. i:=length(hs);
  569. while (i>0) and (hs[i]=' ') do
  570. dec(i);
  571. Delete(hs,i+1,length(hs)-i);
  572. if hs='' then
  573. exit;
  574. if (hs[1]='%') then
  575. begin
  576. { case insensitive }
  577. hs:=upper(hs);
  578. { remove %'s }
  579. Delete(hs,1,1);
  580. if hs[length(hs)]='%' then
  581. Delete(hs,length(hs),1);
  582. { save old }
  583. path:=hs;
  584. { first check for internal macros }
  585. if hs='TIME' then
  586. hs:=gettimestr
  587. else
  588. if hs='DATE' then
  589. hs:=getdatestr
  590. else
  591. if hs='FILE' then
  592. hs:=current_module^.sourcefiles^.get_file_name(aktfilepos.fileindex)
  593. else
  594. if hs='LINE' then
  595. hs:=tostr(aktfilepos.line)
  596. else
  597. if hs='FPCVERSION' then
  598. hs:=version_string
  599. else
  600. if hs='FPCTARGET' then
  601. hs:=target_cpu_string
  602. else
  603. hs:=getenv(hs);
  604. if hs='' then
  605. Message1(scan_w_include_env_not_found,path);
  606. { make it a stringconst }
  607. hs:=''''+hs+'''';
  608. current_scanner^.insertmacro(path,@hs[1],length(hs));
  609. end
  610. else
  611. begin
  612. hs:=FixFileName(hs);
  613. fsplit(hs,path,name,ext);
  614. { look for the include file
  615. 1. specified path,path of current inputfile,current dir
  616. 2. local includepath
  617. 3. global includepath }
  618. found:=false;
  619. path:=FindFile(name+ext,path+';'+current_scanner^.inputfile^.path^+';.',found);
  620. if (not found) then
  621. path:=current_module^.localincludesearchpath.FindFile(name+ext,found);
  622. if (not found) then
  623. path:=includesearchpath.FindFile(name+ext,found);
  624. { shutdown current file }
  625. current_scanner^.tempcloseinputfile;
  626. { load new file }
  627. hp:=new(pinputfile,init(path+name+ext));
  628. current_scanner^.addfile(hp);
  629. if not current_scanner^.openinputfile then
  630. Message1(scan_f_cannot_open_includefile,hs);
  631. Message1(scan_t_start_include_file,current_scanner^.inputfile^.path^+current_scanner^.inputfile^.name^);
  632. current_scanner^.reload;
  633. { process first read char }
  634. case c of
  635. #26 : current_scanner^.reload;
  636. #10,
  637. #13 : current_scanner^.linebreak;
  638. end;
  639. { register for refs }
  640. current_module^.sourcefiles^.register_file(hp);
  641. end;
  642. end;
  643. procedure dir_description(t:tdirectivetoken);
  644. begin
  645. if not (target_info.target in [target_i386_os2,target_i386_win32]) then
  646. Message(scan_w_decription_not_support);
  647. { change description global var in all cases }
  648. { it not used but in win32 and os2 }
  649. current_scanner^.skipspace;
  650. description:=current_scanner^.readcomment;
  651. end;
  652. procedure dir_version(t:tdirectivetoken);
  653. var
  654. major, minor : longint;
  655. error : integer;
  656. begin
  657. if not (target_info.target in [target_i386_os2,target_i386_win32]) then
  658. begin
  659. Message(scan_n_version_not_support);
  660. exit;
  661. end;
  662. if (compile_level<>1) then
  663. Message(scan_n_only_exe_version)
  664. else
  665. begin
  666. { change description global var in all cases }
  667. { it not used but in win32 and os2 }
  668. current_scanner^.skipspace;
  669. { we should only accept Major.Minor format }
  670. current_scanner^.readnumber;
  671. major:=0;
  672. minor:=0;
  673. valint(pattern,major,error);
  674. if error<>0 then
  675. begin
  676. Message1(scan_w_wrong_version_ignored,pattern);
  677. exit;
  678. end;
  679. if c='.' then
  680. begin
  681. current_scanner^.readchar;
  682. current_scanner^.readnumber;
  683. valint(pattern,minor,error);
  684. if error<>0 then
  685. begin
  686. Message(scan_w_wrong_version_ignored);
  687. exit;
  688. end;
  689. dllmajor:=major;
  690. dllminor:=minor;
  691. dllversion:=tostr(major)+'.'+tostr(minor);
  692. end
  693. else
  694. dllversion:=tostr(major);
  695. end;
  696. end;
  697. procedure dir_linkobject(t:tdirectivetoken);
  698. var
  699. s : string;
  700. begin
  701. current_scanner^.skipspace;
  702. s:=AddExtension(FixFileName(current_scanner^.readcomment),target_info.objext);
  703. current_module^.linkotherofiles.insert(s,link_allways);
  704. end;
  705. procedure dir_resource(t:tdirectivetoken);
  706. var
  707. s : string;
  708. begin
  709. current_scanner^.skipspace;
  710. s:=AddExtension(FixFileName(current_scanner^.readcomment),target_info.resext);
  711. if target_info.res<>res_none then
  712. current_module^.resourcefiles.insert(FixFileName(s))
  713. else
  714. Message(scan_e_resourcefiles_not_supported);
  715. end;
  716. procedure dir_linklib(t:tdirectivetoken);
  717. begin
  718. current_scanner^.skipspace;
  719. current_scanner^.readstring;
  720. current_module^.linkOtherSharedLibs.insert(orgpattern,link_allways);
  721. end;
  722. procedure dir_outputformat(t:tdirectivetoken);
  723. begin
  724. if not current_module^.in_global then
  725. Message(scan_w_switch_is_global)
  726. else
  727. begin
  728. current_scanner^.skipspace;
  729. if set_string_asm(current_scanner^.readid) then
  730. aktoutputformat:=target_asm.id
  731. else
  732. Message(scan_w_illegal_switch);
  733. end;
  734. end;
  735. procedure dir_unitpath(t:tdirectivetoken);
  736. begin
  737. if not current_module^.in_global then
  738. Message(scan_w_switch_is_global)
  739. else
  740. begin
  741. current_scanner^.skipspace;
  742. current_module^.localunitsearchpath.AddPath(current_scanner^.readcomment,false);
  743. end;
  744. end;
  745. procedure dir_includepath(t:tdirectivetoken);
  746. begin
  747. if not current_module^.in_global then
  748. Message(scan_w_switch_is_global)
  749. else
  750. begin
  751. current_scanner^.skipspace;
  752. current_module^.localincludesearchpath.AddPath(current_scanner^.readcomment,false);
  753. end;
  754. end;
  755. procedure dir_librarypath(t:tdirectivetoken);
  756. begin
  757. if not current_module^.in_global then
  758. Message(scan_w_switch_is_global)
  759. else
  760. begin
  761. current_scanner^.skipspace;
  762. current_module^.locallibrarysearchpath.AddPath(current_scanner^.readcomment,false);
  763. end;
  764. end;
  765. procedure dir_objectpath(t:tdirectivetoken);
  766. begin
  767. if not current_module^.in_global then
  768. Message(scan_w_switch_is_global)
  769. else
  770. begin
  771. current_scanner^.skipspace;
  772. current_module^.localobjectsearchpath.AddPath(current_scanner^.readcomment,false);
  773. end;
  774. end;
  775. procedure dir_mode(t:tdirectivetoken);
  776. begin
  777. if not current_module^.in_global then
  778. Message(scan_w_switch_is_global)
  779. else
  780. begin
  781. current_scanner^.skipspace;
  782. current_scanner^.readstring;
  783. if pattern='DEFAULT' then
  784. aktmodeswitches:=initmodeswitches
  785. else
  786. if pattern='DELPHI' then
  787. aktmodeswitches:=delphimodeswitches
  788. else
  789. if pattern='TP' then
  790. aktmodeswitches:=tpmodeswitches
  791. else
  792. if pattern='FPC' then
  793. aktmodeswitches:=fpcmodeswitches
  794. else
  795. if pattern='OBJFPC' then
  796. aktmodeswitches:=objfpcmodeswitches
  797. else
  798. if pattern='GPC' then
  799. aktmodeswitches:=gpcmodeswitches
  800. else
  801. Message(scan_w_illegal_switch);
  802. end;
  803. end;
  804. procedure dir_packrecords(t:tdirectivetoken);
  805. var
  806. hs : string;
  807. begin
  808. current_scanner^.skipspace;
  809. if not(c in ['0'..'9']) then
  810. begin
  811. hs:=current_scanner^.readid;
  812. if (hs='C') then
  813. aktpackrecords:=packrecord_C
  814. else
  815. if (hs='NORMAL') or (hs='DEFAULT') then
  816. aktpackrecords:=packrecord_2
  817. else
  818. Message(scan_w_only_pack_records);
  819. end
  820. else
  821. begin
  822. case current_scanner^.readval of
  823. 1 : aktpackrecords:=packrecord_1;
  824. 2 : aktpackrecords:=packrecord_2;
  825. 4 : aktpackrecords:=packrecord_4;
  826. 8 : aktpackrecords:=packrecord_8;
  827. 16 : aktpackrecords:=packrecord_16;
  828. 32 : aktpackrecords:=packrecord_32;
  829. else
  830. Message(scan_w_only_pack_records);
  831. end;
  832. end;
  833. end;
  834. procedure dir_maxfpuregisters(t:tdirectivetoken);
  835. var
  836. l : longint;
  837. hs : string;
  838. begin
  839. current_scanner^.skipspace;
  840. if not(c in ['0'..'9']) then
  841. begin
  842. hs:=current_scanner^.readid;
  843. if (hs='NORMAL') or (hs='DEFAULT') then
  844. aktmaxfpuregisters:=-1
  845. else
  846. Message(scan_e_invalid_maxfpureg_value);
  847. end
  848. else
  849. begin
  850. l:=current_scanner^.readval;
  851. case l of
  852. 0..8:
  853. aktmaxfpuregisters:=l;
  854. else
  855. Message(scan_e_invalid_maxfpureg_value);
  856. end;
  857. end;
  858. end;
  859. procedure dir_packenum(t:tdirectivetoken);
  860. var
  861. hs : string;
  862. begin
  863. if t in [_DIR_Z1,_DIR_Z2,_DIR_Z4] then
  864. begin
  865. aktpackenum:=ord(pattern[2])-ord('0');
  866. exit;
  867. end;
  868. current_scanner^.skipspace;
  869. if not(c in ['0'..'9']) then
  870. begin
  871. hs:=current_scanner^.readid;
  872. if (hs='NORMAL') or (hs='DEFAULT') then
  873. aktpackenum:=4
  874. else
  875. Message(scan_w_only_pack_enum);
  876. end
  877. else
  878. begin
  879. case current_scanner^.readval of
  880. 1 : aktpackenum:=1;
  881. 2 : aktpackenum:=2;
  882. 4 : aktpackenum:=4;
  883. else
  884. Message(scan_w_only_pack_enum);
  885. end;
  886. end;
  887. end;
  888. procedure dir_apptype(t:tdirectivetoken);
  889. var
  890. hs : string;
  891. begin
  892. if target_info.target<>target_i386_win32 then
  893. Message(scan_w_app_type_not_support);
  894. if not current_module^.in_global then
  895. Message(scan_w_switch_is_global)
  896. else
  897. begin
  898. current_scanner^.skipspace;
  899. hs:=current_scanner^.readid;
  900. if hs='GUI' then
  901. apptype:=at_gui
  902. else if hs='CONSOLE' then
  903. apptype:=at_cui
  904. else
  905. Message1(scan_w_unsupported_app_type,hs);
  906. end;
  907. end;
  908. procedure dir_wait(t:tdirectivetoken);
  909. var had_info : boolean;
  910. begin
  911. had_info:=(status.verbosity and V_Info)<>0;
  912. { this message should allways appear !! }
  913. status.verbosity:=status.verbosity or V_Info;
  914. Message(scan_i_press_enter);
  915. readln;
  916. If not(had_info) then
  917. status.verbosity:=status.verbosity and (not V_Info);
  918. end;
  919. procedure dir_asmmode(t:tdirectivetoken);
  920. var
  921. s : string;
  922. begin
  923. current_scanner^.skipspace;
  924. s:=current_scanner^.readid;
  925. If Inside_asm_statement then
  926. Message1(scan_w_no_asm_reader_switch_inside_asm,s);
  927. if s='DEFAULT' then
  928. aktasmmode:=initasmmode
  929. else
  930. if not set_string_asmmode(s,aktasmmode) then
  931. Message1(scan_w_unsupported_asmmode_specifier,s);
  932. end;
  933. procedure dir_oldasmmode(t:tdirectivetoken);
  934. begin
  935. If Inside_asm_statement then
  936. Message1(scan_w_no_asm_reader_switch_inside_asm,directive[t]);
  937. {$ifdef i386}
  938. case t of
  939. _DIR_I386_ATT : aktasmmode:=asmmode_i386_att;
  940. _DIR_I386_DIRECT : aktasmmode:=asmmode_i386_direct;
  941. _DIR_I386_INTEL : aktasmmode:=asmmode_i386_intel;
  942. end;
  943. {$endif i386}
  944. end;
  945. procedure dir_delphiswitch(t:tdirectivetoken);
  946. var
  947. sw,state : char;
  948. begin
  949. case t of
  950. _DIR_ALIGN : sw:='A';
  951. _DIR_ASSERTIONS : sw:='C';
  952. _DIR_BOOLEVAL : sw:='B';
  953. _DIR_DEBUGINFO : sw:='D';
  954. _DIR_IOCHECKS : sw:='I';
  955. _DIR_LOCALSYMBOLS : sw:='L';
  956. _DIR_LONGSTRINGS : sw:='H';
  957. _DIR_OPENSTRINGS : sw:='P';
  958. _DIR_OVERFLOWCHECKS : sw:='Q';
  959. _DIR_RANGECHECKS : sw:='R';
  960. _DIR_REFERENCEINFO : sw:='Y';
  961. _DIR_STACKFRAMES : sw:='W';
  962. _DIR_TYPEDADDRESS : sw:='T';
  963. _DIR_TYPEINFO : sw:='M';
  964. _DIR_VARSTRINGCHECKS : sw:='V';
  965. else
  966. exit;
  967. end;
  968. { c contains the next char, a + or - would be fine }
  969. state:=current_scanner^.readstate;
  970. if state in ['-','+'] then
  971. HandleSwitch(sw,state);
  972. end;
  973. procedure dir_memory(t:tdirectivetoken);
  974. var
  975. l : longint;
  976. begin
  977. current_scanner^.skipspace;
  978. l:=current_scanner^.readval;
  979. if l>1024 then
  980. stacksize:=l;
  981. current_scanner^.skipspace;
  982. if c=',' then
  983. begin
  984. current_scanner^.readchar;
  985. current_scanner^.skipspace;
  986. l:=current_scanner^.readval;
  987. if l>1024 then
  988. heapsize:=l;
  989. end;
  990. if c=',' then
  991. begin
  992. current_scanner^.readchar;
  993. current_scanner^.skipspace;
  994. l:=current_scanner^.readval;
  995. { Ignore this value, because the limit is set by the OS
  996. info and shouldn't be changed by the user (PFV) }
  997. end;
  998. end;
  999. procedure dir_setverbose(t:tdirectivetoken);
  1000. var
  1001. flag,
  1002. state : char;
  1003. begin
  1004. case t of
  1005. _DIR_HINTS : flag:='H';
  1006. _DIR_WARNINGS : flag:='W';
  1007. _DIR_NOTES : flag:='N';
  1008. else
  1009. exit;
  1010. end;
  1011. { support ON/OFF }
  1012. state:=current_scanner^.ReadState;
  1013. SetVerbosity(flag+state);
  1014. end;
  1015. type
  1016. tdirectiveproc=procedure(t:tdirectivetoken);
  1017. const
  1018. directiveproc:array[tdirectivetoken] of tdirectiveproc=(
  1019. {_DIR_NONE} nil,
  1020. {_DIR_ALIGN} dir_delphiswitch,
  1021. {_DIR_APPTYPE} dir_apptype,
  1022. {_DIR_ASMMODE} dir_asmmode,
  1023. {_DIR_ASSERTION} dir_delphiswitch,
  1024. {_DIR_BOOLEVAL} dir_delphiswitch,
  1025. {_DIR_D} dir_description,
  1026. {_DIR_DEBUGINFO} dir_delphiswitch,
  1027. {_DIR_DEFINE} dir_define,
  1028. {_DIR_DESCRIPTION} dir_description,
  1029. {_DIR_ELSE} dir_conditional,
  1030. {_DIR_ENDIF} dir_conditional,
  1031. {_DIR_ERROR} dir_message,
  1032. {_DIR_EXTENDEDSYNTAX} dir_delphiswitch,
  1033. {_DIR_FATAL} dir_message,
  1034. {_DIR_GOTO} dir_moduleswitch,
  1035. {_DIR_HINT} dir_message,
  1036. {_DIR_HINTS} dir_setverbose,
  1037. {_DIR_I} dir_include,
  1038. {_DIR_I386_ATT} dir_oldasmmode,
  1039. {_DIR_I386_DIRECT} dir_oldasmmode,
  1040. {_DIR_I386_INTEL} dir_oldasmmode,
  1041. {_DIR_IOCHECKS} dir_delphiswitch,
  1042. {_DIR_IF} dir_conditional,
  1043. {_DIR_IFDEF} dir_conditional,
  1044. {_DIR_IFNDEF} dir_conditional,
  1045. {_DIR_IFOPT} dir_conditional,
  1046. {_DIR_INCLUDE} dir_include,
  1047. {_DIR_INCLUDEPATH} dir_includepath,
  1048. {_DIR_INFO} dir_message,
  1049. {_DIR_INLINE} dir_moduleswitch,
  1050. {_DIR_L} dir_linkobject,
  1051. {_DIR_LIBRARYPATH} dir_librarypath,
  1052. {_DIR_LINK} dir_linkobject,
  1053. {_DIR_LINKLIB} dir_linklib,
  1054. {_DIR_LOCALSYMBOLS} dir_delphiswitch,
  1055. {_DIR_LONGSTRINGS} dir_delphiswitch,
  1056. {_DIR_M} dir_memory,
  1057. {_DIR_MACRO} dir_moduleswitch,
  1058. {_DIR_MAXFPUREGISTERS} dir_maxfpuregisters,
  1059. {_DIR_MEMORY} dir_memory,
  1060. {_DIR_MESSAGE} dir_message,
  1061. {_DIR_MINENUMSIZE} dir_packenum,
  1062. {_DIR_MMX} dir_localswitch,
  1063. {_DIR_MODE} dir_mode,
  1064. {_DIR_NOTE} dir_message,
  1065. {_DIR_NOTES} dir_setverbose,
  1066. {_DIR_OBJECTPATH} dir_objectpath,
  1067. {_DIR_OPENSTRINGS} dir_delphiswitch,
  1068. {_DIR_OUTPUT_FORMAT} dir_outputformat,
  1069. {_DIR_OVERFLOWCHECKS} dir_delphiswitch,
  1070. {_DIR_PACKENUM} dir_packenum,
  1071. {_DIR_PACKRECORDS} dir_packrecords,
  1072. {_DIR_R} dir_resource,
  1073. {_DIR_RANGECHECKS} dir_delphiswitch,
  1074. {_DIR_REFERENCEINFO} dir_delphiswitch,
  1075. {_DIR_SATURATION} dir_localswitch,
  1076. {_DIR_SMARTLINK} dir_moduleswitch,
  1077. {_DIR_STACKFRAMES} dir_delphiswitch,
  1078. {_DIR_STATIC} dir_moduleswitch,
  1079. {_DIR_STOP} dir_message,
  1080. {_DIR_TYPEDADDRESS} dir_delphiswitch,
  1081. {_DIR_TYPEINFO} dir_delphiswitch,
  1082. {_DIR_UNDEF} dir_undef,
  1083. {_DIR_UNITPATH} dir_unitpath,
  1084. {_DIR_VARSTRINGCHECKS} dir_delphiswitch,
  1085. {_DIR_VERSION} dir_version,
  1086. {_DIR_WAIT} dir_wait,
  1087. {_DIR_WARNING} dir_message,
  1088. {_DIR_WARNINGS} dir_setverbose,
  1089. {_DIR_Z1} dir_packenum,
  1090. {_DIR_Z2} dir_packenum,
  1091. {_DIR_Z4} dir_packenum
  1092. );
  1093. {-------------------------------------------
  1094. Main switches handling
  1095. -------------------------------------------}
  1096. procedure handledirectives;
  1097. var
  1098. t : tdirectivetoken;
  1099. p : tdirectiveproc;
  1100. hs : string;
  1101. begin
  1102. current_scanner^.gettokenpos;
  1103. current_scanner^.readchar; {Remove the $}
  1104. hs:=current_scanner^.readid;
  1105. if parapreprocess then
  1106. begin
  1107. t:=Get_Directive(hs);
  1108. if not(is_conditional(t) or (t=_DIR_DEFINE) or (t=_DIR_UNDEF)) then
  1109. begin
  1110. preprocfile^.AddSpace;
  1111. preprocfile^.Add('{$'+hs+current_scanner^.readcomment+'}');
  1112. exit;
  1113. end;
  1114. end;
  1115. Message1(scan_d_handling_switch,'$'+hs);
  1116. if hs='' then
  1117. Message1(scan_w_illegal_switch,'$'+hs);
  1118. { Check for compiler switches }
  1119. while (length(hs)=1) and (c in ['-','+']) do
  1120. begin
  1121. HandleSwitch(hs[1],c);
  1122. current_scanner^.readchar; {Remove + or -}
  1123. if c=',' then
  1124. begin
  1125. current_scanner^.readchar; {Remove , }
  1126. { read next switch, support $v+,$+}
  1127. hs:=current_scanner^.readid;
  1128. if (hs='') then
  1129. begin
  1130. if (c='$') and (m_fpc in aktmodeswitches) then
  1131. begin
  1132. current_scanner^.readchar; { skip $ }
  1133. hs:=current_scanner^.readid;
  1134. end;
  1135. if (hs='') then
  1136. Message1(scan_w_illegal_directive,'$'+c);
  1137. end
  1138. else
  1139. Message1(scan_d_handling_switch,'$'+hs);
  1140. end
  1141. else
  1142. hs:='';
  1143. end;
  1144. { directives may follow switches after a , }
  1145. if hs<>'' then
  1146. begin
  1147. t:=Get_Directive(hs);
  1148. if t<>_DIR_NONE then
  1149. begin
  1150. p:=directiveproc[t];
  1151. {$ifndef TP}
  1152. if assigned(p) then
  1153. {$else}
  1154. if @p<>nil then
  1155. {$endif}
  1156. p(t);
  1157. end
  1158. else
  1159. Message1(scan_w_illegal_directive,'$'+hs);
  1160. { conditionals already read the comment }
  1161. if (current_scanner^.comment_level>0) then
  1162. current_scanner^.readcomment;
  1163. { we've read the whole comment }
  1164. aktcommentstyle:=comment_none;
  1165. end;
  1166. end;
  1167. {
  1168. $Log$
  1169. Revision 1.72 2000-01-07 01:14:37 peter
  1170. * updated copyright to 2000
  1171. Revision 1.71 2000/01/04 15:15:53 florian
  1172. + added compiler switch $maxfpuregisters
  1173. + fixed a small problem in secondvecn
  1174. Revision 1.70 1999/12/20 23:23:30 pierre
  1175. + $description $version
  1176. Revision 1.69 1999/12/02 17:34:34 peter
  1177. * preprocessor support. But it fails on the caret in type blocks
  1178. Revision 1.68 1999/11/24 11:39:53 pierre
  1179. * asmmode message was placed too early
  1180. Revision 1.67 1999/11/12 11:03:50 peter
  1181. * searchpaths changed to stringqueue object
  1182. Revision 1.66 1999/11/06 14:34:26 peter
  1183. * truncated log to 20 revs
  1184. Revision 1.65 1999/10/30 12:32:30 peter
  1185. * fixed line counter when the first line had #10 only. This was buggy
  1186. for both the main file as for include files
  1187. Revision 1.64 1999/09/27 23:38:17 peter
  1188. * bracket support for macro define
  1189. Revision 1.63 1999/09/20 16:39:02 peter
  1190. * cs_create_smart instead of cs_smartlink
  1191. * -CX is create smartlink
  1192. * -CD is create dynamic, but does nothing atm.
  1193. Revision 1.62 1999/09/03 10:00:49 peter
  1194. * included the 1.60 version of Pierre which was lost !
  1195. Revision 1.61 1999/09/02 18:47:46 daniel
  1196. * Could not compile with TP, some arrays moved to heap
  1197. * NOAG386BIN default for TP
  1198. * AG386* files were not compatible with TP, fixed.
  1199. Revision 1.60 1999/08/31 15:55:45 pierre
  1200. + tmacrosym.is_used set
  1201. Revision 1.59 1999/08/05 16:53:10 peter
  1202. * V_Fatal=1, all other V_ are also increased
  1203. * Check for local procedure when assigning procvar
  1204. * fixed comment parsing because directives
  1205. * oldtp mode directives better supported
  1206. * added some messages to errore.msg
  1207. Revision 1.58 1999/08/04 13:03:03 jonas
  1208. * all tokens now start with an underscore
  1209. * PowerPC compiles!!
  1210. Revision 1.57 1999/07/26 14:55:36 florian
  1211. * $mode gives now a warning if an unknown mode keyword follows
  1212. Revision 1.56 1999/07/23 16:05:27 peter
  1213. * alignment is now saved in the symtable
  1214. * C alignment added for records
  1215. * PPU version increased to solve .12 <-> .13 probs
  1216. Revision 1.55 1999/07/16 10:04:36 peter
  1217. * merged
  1218. Revision 1.54 1999/07/03 00:29:58 peter
  1219. * new link writing to the ppu, one .ppu is needed for all link types,
  1220. static (.o) is now always created also when smartlinking is used
  1221. Revision 1.53.2.1 1999/07/16 09:53:06 peter
  1222. * ignore maxheapsize
  1223. Revision 1.53 1999/06/02 22:44:18 pierre
  1224. * previous wrong log corrected
  1225. Revision 1.52 1999/06/02 22:25:48 pierre
  1226. * changed $ifdef FPC @ into $ifndef TP
  1227. Revision 1.51 1999/04/07 14:36:45 pierre
  1228. + better preproc stack checking and report
  1229. Revision 1.50 1999/03/31 13:55:20 peter
  1230. * assembler inlining working for ag386bin
  1231. Revision 1.49 1999/03/26 00:05:44 peter
  1232. * released valintern
  1233. + deffile is now removed when compiling is finished
  1234. * ^( compiles now correct
  1235. + static directive
  1236. * shrd fixed
  1237. Revision 1.48 1999/03/25 16:55:34 peter
  1238. + unitpath,librarypath,includepath,objectpath directives
  1239. Revision 1.47 1999/02/22 13:07:05 pierre
  1240. + -b and -bl options work !
  1241. + cs_local_browser ($L+) is disabled if cs_browser ($Y+)
  1242. is not enabled when quitting global section
  1243. * local vars and procedures are not yet stored into PPU
  1244. }