1** THIS FILE IS MACHINE GENERATED DO NOT EDIT!! 2** created from 3** by $Id: host.awk,v 1.2 2002-01-09 19:49:17 phil Exp $ 4** 5** perhaps values should be in a FROZEN() TABLE()? 6 7* /* $Id: host.h,v 1.24 2020-12-05 20:09:35 phil Exp $ */ 8 9 10* /* 11* * HOST() function codes 12* */ 13 14* /* 15* **=pea 16* **=sect NAME 17* **snobol4host \- SNOBOL4 host O/S functions 18* ** 19* **=sect SYNOPSIS 20* **=code 21* **-INCLUDE 'host.sno' 22* **=ecode 23* **=sect DESCRIPTION 24* **=cut 25* */ 26 27* /* 28* **=pea 29* **=item B<HOST()> 30* **Macro SPITBOL: returns ARCHITECTURE:OPERATING_SYSTEM:SNOBOL_VERSION 31* **The string contains three parts, separated by colons. The first 32* **part describes the physical architecture, the second describes the 33* **operating system, and the third describes the language 34* **implementation name and version. NOTE! Architecture names come from 35* **the B<uname>(3) library call, and may be different for the same 36* **hardware when running different operating systems. Examples: 37* **=break 38* **\~\~\~\~B<amd64:FreeBSD 12.1-RELEASE-p1:CSNOBOL4B 2.2> 39* **=break 40* **\~\~\~\~B<x86_64:Linux 5.4.0-12-generic:CSNOBOL4B 2.2> 41* **=cut 42* */ 43 HOST_SYSINFO = "" 44 45* /* 46* **=pea 47* **=item B<HOST(0)> 48* **Macro SPITBOL: returns a string containing the command line parameter 49* **supplied to the B<-u> option, if any. If no B<-u> option was given, 50* **B<HOST(0)> returns the concatenation of all user parameters following 51* **the input filename(s). 52* **=cut 53* */ 54 HOST_PARAMS = 0 55 56* /* 57* **=pea 58* **=item B<HOST(1>, I<string>B<)> 59* **Catspaw SPITBOL: passes the string to the B<system>(3) C 60* **library function, and returns the subprocess exit status. 61* **=cut 62* */ 63 HOST_SYSCMD = 1 64 65* /* 66* **=pea 67* **=item B<HOST(2,> I<n>B<)> 68* **Catspaw SPITBOL: for integer I<n> returns the I<n>'th command line 69* **argument (regardless of whether the argument was the command name, an 70* **option, a filename or a user parameter) as a string, or failure if 71* **I<n> is out of range. 72* **=cut 73* */ 74 HOST_ARGN = 2 75 76* /* 77* **=pea 78* **=item B<HOST(3)> 79* **Catspaw SPITBOL: returns an integer for use with B<HOST(2)> indicating the 80* **first command line argument available as a user parameter. 81* **=cut 82* */ 83 HOST_FIRSTARG = 3 84 85* /* 86* **=pea 87* **=item B<HOST(4, I<string>B<)> 88* **Catspaw SPITBOL: returns the value of the environment variable 89* **named by I<string>. 90* **=cut 91* */ 92 HOST_GETENV = 4 93 94* /***************** 95* * CSNOBOL4 Extensions 96* */ 97 98 99* /***** 100* * configuration variables, from config.h (written by autoconf script) 101* */ 102 103* /* CSNOBOL4: returns "config.guess" output (arch-vendor-os) */ 104* #define HOST_CONFIG_GUESS 2000 /* obsolete */ 105 HOST_CONFIG_GUESS = 2000 106 107* /* 108* **=pea 109* **=item B<HOST(HOST_CONFIG_HOST)> 110* **CSNOBOL4: returns host where configure script was run 111* **=cut 112* */ 113 HOST_CONFIG_HOST = 2001 114 115* /* 116* **=item B<HOST(HOST_CONFIG_DATE)> 117* **CSNOBOL4: returns date when configure script was run 118* **=cut 119* */ 120 HOST_CONFIG_DATE = 2002 121 122* /* 123* **=pea 124* **=item B<HOST(HOST_CONFIG_OPTIONS)> 125* **CSNOBOL4: returns configure command line options (or fails) 126* **=cut 127* */ 128 HOST_CONFIG_OPTIONS = 2003 129 130* /* 131* **=pea 132* **=item B<HOST(HOST_VERSION_DATE)> 133* **CSNOBOL4: version date (from configure script) 134* **=cut 135* */ 136 HOST_VERSION_DATE = 2004 137 138* /* 139* **=pea 140* **=item B<HOST(HOST_CC_IS)> 141* **CSNOBOL4: C compiler name/id 142* **=cut 143* */ 144 HOST_CC_IS = 2005 145 146* /***** 147* * variables from build.c, created before linking snobol4 executable 148* */ 149 150* /* 151* **=pea 152* **=item B<HOST(HOST_BUILD_DATE)> 153* **CSNOBOL4: returns date when snobol4 built 154* **=cut 155* */ 156 HOST_BUILD_DATE = 2100 157 158* /* 159* **=pea 160* **=item B<HOST(HOST_BUILD_DIR)> 161* **CSNOBOL4: returns directory where snobol4 built 162* **=cut 163* */ 164 HOST_BUILD_DIR = 2101 165 166* /* 167* **=pea 168* **=item B<HOST(HOST_BUILD_FILES)> 169* **CSNOBOL4: returns named of files ued to build snobol4 170* **=cut 171* */ 172 HOST_BUILD_FILES = 2102 173 174* /***** 175* * defines, from Makefile 176* */ 177 178* /* 179* **=pea 180* **=item B<HOST(HOST_SNOLIB_DIR)> 181* **CSNOBOL4: return default SNOLIB directory (for -INCLUDE, LOAD()) 182* **=cut 183* */ 184 HOST_SNOLIB_DIR = 2200 185 186* /* 187* **=pea 188* **=item B<HOST(HOST_SNOLIB_FILE)> 189* **CSNOBOL4: return default file for LOAD() 190* **=cut 191* */ 192 HOST_SNOLIB_FILE = 2201 193 194* /* 195* **=pea 196* **=item B<HOST(HOST_CC)> 197* **CSNOBOL4: C Compiler used to build CSNOBOL4 198* **=cut 199* */ 200 HOST_CC = 2202 201 202* /* 203* **=pea 204* **=item B<HOST(HOST_COPT)> 205* **CSNOBOL4: C Compiler optimizer flags used to build CSNOBOL4 206* **=cut 207* */ 208 HOST_COPT = 2203 209 210* /* 211* **=pea 212* **=item B<HOST(HOST_SO_EXT)> 213* **CSNOBOL4: Shared Object Library extension 214* **=cut 215* */ 216 HOST_SO_EXT = 2204 217 218* /* 219* **=pea 220* **=item B<HOST(HOST_SO_CFLAGS)> 221* **CSNOBOL4: C Compiler flags for Shared Objects 222* **=cut 223* */ 224 HOST_SO_CFLAGS = 2205 225 226* /* 227* **=pea 228* **=item B<HOST(HOST_SO_LD)> 229* **CSNOBOL4: Shared Object file load command 230* **=cut 231* */ 232 HOST_SO_LD = 2206 233 234* /* 235* **=pea 236* **=item B<HOST(HOST_SO_LDFLAGS)> 237* **CSNOBOL4: Shared Object file load switches 238* **=cut 239* */ 240 HOST_SO_LDFLAGS = 2207 241 242* /* 243* **=pea 244* **=item B<HOST(HOST_DL_EXT)> 245* **CSNOBOL4: Dynamic Loadable Library extension 246* **=cut 247* */ 248 HOST_DL_EXT = 2208 249 250* /* 251* **=pea 252* **=item B<HOST(HOST_DL_CFLAGS)> 253* **CSNOBOL4: C Compiler flags for Dynamic Loadables 254* **=cut 255* */ 256 HOST_DL_CFLAGS = 2209 257 258* /* 259* **=pea 260* **=item B<HOST(HOST_DL_LD)> 261* **CSNOBOL4: Dynamic Loadable file load command 262* **=cut 263* */ 264 HOST_DL_LD = 2210 265 266* /* 267* **=pea 268* **=item B<HOST(HOST_DL_LDFLAGS)> 269* **CSNOBOL4: Dynamic Loadable file load switches 270* **=cut 271* */ 272 HOST_DL_LDFLAGS = 2211 273 274* /* 275* **=pea 276* **=item B<HOST(HOST_DIR_SEP)> 277* **CSNOBOL4: return system directory seperator character (may be empty) 278* **=cut 279* */ 280 HOST_DIR_SEP = 2212 281 282* /* 283* **=pea 284* **=item B<HOST(HOST_PATH_SEP)> 285* **CSNOBOL4: return system PATH seperator character 286* **=cut 287* */ 288 HOST_PATH_SEP = 2213 289 290* /* 291* **=pea 292* **=item B<HOST(HOST_DEF_SNOPATH)> 293* **CSNOBOL4: default library search path 294* **=cut 295* */ 296 HOST_DEF_SNOPATH = 2214 297 298* /* 299* **=pea 300* **=item B<HOST(HOST_INCLUDE_DIR)> 301* **CSNOBOL4: path for C headers 302* **=cut 303* */ 304 HOST_INCLUDE_DIR = 2215 305 306* /* 307* **=pea 308* **=item B<HOST(HOST_OBJ_EXT)> 309* **CSNOBOL4: object file extension 310* **=cut 311* */ 312 HOST_OBJ_EXT = 2216 313 314* /* 315* **=pea 316* **=item B<HOST(HOST_SETUP_SYS)> 317* **CSNOBOL4: setuputil system name 318* **=cut 319* */ 320 HOST_SETUP_SYS = 2217 321 322* /* 323* **=pea 324* **=item B<HOST(HOST_SHARED_OBJ_SUBDIR)> 325* **CSNOBOL4: shared object subdir 326* **=cut 327* */ 328 HOST_SHARED_OBJ_SUBDIR = 2218 329 330* /* 331* **=pea 332* **=item B<HOST(HOST_CONFIG_CFLAGS)> 333* **CSNOBOL4: CFLAGS from configure 334* **=cut 335* */ 336 HOST_CONFIG_CFLAGS = 2219 337 338* /* 339* **=pea 340* **=item B<HOST(HOST_CONFIG_CPPFLAGS)> 341* **CSNOBOL4: C preprocessor flags from configure 342* **=cut 343* */ 344 HOST_CONFIG_CPPFLAGS = 2220 345 346* /* 347* **=pea 348* **=item B<HOST(HOST_CONFIG_LDFLAGS)> 349* **CSNOBOL4: loader flags from configure 350* **=cut 351* */ 352 HOST_CONFIG_LDFLAGS = 2221 353 354* /***** 355* * integer constants; 356* */ 357 358* /* 359* **=pea 360* **=item B<HOST(HOST_INTEGER_BITS)> 361* **CSNOBOL4: number of bits used to represent SNOBOL4 INTEGER type 362* **=cut 363* */ 364 HOST_INTEGER_BITS = 2300 365 366* /* 367* **=pea 368* **=item B<HOST(HOST_REAL_BITS)> 369* **CSNOBOL4: number of bits used to represent SNOBOL4 REAL type 370* **=cut 371* */ 372 HOST_REAL_BITS = 2301 373 374* /* 375* **=pea 376* **=item B<HOST(HOST_POINTER_BITS)> 377* **CSNOBOL4: number of bits used to represent C pointer type 378* **=cut 379* */ 380 HOST_POINTER_BITS = 2302 381 382* /* 383* **=pea 384* **=item B<HOST(HOST_LONG_BITS)> 385* **CSNOBOL4: number of bits used to represent C long type 386* **=cut 387* */ 388 HOST_LONG_BITS = 2303 389 390* /* 391* **=pea 392* **=item B<HOST(HOST_DESCR_BITS)> 393* **CSNOBOL4: number of bits used to represent SIL "descriptor" type 394* **=cut 395* */ 396 HOST_DESCR_BITS = 2304 397 398* /* 399* **=pea 400* **=item B<HOST(HOST_SPEC_BITS)> 401* **CSNOBOL4: number of bits used to represent SIL "specifier" type 402* **=cut 403* */ 404 HOST_SPEC_BITS = 2305 405 406* /* 407* **=pea 408* **=item B<HOST(HOST_CHAR_BITS)> 409* **CSNOBOL4: number of bits used to represent C char type 410* **=cut 411* */ 412 HOST_CHAR_BITS = 2306 413 414* /***** 415* * integer variables; 416* */ 417 418* /* 419* **=pea 420* **=item B<HOST(HOST_DYNAMIC_SIZE)> 421* **CSNOBOL4: size of "dynamic" storage in descriptors 422* **=cut 423* */ 424 HOST_DYNAMIC_SIZE = 2400 425 426* /* 427* **=pea 428* **=item B<HOST(HOST_PMSTACK_SIZE)> 429* **CSNOBOL4: size of pattern match stack in descriptors 430* **=cut 431* */ 432 HOST_PMSTACK_SIZE = 2401 433 434* /* 435* **=pea 436* **=item B<HOST(HOST_ISTACK_SIZE)> 437* **CSNOBOL4: size of interpreter stack in descriptors 438* **=cut 439* */ 440 HOST_ISTACK_SIZE = 2402 441 442* /***** 443* * string variables; 444* */ 445 446* /* 447* **=pea 448* **=item B<HOST(HOST_SNOLIB_BASE)> 449* **CSNOBOL4: library base directory in use 450* **=cut 451* */ 452 HOST_SNOLIB_BASE = 2500 453 454* /* 455* **=pea 456* **=item B<HOST(HOST_SNOLIB_LOCAL)> 457* **CSNOBOL4: local, version-independant files 458* **=cut 459* */ 460 HOST_SNOLIB_LOCAL = 2501 461 462* /* 463* **=pea 464* **=item B<HOST(HOST_SNOLIB_VLIB)> 465* **CSNOBOL4: distribution files (version-specific) 466* **=cut 467* */ 468 HOST_SNOLIB_VLIB = 2502 469 470* /* 471* **=pea 472* **=item B<HOST(HOST_SNOLIB_VLOCAL)> 473* **CSNOBOL4: local, version-specific files 474* **=cut 475* */ 476 HOST_SNOLIB_VLOCAL = 2503 477 478* /* 479* **=pea 480* **=item B<HOST(HOST_SNOPATH_DIR)> 481* **CSNOBOL4: return n'th element in search directory list 482* **=cut 483* */ 484 HOST_SNOPATH_DIR = 2504 485 486* /* 487* **=pea 488* **=item B<HOST(HOST_SNOLIB_VERS)> 489* **CSNOBOL4: versioned base directory 490* **=cut 491* */ 492 HOST_SNOLIB_VERS = 2505 493 494* /* 495* * NOTE!! All of the above 2xxx values are related to internals, and 496* * the build environment. Perhaps it should be kept that way, and 497* * other values added in a different range? 498* */ 499 500* /* 501* * if you MUST add something to host.c (instead of creating a new 502* * dynamicly loaded extension), use codes starting here, to avoid 503* * conflicts with future CSNOBOL4 extensions: 504* */ 505 HOST_USER_EXTENSIONS = 10000 506 507* /* 508* **=pea 509* **=sect SEE ALSO 510* **B<snobol4>(1), 511* **B<snobol4func>(1). 512* **=cut 513* */ 514