scandir.pas 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883
  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. unit scandir;
  19. {$i defines.inc}
  20. interface
  21. procedure InitScannerDirectives;
  22. implementation
  23. uses
  24. dos,
  25. cutils,
  26. version,globtype,globals,systems,
  27. verbose,comphook,
  28. scanner,switches,
  29. finput,fmodule;
  30. {*****************************************************************************
  31. Helpers
  32. *****************************************************************************}
  33. procedure do_delphiswitch(sw:char);
  34. var
  35. state : char;
  36. begin
  37. { c contains the next char, a + or - would be fine }
  38. state:=current_scanner.readstate;
  39. if state in ['-','+'] then
  40. HandleSwitch(sw,state);
  41. end;
  42. procedure do_setverbose(flag:char);
  43. var
  44. state : char;
  45. begin
  46. { support ON/OFF }
  47. state:=current_scanner.ReadState;
  48. SetVerbosity(flag+state);
  49. end;
  50. procedure do_moduleswitch(sw:tmoduleswitch);
  51. var
  52. state : char;
  53. begin
  54. state:=current_scanner.readstate;
  55. if (sw<>cs_modulenone) and (state in ['-','+']) then
  56. begin
  57. if state='-' then
  58. exclude(aktmoduleswitches,sw)
  59. else
  60. include(aktmoduleswitches,sw);
  61. end;
  62. end;
  63. procedure do_localswitch(sw:tlocalswitch);
  64. var
  65. state : char;
  66. begin
  67. state:=current_scanner.readstate;
  68. if (sw<>cs_localnone) and (state in ['-','+']) then
  69. begin
  70. if not localswitcheschanged then
  71. nextaktlocalswitches:=aktlocalswitches;
  72. if state='-' then
  73. exclude(nextaktlocalswitches,sw)
  74. else
  75. include(nextaktlocalswitches,sw);
  76. localswitcheschanged:=true;
  77. end;
  78. end;
  79. procedure do_message(w:integer);
  80. begin
  81. current_scanner.skipspace;
  82. Message1(w,current_scanner.readcomment);
  83. end;
  84. {*****************************************************************************
  85. Directive Callbacks
  86. *****************************************************************************}
  87. procedure dir_align;
  88. begin
  89. do_delphiswitch('A');
  90. end;
  91. procedure dir_asmmode;
  92. var
  93. s : string;
  94. begin
  95. current_scanner.skipspace;
  96. s:=current_scanner.readid;
  97. If Inside_asm_statement then
  98. Message1(scan_w_no_asm_reader_switch_inside_asm,s);
  99. if s='DEFAULT' then
  100. aktasmmode:=initasmmode
  101. else
  102. if not set_asmmode_by_string(s,aktasmmode) then
  103. Message1(scan_w_unsupported_asmmode_specifier,s);
  104. end;
  105. procedure dir_apptype;
  106. var
  107. hs : string;
  108. begin
  109. if (target_info.target<>target_i386_win32)
  110. and (target_info.target<>target_i386_os2) then
  111. Message(scan_w_app_type_not_support);
  112. if not current_module.in_global then
  113. Message(scan_w_switch_is_global)
  114. else
  115. begin
  116. current_scanner.skipspace;
  117. hs:=current_scanner.readid;
  118. if hs='GUI' then
  119. apptype:=app_gui
  120. else if hs='CONSOLE' then
  121. apptype:=app_cui
  122. else if (hs='FS') and (target_info.target=target_i386_os2) then
  123. apptype:=app_fs
  124. else
  125. Message1(scan_w_unsupported_app_type,hs);
  126. end;
  127. end;
  128. procedure dir_assertions;
  129. begin
  130. do_delphiswitch('C');
  131. end;
  132. procedure dir_booleval;
  133. begin
  134. do_delphiswitch('B');
  135. end;
  136. procedure dir_debuginfo;
  137. begin
  138. do_delphiswitch('D');
  139. end;
  140. procedure dir_description;
  141. begin
  142. if not (target_info.target in [target_i386_os2,target_i386_win32,target_i386_netware]) then
  143. Message(scan_w_decription_not_support);
  144. { change description global var in all cases }
  145. { it not used but in win32, os2 and netware }
  146. current_scanner.skipspace;
  147. description:=current_scanner.readcomment;
  148. end;
  149. procedure dir_error;
  150. begin
  151. do_message(scan_e_user_defined);
  152. end;
  153. procedure dir_extendedsyntax;
  154. begin
  155. do_delphiswitch('X');
  156. end;
  157. procedure dir_fatal;
  158. begin
  159. do_message(scan_f_user_defined);
  160. end;
  161. procedure dir_goto;
  162. begin
  163. do_moduleswitch(cs_support_goto);
  164. end;
  165. procedure dir_hint;
  166. begin
  167. do_message(scan_h_user_defined);
  168. end;
  169. procedure dir_hints;
  170. begin
  171. do_setverbose('H');
  172. end;
  173. procedure dir_includepath;
  174. begin
  175. if not current_module.in_global then
  176. Message(scan_w_switch_is_global)
  177. else
  178. begin
  179. current_scanner.skipspace;
  180. current_module.localincludesearchpath.AddPath(current_scanner.readcomment,false);
  181. end;
  182. end;
  183. procedure dir_info;
  184. begin
  185. do_message(scan_i_user_defined);
  186. end;
  187. procedure dir_inline;
  188. begin
  189. do_moduleswitch(cs_support_inline);
  190. end;
  191. procedure dir_interfaces;
  192. var
  193. hs : string;
  194. begin
  195. {corba/com/default}
  196. current_scanner.skipspace;
  197. hs:=current_scanner.readid;
  198. if (hs='CORBA') then
  199. aktinterfacetype:=it_interfacecorba
  200. else if (hs='COM') then
  201. aktinterfacetype:=it_interfacecom
  202. else if (hs='DEFAULT') then
  203. aktinterfacetype:=initinterfacetype
  204. else
  205. Message(scan_e_invalid_interface_type);
  206. end;
  207. procedure dir_iochecks;
  208. begin
  209. do_delphiswitch('I');
  210. end;
  211. procedure dir_librarypath;
  212. begin
  213. if not current_module.in_global then
  214. Message(scan_w_switch_is_global)
  215. else
  216. begin
  217. current_scanner.skipspace;
  218. current_module.locallibrarysearchpath.AddPath(current_scanner.readcomment,false);
  219. end;
  220. end;
  221. procedure dir_link;
  222. var
  223. s : string;
  224. begin
  225. current_scanner.skipspace;
  226. s:=AddExtension(FixFileName(current_scanner.readcomment),target_info.objext);
  227. current_module.linkotherofiles.add(s,link_allways);
  228. end;
  229. procedure dir_linklib;
  230. type
  231. tLinkMode=(lm_shared,lm_static);
  232. var
  233. s : string;
  234. quote : char;
  235. libname,
  236. linkmodestr : string;
  237. p : longint;
  238. linkMode : tLinkMode;
  239. begin
  240. current_scanner.skipspace;
  241. s:=current_scanner.readcomment;
  242. p:=pos(',',s);
  243. if p=0 then
  244. begin
  245. libname:=TrimSpace(s);
  246. linkmodeStr:='';
  247. end
  248. else
  249. begin
  250. libname:=TrimSpace(copy(s,1,p-1));
  251. linkmodeStr:=Upper(TrimSpace(copy(s,p+1,255)));
  252. end;
  253. if (libname='') or (libname='''''') or (libname='""') then
  254. exit;
  255. { get linkmode, default is shared linking }
  256. if linkModeStr='STATIC' then
  257. linkmode:=lm_static
  258. else if (LinkModeStr='SHARED') or (LinkModeStr='') then
  259. linkmode:=lm_shared
  260. else
  261. begin
  262. Comment(V_Error,'Wrong link mode specified: "'+Linkmodestr+'"');
  263. exit;
  264. end;
  265. { create library name }
  266. if libname[1] in ['''','"'] then
  267. begin
  268. quote:=libname[1];
  269. Delete(libname,1,1);
  270. p:=pos(quote,libname);
  271. if p>0 then
  272. Delete(libname,p,1);
  273. end;
  274. { add to the list of libraries to link }
  275. if linkMode=lm_static then
  276. current_module.linkOtherStaticLibs.add(FixFileName(libname),link_allways)
  277. else
  278. current_module.linkOtherSharedLibs.add(FixFileName(libname),link_allways);
  279. end;
  280. procedure dir_localsymbols;
  281. begin
  282. do_delphiswitch('L');
  283. end;
  284. procedure dir_longstrings;
  285. begin
  286. do_delphiswitch('H');
  287. end;
  288. procedure dir_macro;
  289. begin
  290. do_moduleswitch(cs_support_macro);
  291. end;
  292. procedure dir_maxfpuregisters;
  293. var
  294. l : integer;
  295. hs : string;
  296. begin
  297. current_scanner.skipspace;
  298. if not(c in ['0'..'9']) then
  299. begin
  300. hs:=current_scanner.readid;
  301. if (hs='NORMAL') or (hs='DEFAULT') then
  302. aktmaxfpuregisters:=-1
  303. else
  304. Message(scan_e_invalid_maxfpureg_value);
  305. end
  306. else
  307. begin
  308. l:=current_scanner.readval;
  309. case l of
  310. 0..8:
  311. aktmaxfpuregisters:=l;
  312. else
  313. Message(scan_e_invalid_maxfpureg_value);
  314. end;
  315. end;
  316. end;
  317. procedure dir_memory;
  318. var
  319. l : longint;
  320. begin
  321. current_scanner.skipspace;
  322. l:=current_scanner.readval;
  323. if l>1024 then
  324. stacksize:=l;
  325. current_scanner.skipspace;
  326. if c=',' then
  327. begin
  328. current_scanner.readchar;
  329. current_scanner.skipspace;
  330. l:=current_scanner.readval;
  331. if l>1024 then
  332. heapsize:=l;
  333. end;
  334. if c=',' then
  335. begin
  336. current_scanner.readchar;
  337. current_scanner.skipspace;
  338. l:=current_scanner.readval;
  339. { Ignore this value, because the limit is set by the OS
  340. info and shouldn't be changed by the user (PFV) }
  341. end;
  342. end;
  343. procedure dir_message;
  344. begin
  345. do_message(scan_i_user_defined);
  346. end;
  347. procedure dir_mode;
  348. begin
  349. if not current_module.in_global then
  350. Message(scan_w_switch_is_global)
  351. else
  352. begin
  353. current_scanner.skipspace;
  354. current_scanner.readstring;
  355. if not SetCompileMode(pattern,false) then
  356. Message1(scan_w_illegal_switch,pattern);
  357. end;
  358. end;
  359. procedure dir_mmx;
  360. begin
  361. do_localswitch(cs_mmx);
  362. end;
  363. procedure dir_note;
  364. begin
  365. do_message(scan_n_user_defined);
  366. end;
  367. procedure dir_notes;
  368. begin
  369. do_setverbose('N');
  370. end;
  371. procedure dir_objectpath;
  372. begin
  373. if not current_module.in_global then
  374. Message(scan_w_switch_is_global)
  375. else
  376. begin
  377. current_scanner.skipspace;
  378. current_module.localobjectsearchpath.AddPath(current_scanner.readcomment,false);
  379. end;
  380. end;
  381. procedure dir_openstrings;
  382. begin
  383. do_delphiswitch('P');
  384. end;
  385. procedure dir_output_format;
  386. begin
  387. if not current_module.in_global then
  388. Message(scan_w_switch_is_global)
  389. else
  390. begin
  391. current_scanner.skipspace;
  392. if set_target_asm_by_string(current_scanner.readid) then
  393. aktoutputformat:=target_asm.id
  394. else
  395. Message1(scan_w_illegal_switch,pattern);
  396. end;
  397. end;
  398. procedure dir_overflowchecks;
  399. begin
  400. do_delphiswitch('Q');
  401. end;
  402. procedure dir_packenum;
  403. var
  404. hs : string;
  405. begin
  406. current_scanner.skipspace;
  407. if not(c in ['0'..'9']) then
  408. begin
  409. hs:=current_scanner.readid;
  410. if (hs='NORMAL') or (hs='DEFAULT') then
  411. aktpackenum:=4
  412. else
  413. Message(scan_w_only_pack_enum);
  414. end
  415. else
  416. begin
  417. case current_scanner.readval of
  418. 1 : aktpackenum:=1;
  419. 2 : aktpackenum:=2;
  420. 4 : aktpackenum:=4;
  421. else
  422. Message(scan_w_only_pack_enum);
  423. end;
  424. end;
  425. end;
  426. procedure dir_packrecords;
  427. var
  428. hs : string;
  429. begin
  430. current_scanner.skipspace;
  431. if not(c in ['0'..'9']) then
  432. begin
  433. hs:=current_scanner.readid;
  434. if (hs='C') then
  435. aktpackrecords:=packrecord_C
  436. else
  437. if (hs='NORMAL') or (hs='DEFAULT') then
  438. aktpackrecords:=packrecord_2
  439. else
  440. Message(scan_w_only_pack_records);
  441. end
  442. else
  443. begin
  444. case current_scanner.readval of
  445. 1 : aktpackrecords:=packrecord_1;
  446. 2 : aktpackrecords:=packrecord_2;
  447. 4 : aktpackrecords:=packrecord_4;
  448. 8 : aktpackrecords:=packrecord_8;
  449. 16 : aktpackrecords:=packrecord_16;
  450. 32 : aktpackrecords:=packrecord_32;
  451. else
  452. Message(scan_w_only_pack_records);
  453. end;
  454. end;
  455. end;
  456. {$ifdef testvarsets}
  457. procedure dir_packset;
  458. var
  459. hs : string;
  460. begin
  461. current_scanner.skipspace;
  462. if not(c in ['1','2','4']) then
  463. begin
  464. hs:=current_scanner.readid;
  465. if (hs='FIXED') or ((hs='DEFAULT') OR (hs='NORMAL')) then
  466. aktsetalloc:=0 {Fixed mode, sets are 4 or 32 bytes}
  467. else
  468. Message(scan_w_only_packset);
  469. end
  470. else
  471. begin
  472. case current_scanner.readval of
  473. 1 : aktsetalloc:=1;
  474. 2 : aktsetalloc:=2;
  475. 4 : aktsetalloc:=4;
  476. else
  477. Message(scan_w_only_packset);
  478. end;
  479. end;
  480. end;
  481. {$ENDIF}
  482. procedure dir_rangechecks;
  483. begin
  484. do_delphiswitch('R');
  485. end;
  486. procedure dir_referenceinfo;
  487. begin
  488. do_delphiswitch('Y');
  489. end;
  490. procedure dir_resource;
  491. var
  492. s : string;
  493. begin
  494. current_scanner.skipspace;
  495. s:=current_scanner.readcomment;
  496. { replace * with current module name.
  497. This should always be defined. }
  498. if s[1]='*' then
  499. if Assigned(Current_Module) then
  500. begin
  501. delete(S,1,1);
  502. insert(lower(current_module.modulename^),S,1);
  503. end;
  504. s:=AddExtension(FixFileName(s),target_info.resext);
  505. if target_info.res<>res_none then
  506. if (target_info.res = res_emxbind) and
  507. not (Current_module.ResourceFiles.Empty) then
  508. Message(scan_w_only_one_resourcefile_supported)
  509. else
  510. current_module.resourcefiles.insert(FixFileName(s))
  511. else
  512. Message(scan_e_resourcefiles_not_supported);
  513. end;
  514. procedure dir_saturation;
  515. begin
  516. do_localswitch(cs_mmx_saturation);
  517. end;
  518. procedure dir_smartlink;
  519. begin
  520. do_moduleswitch(cs_create_smart);
  521. end;
  522. procedure dir_stackframes;
  523. begin
  524. do_delphiswitch('W');
  525. end;
  526. procedure dir_static;
  527. begin
  528. do_moduleswitch(cs_static_keyword);
  529. end;
  530. procedure dir_stop;
  531. begin
  532. do_message(scan_f_user_defined);
  533. end;
  534. procedure dir_typedaddress;
  535. begin
  536. do_delphiswitch('T');
  537. end;
  538. procedure dir_typeinfo;
  539. begin
  540. do_delphiswitch('M');
  541. end;
  542. procedure dir_unitpath;
  543. begin
  544. if not current_module.in_global then
  545. Message(scan_w_switch_is_global)
  546. else
  547. begin
  548. current_scanner.skipspace;
  549. current_module.localunitsearchpath.AddPath(current_scanner.readcomment,false);
  550. end;
  551. end;
  552. procedure dir_varstringchecks;
  553. begin
  554. do_delphiswitch('V');
  555. end;
  556. procedure dir_version;
  557. var
  558. major, minor, revision : longint;
  559. error : integer;
  560. begin
  561. if not (target_info.target in [target_i386_os2,target_i386_win32,target_i386_netware]) then // AD
  562. begin
  563. Message(scan_n_version_not_support);
  564. exit;
  565. end;
  566. if (compile_level<>1) then
  567. Message(scan_n_only_exe_version)
  568. else
  569. begin
  570. { change description global var in all cases }
  571. { it not used but in win32, os2 and netware }
  572. current_scanner.skipspace;
  573. { we should only accept Major.Minor format for win32 and os2 }
  574. current_scanner.readnumber;
  575. major:=0;
  576. minor:=0;
  577. revision:=0;
  578. valint(pattern,major,error);
  579. if error<>0 then
  580. begin
  581. Message1(scan_w_wrong_version_ignored,pattern);
  582. exit;
  583. end;
  584. if c='.' then
  585. begin
  586. current_scanner.readchar;
  587. current_scanner.readnumber;
  588. valint(pattern,minor,error);
  589. if error<>0 then
  590. begin
  591. Message1(scan_w_wrong_version_ignored,tostr(major)+'.'+pattern);
  592. exit;
  593. end;
  594. if (c='.') and
  595. (target_info.target = target_i386_netware) then // AD
  596. begin
  597. current_scanner.readchar;
  598. current_scanner.readnumber;
  599. valint(pattern,revision,error);
  600. if error<>0 then
  601. begin
  602. Message1(scan_w_wrong_version_ignored,tostr(revision)+'.'+pattern);
  603. exit;
  604. end;
  605. dllmajor:=major;
  606. dllminor:=minor;
  607. dllrevision:=revision;
  608. dllversion:=tostr(major)+','+tostr(minor)+','+tostr(revision);
  609. end
  610. else
  611. begin
  612. dllmajor:=major;
  613. dllminor:=minor;
  614. dllversion:=tostr(major)+'.'+tostr(minor);
  615. end;
  616. end
  617. else
  618. dllversion:=tostr(major);
  619. end;
  620. end;
  621. procedure dir_wait;
  622. var
  623. had_info : boolean;
  624. begin
  625. had_info:=(status.verbosity and V_Info)<>0;
  626. { this message should allways appear !! }
  627. status.verbosity:=status.verbosity or V_Info;
  628. Message(scan_i_press_enter);
  629. readln;
  630. If not(had_info) then
  631. status.verbosity:=status.verbosity and (not V_Info);
  632. end;
  633. procedure dir_warning;
  634. begin
  635. do_message(scan_w_user_defined);
  636. end;
  637. procedure dir_warnings;
  638. begin
  639. do_setverbose('W');
  640. end;
  641. procedure dir_z1;
  642. begin
  643. aktpackenum:=1;
  644. end;
  645. procedure dir_z2;
  646. begin
  647. aktpackenum:=2;
  648. end;
  649. procedure dir_z4;
  650. begin
  651. aktpackenum:=4;
  652. end;
  653. {****************************************************************************
  654. Initialize Directives
  655. ****************************************************************************}
  656. procedure InitScannerDirectives;
  657. begin
  658. AddDirective('ALIGN',{$ifdef FPCPROCVAR}@{$endif}dir_align);
  659. AddDirective('APPTYPE',{$ifdef FPCPROCVAR}@{$endif}dir_apptype);
  660. AddDirective('ASMMODE',{$ifdef FPCPROCVAR}@{$endif}dir_asmmode);
  661. AddDirective('ASSERTIONS',{$ifdef FPCPROCVAR}@{$endif}dir_assertions);
  662. AddDirective('BOOLEVAL',{$ifdef FPCPROCVAR}@{$endif}dir_booleval);
  663. AddDirective('D',{$ifdef FPCPROCVAR}@{$endif}dir_description);
  664. AddDirective('DEBUGINFO',{$ifdef FPCPROCVAR}@{$endif}dir_debuginfo);
  665. AddDirective('DESCRIPTION',{$ifdef FPCPROCVAR}@{$endif}dir_description);
  666. AddDirective('ERROR',{$ifdef FPCPROCVAR}@{$endif}dir_error);
  667. AddDirective('EXTENDEDSYNTAX',{$ifdef FPCPROCVAR}@{$endif}dir_extendedsyntax);
  668. AddDirective('FATAL',{$ifdef FPCPROCVAR}@{$endif}dir_fatal);
  669. AddDirective('GOTO',{$ifdef FPCPROCVAR}@{$endif}dir_goto);
  670. AddDirective('HINT',{$ifdef FPCPROCVAR}@{$endif}dir_hint);
  671. AddDirective('HINTS',{$ifdef FPCPROCVAR}@{$endif}dir_hints);
  672. AddDirective('IOCHECKS',{$ifdef FPCPROCVAR}@{$endif}dir_iochecks);
  673. AddDirective('INCLUDEPATH',{$ifdef FPCPROCVAR}@{$endif}dir_includepath);
  674. AddDirective('INFO',{$ifdef FPCPROCVAR}@{$endif}dir_info);
  675. AddDirective('INLINE',{$ifdef FPCPROCVAR}@{$endif}dir_inline);
  676. AddDirective('INTERFACES',{$ifdef FPCPROCVAR}@{$endif}dir_interfaces);
  677. AddDirective('L',{$ifdef FPCPROCVAR}@{$endif}dir_link);
  678. AddDirective('LIBRARYPATH',{$ifdef FPCPROCVAR}@{$endif}dir_librarypath);
  679. AddDirective('LINK',{$ifdef FPCPROCVAR}@{$endif}dir_link);
  680. AddDirective('LINKLIB',{$ifdef FPCPROCVAR}@{$endif}dir_linklib);
  681. AddDirective('LOCALSYMBOLS',{$ifdef FPCPROCVAR}@{$endif}dir_localsymbols);
  682. AddDirective('LONGSTRINGS',{$ifdef FPCPROCVAR}@{$endif}dir_longstrings);
  683. AddDirective('M',{$ifdef FPCPROCVAR}@{$endif}dir_memory);
  684. AddDirective('MACRO',{$ifdef FPCPROCVAR}@{$endif}dir_macro);
  685. AddDirective('MAXFPUREGISTERS',{$ifdef FPCPROCVAR}@{$endif}dir_maxfpuregisters);
  686. AddDirective('MEMORY',{$ifdef FPCPROCVAR}@{$endif}dir_memory);
  687. AddDirective('MESSAGE',{$ifdef FPCPROCVAR}@{$endif}dir_message);
  688. AddDirective('MINENUMSIZE',{$ifdef FPCPROCVAR}@{$endif}dir_packenum);
  689. AddDirective('MMX',{$ifdef FPCPROCVAR}@{$endif}dir_mmx);
  690. AddDirective('MODE',{$ifdef FPCPROCVAR}@{$endif}dir_mode);
  691. AddDirective('NOTE',{$ifdef FPCPROCVAR}@{$endif}dir_note);
  692. AddDirective('NOTES',{$ifdef FPCPROCVAR}@{$endif}dir_notes);
  693. AddDirective('OBJECTPATH',{$ifdef FPCPROCVAR}@{$endif}dir_objectpath);
  694. AddDirective('OPENSTRINGS',{$ifdef FPCPROCVAR}@{$endif}dir_openstrings);
  695. AddDirective('OUTPUT_FORMAT',{$ifdef FPCPROCVAR}@{$endif}dir_output_format);
  696. AddDirective('OVERFLOWCHECKS',{$ifdef FPCPROCVAR}@{$endif}dir_overflowchecks);
  697. AddDirective('PACKENUM',{$ifdef FPCPROCVAR}@{$endif}dir_packenum);
  698. AddDirective('PACKRECORDS',{$ifdef FPCPROCVAR}@{$endif}dir_packrecords);
  699. {$IFDEF TestVarsets}
  700. AddDirective('PACKSET',{$ifdef FPCPROCVAR}@{$endif}dir_packset);
  701. {$ENDIF}
  702. AddDirective('R',{$ifdef FPCPROCVAR}@{$endif}dir_resource);
  703. AddDirective('RANGECHECKS',{$ifdef FPCPROCVAR}@{$endif}dir_rangechecks);
  704. AddDirective('REFERENCEINFO',{$ifdef FPCPROCVAR}@{$endif}dir_referenceinfo);
  705. AddDirective('SATURATION',{$ifdef FPCPROCVAR}@{$endif}dir_saturation);
  706. AddDirective('SMARTLINK',{$ifdef FPCPROCVAR}@{$endif}dir_smartlink);
  707. AddDirective('STACKFRAMES',{$ifdef FPCPROCVAR}@{$endif}dir_stackframes);
  708. AddDirective('STATIC',{$ifdef FPCPROCVAR}@{$endif}dir_static);
  709. AddDirective('STOP',{$ifdef FPCPROCVAR}@{$endif}dir_stop);
  710. AddDirective('TYPEDADDRESS',{$ifdef FPCPROCVAR}@{$endif}dir_typedaddress);
  711. AddDirective('TYPEINFO',{$ifdef FPCPROCVAR}@{$endif}dir_typeinfo);
  712. AddDirective('UNITPATH',{$ifdef FPCPROCVAR}@{$endif}dir_unitpath);
  713. AddDirective('VARSTRINGCHECKS',{$ifdef FPCPROCVAR}@{$endif}dir_varstringchecks);
  714. AddDirective('VERSION',{$ifdef FPCPROCVAR}@{$endif}dir_version);
  715. AddDirective('WAIT',{$ifdef FPCPROCVAR}@{$endif}dir_wait);
  716. AddDirective('WARNING',{$ifdef FPCPROCVAR}@{$endif}dir_warning);
  717. AddDirective('WARNINGS',{$ifdef FPCPROCVAR}@{$endif}dir_warnings);
  718. AddDirective('Z1',{$ifdef FPCPROCVAR}@{$endif}dir_z1);
  719. AddDirective('Z2',{$ifdef FPCPROCVAR}@{$endif}dir_z2);
  720. AddDirective('Z4',{$ifdef FPCPROCVAR}@{$endif}dir_z4);
  721. end;
  722. end.
  723. {
  724. $Log$
  725. Revision 1.2 2001-04-18 22:01:58 peter
  726. * registration of targets and assemblers
  727. Revision 1.1 2001/04/13 18:00:36 peter
  728. * easier registration of directives
  729. Revision 1.20 2001/04/13 01:22:13 peter
  730. * symtable change to classes
  731. * range check generation and errors fixed, make cycle DEBUG=1 works
  732. * memory leaks fixed
  733. Revision 1.19 2001/03/13 18:45:07 peter
  734. * fixed some memory leaks
  735. Revision 1.18 2001/02/20 21:41:18 peter
  736. * new fixfilename, findfile for unix. Look first for lowercase, then
  737. NormalCase and last for UPPERCASE names.
  738. Revision 1.17 2001/01/20 18:32:52 hajny
  739. + APPTYPE support under OS/2, app_fs, GetEnvPChar for OS/2
  740. Revision 1.16 2001/01/13 00:09:21 peter
  741. * made Pavel O. happy ;)
  742. Revision 1.15 2000/12/25 00:07:28 peter
  743. + new tlinkedlist class (merge of old tstringqueue,tcontainer and
  744. tlinkedlist objects)
  745. Revision 1.14 2000/12/24 12:24:38 peter
  746. * moved preprocessfile into a conditional
  747. Revision 1.13 2000/12/12 19:48:52 peter
  748. * fixed lost char after $I directive (merged)
  749. Revision 1.12 2000/11/12 22:17:47 peter
  750. * some realname updates for messages
  751. Revision 1.11 2000/11/04 14:25:21 florian
  752. + merged Attila's changes for interfaces, not tested yet
  753. Revision 1.10 2000/10/31 22:02:51 peter
  754. * symtable splitted, no real code changes
  755. Revision 1.9 2000/09/26 10:50:41 jonas
  756. * initmodeswitches is changed is you change the compiler mode from the
  757. command line (the -S<x> switches didn't work anymore for changing the
  758. compiler mode) (merged from fixes branch)
  759. Revision 1.8 2000/09/24 21:33:47 peter
  760. * message updates merges
  761. Revision 1.7 2000/09/24 15:06:27 peter
  762. * use defines.inc
  763. Revision 1.6 2000/09/11 17:00:23 florian
  764. + first implementation of Netware Module support, thanks to
  765. Armin Diehl ([email protected]) for providing the patches
  766. Revision 1.5 2000/09/10 21:18:15 peter
  767. * macro warning (merged)
  768. Revision 1.4 2000/08/12 15:30:44 peter
  769. * IDE patch for stream reading (merged)
  770. Revision 1.3 2000/08/08 19:28:57 peter
  771. * memdebug/memory patches (merged)
  772. * only once illegal directive (merged)
  773. Revision 1.2 2000/07/13 11:32:49 michael
  774. + removed logs
  775. }