globtype.pas 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637
  1. {
  2. Copyright (c) 1998-2002 by Florian Klaempfl, Pierre Muller
  3. Global types
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  15. ****************************************************************************
  16. }
  17. unit globtype;
  18. {$i fpcdefs.inc}
  19. interface
  20. const
  21. maxidlen = 127;
  22. type
  23. { TCmdStr is used to pass command line parameters to an external program to be
  24. executed from the FPC application. In some circomstances, this can be more
  25. than 255 characters. That's why using Ansi Strings}
  26. TCmdStr = AnsiString;
  27. TPathStr = AnsiString;
  28. {$ifdef symansistr}
  29. TSymStr = AnsiString;
  30. {$else symansistr}
  31. TSymStr = ShortString;
  32. {$endif symansistr}
  33. PSymStr = ^TSymStr;
  34. { Integer type corresponding to pointer size }
  35. {$ifdef cpu64bitaddr}
  36. PUint = qword;
  37. PInt = int64;
  38. {$endif cpu64bitaddr}
  39. {$ifdef cpu32bitaddr}
  40. PUint = cardinal;
  41. PInt = longint;
  42. {$endif cpu32bitaddr}
  43. {$ifdef cpu16bitaddr}
  44. PUint = word;
  45. PInt = Smallint;
  46. {$endif cpu16bitaddr}
  47. { Natural integer register type and size for the target machine }
  48. {$ifdef cpu64bitalu}
  49. AWord = qword;
  50. AInt = Int64;
  51. Const
  52. AIntBits = 64;
  53. {$endif cpu64bitalu}
  54. {$ifdef cpu32bitalu}
  55. AWord = longword;
  56. AInt = longint;
  57. Const
  58. AIntBits = 32;
  59. {$endif cpu32bitalu}
  60. {$ifdef cpu16bitalu}
  61. AWord = Word;
  62. AInt = Smallint;
  63. Const
  64. AIntBits = 16;
  65. {$endif cpu16bitalu}
  66. {$ifdef cpu8bitalu}
  67. AWord = Byte;
  68. AInt = Shortint;
  69. Const
  70. AIntBits = 8;
  71. {$endif cpu8bitalu}
  72. Type
  73. PAWord = ^AWord;
  74. PAInt = ^AInt;
  75. { target cpu specific type used to store data sizes }
  76. ASizeInt = PInt;
  77. ASizeUInt = PUInt;
  78. { type used for handling constants etc. in the code generator }
  79. TCGInt = Int64;
  80. { This must be an ordinal type with the same size as a pointer
  81. Note: Must be unsigned! Otherwise, ugly code like
  82. pointer(-1) will result in a pointer with the value
  83. $fffffffffffffff on a 32bit machine if the compiler uses
  84. int64 constants internally (JM) }
  85. TConstPtrUInt = AWord;
  86. { Use a variant record to be sure that the array if aligned correctly }
  87. tdoublerec=record
  88. case byte of
  89. 0 : (bytes:array[0..7] of byte);
  90. 1 : (value:double);
  91. end;
  92. textendedrec=record
  93. case byte of
  94. 0 : (bytes:array[0..9] of byte);
  95. 1 : (value:extended);
  96. end;
  97. pconstset = ^tconstset;
  98. tconstset = set of 0..255;
  99. { Switches which can be changed locally }
  100. tlocalswitch = (cs_localnone,
  101. { codegen }
  102. cs_check_overflow,cs_check_range,cs_check_object,
  103. cs_check_io,cs_check_stack,
  104. cs_checkpointer,cs_check_ordinal_size,
  105. cs_generate_stackframes,cs_do_assertion,cs_generate_rtti,
  106. cs_full_boolean_eval,cs_typed_const_writable,cs_allow_enum_calc,
  107. cs_do_inline,cs_fpu_fwait,cs_ieee_errors,
  108. cs_check_low_addr_load,
  109. { mmx }
  110. cs_mmx,cs_mmx_saturation,
  111. { parser }
  112. cs_typed_addresses,cs_strict_var_strings,cs_refcountedstrings,
  113. cs_bitpacking,cs_varpropsetter,cs_scopedenums,cs_pointermath,
  114. { macpas specific}
  115. cs_external_var, cs_externally_visible,
  116. { jvm specific }
  117. cs_check_var_copyout
  118. );
  119. tlocalswitches = set of tlocalswitch;
  120. { Switches which can be changed only at the beginning of a new module }
  121. tmoduleswitch = (cs_modulenone,
  122. { parser }
  123. cs_fp_emulation,cs_extsyntax,cs_openstring,
  124. { support }
  125. cs_support_goto,cs_support_macro,
  126. cs_support_c_operators,
  127. { generation }
  128. cs_profile,cs_debuginfo,cs_compilesystem,
  129. cs_lineinfo,cs_implicit_exceptions,cs_explicit_codepage,
  130. { linking }
  131. cs_create_smart,cs_create_dynamic,cs_create_pic,
  132. { browser switches are back }
  133. cs_browser,cs_local_browser,
  134. { target specific }
  135. cs_executable_stack
  136. );
  137. tmoduleswitches = set of tmoduleswitch;
  138. { Switches which can be changed only for a whole program/compilation,
  139. mostly set with commandline }
  140. tglobalswitch = (cs_globalnone,
  141. { parameter switches }
  142. cs_check_unit_name,cs_constructor_name,cs_support_exceptions,
  143. cs_support_c_objectivepas,
  144. { units }
  145. cs_load_objpas_unit,
  146. cs_load_gpc_unit,
  147. cs_load_fpcylix_unit,
  148. cs_support_vectors,
  149. { debuginfo }
  150. cs_use_heaptrc,cs_use_lineinfo,
  151. cs_gdb_valgrind,cs_no_regalloc,cs_stabs_preservecase,
  152. { assembling }
  153. cs_asm_leave,cs_asm_extern,cs_asm_pipe,cs_asm_source,
  154. cs_asm_regalloc,cs_asm_tempalloc,cs_asm_nodes,
  155. { linking }
  156. cs_link_nolink,cs_link_static,cs_link_smart,cs_link_shared,cs_link_deffile,
  157. cs_link_strip,cs_link_staticflag,cs_link_on_target,cs_link_extern,cs_link_opt_vtable,
  158. cs_link_opt_used_sections,cs_link_separate_dbg_file,
  159. cs_link_map,cs_link_pthread,cs_link_no_default_lib_order,
  160. cs_link_native
  161. );
  162. tglobalswitches = set of tglobalswitch;
  163. { global switches specific to debug information }
  164. tdebugswitch = (ds_none,
  165. { enable set support in dwarf debug info, breaks gdb versions }
  166. { without support for that tag (they refuse to parse the rest }
  167. { of the debug information) }
  168. ds_dwarf_sets,
  169. { use absolute paths for include files in stabs. Pro: gdb }
  170. { always knows full path to file. Con: doesn't work anymore }
  171. { if the include file is moved (otherwise, things still work }
  172. { if your source hierarchy is the same, but has a different }
  173. { base path) }
  174. ds_stabs_abs_include_files,
  175. { prefix method names by "classname__" in DWARF (like is done }
  176. { for Stabs); not enabled by default, because otherwise once }
  177. { support for calling methods has been added to gdb, you'd }
  178. { always have to type classinstance.classname__methodname() }
  179. ds_dwarf_method_class_prefix
  180. );
  181. tdebugswitches = set of tdebugswitch;
  182. { global target-specific switches }
  183. ttargetswitch = (ts_none,
  184. { generate code that results in smaller TOCs than normal (AIX) }
  185. ts_small_toc,
  186. { for the JVM target: generate integer array initializations via string
  187. constants in order to reduce the generated code size (Java routines
  188. are limited to 64kb of bytecode) }
  189. ts_compact_int_array_init,
  190. { for the JVM target: intialize enum fields in constructors with the
  191. enum class instance corresponding to ordinal value 0 (not done by
  192. default because this initialization can only be performed after the
  193. inherited constructors have run, and if they call a virtual method
  194. of the current class, then this virtual method may already have
  195. initialized that field with another value and the constructor
  196. initialization will result in data loss }
  197. ts_jvm_enum_field_init
  198. );
  199. ttargetswitches = set of ttargetswitch;
  200. { adding a new entry here requires also adding the appropriate define in
  201. systemh.inc (FK)
  202. }
  203. tfeature = (
  204. f_heap,f_init_final,f_rtti,f_classes,f_exceptions,f_exitcode,
  205. f_ansistrings,f_widestrings,f_textio,f_consoleio,f_fileio,
  206. f_random,f_variants,f_objects,f_dynarrays,f_threading,f_commandargs,
  207. f_processes,f_stackcheck,f_dynlibs,f_softfpu,f_objectivec1,f_resources
  208. );
  209. tfeatures = set of tfeature;
  210. type
  211. { optimizer }
  212. toptimizerswitch = (cs_opt_none,
  213. cs_opt_level1,cs_opt_level2,cs_opt_level3,
  214. cs_opt_regvar,cs_opt_uncertain,cs_opt_size,cs_opt_stackframe,
  215. cs_opt_peephole,cs_opt_asmcse,cs_opt_loopunroll,cs_opt_tailrecursion,cs_opt_nodecse,
  216. cs_opt_nodedfa,cs_opt_loopstrength,cs_opt_scheduler,cs_opt_autoinline,cs_useebp,
  217. cs_opt_reorder_fields
  218. );
  219. toptimizerswitches = set of toptimizerswitch;
  220. { whole program optimizer }
  221. twpoptimizerswitch = (
  222. cs_wpo_devirtualize_calls,cs_wpo_optimize_vmts,
  223. cs_wpo_symbol_liveness
  224. );
  225. twpoptimizerswitches = set of twpoptimizerswitch;
  226. type
  227. { Used by ARM / AVR to differentiate between specific microcontrollers }
  228. tcontrollerdatatype = record
  229. controllertypestr, controllerunitstr: string[20];
  230. interruptvectors:integer;
  231. flashbase, flashsize, srambase, sramsize, eeprombase, eepromsize: dword;
  232. end;
  233. const
  234. OptimizerSwitchStr : array[toptimizerswitch] of string[11] = ('',
  235. 'LEVEL1','LEVEL2','LEVEL3',
  236. 'REGVAR','UNCERTAIN','SIZE','STACKFRAME',
  237. 'PEEPHOLE','ASMCSE','LOOPUNROLL','TAILREC','CSE',
  238. 'DFA','STRENGTH','SCHEDULE','AUTOINLINE','USEEBP',
  239. 'ORDERFIELDS'
  240. );
  241. WPOptimizerSwitchStr : array [twpoptimizerswitch] of string[14] = (
  242. 'DEVIRTCALLS','OPTVMTS','SYMBOLLIVENESS'
  243. );
  244. DebugSwitchStr : array[tdebugswitch] of string[22] = ('',
  245. 'DWARFSETS','STABSABSINCLUDES','DWARFMETHODCLASSPREFIX');
  246. TargetSwitchStr : array[ttargetswitch] of string[19] = ('',
  247. 'SMALLTOC',
  248. 'COMPACTINTARRAYINIT',
  249. 'ENUMFIELDINIT');
  250. { switches being applied to all CPUs at the given level }
  251. genericlevel1optimizerswitches = [cs_opt_level1];
  252. genericlevel2optimizerswitches = [cs_opt_level2];
  253. genericlevel3optimizerswitches = [cs_opt_level3];
  254. { whole program optimizations whose information generation requires
  255. information from all loaded units
  256. }
  257. WPOptimizationsNeedingAllUnitInfo = [cs_wpo_devirtualize_calls,cs_wpo_optimize_vmts];
  258. featurestr : array[tfeature] of string[12] = (
  259. 'HEAP','INITFINAL','RTTI','CLASSES','EXCEPTIONS','EXITCODE',
  260. 'ANSISTRINGS','WIDESTRINGS','TEXTIO','CONSOLEIO','FILEIO',
  261. 'RANDOM','VARIANTS','OBJECTS','DYNARRAYS','THREADING','COMMANDARGS',
  262. 'PROCESSES','STACKCHECK','DYNLIBS','SOFTFPU','OBJECTIVEC1','RESOURCES'
  263. );
  264. type
  265. { Switches which can be changed by a mode (fpc,tp7,delphi) }
  266. tmodeswitch = (m_none,m_all, { needed for keyword }
  267. { generic }
  268. m_fpc,m_objfpc,m_delphi,m_tp7,m_mac,m_iso,
  269. {$ifdef fpc_mode}m_gpc,{$endif}
  270. { more specific }
  271. m_class, { delphi class model }
  272. m_objpas, { load objpas unit }
  273. m_result, { result in functions }
  274. m_string_pchar, { pchar 2 string conversion }
  275. m_cvar_support, { cvar variable directive }
  276. m_nested_comment, { nested comments }
  277. m_tp_procvar, { tp style procvars (no @ needed) }
  278. m_mac_procvar, { macpas style procvars }
  279. m_repeat_forward, { repeating forward declarations is needed }
  280. m_pointer_2_procedure, { allows the assignement of pointers to
  281. procedure variables }
  282. m_autoderef, { does auto dereferencing of struct. vars }
  283. m_initfinal, { initialization/finalization for units }
  284. m_default_ansistring, { ansistring turned on by default }
  285. m_out, { support the calling convention OUT }
  286. m_default_para, { support default parameters }
  287. m_hintdirective, { support hint directives }
  288. m_duplicate_names, { allow locals/paras to have duplicate names of globals }
  289. m_property, { allow properties }
  290. m_default_inline, { allow inline proc directive }
  291. m_except, { allow exception-related keywords }
  292. m_objectivec1, { support interfacing with Objective-C (1.0) }
  293. m_objectivec2, { support interfacing with Objective-C (2.0) }
  294. m_nested_procvars, { support nested procedural variables }
  295. m_non_local_goto, { support non local gotos (like iso pascal) }
  296. m_advanced_records, { advanced record syntax with visibility sections, methods and properties }
  297. m_isolike_unary_minus, { unary minus like in iso pascal: same precedence level as binary minus/plus }
  298. m_systemcodepage, { use system codepage as compiler codepage by default, emit ansistrings with system codepage }
  299. m_final_fields, { allows declaring fields as "final", which means they must be initialised
  300. in the (class) constructor and are constant from then on (same as final
  301. fields in Java) }
  302. m_default_unicodestring { makes the default string type in $h+ mode unicodestring rather than
  303. ansistring; similarly, char becomes unicodechar rather than ansichar }
  304. );
  305. tmodeswitches = set of tmodeswitch;
  306. { Win32, OS/2 & MacOS application types }
  307. tapptype = (
  308. app_none,
  309. app_native,
  310. app_gui, { graphic user-interface application}
  311. app_cui, { console application}
  312. app_fs, { full-screen type application (OS/2 and EMX only) }
  313. app_tool, { tool application, (MPW tool for MacOS, MacOS only)}
  314. app_arm7,
  315. app_arm9,
  316. app_bundle { dynamically loadable bundle, Darwin only }
  317. );
  318. { interface types }
  319. tinterfacetypes = (
  320. it_interfacecom,
  321. it_interfacecorba,
  322. it_interfacejava
  323. );
  324. { currently parsed block type }
  325. tblock_type = (
  326. bt_none, { not assigned }
  327. bt_general, { default }
  328. bt_type, { type section }
  329. bt_const, { const section }
  330. bt_const_type, { const part of type. e.g.: ": Integer = 1" }
  331. bt_var, { variable declaration }
  332. bt_var_type, { type of variable }
  333. bt_except, { except section }
  334. bt_body { procedure body }
  335. );
  336. { Temp types }
  337. ttemptype = (tt_none,
  338. { free temp location, can be reused for something else }
  339. tt_free,
  340. { temp location that will be freed when ttgobj.UnGetTemp/
  341. ttgobj.UnGetIfTemp is called on it }
  342. tt_normal,
  343. { temp location that will not be freed; if it has to be
  344. freed, first ttgobj.changetemptype() it to tt_normal,
  345. or call ttgobj.UnGetLocal() instead (for local variables,
  346. since they are also persistent temps) }
  347. tt_persistent,
  348. { temp location that can never be reused anymore, even
  349. after it has been freed }
  350. tt_noreuse,
  351. { freed version of the above }
  352. tt_freenoreuse,
  353. { temp location that has been allocated by the register
  354. allocator and that can be reallocated only by the
  355. register allocator }
  356. tt_regallocator,
  357. { freed version of the above }
  358. tt_freeregallocator);
  359. ttemptypeset = set of ttemptype;
  360. { calling convention for tprocdef and tprocvardef }
  361. tproccalloption=(pocall_none,
  362. { procedure uses C styled calling }
  363. pocall_cdecl,
  364. { C++ calling conventions }
  365. pocall_cppdecl,
  366. { Far16 for OS/2 }
  367. pocall_far16,
  368. { Old style FPC default calling }
  369. pocall_oldfpccall,
  370. { Procedure has compiler magic}
  371. pocall_internproc,
  372. { procedure is a system call, applies e.g. to MorphOS and PalmOS }
  373. pocall_syscall,
  374. { pascal standard left to right }
  375. pocall_pascal,
  376. { procedure uses register (fastcall) calling }
  377. pocall_register,
  378. { safe call calling conventions }
  379. pocall_safecall,
  380. { procedure uses stdcall call }
  381. pocall_stdcall,
  382. { Special calling convention for cpus without a floating point
  383. unit. Floating point numbers are passed in integer registers
  384. instead of floating point registers. Depending on the other
  385. available calling conventions available for the cpu
  386. this replaces either pocall_fastcall or pocall_stdcall.
  387. }
  388. pocall_softfloat,
  389. { Metrowerks Pascal. Special case on Mac OS (X): passes all }
  390. { constant records by reference. }
  391. pocall_mwpascal,
  392. { Special interrupt handler for embedded systems }
  393. pocall_interrupt
  394. );
  395. tproccalloptions = set of tproccalloption;
  396. const
  397. proccalloptionStr : array[tproccalloption] of string[14]=('',
  398. 'CDecl',
  399. 'CPPDecl',
  400. 'Far16',
  401. 'OldFPCCall',
  402. 'InternProc',
  403. 'SysCall',
  404. 'Pascal',
  405. 'Register',
  406. 'SafeCall',
  407. 'StdCall',
  408. 'SoftFloat',
  409. 'MWPascal',
  410. 'Interrupt'
  411. );
  412. { Default calling convention }
  413. {$ifdef x86}
  414. pocall_default = pocall_register;
  415. {$else}
  416. pocall_default = pocall_stdcall;
  417. {$endif}
  418. cstylearrayofconst = [pocall_cdecl,pocall_cppdecl,pocall_mwpascal];
  419. modeswitchstr : array[tmodeswitch] of string[18] = ('','',
  420. '','','','','','',
  421. {$ifdef fpc_mode}'',{$endif}
  422. { more specific }
  423. 'CLASS',
  424. 'OBJPAS',
  425. 'RESULT',
  426. 'PCHARTOSTRING',
  427. 'CVAR',
  428. 'NESTEDCOMMENTS',
  429. 'CLASSICPROCVARS',
  430. 'MACPROCVARS',
  431. 'REPEATFORWARD',
  432. 'POINTERTOPROCVAR',
  433. 'AUTODEREF',
  434. 'INITFINAL',
  435. 'ANSISTRINGS',
  436. 'OUT',
  437. 'DEFAULTPARAMETERS',
  438. 'HINTDIRECTIVE',
  439. 'DUPLICATELOCALS',
  440. 'PROPERTIES',
  441. 'ALLOWINLINE',
  442. 'EXCEPTIONS',
  443. 'OBJECTIVEC1',
  444. 'OBJECTIVEC2',
  445. 'NESTEDPROCVARS',
  446. 'NONLOCALGOTO',
  447. 'ADVANCEDRECORDS',
  448. 'ISOUNARYMINUS',
  449. 'SYSTEMCODEPAGE',
  450. 'FINALFIELDS',
  451. 'UNICODESTRINGS');
  452. type
  453. tprocinfoflag=(
  454. { procedure has at least one assembler block }
  455. pi_has_assembler_block,
  456. { procedure does a call }
  457. pi_do_call,
  458. { procedure has a try statement = no register optimization }
  459. pi_uses_exceptions,
  460. { procedure is declared as @var(assembler), don't optimize}
  461. pi_is_assembler,
  462. { procedure contains data which needs to be finalized }
  463. pi_needs_implicit_finally,
  464. { procedure has the implicit try..finally generated }
  465. pi_has_implicit_finally,
  466. { procedure uses fpu}
  467. pi_uses_fpu,
  468. { procedure uses GOT for PIC code }
  469. pi_needs_got,
  470. { references var/proc/type/const in static symtable,
  471. i.e. not allowed for inlining from other units }
  472. pi_uses_static_symtable,
  473. { set if the procedure has to push parameters onto the stack }
  474. pi_has_stackparameter,
  475. { set if the procedure has at least one label }
  476. pi_has_label,
  477. { calls itself recursive }
  478. pi_is_recursive,
  479. { stack frame optimization not possible (only on x86 probably) }
  480. pi_needs_stackframe,
  481. { set if the procedure has at least one register saved on the stack }
  482. pi_has_saved_regs,
  483. { dfa was generated for this proc }
  484. pi_dfaavailable,
  485. { subroutine contains interprocedural used labels }
  486. pi_has_interproclabel,
  487. { subroutine has unwind info (win64) }
  488. pi_has_unwind_info,
  489. { subroutine contains interprocedural gotos }
  490. pi_has_global_goto,
  491. { subroutine contains inherited call }
  492. pi_has_inherited
  493. );
  494. tprocinfoflags=set of tprocinfoflag;
  495. type
  496. { float types -- warning, this enum/order is used internally by the RTL
  497. as well in rtl/inc/real2str.inc }
  498. tfloattype = (
  499. s32real,s64real,s80real,sc80real { the C "long double" type on x86 },
  500. s64comp,s64currency,s128real
  501. );
  502. type
  503. { register allocator live range extension direction }
  504. TRADirection = (rad_forward, rad_backwards, rad_backwards_reinit);
  505. type
  506. TIDString = string[maxidlen];
  507. tnormalset = set of byte; { 256 elements set }
  508. pnormalset = ^tnormalset;
  509. pboolean = ^boolean;
  510. pdouble = ^double;
  511. pbyte = ^byte;
  512. pword = ^word;
  513. plongint = ^longint;
  514. plongintarray = plongint;
  515. pfileposinfo = ^tfileposinfo;
  516. tfileposinfo = record
  517. { if types of column or fileindex are changed, modify tcompilerppufile.putposinfo }
  518. line : longint;
  519. column : word;
  520. fileindex : word;
  521. moduleindex : word;
  522. end;
  523. {$ifndef xFPC}
  524. type
  525. pguid = ^tguid;
  526. tguid = packed record
  527. D1: LongWord;
  528. D2: Word;
  529. D3: Word;
  530. D4: array[0..7] of Byte;
  531. end;
  532. {$endif}
  533. tstringencoding = Word;
  534. tcodepagestring = string[20];
  535. const
  536. { link options }
  537. link_none = $0;
  538. link_always = $1;
  539. link_static = $2;
  540. link_smart = $4;
  541. link_shared = $8;
  542. type
  543. { a message state }
  544. tmsgstate = (
  545. ms_on := 1,
  546. ms_off := 2,
  547. ms_error := 3,
  548. ms_on_global := $11, // turn on output
  549. ms_off_global := $22, // turn off output
  550. ms_error_global := $33 // cast to error
  551. );
  552. const
  553. { Mask for current value of message state }
  554. ms_local_mask = $0f;
  555. { Mask for global value of message state
  556. that needs to be restored when changing units }
  557. ms_global_mask = $f0;
  558. { Shift used to convert global to local message state }
  559. ms_shift = 4;
  560. type
  561. pmessagestaterecord = ^tmessagestaterecord;
  562. tmessagestaterecord = record
  563. next : pmessagestaterecord;
  564. value : longint;
  565. state : tmsgstate;
  566. end;
  567. { hide Sysutils.ExecuteProcess in units using this one after SysUtils}
  568. const
  569. ExecuteProcess = 'Do not use' deprecated 'Use cfileutil.RequotedExecuteProcess instead, ExecuteProcess cannot deal with single quotes as used by Unix command lines';
  570. implementation
  571. end.