sllimits.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /* sllimits.h */
  2. /*
  3. Copyright (C) 2004, 2005 John E. Davis
  4. This file is part of the S-Lang Library.
  5. The S-Lang Library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU General Public License as
  7. published by the Free Software Foundation; either version 2 of the
  8. License, or (at your option) any later version.
  9. The S-Lang Library 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 GNU
  12. General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this library; if not, write to the Free Software
  15. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
  16. USA.
  17. */
  18. #define USE_NEW_HASH_CODE 1
  19. #define SLSTRING_HASH_TABLE_SIZE 10007
  20. #if 0
  21. /* slstring.c: Size of the hash table used for strings (prime numbers) */
  22. #ifdef __MSDOS_16BIT__
  23. # define SLSTRING_HASH_TABLE_SIZE 601
  24. #else
  25. # define SLSTRING_HASH_TABLE_SIZE 6007 /* 2909 */
  26. #endif
  27. #endif
  28. /* slang.c: maximum size of run time stack */
  29. #ifdef __MSDOS_16BIT__
  30. # define SLANG_MAX_STACK_LEN 500
  31. #else
  32. # define SLANG_MAX_STACK_LEN 2500
  33. #endif
  34. /* slang.c: This sets the size on the depth of function calls */
  35. #ifdef __MSDOS_16BIT__
  36. # define SLANG_MAX_RECURSIVE_DEPTH 50
  37. #else
  38. # define SLANG_MAX_RECURSIVE_DEPTH 2500
  39. #endif
  40. /* slang.c: Size of the stack used for local variables */
  41. #ifdef __MSDOS_16BIT__
  42. # define SLANG_MAX_LOCAL_STACK 200
  43. #else
  44. # define SLANG_MAX_LOCAL_STACK 4096
  45. #endif
  46. /* slang.c: The size of the hash table used for local and global objects.
  47. * These should be prime numbers.
  48. */
  49. #if USE_NEW_HASH_CODE
  50. # define SLGLOBALS_HASH_TABLE_SIZE 2048
  51. # define SLLOCALS_HASH_TABLE_SIZE 64
  52. # define SLSTATIC_HASH_TABLE_SIZE 64
  53. #else
  54. # define SLGLOBALS_HASH_TABLE_SIZE 2909
  55. # define SLLOCALS_HASH_TABLE_SIZE 73
  56. # define SLSTATIC_HASH_TABLE_SIZE 73
  57. #endif
  58. /* Size of the keyboard buffer use by the ungetkey routines */
  59. #ifdef __MSDOS_16BIT__
  60. # define SL_MAX_INPUT_BUFFER_LEN 40
  61. #else
  62. # define SL_MAX_INPUT_BUFFER_LEN 1024
  63. #endif
  64. /* Maximum number of nested switch statements */
  65. #define SLANG_MAX_NESTED_SWITCH 10
  66. /* Size of the block stack (used in byte-compiling) */
  67. #define SLANG_MAX_BLOCK_STACK_LEN 50
  68. /* slfile.c: Max number of open file pointers */
  69. #ifdef __MSDOS_16BIT__
  70. # define SL_MAX_FILES 32
  71. #else
  72. # define SL_MAX_FILES 256
  73. #endif
  74. #if !defined(__MSDOS_16BIT__)
  75. # define SLTT_MAX_SCREEN_COLS 512
  76. # define SLTT_MAX_SCREEN_ROWS 512
  77. #else
  78. # define SLTT_MAX_SCREEN_ROWS 64
  79. # define SLTT_MAX_SCREEN_COLS 75
  80. #endif