scandir.pas 27 KB

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