scandir.pas 29 KB

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