scandir.inc 41 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360
  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. if path<>'' then
  620. path:=path+';';
  621. path:=FindFile(name+ext,path+current_scanner^.inputfile^.path^+';.'+DirSep,found);
  622. if (not found) then
  623. path:=current_module^.localincludesearchpath.FindFile(name+ext,found);
  624. if (not found) then
  625. path:=includesearchpath.FindFile(name+ext,found);
  626. { shutdown current file }
  627. current_scanner^.tempcloseinputfile;
  628. { load new file }
  629. hp:=new(pinputfile,init(path+name+ext));
  630. current_scanner^.addfile(hp);
  631. if not current_scanner^.openinputfile then
  632. Message1(scan_f_cannot_open_includefile,hs);
  633. Message1(scan_t_start_include_file,current_scanner^.inputfile^.path^+current_scanner^.inputfile^.name^);
  634. current_scanner^.reload;
  635. { process first read char }
  636. case c of
  637. #26 : current_scanner^.reload;
  638. #10,
  639. #13 : current_scanner^.linebreak;
  640. end;
  641. { register for refs }
  642. current_module^.sourcefiles^.register_file(hp);
  643. end;
  644. end;
  645. procedure dir_description(t:tdirectivetoken);
  646. begin
  647. if not (target_info.target in [target_i386_os2,target_i386_win32]) then
  648. Message(scan_w_decription_not_support);
  649. { change description global var in all cases }
  650. { it not used but in win32 and os2 }
  651. current_scanner^.skipspace;
  652. description:=current_scanner^.readcomment;
  653. end;
  654. procedure dir_version(t:tdirectivetoken);
  655. var
  656. major, minor : longint;
  657. error : integer;
  658. begin
  659. if not (target_info.target in [target_i386_os2,target_i386_win32]) then
  660. begin
  661. Message(scan_n_version_not_support);
  662. exit;
  663. end;
  664. if (compile_level<>1) then
  665. Message(scan_n_only_exe_version)
  666. else
  667. begin
  668. { change description global var in all cases }
  669. { it not used but in win32 and os2 }
  670. current_scanner^.skipspace;
  671. { we should only accept Major.Minor format }
  672. current_scanner^.readnumber;
  673. major:=0;
  674. minor:=0;
  675. valint(pattern,major,error);
  676. if error<>0 then
  677. begin
  678. Message1(scan_w_wrong_version_ignored,pattern);
  679. exit;
  680. end;
  681. if c='.' then
  682. begin
  683. current_scanner^.readchar;
  684. current_scanner^.readnumber;
  685. valint(pattern,minor,error);
  686. if error<>0 then
  687. begin
  688. Message(scan_w_wrong_version_ignored);
  689. exit;
  690. end;
  691. dllmajor:=major;
  692. dllminor:=minor;
  693. dllversion:=tostr(major)+'.'+tostr(minor);
  694. end
  695. else
  696. dllversion:=tostr(major);
  697. end;
  698. end;
  699. procedure dir_linkobject(t:tdirectivetoken);
  700. var
  701. s : string;
  702. begin
  703. current_scanner^.skipspace;
  704. s:=AddExtension(FixFileName(current_scanner^.readcomment),target_info.objext);
  705. current_module^.linkotherofiles.insert(s,link_allways);
  706. end;
  707. procedure dir_resource(t:tdirectivetoken);
  708. var
  709. s : string;
  710. begin
  711. current_scanner^.skipspace;
  712. s:=AddExtension(FixFileName(current_scanner^.readcomment),target_info.resext);
  713. if target_info.res<>res_none then
  714. current_module^.resourcefiles.insert(FixFileName(s))
  715. else
  716. Message(scan_e_resourcefiles_not_supported);
  717. end;
  718. procedure dir_linklib(t:tdirectivetoken);
  719. begin
  720. current_scanner^.skipspace;
  721. current_scanner^.readstring;
  722. current_module^.linkOtherSharedLibs.insert(orgpattern,link_allways);
  723. end;
  724. procedure dir_outputformat(t:tdirectivetoken);
  725. begin
  726. if not current_module^.in_global then
  727. Message(scan_w_switch_is_global)
  728. else
  729. begin
  730. current_scanner^.skipspace;
  731. if set_string_asm(current_scanner^.readid) then
  732. aktoutputformat:=target_asm.id
  733. else
  734. Message(scan_w_illegal_switch);
  735. end;
  736. end;
  737. procedure dir_unitpath(t:tdirectivetoken);
  738. begin
  739. if not current_module^.in_global then
  740. Message(scan_w_switch_is_global)
  741. else
  742. begin
  743. current_scanner^.skipspace;
  744. current_module^.localunitsearchpath.AddPath(current_scanner^.readcomment,false);
  745. end;
  746. end;
  747. procedure dir_includepath(t:tdirectivetoken);
  748. begin
  749. if not current_module^.in_global then
  750. Message(scan_w_switch_is_global)
  751. else
  752. begin
  753. current_scanner^.skipspace;
  754. current_module^.localincludesearchpath.AddPath(current_scanner^.readcomment,false);
  755. end;
  756. end;
  757. procedure dir_librarypath(t:tdirectivetoken);
  758. begin
  759. if not current_module^.in_global then
  760. Message(scan_w_switch_is_global)
  761. else
  762. begin
  763. current_scanner^.skipspace;
  764. current_module^.locallibrarysearchpath.AddPath(current_scanner^.readcomment,false);
  765. end;
  766. end;
  767. procedure dir_objectpath(t:tdirectivetoken);
  768. begin
  769. if not current_module^.in_global then
  770. Message(scan_w_switch_is_global)
  771. else
  772. begin
  773. current_scanner^.skipspace;
  774. current_module^.localobjectsearchpath.AddPath(current_scanner^.readcomment,false);
  775. end;
  776. end;
  777. procedure dir_mode(t:tdirectivetoken);
  778. begin
  779. if not current_module^.in_global then
  780. Message(scan_w_switch_is_global)
  781. else
  782. begin
  783. current_scanner^.skipspace;
  784. current_scanner^.readstring;
  785. if pattern='DEFAULT' then
  786. aktmodeswitches:=initmodeswitches
  787. else
  788. if pattern='DELPHI' then
  789. aktmodeswitches:=delphimodeswitches
  790. else
  791. if pattern='TP' then
  792. aktmodeswitches:=tpmodeswitches
  793. else
  794. if pattern='FPC' then
  795. aktmodeswitches:=fpcmodeswitches
  796. else
  797. if pattern='OBJFPC' then
  798. aktmodeswitches:=objfpcmodeswitches
  799. else
  800. if pattern='GPC' then
  801. aktmodeswitches:=gpcmodeswitches
  802. else
  803. Message(scan_w_illegal_switch);
  804. end;
  805. end;
  806. procedure dir_packrecords(t:tdirectivetoken);
  807. var
  808. hs : string;
  809. begin
  810. current_scanner^.skipspace;
  811. if not(c in ['0'..'9']) then
  812. begin
  813. hs:=current_scanner^.readid;
  814. if (hs='C') then
  815. aktpackrecords:=packrecord_C
  816. else
  817. if (hs='NORMAL') or (hs='DEFAULT') then
  818. aktpackrecords:=packrecord_2
  819. else
  820. Message(scan_w_only_pack_records);
  821. end
  822. else
  823. begin
  824. case current_scanner^.readval of
  825. 1 : aktpackrecords:=packrecord_1;
  826. 2 : aktpackrecords:=packrecord_2;
  827. 4 : aktpackrecords:=packrecord_4;
  828. 8 : aktpackrecords:=packrecord_8;
  829. 16 : aktpackrecords:=packrecord_16;
  830. 32 : aktpackrecords:=packrecord_32;
  831. else
  832. Message(scan_w_only_pack_records);
  833. end;
  834. end;
  835. end;
  836. procedure dir_maxfpuregisters(t:tdirectivetoken);
  837. var
  838. l : longint;
  839. hs : string;
  840. begin
  841. current_scanner^.skipspace;
  842. if not(c in ['0'..'9']) then
  843. begin
  844. hs:=current_scanner^.readid;
  845. if (hs='NORMAL') or (hs='DEFAULT') then
  846. aktmaxfpuregisters:=-1
  847. else
  848. Message(scan_e_invalid_maxfpureg_value);
  849. end
  850. else
  851. begin
  852. l:=current_scanner^.readval;
  853. case l of
  854. 0..8:
  855. aktmaxfpuregisters:=l;
  856. else
  857. Message(scan_e_invalid_maxfpureg_value);
  858. end;
  859. end;
  860. end;
  861. procedure dir_packenum(t:tdirectivetoken);
  862. var
  863. hs : string;
  864. begin
  865. if t in [_DIR_Z1,_DIR_Z2,_DIR_Z4] then
  866. begin
  867. aktpackenum:=ord(pattern[2])-ord('0');
  868. exit;
  869. end;
  870. current_scanner^.skipspace;
  871. if not(c in ['0'..'9']) then
  872. begin
  873. hs:=current_scanner^.readid;
  874. if (hs='NORMAL') or (hs='DEFAULT') then
  875. aktpackenum:=4
  876. else
  877. Message(scan_w_only_pack_enum);
  878. end
  879. else
  880. begin
  881. case current_scanner^.readval of
  882. 1 : aktpackenum:=1;
  883. 2 : aktpackenum:=2;
  884. 4 : aktpackenum:=4;
  885. else
  886. Message(scan_w_only_pack_enum);
  887. end;
  888. end;
  889. end;
  890. procedure dir_apptype(t:tdirectivetoken);
  891. var
  892. hs : string;
  893. begin
  894. if target_info.target<>target_i386_win32 then
  895. Message(scan_w_app_type_not_support);
  896. if not current_module^.in_global then
  897. Message(scan_w_switch_is_global)
  898. else
  899. begin
  900. current_scanner^.skipspace;
  901. hs:=current_scanner^.readid;
  902. if hs='GUI' then
  903. apptype:=at_gui
  904. else if hs='CONSOLE' then
  905. apptype:=at_cui
  906. else
  907. Message1(scan_w_unsupported_app_type,hs);
  908. end;
  909. end;
  910. procedure dir_wait(t:tdirectivetoken);
  911. var had_info : boolean;
  912. begin
  913. had_info:=(status.verbosity and V_Info)<>0;
  914. { this message should allways appear !! }
  915. status.verbosity:=status.verbosity or V_Info;
  916. Message(scan_i_press_enter);
  917. readln;
  918. If not(had_info) then
  919. status.verbosity:=status.verbosity and (not V_Info);
  920. end;
  921. procedure dir_asmmode(t:tdirectivetoken);
  922. var
  923. s : string;
  924. begin
  925. current_scanner^.skipspace;
  926. s:=current_scanner^.readid;
  927. If Inside_asm_statement then
  928. Message1(scan_w_no_asm_reader_switch_inside_asm,s);
  929. if s='DEFAULT' then
  930. aktasmmode:=initasmmode
  931. else
  932. if not set_string_asmmode(s,aktasmmode) then
  933. Message1(scan_w_unsupported_asmmode_specifier,s);
  934. end;
  935. procedure dir_oldasmmode(t:tdirectivetoken);
  936. begin
  937. If Inside_asm_statement then
  938. Message1(scan_w_no_asm_reader_switch_inside_asm,directive[t]);
  939. {$ifdef i386}
  940. case t of
  941. _DIR_I386_ATT : aktasmmode:=asmmode_i386_att;
  942. _DIR_I386_DIRECT : aktasmmode:=asmmode_i386_direct;
  943. _DIR_I386_INTEL : aktasmmode:=asmmode_i386_intel;
  944. end;
  945. {$endif i386}
  946. end;
  947. procedure dir_delphiswitch(t:tdirectivetoken);
  948. var
  949. sw,state : char;
  950. begin
  951. case t of
  952. _DIR_ALIGN : sw:='A';
  953. _DIR_ASSERTIONS : sw:='C';
  954. _DIR_BOOLEVAL : sw:='B';
  955. _DIR_DEBUGINFO : sw:='D';
  956. _DIR_IOCHECKS : sw:='I';
  957. _DIR_LOCALSYMBOLS : sw:='L';
  958. _DIR_LONGSTRINGS : sw:='H';
  959. _DIR_OPENSTRINGS : sw:='P';
  960. _DIR_OVERFLOWCHECKS : sw:='Q';
  961. _DIR_RANGECHECKS : sw:='R';
  962. _DIR_REFERENCEINFO : sw:='Y';
  963. _DIR_STACKFRAMES : sw:='W';
  964. _DIR_TYPEDADDRESS : sw:='T';
  965. _DIR_TYPEINFO : sw:='M';
  966. _DIR_VARSTRINGCHECKS : sw:='V';
  967. else
  968. exit;
  969. end;
  970. { c contains the next char, a + or - would be fine }
  971. state:=current_scanner^.readstate;
  972. if state in ['-','+'] then
  973. HandleSwitch(sw,state);
  974. end;
  975. procedure dir_memory(t:tdirectivetoken);
  976. var
  977. l : longint;
  978. begin
  979. current_scanner^.skipspace;
  980. l:=current_scanner^.readval;
  981. if l>1024 then
  982. stacksize:=l;
  983. current_scanner^.skipspace;
  984. if c=',' then
  985. begin
  986. current_scanner^.readchar;
  987. current_scanner^.skipspace;
  988. l:=current_scanner^.readval;
  989. if l>1024 then
  990. heapsize:=l;
  991. end;
  992. if c=',' then
  993. begin
  994. current_scanner^.readchar;
  995. current_scanner^.skipspace;
  996. l:=current_scanner^.readval;
  997. { Ignore this value, because the limit is set by the OS
  998. info and shouldn't be changed by the user (PFV) }
  999. end;
  1000. end;
  1001. procedure dir_setverbose(t:tdirectivetoken);
  1002. var
  1003. flag,
  1004. state : char;
  1005. begin
  1006. case t of
  1007. _DIR_HINTS : flag:='H';
  1008. _DIR_WARNINGS : flag:='W';
  1009. _DIR_NOTES : flag:='N';
  1010. else
  1011. exit;
  1012. end;
  1013. { support ON/OFF }
  1014. state:=current_scanner^.ReadState;
  1015. SetVerbosity(flag+state);
  1016. end;
  1017. type
  1018. tdirectiveproc=procedure(t:tdirectivetoken);
  1019. const
  1020. directiveproc:array[tdirectivetoken] of tdirectiveproc=(
  1021. {_DIR_NONE} nil,
  1022. {_DIR_ALIGN} dir_delphiswitch,
  1023. {_DIR_APPTYPE} dir_apptype,
  1024. {_DIR_ASMMODE} dir_asmmode,
  1025. {_DIR_ASSERTION} dir_delphiswitch,
  1026. {_DIR_BOOLEVAL} dir_delphiswitch,
  1027. {_DIR_D} dir_description,
  1028. {_DIR_DEBUGINFO} dir_delphiswitch,
  1029. {_DIR_DEFINE} dir_define,
  1030. {_DIR_DESCRIPTION} dir_description,
  1031. {_DIR_ELSE} dir_conditional,
  1032. {_DIR_ENDIF} dir_conditional,
  1033. {_DIR_ERROR} dir_message,
  1034. {_DIR_EXTENDEDSYNTAX} dir_delphiswitch,
  1035. {_DIR_FATAL} dir_message,
  1036. {_DIR_GOTO} dir_moduleswitch,
  1037. {_DIR_HINT} dir_message,
  1038. {_DIR_HINTS} dir_setverbose,
  1039. {_DIR_I} dir_include,
  1040. {_DIR_I386_ATT} dir_oldasmmode,
  1041. {_DIR_I386_DIRECT} dir_oldasmmode,
  1042. {_DIR_I386_INTEL} dir_oldasmmode,
  1043. {_DIR_IOCHECKS} dir_delphiswitch,
  1044. {_DIR_IF} dir_conditional,
  1045. {_DIR_IFDEF} dir_conditional,
  1046. {_DIR_IFNDEF} dir_conditional,
  1047. {_DIR_IFOPT} dir_conditional,
  1048. {_DIR_INCLUDE} dir_include,
  1049. {_DIR_INCLUDEPATH} dir_includepath,
  1050. {_DIR_INFO} dir_message,
  1051. {_DIR_INLINE} dir_moduleswitch,
  1052. {_DIR_L} dir_linkobject,
  1053. {_DIR_LIBRARYPATH} dir_librarypath,
  1054. {_DIR_LINK} dir_linkobject,
  1055. {_DIR_LINKLIB} dir_linklib,
  1056. {_DIR_LOCALSYMBOLS} dir_delphiswitch,
  1057. {_DIR_LONGSTRINGS} dir_delphiswitch,
  1058. {_DIR_M} dir_memory,
  1059. {_DIR_MACRO} dir_moduleswitch,
  1060. {_DIR_MAXFPUREGISTERS} dir_maxfpuregisters,
  1061. {_DIR_MEMORY} dir_memory,
  1062. {_DIR_MESSAGE} dir_message,
  1063. {_DIR_MINENUMSIZE} dir_packenum,
  1064. {_DIR_MMX} dir_localswitch,
  1065. {_DIR_MODE} dir_mode,
  1066. {_DIR_NOTE} dir_message,
  1067. {_DIR_NOTES} dir_setverbose,
  1068. {_DIR_OBJECTPATH} dir_objectpath,
  1069. {_DIR_OPENSTRINGS} dir_delphiswitch,
  1070. {_DIR_OUTPUT_FORMAT} dir_outputformat,
  1071. {_DIR_OVERFLOWCHECKS} dir_delphiswitch,
  1072. {_DIR_PACKENUM} dir_packenum,
  1073. {_DIR_PACKRECORDS} dir_packrecords,
  1074. {_DIR_R} dir_resource,
  1075. {_DIR_RANGECHECKS} dir_delphiswitch,
  1076. {_DIR_REFERENCEINFO} dir_delphiswitch,
  1077. {_DIR_SATURATION} dir_localswitch,
  1078. {_DIR_SMARTLINK} dir_moduleswitch,
  1079. {_DIR_STACKFRAMES} dir_delphiswitch,
  1080. {_DIR_STATIC} dir_moduleswitch,
  1081. {_DIR_STOP} dir_message,
  1082. {_DIR_TYPEDADDRESS} dir_delphiswitch,
  1083. {_DIR_TYPEINFO} dir_delphiswitch,
  1084. {_DIR_UNDEF} dir_undef,
  1085. {_DIR_UNITPATH} dir_unitpath,
  1086. {_DIR_VARSTRINGCHECKS} dir_delphiswitch,
  1087. {_DIR_VERSION} dir_version,
  1088. {_DIR_WAIT} dir_wait,
  1089. {_DIR_WARNING} dir_message,
  1090. {_DIR_WARNINGS} dir_setverbose,
  1091. {_DIR_Z1} dir_packenum,
  1092. {_DIR_Z2} dir_packenum,
  1093. {_DIR_Z4} dir_packenum
  1094. );
  1095. {-------------------------------------------
  1096. Main switches handling
  1097. -------------------------------------------}
  1098. procedure handledirectives;
  1099. var
  1100. t : tdirectivetoken;
  1101. p : tdirectiveproc;
  1102. hs : string;
  1103. begin
  1104. current_scanner^.gettokenpos;
  1105. current_scanner^.readchar; {Remove the $}
  1106. hs:=current_scanner^.readid;
  1107. if parapreprocess then
  1108. begin
  1109. t:=Get_Directive(hs);
  1110. if not(is_conditional(t) or (t=_DIR_DEFINE) or (t=_DIR_UNDEF)) then
  1111. begin
  1112. preprocfile^.AddSpace;
  1113. preprocfile^.Add('{$'+hs+current_scanner^.readcomment+'}');
  1114. exit;
  1115. end;
  1116. end;
  1117. Message1(scan_d_handling_switch,'$'+hs);
  1118. if hs='' then
  1119. Message1(scan_w_illegal_switch,'$'+hs);
  1120. { Check for compiler switches }
  1121. while (length(hs)=1) and (c in ['-','+']) do
  1122. begin
  1123. HandleSwitch(hs[1],c);
  1124. current_scanner^.readchar; {Remove + or -}
  1125. if c=',' then
  1126. begin
  1127. current_scanner^.readchar; {Remove , }
  1128. { read next switch, support $v+,$+}
  1129. hs:=current_scanner^.readid;
  1130. if (hs='') then
  1131. begin
  1132. if (c='$') and (m_fpc in aktmodeswitches) then
  1133. begin
  1134. current_scanner^.readchar; { skip $ }
  1135. hs:=current_scanner^.readid;
  1136. end;
  1137. if (hs='') then
  1138. Message1(scan_w_illegal_directive,'$'+c);
  1139. end
  1140. else
  1141. Message1(scan_d_handling_switch,'$'+hs);
  1142. end
  1143. else
  1144. hs:='';
  1145. end;
  1146. { directives may follow switches after a , }
  1147. if hs<>'' then
  1148. begin
  1149. t:=Get_Directive(hs);
  1150. if t<>_DIR_NONE then
  1151. begin
  1152. p:=directiveproc[t];
  1153. {$ifndef TP}
  1154. if assigned(p) then
  1155. {$else}
  1156. if @p<>nil then
  1157. {$endif}
  1158. p(t);
  1159. end
  1160. else
  1161. Message1(scan_w_illegal_directive,'$'+hs);
  1162. { conditionals already read the comment }
  1163. if (current_scanner^.comment_level>0) then
  1164. current_scanner^.readcomment;
  1165. { we've read the whole comment }
  1166. aktcommentstyle:=comment_none;
  1167. end;
  1168. end;
  1169. {
  1170. $Log$
  1171. Revision 1.73 2000-01-14 14:28:40 pierre
  1172. * avoid searching of include file in start dir first
  1173. Revision 1.72 2000/01/07 01:14:37 peter
  1174. * updated copyright to 2000
  1175. Revision 1.71 2000/01/04 15:15:53 florian
  1176. + added compiler switch $maxfpuregisters
  1177. + fixed a small problem in secondvecn
  1178. Revision 1.70 1999/12/20 23:23:30 pierre
  1179. + $description $version
  1180. Revision 1.69 1999/12/02 17:34:34 peter
  1181. * preprocessor support. But it fails on the caret in type blocks
  1182. Revision 1.68 1999/11/24 11:39:53 pierre
  1183. * asmmode message was placed too early
  1184. Revision 1.67 1999/11/12 11:03:50 peter
  1185. * searchpaths changed to stringqueue object
  1186. Revision 1.66 1999/11/06 14:34:26 peter
  1187. * truncated log to 20 revs
  1188. Revision 1.65 1999/10/30 12:32:30 peter
  1189. * fixed line counter when the first line had #10 only. This was buggy
  1190. for both the main file as for include files
  1191. Revision 1.64 1999/09/27 23:38:17 peter
  1192. * bracket support for macro define
  1193. Revision 1.63 1999/09/20 16:39:02 peter
  1194. * cs_create_smart instead of cs_smartlink
  1195. * -CX is create smartlink
  1196. * -CD is create dynamic, but does nothing atm.
  1197. Revision 1.62 1999/09/03 10:00:49 peter
  1198. * included the 1.60 version of Pierre which was lost !
  1199. Revision 1.61 1999/09/02 18:47:46 daniel
  1200. * Could not compile with TP, some arrays moved to heap
  1201. * NOAG386BIN default for TP
  1202. * AG386* files were not compatible with TP, fixed.
  1203. Revision 1.60 1999/08/31 15:55:45 pierre
  1204. + tmacrosym.is_used set
  1205. Revision 1.59 1999/08/05 16:53:10 peter
  1206. * V_Fatal=1, all other V_ are also increased
  1207. * Check for local procedure when assigning procvar
  1208. * fixed comment parsing because directives
  1209. * oldtp mode directives better supported
  1210. * added some messages to errore.msg
  1211. Revision 1.58 1999/08/04 13:03:03 jonas
  1212. * all tokens now start with an underscore
  1213. * PowerPC compiles!!
  1214. Revision 1.57 1999/07/26 14:55:36 florian
  1215. * $mode gives now a warning if an unknown mode keyword follows
  1216. Revision 1.56 1999/07/23 16:05:27 peter
  1217. * alignment is now saved in the symtable
  1218. * C alignment added for records
  1219. * PPU version increased to solve .12 <-> .13 probs
  1220. Revision 1.55 1999/07/16 10:04:36 peter
  1221. * merged
  1222. Revision 1.54 1999/07/03 00:29:58 peter
  1223. * new link writing to the ppu, one .ppu is needed for all link types,
  1224. static (.o) is now always created also when smartlinking is used
  1225. Revision 1.53.2.1 1999/07/16 09:53:06 peter
  1226. * ignore maxheapsize
  1227. Revision 1.53 1999/06/02 22:44:18 pierre
  1228. * previous wrong log corrected
  1229. Revision 1.52 1999/06/02 22:25:48 pierre
  1230. * changed $ifdef FPC @ into $ifndef TP
  1231. Revision 1.51 1999/04/07 14:36:45 pierre
  1232. + better preproc stack checking and report
  1233. Revision 1.50 1999/03/31 13:55:20 peter
  1234. * assembler inlining working for ag386bin
  1235. Revision 1.49 1999/03/26 00:05:44 peter
  1236. * released valintern
  1237. + deffile is now removed when compiling is finished
  1238. * ^( compiles now correct
  1239. + static directive
  1240. * shrd fixed
  1241. Revision 1.48 1999/03/25 16:55:34 peter
  1242. + unitpath,librarypath,includepath,objectpath directives
  1243. Revision 1.47 1999/02/22 13:07:05 pierre
  1244. + -b and -bl options work !
  1245. + cs_local_browser ($L+) is disabled if cs_browser ($Y+)
  1246. is not enabled when quitting global section
  1247. * local vars and procedures are not yet stored into PPU
  1248. }