1 /* 2 * The Regina Rexx Interpreter 3 * Copyright (C) 1992-1994 Anders Christensen <anders@pvv.unit.no> 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Library General Public 7 * License as published by the Free Software Foundation; either 8 * version 2 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Library General Public License for more details. 14 * 15 * You should have received a copy of the GNU Library General Public 16 * License along with this library; if not, write to the Free 17 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 */ 19 /* 20 * For platforms that don't use autoconf, put these here... 21 */ 22 #define HAVE_ASSERT_H 1 23 #define HAVE_ERRNO_H 1 24 #define HAVE_CTYPE_H 1 25 #define HAVE_STDARG_H 1 26 #define HAVE_SYS_STAT_H 1 27 28 #if defined(DOS) && defined(EMX) 29 # define HAVE_ALLOCA_H 1 30 # define HAVE_FTIME 1 31 # define HAVE_MATH_H 1 32 # define HAVE_RANDOM 1 33 #undef HAVE_RANDOM /* needs bsd support and linking with -lbsd */ 34 # define HAVE_SIGACTION 1 35 # define HAVE_STDIO_H 1 36 # define HAVE_SYS_TIME_H 1 37 # define HAVE_SYSCONF 1 38 # define HAVE_TERMIOS_H 1 39 # define HAVE_TIME_H 1 40 # define HAVE_FCNTL_H 1 41 # define HAVE_GRP_H 1 42 # define HAVE_PWD_H 1 43 # define HAVE_LIMITS_H 1 44 # define HAVE_MALLOC_H 1 45 # define HAVE_SETJMP_H 1 46 # define HAVE_SIGNAL_H 1 47 # define HAVE_STDLIB_H 1 48 # define HAVE_STRING_H 1 49 # define HAVE_UNISTD_H 1 50 # define HAVE_SYS_SOCKET_H 1 51 # define HAVE_NETINET_IN_H 1 52 # define HAVE_SYS_SELECT_H 1 53 # define HAVE_NETDB_H 1 54 # define HAVE_ARPA_INET_H 1 55 # define HAVE__FULLPATH 1 56 # define HAVE_PUTENV 1 57 # define HAVE_GETTIMEOFDAY 1 58 # define HAVE_FTRUNCATE 1 59 # define HAVE_MEMCPY 1 60 # define HAVE_MEMMOVE 1 61 # define HAVE_STRERROR 1 62 # define HAVE_VSPRINTF 1 63 # define HAVE_GETPID 1 64 # define TIME_WITH_SYS_TIME 1 65 # define HAVE_DIV 1 66 # define HAVE_RAISE 1 67 #endif 68 69 #if defined(OS2) && defined(EMX) 70 # define HAVE_ALLOCA_H 1 71 # define HAVE_FTIME 1 72 # define HAVE_MATH_H 1 73 # define HAVE_RANDOM 1 74 #undef HAVE_RANDOM /* needs bsd support and linking with -lbsd */ 75 # define HAVE_SIGACTION 1 76 # define HAVE_STDIO_H 1 77 # define HAVE_SYS_TIME_H 1 78 # define HAVE_SYS_STAT_H 1 79 # define HAVE_SYS_TYPES_H 1 80 # define HAVE_SYSCONF 1 81 # define HAVE_TERMIOS_H 1 82 # define HAVE_TIME_H 1 83 # define HAVE_FCNTL_H 1 84 # define HAVE_GRP_H 1 85 # define HAVE_PWD_H 1 86 # define HAVE_LIMITS_H 1 87 # define HAVE_PROCESS_H 1 88 # define HAVE_MALLOC_H 1 89 # define HAVE_SETJMP_H 1 90 # define HAVE_SIGNAL_H 1 91 # define HAVE_STDLIB_H 1 92 # define HAVE_STDINT_H 1 93 # define HAVE_STRING_H 1 94 # define HAVE_UNISTD_H 1 95 # define HAVE_SYS_SOCKET_H 1 96 # define HAVE_NETINET_IN_H 1 97 # define HAVE_SYS_SELECT_H 1 98 # define HAVE_NETDB_H 1 99 # define HAVE_ARPA_INET_H 1 100 # define HAVE__FULLPATH 1 101 # define HAVE_PUTENV 1 102 # define HAVE_GETTIMEOFDAY 1 103 # define HAVE_FTRUNCATE 1 104 # define HAVE_MEMCPY 1 105 # define HAVE_MEMMOVE 1 106 # define HAVE_STRERROR 1 107 # define HAVE_VSPRINTF 1 108 # define HAVE_GETPID 1 109 # define HAVE_DIV 1 110 # define HAVE_RAISE 1 111 # define TIME_WITH_SYS_TIME 1 112 # if defined(DYNAMIC) 113 # define DYNAMIC_OS2 114 # endif 115 #endif 116 117 #if defined(OS2) && defined(__IBMC__) 118 # define HAVE_SETJMP_H 119 # define HAVE__FULLPATH 120 # define HAVE_PUTENV 121 # define HAVE_GETTIMEOFDAY 122 # define HAVE_FTRUNCATE 123 # define HAVE_MEMCPY 124 # define HAVE_MEMMOVE 125 # define HAVE_STRERROR 126 # define HAVE_VSPRINTF 127 # define HAVE_GETPID 128 # define HAVE_DIV 129 # define HAVE_RAISE 130 # define TIME_WITH_SYS_TIME 131 #endif 132 133 #if defined(OS2) && defined(__WATCOMC__) 134 # define HAVE_ARPA_INET_H /* at least OpenWatcom */ 135 # define HAVE_DIRECT_H 136 # define HAVE_DIV 137 # define HAVE_FCNTL_H 138 # define HAVE_FTIME 139 # define HAVE_GETPID 140 # define HAVE_MALLOC_H 141 # define HAVE_MEMCPY 142 # define HAVE_MEMMOVE 143 # define HAVE_NETDB_H /* at least OpenWatcom */ 144 # define HAVE_NETINET_IN_H /* at least OpenWatcom */ 145 # define HAVE_PROCESS_H /* at least OpenWatcom */ 146 # define HAVE_PUTENV 147 # define HAVE_RAISE 148 # define HAVE_SETENV 149 # define HAVE_SETJMP_H 150 # define HAVE_PROCESS_H 151 # define HAVE_SIGNAL_H 152 # define HAVE_STRERROR 153 # define HAVE_STRING_H 154 # define HAVE_SYS_SELECT_H /* at least OpenWatcom */ 155 # define HAVE_SYS_SOCKET_H /* at least OpenWatcom */ 156 # define HAVE_TYPES_H 157 # define HAVE_UNISTD_H 158 # define HAVE_VSPRINTF 159 # define HAVE__FULLPATH 160 # define HAVE__SPLITPATH2 161 # if defined(DYNAMIC) 162 # define DYNAMIC_OS2 163 # endif 164 #endif 165 166 #if defined(WIN32) && defined(__WATCOMC__) 167 # define HAVE_ARPA_INET_H /* at least OpenWatcom */ 168 # define HAVE_DIRECT_H 169 # define HAVE_DIV 170 # define HAVE_FCNTL_H 171 # define HAVE_FTIME 172 # define HAVE_GETPID 173 # define HAVE_MALLOC_H 174 # define HAVE_MEMCPY 175 # define HAVE_MEMMOVE 176 # define HAVE_NETDB_H /* at least OpenWatcom */ 177 # define HAVE_NETINET_IN_H /* at least OpenWatcom */ 178 # define HAVE_PROCESS_H /* at least OpenWatcom */ 179 # define HAVE_PUTENV 180 # define HAVE_RAISE 181 # define HAVE_SETENV 182 # define HAVE_SETJMP_H 183 # define HAVE_SIGNAL_H 184 # define HAVE_STRERROR 185 # define HAVE_STRING_H 186 # define HAVE_SYS_SELECT_H /* at least OpenWatcom */ 187 # define HAVE_SYS_SOCKET_H /* at least OpenWatcom */ 188 # define HAVE_TYPES_H 189 # define HAVE_UNISTD_H 190 # define HAVE_VSPRINTF 191 # define HAVE__FULLPATH 192 # define HAVE__SPLITPATH2 193 # if defined(DYNAMIC) 194 # define DYNAMIC_WIN32 195 # endif 196 # define HAVE_I64U 197 # define HAVE__STATI64 198 # define HAVE__ATOI64 199 #endif 200 201 #if defined(DOS) && defined(__WATCOMC__) 202 # define HAVE_MALLOC_H 203 # define HAVE_SETJMP_H 204 # define HAVE_SIGNAL_H 205 # define HAVE_UNISTD_H 206 # define HAVE_STRING_H 207 # define HAVE_FTIME 208 # define HAVE_FCNTL_H 209 # define HAVE_PROCESS_H /* at least OpenWatcom */ 210 # define HAVE__FULLPATH 211 # define HAVE__SPLITPATH2 212 /* # define HAVE_FTRUNCATE */ 213 # define HAVE_MEMCPY 214 # define HAVE_MEMMOVE 215 # define HAVE_SETENV 216 # define HAVE_STRERROR 217 # define HAVE_VSPRINTF 218 # define HAVE_GETPID 219 # define HAVE_DIV 220 # define HAVE_RAISE 221 /* statically link Regutil */ 222 # define HAVE_REXXUTIL_PACKAGE 223 #endif 224 225 #if defined(WIN32) && defined(_MSC_VER) 226 # define HAVE_FCNTL_H 227 # define HAVE_LIMITS_H 228 # define HAVE_MALLOC_H 229 # define HAVE_PROCESS_H 230 # define HAVE_SETJMP_H 231 # define HAVE_SIGNAL_H 232 # define HAVE_STDLIB_H 233 # define HAVE_STRING_H 234 # define HAVE__FULLPATH 235 # define HAVE__SPLITPATH 236 # define HAVE_FTRUNCATE 237 # define HAVE_MY_WIN32_SETENV 238 # define HAVE_FTIME 239 # define HAVE_MEMCPY 240 # define HAVE_MEMMOVE 241 # define HAVE_STRERROR 242 # define HAVE_VSPRINTF 243 # define HAVE_GETPID 244 # define HAVE_DIV 245 # define HAVE_RAISE 246 # if defined(DYNAMIC) 247 # define DYNAMIC_WIN32 248 # endif 249 /* 250 * Following for large file support 251 */ 252 # define HAVE_I64U 253 # define HAVE__STATI64 254 # define HAVE__ATOI64 255 #endif 256 257 #if defined(WIN32) && defined(__BORLANDC__) 258 # define HAVE_FCNTL_H 259 # define HAVE_LIMITS_H 260 # define HAVE_MALLOC_H 261 # define HAVE_PROCESS_H 262 # define HAVE_SETJMP_H 263 # define HAVE_SIGNAL_H 264 # define HAVE_STDLIB_H 265 # define HAVE_STRING_H 266 # define HAVE__FULLPATH 267 # define HAVE__SPLITPATH 268 # define HAVE_MY_WIN32_SETENV 269 # define HAVE_FTIME 270 # define HAVE_MEMCPY 271 # define HAVE_MEMMOVE 272 # define HAVE_STRERROR 273 # define HAVE_VSPRINTF 274 # define HAVE_DIV 275 # define HAVE_RAISE 276 # if defined(DYNAMIC) 277 # define DYNAMIC_WIN32 278 # endif 279 #endif 280 281 #if defined(WIN32) && defined(__CYGWIN32__) 282 # define HAVE_GRP_H 1 283 # define HAVE_PWD_H 1 284 # define HAVE_LIMITS_H 1 285 # define HAVE_MALLOC_H 1 286 # define HAVE_PROCESS_H 1 287 # define HAVE_SETJMP_H 1 288 # define HAVE_SIGNAL_H 1 289 # define HAVE_STDLIB_H 1 290 # define HAVE_STRING_H 1 291 # define HAVE_UNISTD_H 1 292 /* # define HAVE__FULLPATH 1 */ 293 # define HAVE_PUTENV 1 294 # define HAVE_GETTIMEOFDAY 1 295 # define HAVE_FTRUNCATE 1 296 # define HAVE_MEMCPY 1 297 # define HAVE_MEMMOVE 1 298 # define HAVE_STRERROR 1 299 # define HAVE_VSPRINTF 1 300 # define HAVE_GETPID 301 # define HAVE_DIV 302 # define HAVE_RAISE 303 # define TIME_WITH_SYS_TIME 1 304 # if defined(DYNAMIC) 305 # define DYNAMIC_WIN32 306 # endif 307 #endif 308 309 #if defined(WIN32) && defined(__MINGW32__) 310 # define HAVE_LIMITS_H 1 311 # define HAVE_MALLOC_H 1 312 # define HAVE_PROCESS_H 1 313 # define HAVE_SETJMP_H 1 314 # define HAVE_SIGNAL_H 1 315 # define HAVE_STDLIB_H 1 316 # define HAVE_STRING_H 1 317 # define HAVE_UNISTD_H 1 318 # define HAVE_FCNTL_H 1 319 # define HAVE__FULLPATH 1 320 # define HAVE_PUTENV 1 321 /* # define HAVE_GETTIMEOFDAY 1 */ 322 /* # define HAVE_FTRUNCATE 1 */ 323 # define HAVE_MEMCPY 1 324 # define HAVE_MEMMOVE 1 325 # define HAVE_STRERROR 1 326 # define HAVE_VSPRINTF 1 327 # define HAVE_GETPID 328 # define HAVE_DIV 329 # define HAVE_RAISE 330 # define TIME_WITH_SYS_TIME 1 331 # if defined(DYNAMIC) 332 # define DYNAMIC_WIN32 333 # endif 334 /* 335 * Following for large file support 336 */ 337 # define HAVE_I64U 338 # define HAVE__STATI64 339 #endif 340 341 #if defined(WIN32) && defined(__LCC__) 342 # define HAVE_FCNTL_H 1 343 # define HAVE_DIRECT_H 1 344 # define HAVE_LIMITS_H 1 345 # define HAVE_MALLOC_H 1 346 # define HAVE_PROCESS_H 1 347 # define HAVE_SETJMP_H 1 348 # define HAVE_SIGNAL_H 1 349 # define HAVE_STDLIB_H 1 350 # define HAVE_STRING_H 1 351 # define HAVE_UNISTD_H 1 352 # define HAVE__FULLPATH 1 353 # define HAVE_PUTENV 1 354 /* # define HAVE_GETTIMEOFDAY 1 */ 355 /* # define HAVE_FTRUNCATE 1 */ 356 # define HAVE_MEMCPY 1 357 # define HAVE_MEMMOVE 1 358 # define HAVE_STRERROR 1 359 # define HAVE_VSPRINTF 1 360 # define HAVE__SPLITPATH 1 361 # define HAVE_GETPID 1 362 # define HAVE_DIV 363 # define HAVE_RAISE 364 /* # define TIME_WITH_SYS_TIME 1 */ 365 # if defined(DYNAMIC) 366 # define DYNAMIC_WIN32 367 # endif 368 #endif 369 370 #if defined(DOS) && defined(DJGPP) 371 # define HAVE_FCNTL_H 372 # define HAVE_GRP_H 373 # define HAVE_PWD_H 374 # define HAVE_LIMITS_H 375 # define HAVE_STRING_H 376 # define TIME_WITH_SYS_TIME 377 # define HAVE_SETJMP_H 378 # define HAVE_UNISTD_H 379 # define HAVE_SYS_SOCKET_H 380 # define HAVE_NETINET_IN_H 381 /* # define HAVE_SYS_SELECT_H */ 382 # define HAVE_NETDB_H 383 # define HAVE_ARPA_INET_H 384 # define HAVE_PUTENV 385 # define HAVE_GETTIMEOFDAY 386 # define HAVE_FTRUNCATE 387 # define HAVE_RANDOM 388 # define HAVE_USLEEP 389 # define HAVE_MEMCPY 390 # define HAVE_MEMMOVE 391 # define HAVE_STRERROR 392 # define HAVE__TRUENAME 393 # define HAVE_VSPRINTF 394 # define HAVE_GETPID 395 # define HAVE_DIV 396 # define HAVE_RAISE 397 # ifndef _MAX_PATH 398 # define _MAX_PATH PATH_MAX 399 # endif 400 #endif 401 402 #if defined(_AMIGA) && defined(__SASC) 403 # define HAVE_SETJMP_H 404 /* # define HAVE_UNISTD_H */ 405 # define HAVE_PUTENV 406 # define HAVE_MEMCPY 407 # define HAVE_MEMMOVE 408 # define HAVE_STRERROR 409 # define HAVE_VSPRINTF 410 # define HAVE_DIV 411 # define HAVE_RAISE 412 # define UNIX 413 #endif 414 415 #if defined(AMIGA) && ( defined(GCC) || defined(__GNUC__) ) 416 # define HAVE_GRP_H 1 417 # define HAVE_PWD_H 1 418 # define HAVE_LIMITS_H 1 419 # define HAVE_MALLOC_H 1 420 # define HAVE_SETJMP_H 1 421 # define HAVE_SIGNAL_H 1 422 # define HAVE_STDLIB_H 1 423 # define HAVE_STRING_H 1 424 # define HAVE_UNISTD_H 1 425 # define HAVE_SYS_SOCKET_H 1 426 # define HAVE_SYS_FCNTL_H 1 427 # define HAVE_NETINET_IN_H 1 428 # define HAVE_NETDB_H 1 429 # define HAVE_ARPA_INET_H 1 430 /* # define HAVE__FULLPATH 1 */ 431 # define HAVE_PUTENV 1 432 # define HAVE_FTIME 1 433 # define HAVE_FTRUNCATE 1 434 # define HAVE_MEMCPY 1 435 # define HAVE_MEMMOVE 1 436 # define HAVE_STRERROR 1 437 # define HAVE_VSPRINTF 1 438 # define HAVE_GETPID 439 # define HAVE_DIV 440 # define HAVE_RAISE 441 # define TIME_WITH_SYS_TIME 1 442 # if !defined( _AMIGA ) 443 # define _AMIGA 444 # endif 445 # if !defined( __AMIGADATE__ ) 446 # define __AMIGADATE__ "("__DATE__")" 447 # endif 448 #endif 449 450 #if defined(MAC) 451 /* # define HAVE_GRP_H 1 */ 452 /* # define HAVE_PWD_H 1 */ 453 # define HAVE_LIMITS_H 1 454 /* # define HAVE_MALLOC_H 1 */ 455 # define HAVE_SETJMP_H 1 456 # define HAVE_SIGNAL_H 1 457 # define HAVE_STDLIB_H 1 458 # define HAVE_STRING_H 1 459 /* # define HAVE_UNISTD_H 1 */ 460 /* 461 # define HAVE_SYS_SOCKET_H 1 462 # define HAVE_NETINET_IN_H 1 463 # define HAVE_NETDB_H 1 464 # define HAVE_ARPA_INET_H 1 465 */ 466 /* # define HAVE__FULLPATH 1 */ 467 /*# define HAVE_SETENV 1 */ 468 /* # define HAVE_FTIME 1 */ 469 /* # define HAVE_FTRUNCATE 1 */ 470 # define HAVE_MEMCPY 1 471 # define HAVE_MEMMOVE 1 472 # define HAVE_STRERROR 1 473 # define HAVE_VSPRINTF 1 474 # define HAVE_GETPID 475 # define HAVE_DIV 476 # define HAVE_RAISE 477 /* # define TIME_WITH_SYS_TIME 1 */ 478 #endif 479 480 /* 481 * The following are for Epoc32 platform 482 */ 483 #if defined(__VC32__) && defined(__WINS__) 484 # define HAVE_SYS_FCNTL_H 485 # define HAVE_LIMITS_H 486 # define HAVE_PROCESS_H 487 # define HAVE_SETJMP_H 488 # define HAVE_SIGNAL_H 489 # define HAVE_STDLIB_H 490 # define HAVE_STRING_H 491 /* # define HAVE__FULLPATH */ 492 /* # define HAVE__SPLITPATH */ 493 /* # define HAVE_FTRUNCATE */ 494 /* # define HAVE_MY_WIN32_SETENV */ 495 # define HAVE_MEMCPY 496 # define HAVE_MEMMOVE 497 # define HAVE_STRERROR 498 # define HAVE_VSPRINTF 499 # define HAVE_GETPID 500 # define HAVE_DIV 501 # define HAVE_RAISE 502 # define HAVE_SYS_SOCKET_H 503 # define HAVE_NETINET_IN_H 504 # define HAVE_NETDB_H 505 # define HAVE_ARPA_INET_H 506 # define HAVE_UNISTD_H 507 # if defined(DYNAMIC) 508 # define DYNAMIC_WIN32 509 # endif 510 #endif 511 512 #if defined(__GCC32__) && defined(__EPOC32__) 513 # define HAVE_SYS_FCNTL_H 1 514 /* # define HAVE_GRP_H 1 */ 515 /* # define HAVE_PWD_H 1 */ 516 # define HAVE_LIMITS_H 1 517 /*# define HAVE_MALLOC_H 1 */ 518 # define HAVE_PROCESS_H 1 519 # define HAVE_SETJMP_H 1 520 # define HAVE_SIGNAL_H 1 521 # define HAVE_STDLIB_H 1 522 # define HAVE_STRING_H 1 523 # define HAVE_UNISTD_H 1 524 /* # define HAVE__FULLPATH 1 */ 525 /* # define HAVE_PUTENV 1 */ 526 # define HAVE_GETTIMEOFDAY 1 527 /*# define HAVE_FTRUNCATE 1 */ 528 # define HAVE_MEMCPY 1 529 # define HAVE_MEMMOVE 1 530 # define HAVE_STRERROR 1 531 # define HAVE_VSPRINTF 1 532 # define HAVE_GETPID 1 533 # define HAVE_DIV 534 # define HAVE_RAISE 535 # define TIME_WITH_SYS_TIME 1 536 # define HAVE_SYS_SOCKET_H 1 537 # define HAVE_NETINET_IN_H 1 538 # define HAVE_NETDB_H 1 539 # define HAVE_ARPA_INET_H 1 540 # if defined(DYNAMIC) 541 # define DYNAMIC_WIN32 542 # endif 543 #endif 544 545 #if defined(SKYOS) 546 # include <skyos/libskyos.h> 547 # define HAVE_SYS_FCNTL_H 1 548 # define HAVE_GRP_H 1 549 # define HAVE_PWD_H 1 550 # define HAVE_LIMITS_H 1 551 # define HAVE_MALLOC_H 1 552 # define HAVE_PROCESS_H 1 553 # define HAVE_SETJMP_H 1 554 # define HAVE_SIGNAL_H 1 555 # define HAVE_STDLIB_H 1 556 # define HAVE_STRING_H 1 557 # define HAVE_UNISTD_H 1 558 /* # define HAVE__FULLPATH 1 */ 559 # define HAVE_PUTENV 1 560 # define HAVE_GETTIMEOFDAY 1 561 /*# define HAVE_FTRUNCATE 1 */ 562 # define HAVE_MEMCPY 1 563 # define HAVE_MEMMOVE 1 564 # define HAVE_STRERROR 1 565 # define HAVE_VSPRINTF 1 566 # define HAVE_GETPID 1 567 # define HAVE_DIV 1 568 # define HAVE_RAISE 1 569 /*# define TIME_WITH_SYS_TIME 1*/ 570 # define HAVE_SYS_SOCKET_H 1 571 # define HAVE_NETINET_IN_H 1 572 # define HAVE_NETDB_H 1 573 # define HAVE_ARPA_INET_H 1 574 # if defined(DYNAMIC) 575 # define DYNAMIC_SKYOS 576 # endif 577 #endif 578 579 #if defined(VMS) 580 # include "vms.h" 581 #endif 582 583 /* Configurable values */ 584 585 586 /* The macro MAXLEVELS is the maximum number of levels that the 587 * interpreter shall handle. One level is used for functioncalls and 588 * the commands CALL, IF, DO and SELECT 589 */ 590 #define MAXLEVELS 1024 591 592 /* The macro MAX_INDEX_LENGTH defines the maximum length that the name 593 * of an compund variable might expand to. 594 */ 595 #define MAX_INDEX_LENGTH 256 596 597 /* The macro MAX_EXPONENT is the maximum exponent disregarding sign we 598 * are able to handle. 599 * This value MUST change for 64-bit-support. 600 */ 601 #define MAX_EXPONENT 999999999 602 603 /* 604 * The macro DEFAULT_FLUSH_STACK can be defined to either 1 or 0, 605 * depending on whether you want the stack to be flushed during a 606 * command reading input from or writing output to the stack. If 607 * defined, a line written will be physically in the stack at once, 608 * while if not defined, all output lines will be temporarily stacked 609 * until the command has terminated, then they are all simultaneously 610 * flushed to the stack. The default default value is 0, it can be 611 * changed through OPTIONS. 612 */ 613 #ifndef DEFAULT_FLUSHSTACK 614 # define DEFAULT_FLUSHSTACK 0 615 #endif 616 617 /* 618 * The macro DEFAULT_LINEOUTTRUNC can be set to 1 or 0, whether you want 619 * the default behavior of lineout() to truncate the file immediately 620 * after the end of each new file written out. When set to 1, the file 621 * will be truncated. Also note, that if HAVE_FTRUNCATE isn't set later 622 * in this script, the DEFAULT_LINEOUTTRUNC will be forced to 0, just 623 * for consistency (then, setting it to 1 will have no practical effect. 624 */ 625 #ifndef DEFAULT_LINEOUTTRUNC 626 # define DEFAULT_LINEOUTTRUNC 1 627 #endif 628 629 #define DEFAULT_MAKEBUF_BIF 1 630 #define DEFAULT_DROPBUF_BIF 1 631 #define DEFAULT_BUFTYPE_BIF 1 632 #define DEFAULT_DESBUF_BIF 1 633 634 #define DEFAULT_CACHEEXT 0 635 #define DEFAULT_PRUNE_TRACE 1 636 637 /* 638 * Indicates that Regina treats external commands as functions by default 639 */ 640 #define DEFAULT_EXT_COMMANDS_AS_FUNCS 1 641 /* 642 * Indicates that Regina does not send output that normally goes to stderr, to stdout 643 */ 644 #define DEFAULT_STDOUT_FOR_STDERR 0 645 /* 646 * Indicates that Regina allows external queues (and internal queues) by default 647 */ 648 #define DEFAULT_INTERNAL_QUEUES 0 649 /* 650 * Indicates that Regina does not wrap trace output in HTML code by default 651 */ 652 #define DEFAULT_TRACE_HTML 0 653 /* 654 * Indicates that Regina returns 1 or 0 for when calling LINES BIF without optional 2nd argument by default 655 */ 656 #define DEFAULT_FAST_LINES_BIF_DEFAULT 1 657 /* 658 * Indicates that Regina does not observe strict ANSI functionality by default 659 */ 660 #define DEFAULT_STRICT_ANSI 0 661 /* 662 * Indicates that Regina-specific BUFs are available by default 663 */ 664 #define DEFAULT_REGINA_BIFS 1 665 /* 666 * Indicates that Regina does not do strict white space comparison by default 667 */ 668 #define DEFAULT_STRICT_WHITE_SPACE_COMPARISONS 0 669 /* 670 * Indicates if the ARexx BIFs (OPEN, CLOSE, EOF) use AREXX semantics or not 671 * On Amiga and AROS, they are on by default. 672 */ 673 #if defined(_AMIGA) || defined(__AROS__) 674 # define DEFAULT_AREXX_SEMANTICS 1 675 #else 676 # define DEFAULT_AREXX_SEMANTICS 0 677 #endif 678 /* 679 * Indicates that AREXX BIFs are available by default on Amiga and AROS, but 680 * OFF on other platforms 681 */ 682 #if defined(_AMIGA) || defined(__AROS__) 683 # define DEFAULT_AREXX_BIFS 1 684 #else 685 # define DEFAULT_AREXX_BIFS 0 686 #endif 687 /* 688 * Indicates if the user want the "broken" semantics of ADDRESS COMMAND 689 */ 690 #define DEFAULT_BROKEN_ADDRESS_COMMAND 0 691 /* 692 * Indicates if the user wants outer parentheses when using CALL subroutine. 693 */ 694 #define DEFAULT_CALLS_AS_FUNCS 0 695 /* 696 * Indicates if the user wants the broken queue naming conventions. 697 */ 698 #define DEFAULT_QUEUES_301 0 699 /* 700 * Indicates if a failure in a call to an external routine halts the caller with error 40.1 701 */ 702 #define DEFAULT_HALT_ON_EXT_CALL_FAIL 0 703 /* 704 * Indicates if a new thread calls an API function the call occurs in the current (and only one) instance of an interpreter 705 */ 706 #define DEFAULT_SINGLE_INTERPRETER 0 707 /* 708 * Indicates that Regina allows single line comments by default 709 */ 710 #define DEFAULT_SINGLE_LINE_COMMENTS 1 711 712 /* 713 * The FILE_SEPARATOR is one character, and defines the char that separates 714 * directories, and filename from directories in a file's path. 715 * The PATH_SEPARATOR is one character, and defines the char that separates 716 * directories, from one another in a PATH environment variable. 717 */ 718 719 #if defined(MSDOS) || ( defined(__WATCOMC__) && !defined(__QNX__) ) || defined(_MSC_VER) || defined(DOS) || defined(OS2) || defined(__WINS__) || defined(__EPOC32__) || defined(__LCC__) || defined(__BORLANDC__) || defined(__MINGW32__) 720 # define FILE_SEPARATORS "\\/:" 721 # define FILE_SEPARATOR '\\' 722 # define FILE_SEPARATOR_STR "\\" 723 # define PATH_SEPARATOR ';' 724 # define PATH_SEPARATOR_STR ";" 725 #elif defined(VMS) 726 # define FILE_SEPARATORS "]" 727 # define FILE_SEPARATOR ']' 728 # define FILE_SEPARATOR_STR "]" 729 # define PATH_SEPARATOR '?' 730 # define PATH_SEPARATOR_STR "?" 731 #elif defined(MAC) 732 # define FILE_SEPARATOR "]" 733 # define FILE_SEPARATOR ']' 734 # define FILE_SEPARATOR_STR "]" 735 # define PATH_SEPARATOR '?' 736 # define PATH_SEPARATOR_STR "?" 737 #else 738 # define FILE_SEPARATORS "/" 739 # define FILE_SEPARATOR '/' 740 # define FILE_SEPARATOR_STR "/" 741 # define PATH_SEPARATOR ':' 742 # define PATH_SEPARATOR_STR ":" 743 #endif 744 745 746 #define FIX_PROTOS 747 #define FIX_ALL_PROTOS 748 749 750 #if defined(HPUX) || defined(__hpux) 751 # define YY_CHAR_TYPE unsigned char 752 #endif 753 754 #if !defined(HAVE_MEMCPY) 755 # define memcpy(a,b,c) bcopy((b),(a),(c)) 756 #endif 757 758 #if !defined(HAVE_MEMMOVE) 759 # define memmove(a,b,c) bcopy((b),(a),(c)) 760 #endif 761 762 #if !defined(HAVE_STRERROR) 763 const char *get_sys_errlist( int num ); 764 # define strerror(a) get_sys_errlist(a) 765 #endif 766 767 768 #if defined(sgi) || defined(__sgi) 769 # define SGI 1 770 #endif 771 772 #if defined(__osf__) 773 # define OSF 1 774 # define YY_CHAR_TYPE unsigned char 775 #endif 776 777 /* 778 * Define HAVE_USLEEP if you have the usleep() function available. It will 779 * take the number of micro-seconds to sleep. If this is not defined, 780 * the 'normal' sleep() will be used. 781 * Handled by autoconf 782 */ 783 784 /* 785 * Define HAVE_RANDOM if your machine has the routines random() and 786 * srandom(). If it is not defined, rand() and srand() are used 787 * instead. There are several reason why you might want to use 788 * random() instead of rand() 789 * Handled by autoconf 790 */ 791 792 793 #define DEFAULT_NUMERIC_FUZZ 0 794 #define DEFAULT_NUMERIC_SIZE 9 795 #define DEFAULT_MATH_TYPE 0 796 797 798 /* 799 * If you use gcc on a machine that does not have proper ANSI C 800 * libraries and the function div() is not defined, then you can 801 * define the symbol HAVE_NO_DIV, which will try to kludge it. 802 * 803 * This is necessary on Suns, and some other machines. 804 * 805 * Not used anymore MH 10-06-97 806 */ 807 808 809 #ifndef YY_CHAR_TYPE 810 # ifdef _AIX 811 # define YY_CHAR_TYPE unsigned char 812 # else 813 # define YY_CHAR_TYPE char 814 # endif 815 #endif 816 817 818 /* Unfortunately, ftruncate() is not POSIX, so if you don't have it, 819 * just ignore it, the effect is that lines written to the middle of a 820 * file will not cause the rest of the file (after the linefeed 821 * terminating the line written), also to truncate the file at that 822 * point. If you wonder whether you have ftruncate(), the bsd portions 823 * of you system (if it exist) is a good place to start looking. You 824 * may have to link in a specific library too, maybe libbsd.a. 825 */ 826 /*#define HAVE_FTRUNCATE*/ /* handled in makefile - TBD in autoconf */ 827 828 829 830 #ifdef VMS 831 # ifdef HAVE_GETTIMEOFDAY 832 # undef HAVE_GETTIMEOFDAY 833 # endif 834 # ifdef HAVE_PUTENV 835 # undef HAVE_PUTENV 836 # endif 837 # ifdef HAVE_FTRUNCATE 838 # undef HAVE_FTRUNCATE 839 # endif 840 #endif 841 842 843 #if defined(__GNUC__) && defined(VMS) 844 # ifdef HAVE_GETTIMEOFODAY 845 # undef HAVE_GETTIMEOFDAY 846 # endif 847 #endif 848 849 /* 850 * DLOPEN - dlopen()/dlsym() under SunOS and SysV4 851 * HPSHLOAD - shl_load()/shl_findsym() under HP-UX 852 * AIXLOAD - load()/loadbind() under AIX - not supported 853 * OS2 - DosLoadModule()/DosQueryProcAddr() under OS/2 854 * WIN32 - LoadLibrary()/GetProcAddress() under Win32 855 */ 856 857 /* 858 * QNX 4.2x does have a ftrunc() equivalent: ltrunc() 859 */ 860 #if defined(__WATCOMC__) && defined(__QNX__) 861 # define HAVE_FTRUNCATE 862 #endif 863 /* 864 * If we don't have ftruncate() then we don't want the default setting 865 * of LINEOUT() to be to truncate after each new line written out. 866 */ 867 #ifndef HAVE_FTRUNCATE 868 # undef DEFAULT_LINEOUTTRUNC /* MH 10-06-96 */ 869 # define DEFAULT_LINEOUTTRUNC 0 870 #endif 871 872 #ifdef _MSC_VER 873 /* This picky compiler claims about unused formal parameters. 874 * This is correct but hides (for human eyes) other errors since they 875 * are many and we can't reduce them all. 876 * Error 4100 is "unused formal parameter". 877 */ 878 # pragma warning(disable:4100) 879 #endif 880