home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / CLISP-1.LHA / CLISP960530-sr.lha / src / genclisph.d < prev    next >
Encoding:
Text File  |  1996-05-16  |  70.3 KB  |  1,353 lines

  1. # Ausgabe aller Definitionen aus lispbibl.d, die an externe Module
  2. # exportiert werden.
  3. # Bruno Haible 21.6.1995
  4.  
  5. #include "lispbibl.c"
  6.  
  7. #include <stdio.h>
  8.  
  9. # Ausgabe von Strings mit eingebetteten Zahlen, wie printf().
  10. # Nur daß die Zahlen auch vom Typ `unsigned long long' sein können.
  11. # Wir vermeiden es, <stdarg.h> oder <varargs.h> vorauszusetzen.
  12.  
  13. typedef struct { char base; # 'd' für dezimal, 'x' für hexadezimal
  14.                  int size;
  15.                  union { uint8 val8;
  16.                          uint16 val16;
  17.                          uint32 val32;
  18.                          #ifdef HAVE_LONGLONG
  19.                          uint64 val64;
  20.                          #endif
  21.                        }
  22.                        value;
  23.                }
  24.         printf_arg;
  25.  
  26. #ifdef HAVE_LONGLONG
  27.   #define fill_printf_arg(where,expr)  \
  28.     where.size = sizeof(expr); \
  29.     if (sizeof(expr) == sizeof(uint8)) { where.value.val8 = (uint8)(expr); } \
  30.     elif (sizeof(expr) == sizeof(uint16)) { where.value.val16 = (uint16)(expr); } \
  31.     elif (sizeof(expr) == sizeof(uint32)) { where.value.val32 = (uint32)(expr); } \
  32.     elif (sizeof(expr) == sizeof(uint64)) { where.value.val64 = (uint64)(expr); } \
  33.     else abort();
  34. #else
  35.   #define fill_printf_arg(where,expr)  \
  36.     where.size = sizeof(expr); \
  37.     if (sizeof(expr) == sizeof(uint8)) { where.value.val8 = (uint8)(expr); } \
  38.     elif (sizeof(expr) == sizeof(uint16)) { where.value.val16 = (uint16)(expr); } \
  39.     elif (sizeof(expr) == sizeof(uint32)) { where.value.val32 = (uint32)(expr); } \
  40.     else abort();
  41. #endif
  42.  
  43. local char* Lsuffix =
  44.   #ifdef ANSI
  45.     "L"
  46.   #else
  47.     ""
  48.   #endif
  49.   ;
  50. local char* ULsuffix =
  51.   #ifdef ANSI
  52.     "UL"
  53.   #else
  54.     ""
  55.   #endif
  56.   ;
  57. #ifdef HAVE_LONGLONG
  58. local char* ULLsuffix =
  59.   #ifdef ANSI
  60.     "ULL"
  61.   #else
  62.     ""
  63.   #endif
  64.   ;
  65. #endif
  66.  
  67. global void print_printf_arg (printf_arg* arg);
  68. global void print_printf_arg(arg)
  69.   var reg1 printf_arg* arg;
  70.   { switch (arg->size)
  71.       { case sizeof(uint8):
  72.           printf(arg->base=='d' ? "%u" : "0x%X", (unsigned int)(arg->value.val8));
  73.           break;
  74.         case sizeof(uint16):
  75.           printf(arg->base=='d' ? "%u" : "0x%X", (unsigned int)(arg->value.val16));
  76.           break;
  77.         case sizeof(uint32):
  78.           printf(arg->base=='d' ? "%lu%s" : "0x%lX%s", (unsigned long)(arg->value.val32), ULsuffix);
  79.           break;
  80.         #ifdef HAVE_LONGLONG
  81.         case sizeof(uint64):
  82.           #if (long_bitsize == 64)
  83.             if (!(sizeof(uint64) == sizeof(unsigned long))) { abort(); }
  84.             printf("0x%lX%s", (unsigned long)(arg->value.val64), ULsuffix);
  85.           #else
  86.             if (!(sizeof(uint32) == sizeof(unsigned long))) { abort(); }
  87.             printf("0x%lX%08lX%s",
  88.                    (unsigned long)(arg->value.val64 >> 32),
  89.                    (unsigned long)(arg->value.val64 & 0xFFFFFFFFUL),
  90.                    ULLsuffix
  91.                   );
  92.           #endif
  93.           break;
  94.         #endif
  95.         default:
  96.           abort();
  97.   }   }
  98.  
  99. global void printf_with_args (char* string, int argcount, printf_arg* args);
  100. global void printf_with_args(string,argcount,args)
  101.   var reg1 char* string;
  102.   var reg3 int argcount;
  103.   var reg2 printf_arg* args;
  104.   { while (*string)
  105.       { if (string[0]=='%')
  106.           { if (!(string[1]=='d' || string[1]=='x')) { abort(); }
  107.             if (!(argcount > 0)) { abort(); }
  108.             args->base = string[1]; print_printf_arg(args);
  109.             string+=2; args++; argcount--;
  110.           }
  111.         else
  112.           { putchar(*string); string++; }
  113.   }   }
  114.  
  115. #define printf0(string)  printf(string)
  116. #define printf1(string,arg0)  \
  117.   { var printf_arg args[1]; \
  118.     fill_printf_arg(args[0],arg0); \
  119.     printf_with_args(string,1,args); \
  120.   }
  121. #define printf2(string,arg0,arg1)  \
  122.   { var printf_arg args[2]; \
  123.     fill_printf_arg(args[0],arg0); \
  124.     fill_printf_arg(args[1],arg1); \
  125.     printf_with_args(string,2,args); \
  126.   }
  127. #define printf3(string,arg0,arg1,arg2)  \
  128.   { var printf_arg args[3]; \
  129.     fill_printf_arg(args[0],arg0); \
  130.     fill_printf_arg(args[1],arg1); \
  131.     fill_printf_arg(args[2],arg2); \
  132.     printf_with_args(string,3,args); \
  133.   }
  134. #define printf4(string,arg0,arg1,arg2,arg3)  \
  135.   { var printf_arg args[4]; \
  136.     fill_printf_arg(args[0],arg0); \
  137.     fill_printf_arg(args[1],arg1); \
  138.     fill_printf_arg(args[2],arg2); \
  139.     fill_printf_arg(args[3],arg3); \
  140.     printf_with_args(string,4,args); \
  141.   }
  142. #define printf5(string,arg0,arg1,arg2,arg3,arg4)  \
  143.   { var printf_arg args[5]; \
  144.     fill_printf_arg(args[0],arg0); \
  145.     fill_printf_arg(args[1],arg1); \
  146.     fill_printf_arg(args[2],arg2); \
  147.     fill_printf_arg(args[3],arg3); \
  148.     fill_printf_arg(args[4],arg4); \
  149.     printf_with_args(string,5,args); \
  150.   }
  151. #define printf6(string,arg0,arg1,arg2,arg3,arg4,arg5)  \
  152.   { var printf_arg args[6]; \
  153.     fill_printf_arg(args[0],arg0); \
  154.     fill_printf_arg(args[1],arg1); \
  155.     fill_printf_arg(args[2],arg2); \
  156.     fill_printf_arg(args[3],arg3); \
  157.     fill_printf_arg(args[4],arg4); \
  158.     fill_printf_arg(args[5],arg5); \
  159.     printf_with_args(string,6,args); \
  160.   }
  161. #define printf7(string,arg0,arg1,arg2,arg3,arg4,arg5,arg6)  \
  162.   { var printf_arg args[7]; \
  163.     fill_printf_arg(args[0],arg0); \
  164.     fill_printf_arg(args[1],arg1); \
  165.     fill_printf_arg(args[2],arg2); \
  166.     fill_printf_arg(args[3],arg3); \
  167.     fill_printf_arg(args[4],arg4); \
  168.     fill_printf_arg(args[5],arg5); \
  169.     fill_printf_arg(args[6],arg6); \
  170.     printf_with_args(string,7,args); \
  171.   }
  172.  
  173. global int main()
  174. { char* glue =
  175.     #ifdef ANSI
  176.     "##"
  177.     #else
  178.     "/**/"
  179.     #endif
  180.     ;
  181.   printf("#ifndef _CLISP_H\n");
  182.   printf("#define _CLISP_H\n");
  183.   printf("\n");
  184.   printf("#include \"config.h\"\n"); # Wir setzen Unix voraus.
  185. # printf("\n");
  186. # printf("#include \"machine.h\"\n");
  187. # printf("\n");
  188. # #ifdef LANGUAGE_STATIC
  189. #   printf1("#define ENGLISH  %d\n",ENGLISH);
  190. #   printf1("#define DEUTSCH  %d\n",DEUTSCH);
  191. #   printf1("#define FRANCAIS  %d\n",FRANCAIS);
  192. # #else
  193. #   printf1("#define ENGLISH  (language==%d)\n",language_english);
  194. #   printf1("#define DEUTSCH  (language==%d)\n",language_deutsch);
  195. #   printf1("#define FRANCAIS  (language==%d)\n",language_francais);
  196. # #endif
  197. # printf1("#define BIG_ENDIAN_P  %d\n",BIG_ENDIAN_P);
  198. # #if !defined(ANSI) && !defined(UNIXCONF)
  199. #    printf("#define const\n");
  200. # #endif
  201. # #if !defined(ANSI)
  202. #   printf("#define volatile\n");
  203. # #endif
  204. # #if !defined(ANSI) && !defined(__CHAR_UNSIGNED__)
  205. #   printf("#define signed\n");
  206. # #endif
  207.   #if !defined(ANSI) && !defined(UNIXCONF)
  208.     printf("#define void  char\n");
  209.   #endif
  210. # #if !defined(GNU) && !defined(UNIXCONF)
  211. #   printf("#define inline\n");
  212. # #endif
  213.   printf("#ifdef __cplusplus\n");
  214.   printf("#define BEGIN_DECLS  extern \"C\" {\n");
  215.   printf("#define END_DECLS    }\n");
  216.   printf("#else\n");
  217.   printf("#define BEGIN_DECLS\n");
  218.   printf("#define END_DECLS\n");
  219.   printf("#endif\n");
  220.   printf("#define CONCAT_(xxx,yyy)  xxx%syyy\n",glue);
  221.   printf("#define CONCAT3_(aaa,bbb,ccc)  aaa%sbbb%sccc\n",glue,glue);
  222. # printf("#define CONCAT4_(aaa,bbb,ccc,ddd)  aaa%sbbb%sccc%sddd\n",glue,glue,glue);
  223. # printf("#define CONCAT5_(aaa,bbb,ccc,ddd,eee)  aaa%sbbb%sccc%sddd%seee\n",glue,glue,glue,glue);
  224.   printf("#define CONCAT(xxx,yyy)  CONCAT_(xxx,yyy)\n");
  225.   printf("#define CONCAT3(aaa,bbb,ccc)  CONCAT3_(aaa,bbb,ccc)\n");
  226. # printf("#define CONCAT4(aaa,bbb,ccc,ddd)  CONCAT4_(aaa,bbb,ccc,ddd)\n");
  227. # printf("#define CONCAT5(aaa,bbb,ccc,ddd,eee)  CONCAT5_(aaa,bbb,ccc,ddd,eee)\n");
  228.   #ifdef ANSI
  229.     printf("#define STRING(token) #token\n");
  230.   #else
  231.     printf("#define STRING(token) \"token\"\n");
  232.   #endif
  233.   printf("#define STRINGIFY(token) STRING(token)\n");
  234.   printf("#define global\n");
  235. # printf("#define local  static\n");
  236.   #ifdef GNU
  237.     printf("#define nonreturning  __volatile__\n");
  238.   #else
  239.     printf("#define nonreturning\n");
  240.   #endif
  241.   printf("#define maygc\n");
  242.   #ifdef ANSI
  243.     printf("#define _ARGS(x) x\n");
  244.   #else
  245.     printf("#define _ARGS(x) ()\n");
  246.   #endif
  247.   #ifdef GNU
  248.     #ifdef ANSI
  249.       printf("#define nonreturning_function(storclass,funname,arguments)  \\\n");
  250.       printf("  typedef void CONCAT3(funname,_function_,__LINE__) arguments; \\\n");
  251.       printf("  storclass nonreturning CONCAT3(funname,_function_,__LINE__) funname\n");
  252.     #else
  253.       printf("typedef void void_function ();\n");
  254.       printf("#define nonreturning_function(storclass,funname,arguments)  \\\n");
  255.       printf("  storclass nonreturning void_function funname\n");
  256.     #endif
  257.   #else
  258.     #ifdef ANSI
  259.       printf("#define nonreturning_function(storclass,funname,arguments)  \\\n");
  260.       printf("  storclass void funname arguments\n");
  261.     #else
  262.       printf("#define nonreturning_function(storclass,funname,arguments)  \\\n");
  263.       printf("  storclass void funname()\n");
  264.     #endif
  265.   #endif
  266.   printf("#define var\n");
  267.   { int i;
  268.     for (i=1; i<=10; i++)
  269.       { if (regvarcount>=i)
  270.           printf("#define reg%d  register\n",i);
  271.         else
  272.           printf("#define reg%d\n",i);
  273.   }   }
  274. # printf("#define elif  else if\n");
  275. # printf("#define loop  while (1)\n");
  276. # printf("#define until(expression)  while(!(expression))\n");
  277. # printf("#define NOTREACHED  fehler_notreached(__FILE__,__LINE__);\n");
  278. # printf("#define ASSERT(expr)  { if (!(expr)) { NOTREACHED } }\n");
  279. # #if defined(GNU) && !defined(RISCOS) && !defined(CONVEX)
  280. #   printf("#define alloca  __builtin_alloca\n");
  281. # #elif defined(HAVE_ALLOCA_H) || defined(RISCOS)
  282. #   printf("#include <alloca.h>\n");
  283. #   #ifndef alloca
  284. #     #ifdef UNIX_OSF
  285. #       printf("extern char* alloca _ARGS((int size));\n");
  286. #     #else
  287. #       printf("extern void* alloca _ARGS((int size));\n");
  288. #     #endif
  289. #   #endif
  290. # #elif defined(_AIX)
  291. #   printf("#pragma alloca\n");
  292. # #elif defined(WATCOM)
  293. #   printf("#include <malloc.h>\n");
  294. # #elif !defined(NO_ALLOCA)
  295. #   printf("extern void* alloca _ARGS((int size));\n");
  296. # #endif
  297.   #ifdef __CHAR_UNSIGNED__
  298.     printf("typedef signed char  CLISP_BYTE;\n");
  299.   #else
  300.     printf("typedef char         CLISP_BYTE;\n");
  301.   #endif
  302.   printf("typedef unsigned char  CLISP_UBYTE;\n");
  303.   printf("typedef short          CLISP_WORD;\n");
  304.   printf("typedef unsigned short CLISP_UWORD;\n");
  305.   #if (long_bitsize==32)
  306.     printf("typedef long           CLISP_LONG;\n");
  307.     printf("typedef unsigned long  CLISP_ULONG;\n");
  308.   #elif (int_bitsize==32)
  309.     printf("typedef int            CLISP_LONG;\n");
  310.     printf("typedef unsigned int   CLISP_ULONG;\n");
  311.   #endif
  312.   #if (long_bitsize==64)
  313.     printf("typedef long           CLISP_LONGLONG;\n");
  314.     printf("typedef unsigned long  CLISP_ULONGLONG;\n");
  315.   #elif defined(HAVE_LONGLONG)
  316.     printf("typedef long long           CLISP_LONGLONG;\n");
  317.     printf("typedef unsigned long long  CLISP_ULONGLONG;\n");
  318.   #endif
  319.   printf("#define TRUE   1\n");
  320.   printf("#define FALSE  0\n");
  321.   printf("typedef unsigned int  boolean;\n");
  322.   printf("#undef NULL\n");
  323.   printf("#define NULL  ((void*) 0L)\n");
  324.   #if defined(GNU)
  325.     printf("#define unspecified 0\n");
  326.   #else
  327.     printf("#define unspecified 1\n");
  328.   #endif
  329.   #if !(defined(GNU) || (pointer_bitsize > 32))
  330.     printf("#define pointerplus(pointer,offset)  ((void*)((CLISP_ULONG)(pointer)+(offset)))\n");
  331.   #else
  332.     printf("#define pointerplus(pointer,offset)  ((CLISP_UBYTE*)(pointer)+(offset))\n");
  333.   #endif
  334.   printf("#define bit(n)  (1%s<<(n))\n",Lsuffix);
  335. # printf("#define bitm(n)  (2%s<<((n)-1))\n",Lsuffix);
  336.   #if !defined(SPARC)
  337.     printf("#define bit_test(x,n)  ((x) & bit(n))\n");
  338.   #else
  339.     #if !defined(GNU)
  340.       printf("#define bit_test(x,n)  ((n)<12 ? ((x) & bit(n)) : ((sint32)((uint32)(x) << (31-(n))) < 0))\n");
  341.     #else
  342.       printf("#define bit_test(x,n)  ((((n)<12) && ((x) & bit(n))) || (((n)>=12) && ((sint32)((uint32)(x) << (31-(n))) < 0)))\n");
  343.     #endif
  344.   #endif
  345. # printf("#define minus_bit(n)  (-1%s<<(n))\n",Lsuffix);
  346. # printf("#define minus_bitm(n)  (-2%s<<((n)-1))\n",Lsuffix);
  347. # printf("#define floor(a_from_floor,b_from_floor)  ((a_from_floor) / (b_from_floor))\n");
  348. # printf("#define ceiling(a_from_ceiling,b_from_ceiling)  (((a_from_ceiling) + (b_from_ceiling) - 1) / (b_from_ceiling))\n");
  349. # printf("#define round_down(a_from_round,b_from_round)  (floor(a_from_round,b_from_round)*(b_from_round))\n");
  350. # printf("#define round_up(a_from_round,b_from_round)  (ceiling(a_from_round,b_from_round)*(b_from_round))\n");
  351. # #if defined(GNU)
  352. #   #ifdef DECALPHA
  353. #     printf("#define DYNAMIC_ARRAY(regdecl,arrayvar,arrayeltype,arraysize)  arrayeltype arrayvar[(arraysize)+1]\n");
  354. #   #else
  355. #     printf("#define DYNAMIC_ARRAY(regdecl,arrayvar,arrayeltype,arraysize)  arrayeltype arrayvar[arraysize]\n");
  356. #   #endif
  357. #   printf("#define FREE_DYNAMIC_ARRAY(arrayvar)\n");
  358. # #elif (defined(UNIX) && (defined(HAVE_ALLOCA_H) || defined(_AIX) || !defined(NO_ALLOCA))) || defined(WATCOM) || defined(RISCOS)
  359. #   printf("#define DYNAMIC_ARRAY(regdecl,arrayvar,arrayeltype,arraysize)  regdecl arrayeltype* arrayvar = (arrayeltype*)alloca((arraysize)*sizeof(arrayeltype))\n");
  360. #   printf("#define FREE_DYNAMIC_ARRAY(arrayvar)\n");
  361. # #else
  362. #   #ifdef HAVE_STDLIB_H
  363. #     printf("#include <stdlib.h>\n");
  364. #   #else
  365. #     printf("#include <sys/types.h>\n");
  366. #   #endif
  367. #   printf("extern void* malloca _ARGS((size_t size));\n");
  368. #   printf("extern void freea _ARGS((void* ptr));\n");
  369. #   printf("#define DYNAMIC_ARRAY(regdecl,arrayvar,arrayeltype,arraysize)  regdecl arrayeltype* arrayvar = (arrayeltype*)malloca((arraysize)*sizeof(arrayeltype))\n");
  370. #   printf("#define FREE_DYNAMIC_ARRAY(arrayvar)  freea(arrayvar)\n");
  371. # #endif
  372.   { int i;
  373.     for (i=1; i<=8; i++)
  374.       { printf("typedef CLISP_UBYTE   uint%d;\n",i);
  375.         printf("typedef CLISP_BYTE    sint%d;\n",i);
  376.       }
  377.     for (i=9; i<=16; i++)
  378.       { printf("typedef CLISP_UWORD   uint%d;\n",i);
  379.         printf("typedef CLISP_WORD    sint%d;\n",i);
  380.       }
  381.     for (i=17; i<=32; i++)
  382.       { printf("typedef CLISP_ULONG   uint%d;\n",i);
  383.         printf("typedef CLISP_LONG    sint%d;\n",i);
  384.       }
  385.     #ifdef HAVE_LONGLONG
  386.       for (i=33; i<=64; i++)
  387.         if ((i==33) || (i==48) || (i==64))
  388.           { printf("typedef CLISP_ULONGLONG  uint%d;\n",i);
  389.             printf("typedef CLISP_LONGLONG   sint%d;\n",i);
  390.           }
  391.     #endif
  392.   }
  393. # printf("typedef sint%d sintB;\n",intBsize);
  394.   printf("typedef uint%d uintB;\n",intBsize);
  395. # printf("typedef sint%d sintW;\n",intWsize);
  396.   printf("typedef uint%d uintW;\n",intWsize);
  397.   printf("typedef sint%d sintL;\n",intLsize);
  398.   printf("typedef uint%d uintL;\n",intLsize);
  399. # #ifdef intQsize
  400. #   printf("typedef sint%d sintQ;\n",intQsize);
  401. #   printf("typedef uint%d uintQ;\n",intQsize);
  402. # #else
  403. #   printf("typedef struct { sintL hi; uintL lo; } sintL2;\n");
  404. #   printf("typedef struct { uintL hi; uintL lo; } uintL2;\n");
  405. # #endif
  406.   printf("typedef sint%d sintP;\n",pointer_bitsize);
  407. # printf("typedef uint%d uintP;\n",pointer_bitsize);
  408. # printf("typedef sint%d sintBW;\n",intBWsize);
  409. # printf("typedef uint%d uintBW;\n",intBWsize);
  410. # printf("typedef sint%d sintWL;\n",intWLsize);
  411.   printf("typedef uint%d uintWL;\n",intWLsize);
  412. # printf("typedef sint%d sintBWL;\n",intBWLsize);
  413.   printf("typedef uint%d uintBWL;\n",intBWLsize);
  414. # #ifdef fast_dotimesW
  415. #   #if (__GNUC__<2)
  416. #     printf("#define dotimesW(countvar_from_dotimesW,count_from_dotimesW,statement_from_dotimesW)  \\\n");
  417. #     printf("  { countvar_from_dotimesW = (count_from_dotimesW);     \\\n");
  418. #     printf("    if (!(countvar_from_dotimesW==0))                   \\\n");
  419. #     printf("      { countvar_from_dotimesW--;                       \\\n");
  420. #     printf("        do {statement_from_dotimesW}                    \\\n");
  421. #     printf("           until ((sintW)--countvar_from_dotimesW==-1); \\\n");
  422. #     printf("  }   }\n");
  423. #     printf("#define dotimespW(countvar_from_dotimespW,count_from_dotimespW,statement_from_dotimespW)  \\\n");
  424. #     printf("  { countvar_from_dotimespW = (count_from_dotimespW)-1;                         \\\n");
  425. #     printf("    do {statement_from_dotimespW} until ((sintW)--countvar_from_dotimespW==-1); \\\n");
  426. #     printf("  }\n");
  427. #   #else
  428. #     printf("#define dotimesW(countvar_from_dotimesW,count_from_dotimesW,statement_from_dotimesW)  \\\n");
  429. #     printf("  { countvar_from_dotimesW = (count_from_dotimesW);        \\\n");
  430. #     printf("    if (!(countvar_from_dotimesW==0))                      \\\n");
  431. #     printf("      { countvar_from_dotimesW--;                          \\\n");
  432. #     printf("        do {statement_from_dotimesW}                       \\\n");
  433. #     printf("           until ((sintW)(--countvar_from_dotimesW)+1==0); \\\n");
  434. #     printf("  }   }\n");
  435. #     printf("#define dotimespW(countvar_from_dotimespW,count_from_dotimespW,statement_from_dotimespW)  \\\n");
  436. #     printf("  { countvar_from_dotimespW = (count_from_dotimespW)-1;                            \\\n");
  437. #     printf("    do {statement_from_dotimespW} until ((sintW)(--countvar_from_dotimespW)+1==0); \\\n");
  438. #     printf("  }\n");
  439. #   #endif
  440. # #else
  441. #   printf("#define dotimesW(countvar_from_dotimesW,count_from_dotimesW,statement_from_dotimesW)  \\\n");
  442. #   printf("  { countvar_from_dotimesW = (count_from_dotimesW);         \\\n");
  443. #   printf("    until (countvar_from_dotimesW==0)                       \\\n");
  444. #   printf("      {statement_from_dotimesW; countvar_from_dotimesW--; } \\\n");
  445. #   printf("  }\n");
  446. #   printf("#define dotimespW(countvar_from_dotimespW,count_from_dotimespW,statement_from_dotimespW)  \\\n");
  447. #   printf("  { countvar_from_dotimespW = (count_from_dotimespW);                   \\\n");
  448. #   printf("    do {statement_from_dotimespW} until (--countvar_from_dotimespW==0); \\\n");
  449. #   printf("  }\n");
  450. # #endif
  451. # #ifdef fast_dotimesL
  452. #   printf("#define dotimesL(countvar_from_dotimesL,count_from_dotimesL,statement_from_dotimesL)  \\\n");
  453. #   printf("  { countvar_from_dotimesL = (count_from_dotimesL);           \\\n");
  454. #   printf("    if (!(countvar_from_dotimesL==0))                         \\\n");
  455. #   printf("      { countvar_from_dotimesL--;                             \\\n");
  456. #   printf("        do {statement_from_dotimesL}                          \\\n");
  457. #   printf("           until ((sintL)(--countvar_from_dotimesL) == -1);   \\\n");
  458. #   printf("  }   }\n");
  459. #   printf("#define dotimespL(countvar_from_dotimespL,count_from_dotimespL,statement_from_dotimespL)  \\\n");
  460. #   printf("  { countvar_from_dotimespL = (count_from_dotimespL)-1;                             \\\n");
  461. #   printf("    do {statement_from_dotimespL} until ((sintL)(--countvar_from_dotimespL) == -1); \\\n");
  462. #   printf("  }\n");
  463. # #else
  464. #   printf("#define dotimesL(countvar_from_dotimesL,count_from_dotimesL,statement_from_dotimesL)  \\\n");
  465. #   printf("  { countvar_from_dotimesL = (count_from_dotimesL);         \\\n");
  466. #   printf("    until (countvar_from_dotimesL==0)                       \\\n");
  467. #   printf("      {statement_from_dotimesL; countvar_from_dotimesL--; } \\\n");
  468. #   printf("  }\n");
  469. #   printf("#define dotimespL(countvar_from_dotimespL,count_from_dotimespL,statement_from_dotimespL)  \\\n");
  470. #   printf("  { countvar_from_dotimespL = (count_from_dotimespL);                   \\\n");
  471. #   printf("    do {statement_from_dotimespL} until (--countvar_from_dotimespL==0); \\\n");
  472. #   printf("  }\n");
  473. # #endif
  474.   printf("#define uintC uintWL\n");
  475. # printf("#define sintC sintWL\n");
  476. # #if (intCsize==intWsize)
  477. #   printf("#define dotimesC dotimesW\n");
  478. #   printf("#define dotimespC dotimespW\n");
  479. # #endif
  480. # #if (intCsize==intLsize)
  481. #   printf("#define dotimesC dotimesL\n");
  482. #   printf("#define dotimespC dotimespL\n");
  483. # #endif
  484. # printf("typedef sint%d sintD;\n",intDsize);
  485.   printf("typedef uint%d uintD;\n",intDsize);
  486. # #ifdef WIDE_HARD
  487. #   printf("#define WIDE_HARD\n");
  488. # #endif
  489. # #ifdef WIDE_SOFT
  490. #   printf("#define WIDE_SOFT\n");
  491. # #endif
  492. # #ifdef WIDE
  493. #   printf("#define WIDE\n");
  494. # #endif
  495.   #if !defined(WIDE)
  496.     #ifdef OBJECT_STRUCT
  497.       printf("typedef struct { uintL one; } object;\n");
  498.     #else
  499.       printf("typedef  void *  object;\n");
  500.     #endif
  501.     printf("typedef  uintL  oint;\n");
  502. #   printf("typedef  sintL  soint;\n");
  503.   #else
  504.     printf("typedef  uint64  oint;\n");
  505. #   printf("typedef  sint64  soint;\n");
  506.     #ifdef WIDE_STRUCT
  507.       printf("typedef  union {\n");
  508.       #if BIG_ENDIAN_P==WIDE_ENDIANNESS
  509.         printf("  struct { /* tint */ uintL type; /* aint */ uintL addr; } both;\n");
  510.       #else
  511.         printf("  struct { /* aint */ uintL addr; /* tint */ uintL type; } both;\n");
  512.       #endif
  513.       printf("  oint one");
  514.       #ifdef GENERATIONAL_GC
  515.         printf(" __attribute__ ((aligned(8)))");
  516.       #endif
  517.       printf("; }\n");
  518.       printf("  object;\n");
  519.     #else
  520.       printf("typedef  oint  object;\n");
  521.     #endif
  522.   #endif
  523.   #if defined(WIDE_STRUCT) || defined(OBJECT_STRUCT)
  524.     printf("#define as_oint(expr)  ((expr).one)\n");
  525.     printf("#define as_object(o)  ((object){one:(o)})\n");
  526.   #else
  527.     printf("#define as_oint(expr)  (oint)(expr)\n");
  528.     printf("#define as_object(o)  (object)(o)\n");
  529.   #endif
  530. # printf1("#define addressbus_mask  %x\n",(oint)addressbus_mask);
  531. # printf("#define oint_type_shift  %d\n",oint_type_shift);
  532. # printf("#define oint_type_len  %d\n",oint_type_len);
  533. # printf1("#define oint_type_mask  %x\n",(oint)oint_type_mask);
  534. # printf("#define oint_addr_shift  %d\n",oint_addr_shift);
  535. # printf("#define oint_addr_len  %d\n",oint_addr_len);
  536. # printf1("#define oint_addr_mask  %x\n",(oint)oint_addr_mask);
  537. # printf("#define oint_data_shift  %d\n",oint_data_shift);
  538. # printf("#define oint_data_len  %d\n",oint_data_len);
  539. # printf1("#define oint_data_mask  %x\n",(oint)oint_data_mask);
  540. # printf("#define addr_shift  %d\n",addr_shift);
  541. # #ifdef vm_addr_mask
  542. #   printf1("#define vm_addr_mask  %x\n",(oint)vm_addr_mask);
  543. # #endif
  544.   printf("typedef uint%d tint;\n",oint_type_len);
  545.   printf("typedef uint%d aint;\n",oint_addr_len);
  546. # printf("typedef sint%d saint;\n",oint_addr_len);
  547. # printf1("#define tint_type_mask  %x\n",(tint)tint_type_mask);
  548.   #if !(defined(WIDE_SOFT) || defined(OBJECT_STRUCT))
  549.     printf("#define objectplus(obj,offset)  ((object)pointerplus(obj,offset))\n");
  550.   #else
  551.     printf("#define objectplus(obj,offset)  as_object(as_oint(obj)+(soint)(offset))\n");
  552.   #endif
  553.   #if !defined(WIDE_SOFT)
  554. #   printf("#define wbit  bit\n");
  555. #   printf("#define wbitm  bitm\n");
  556.     printf("#define wbit_test  bit_test\n");
  557. #   printf("#define minus_wbit  minus_bit\n");
  558.   #else
  559.     printf("#define wbit(n)  (1LL<<(n))\n");
  560. #   printf("#define wbitm(n)  (2LL<<((n)-1))\n");
  561.     printf("#define wbit_test(x,n)  ((x) & wbit(n))\n");
  562. #   printf("#define minus_wbit(n)  (-1LL<<(n))\n");
  563.   #endif
  564.   #if !(exact_uint_size_p(oint_type_len) && (tint_type_mask == bit(oint_type_len)-1))
  565.     printf2("#define typecode(expr)  ((tint)(as_oint(expr) >> %d) & %x)\n",oint_type_shift,(oint)(oint_type_mask >> oint_type_shift));
  566. #   printf("#define mtypecode(expr)  typecode(expr)\n");
  567.   #else
  568.     #if defined(MC68000) && defined(GNU) && !defined(NO_ASM) && (oint_type_shift==24) && (oint_type_len==8)
  569.       printf("#define typecode(expr)  ({var tint __typecode; __asm__ (\"roll #8,%%0\" : \"=d\" (__typecode) : \"0\" (as_oint(expr)) ); __typecode; })\n");
  570.     #elif defined(SPARC) && !defined(WIDE)
  571.       printf("#define typecode(expr)  ((as_oint(expr) << %d) >> %d)\n",32-oint_type_len-oint_type_shift,32-oint_type_len);
  572.     #elif defined(WIDE) && defined(WIDE_STRUCT)
  573.       printf("#define typecode(expr)  ((expr).both.type)\n");
  574.     #else
  575.       printf("#define typecode(expr)  ((tint)(as_oint(expr) >> %d))\n",oint_type_shift);
  576.     #endif
  577. #   #ifdef fast_mtypecode
  578. #     #ifndef WIDE
  579. #       printf("#define mtypecode(expr)  (*(tint*)&(expr)+%d)\n",3*((oint_type_shift==0)==BIG_ENDIAN_P));
  580. #     #endif
  581. #     #ifdef WIDE
  582. #       #ifdef WIDE_STRUCT
  583. #         printf("#define mtypecode(expr)  ((expr).both.type)\n");
  584. #       #elif (oint_type_len==16)
  585. #         printf("#define mtypecode(expr)  (*((tint*)&(expr)+%d))\n",3*((oint_type_shift==0)==BIG_ENDIAN_P));
  586. #       #elif (oint_type_len==32)
  587. #         printf("#define mtypecode(expr)  (*((tint*)&(expr)+%d))\n",((oint_type_shift==0)==BIG_ENDIAN_P));
  588. #       #endif
  589. #     #endif
  590. #   #else
  591. #     printf("#define mtypecode(expr)  typecode(expr)\n");
  592. #   #endif
  593.   #endif
  594. # #if defined(WIDE) && defined(WIDE_STRUCT)
  595. #   printf("#define untype(expr)  ((expr).both.addr)\n");
  596. # #elif !(defined(SPARC) && (oint_addr_len+oint_addr_shift<32))
  597. #   printf2("#define untype(expr)  ((aint)(as_oint(expr) >> %d) & %x)\n",oint_addr_shift,(oint)(oint_addr_mask >> oint_addr_shift));
  598. # #else
  599. #   printf("#define untype(expr)  ((aint)((as_oint(expr) << %d) >> %d))\n",32-oint_addr_len-oint_addr_shift,32-oint_addr_len);
  600. # #endif
  601.   #if defined(WIDE) && defined(WIDE_STRUCT)
  602.     #if BIG_ENDIAN_P==WIDE_ENDIANNESS
  603.       printf("#define type_untype_object(type,address)  ((object){{(tint)(type),(aint)(address)}})\n");
  604.     #else
  605.       printf("#define type_untype_object(type,address)  ((object){{(aint)(address),(tint)(type)}})\n");
  606.     #endif
  607.   #elif !(oint_addr_shift==0)
  608.     printf("#define type_untype_object(type,address)  (as_object(((oint)(tint)(type) << %d) + ((oint)(aint)(address) << %d)))\n",oint_type_shift,oint_addr_shift);
  609.   #else
  610.     #if defined(WIDE_SOFT)
  611.       printf("#define type_untype_object(type,address)  objectplus((oint)(aint)(address),(oint)(tint)(type)<<%d)\n",oint_type_shift);
  612.     #elif defined(OBJECT_STRUCT)
  613.       printf("#define type_untype_object(type,address)  as_object((oint)pointerplus((address),(oint)(tint)(type)<<%d))\n",oint_type_shift);
  614.     #else
  615.       printf("#define type_untype_object(type,address)  as_object(pointerplus((address),(oint)(tint)(type)<<%d))\n",oint_type_shift);
  616.     #endif
  617.   #endif
  618.   #if defined(WIDE) && defined(WIDE_STRUCT)
  619.     #if BIG_ENDIAN_P==WIDE_ENDIANNESS
  620.       printf("#define type_data_object(type,address)  ((object){{(tint)(type),(aint)(address)}})\n");
  621.     #else
  622.       printf("#define type_data_object(type,address)  ((object){{(aint)(address),(tint)(type)}})\n");
  623.     #endif
  624.   #elif !(oint_addr_shift==0)
  625.     printf("#define type_data_object(type,data)  (as_object(((oint)(tint)(type) << %d) + ((oint)(aint)(data) << %d)))\n",oint_type_shift,oint_addr_shift);
  626.   #else
  627.     printf("#define type_data_object(type,data)  (as_object(((oint)(tint)(type) << %d) + (oint)(aint)(data)))\n",oint_type_shift);
  628.   #endif
  629.   #if (addr_shift==0)
  630.     printf("#define upointer  untype\n");
  631.   #else
  632.     printf("#define optimized_upointer(obj)  ((aint)((as_oint(obj) << %d) >> %d))\n",32-oint_addr_len-oint_addr_shift,32-oint_addr_len-addr_shift);
  633.     printf("#define upointer(obj)  (untype(obj)<<%d)\n",addr_shift);
  634.   #endif
  635.   #if (addr_shift==0)
  636.     printf("#define type_pointer_object(type,address)  type_untype_object(type,address)\n");
  637.   #elif defined(WIDE_SOFT) && !defined(WIDE_STRUCT)
  638.     printf("#define type_pointer_object(type,address)    type_untype_object(type,(aint)(address)>>%d)\n",addr_shift);
  639.   #else
  640.     printf("#define type_pointer_object(type,address)  (as_object(((oint)(tint)(type) << %d) + ((oint)(aint)(address) << %d)))\n",oint_type_shift,oint_addr_shift-addr_shift);
  641.   #endif
  642.   printf("#define type_constpointer_object(type,address)  type_pointer_object(type,address)\n");
  643.   #if defined(WIDE_SOFT) && defined(WIDE_STRUCT)
  644.     printf("#define type_zero_oint(type)  as_oint(type_untype_object(type,0))\n");
  645.   #else
  646.     printf("#define type_zero_oint(type)  ((oint)(tint)(type) << %d)\n",oint_type_shift);
  647.   #endif
  648. # printf("typedef struct { object cdr; object car; } cons_;\n");
  649. # printf("typedef cons_ *  Cons;\n");
  650. # printf("typedef struct { object rt_num; object rt_den; } ratio_;\n");
  651. # printf("typedef ratio_ *  Ratio;\n");
  652. # printf("typedef struct { object c_real; object c_imag; } complex_;\n");
  653. # printf("typedef complex_ *  Complex;\n");
  654.   printf("#define VAROBJECT_HEADER  object GCself;\n");
  655.   printf("typedef struct { VAROBJECT_HEADER object symvalue; object symfunction; object proplist; object pname; object homepackage; } symbol_;\n");
  656. # printf("typedef symbol_ *  Symbol;\n");
  657.   printf("typedef uint%d cint;\n",char_int_len);
  658.   printf1("#define int_char(int_from_int_char)  type_data_object(%d,(aint)(cint)(int_from_int_char))\n",(tint)char_type);
  659.   #if !((oint_data_shift==0) && (char_int_len<=oint_data_len) && (exact_uint_size_p(char_int_len)))
  660.     printf("#define char_int(char_from_char_int)  ((cint)(untype(char_from_char_int)))\n");
  661.   #else
  662.     printf("#define char_int(char_from_char_int)  ((cint)as_oint(char_from_char_int))\n");
  663.   #endif
  664.   #if !(char_code_shift_c==0)
  665.     printf("#define code_char(code_from_code_char)  int_char((cint)(code_from_code_char)<<%d)\n",char_code_shift_c);
  666.   #else
  667.     printf("#define code_char(code_from_code_char)  int_char((cint)(code_from_code_char))\n");
  668.   #endif
  669.   #if !((char_code_shift_c==0)&&(char_code_len_c==8))
  670.     printf2("#define char_code(char_from_char_code)  ((uintB)((char_int(char_from_char_code)&%x)>>%d))\n",(cint)char_code_mask_c,char_code_shift_c);
  671.   #else
  672.     printf("#define char_code(char_from_char_code)  ((uintB)(char_int(char_from_char_code)))\n");
  673.   #endif
  674.   printf1("#define fixnum(x)  type_data_object(%d,x)\n",(tint)fixnum_type);
  675. # printf("#define Fixnum_0  fixnum(0)\n");
  676. # printf("#define Fixnum_1  fixnum(1)\n");
  677. # printf2("#define Fixnum_minus1  type_data_object(%d,%x)\n",(tint)(fixnum_type | bit(sign_bit_t)),(aint)(bitm(oint_data_len)-1));
  678.   #if !(defined(SPARC) && (oint_data_len+oint_data_shift<32))
  679.     printf2("#define posfixnum_to_L(obj)  ((uintL)((as_oint(obj)&%x)>>%d))\n",(oint)(wbitm(oint_data_len+oint_data_shift)-1),oint_data_shift);
  680.   #else
  681.     printf("#define posfixnum_to_L(obj)  ((uintL)((as_oint(obj) << %d) >> %d))\n",32-oint_data_len-oint_data_shift,32-oint_data_len);
  682.   #endif
  683. # printf1("#define negfixnum_to_L(obj)  (posfixnum_to_L(obj) | %x)\n",(uintL)(-bitm(oint_data_len)));
  684.   #if (oint_data_len>=intLsize)
  685.     printf("#define fixnum_to_L(obj)  (sintL)posfixnum_to_L(obj)\n");
  686.   #elif (sign_bit_o == oint_data_len+oint_data_shift)
  687.     printf("#define fixnum_to_L(obj)  (((sintL)as_oint(obj) << %d) >> %d)\n",intLsize-1-sign_bit_o,intLsize-1-sign_bit_o+oint_data_shift);
  688.   #else
  689.     #if !defined(SPARC)
  690.       printf5("#define fixnum_to_L(obj)  (sintL)( ((((sintL)as_oint(obj) >> %d) << %d) >> %d) | ((uintL)((as_oint(obj) & %x) >> %d)) )\n",sign_bit_o,intLsize-1,intLsize-1-oint_data_len,(oint)wbitm(oint_data_len+oint_data_shift)-1,oint_data_shift);
  691.     #else
  692.       printf("#define fixnum_to_L(obj)  (sintL)( ((((sintL)as_oint(obj) >> %d) << %d) >> %d) | (((uintL)as_oint(obj) << %d) >> %d) )\n",sign_bit_o,intLsize-1,intLsize-1-oint_data_len,intLsize-oint_data_len-oint_data_shift,intLsize-oint_data_len);
  693.     #endif
  694.   #endif
  695. # printf("#define fixnum_inc(obj,delta)  objectplus(obj, (soint)(delta) << %d)\n",oint_data_shift);
  696. # printf("#define posfixnum(x)  fixnum_inc(Fixnum_0,x)\n");
  697. # printf("#define negfixnum(x)  fixnum_inc(fixnum_inc(Fixnum_minus1,1),x)\n");
  698. # printf("#define sfixnum(x) ((x)>=0 ? posfixnum(x) : negfixnum(x))\n");
  699.   printf("typedef struct { VAROBJECT_HEADER uintC length; uintD data[unspecified]; } bignum_;\n");
  700.   printf("typedef bignum_ *  Bignum;\n");
  701.   printf("typedef uint32 ffloat;\n");
  702.   printf("typedef union { ffloat explicit_; } ffloatjanus;\n");
  703.   #ifdef intQsize
  704.     printf("typedef uint64 dfloat;\n");
  705.   #else
  706.     #if BIG_ENDIAN_P
  707.       printf("typedef struct {uint32 semhi,mlo;} dfloat;\n");
  708.     #else
  709.       printf("typedef struct {uint32 mlo,semhi;} dfloat;\n");
  710.     #endif
  711.   #endif
  712.   printf("typedef union { dfloat explicit_; } dfloatjanus;\n");
  713. # printf("typedef struct { VAROBJECT_HEADER uintL  length; } sarray_;\n");
  714. # printf("typedef sarray_ *  Sarray;\n");
  715. # printf("typedef struct { VAROBJECT_HEADER uintL  length; uint8  data[unspecified]; } sbvector_;\n");
  716. # printf("typedef sbvector_ *  Sbvector;\n");
  717. # printf("typedef struct { VAROBJECT_HEADER uintL  length; uintB  data[unspecified]; } sstring_;\n");
  718. # printf("typedef sstring_ *  Sstring;\n");
  719. # printf("typedef struct { VAROBJECT_HEADER uintL  length; object data[unspecified]; } svector_;\n");
  720. # printf("typedef svector_ *  Svector;\n");
  721. # printf("typedef struct { VAROBJECT_HEADER uintB recflags; sintB rectype; uintW recfiller; object recdata[unspecified]; } record_;\n");
  722. # printf("typedef record_ *  Record;\n");
  723. # printf("#define SRECORD_HEADER  VAROBJECT_HEADER uintB recflags; sintB rectype; uintW reclength;\n");
  724. # printf("typedef struct { SRECORD_HEADER object recdata[unspecified]; } srecord_;\n");
  725. # printf("typedef srecord_ *  Srecord;\n");
  726. # printf("#define XRECORD_HEADER  VAROBJECT_HEADER uintB recflags; sintB rectype; uintB reclength; uintB recxlength;\n");
  727. # printf("typedef struct { XRECORD_HEADER object recdata[unspecified]; } xrecord_;\n");
  728. # printf("typedef xrecord_ *  Xrecord;\n");
  729. # printf("typedef struct { XRECORD_HEADER object pack_external_symbols; object pack_internal_symbols; object pack_shadowing_symbols; object pack_use_list; object pack_used_by_list; object pack_name; object pack_nicknames; } *  Package;\n");
  730. # printf("typedef Srecord  Structure;\n");
  731. # printf("#define structure_types   recdata[0]\n");
  732. # printf("typedef struct { SRECORD_HEADER object class; object other[unspecified]; } *  Instance;\n");
  733.   printf("typedef void Values;\n");
  734.   printf("typedef Values (*lisp_function)();\n");
  735.   printf("typedef struct { lisp_function function; object name; object keywords; uintW argtype; uintW req_anz; uintW opt_anz; uintB rest_flag; uintB key_flag; uintW key_anz; } subr_;\n");
  736. # printf("typedef subr_ *  Subr;\n");
  737.   printf("typedef enum { subr_norest, subr_rest } subr_rest_;\n");
  738.   printf("typedef enum { subr_nokey, subr_key, subr_key_allow } subr_key_;\n");
  739. # printf3("#define make_system(data)  type_data_object(%d,%x | (%x & (data)))\n",(tint)system_type,(oint)(bit(oint_data_len-1) | bit(0)),(oint)(bit(oint_data_len)-1));
  740. # printf1("#define unbound  make_system(%x)\n",0xFFFFFFUL);
  741.   #if !((oint_addr_shift==0) && (addr_shift==0))
  742.     printf("#define pointable(obj)  ((void*)upointer(obj))\n");
  743.   #else
  744.     #if !(((tint_type_mask<<oint_type_shift) & addressbus_mask) == 0)
  745.       printf1("#define pointable(obj)  ((void*)((aint)as_oint(obj) & %x))\n",(aint)oint_addr_mask | ~addressbus_mask);
  746.     #else
  747.       printf("#define pointable(obj)  ((void*)as_oint(obj))\n");
  748.     #endif
  749.   #endif
  750.   #if defined(WIDE_STRUCT)
  751.     #define printf_type_pointable(type)  printf("((void*)((obj).both.addr))");
  752.   #elif !((oint_addr_shift==0) && (addr_shift==0) && (((tint_type_mask<<oint_type_shift) & addressbus_mask) == 0))
  753.     #if (addr_shift==0)
  754.       #define printf_type_pointable(type)  \
  755.         if ((oint_addr_shift==0) && ((type_zero_oint(type) & addressbus_mask) == 0)) \
  756.           printf("((void*)(aint)as_oint(obj))"); \
  757.           else \
  758.           printf("((void*)(aint)pointable(obj))");
  759.     #elif !(addr_shift==0)
  760.       #define printf_type_pointable(type)  \
  761.         if (optimized_upointer(type_data_object(type,0)) == 0) \
  762.           printf("((void*)(aint)optimized_upointer(obj))"); \
  763.           else \
  764.           printf("((void*)(aint)pointable(obj))");
  765.     #endif
  766.   #else
  767.     #define printf_type_pointable(type)  printf("((void*)(aint)as_oint(obj))");
  768.   #endif
  769. # printf("#define TheCons(obj)  ((Cons)("); printf_type_pointable(cons_type|imm_cons_type); printf("))\n");
  770. # printf("#define TheRatio(obj)  ((Ratio)("); printf_type_pointable(ratio_type|bit(sign_bit_t)); printf("))\n");
  771. # printf("#define TheComplex(obj)  ((Complex)("); printf_type_pointable(complex_type); printf("))\n");
  772. # printf("#define TheSymbol(obj)  ((Symbol)("); printf_type_pointable(symbol_type); printf("))\n");
  773.   printf("#define TheBignum(obj)  ((Bignum)("); printf_type_pointable(bignum_type|bit(sign_bit_t)); printf("))\n");
  774. # printf("#define TheSarray(obj)  ((Sarray)("); printf_type_pointable(sbvector_type|imm_sbvector_type|sstring_type|imm_sstring_type|svector_type|imm_svector_type); printf("))\n");
  775. # printf("#define TheSbvector(obj)  ((Sbvector)("); printf_type_pointable(sbvector_type|imm_sbvector_type); printf("))\n");
  776. # printf("#define TheSstring(obj)  ((Sstring)("); printf_type_pointable(sstring_type|imm_sstring_type); printf("))\n");
  777. # printf("#define TheSvector(obj)  ((Svector)("); printf_type_pointable(svector_type|imm_svector_type); printf("))\n");
  778. # printf("#define TheRecord(obj)  ((Record)("); printf_type_pointable(closure_type|structure_type|stream_type|orecord_type|instance_type); printf("))\n");
  779. # printf("#define TheSrecord(obj)  ((Srecord)("); printf_type_pointable(closure_type|structure_type|orecord_type|instance_type); printf("))\n");
  780. # printf("#define TheXrecord(obj)  ((Xrecord)("); printf_type_pointable(stream_type|orecord_type); printf("))\n");
  781. # printf("#define ThePackage(obj)  ((Package)("); printf_type_pointable(orecord_type); printf("))\n");
  782. # printf("#define TheStructure(obj)  ((Structure)("); printf_type_pointable(structure_type); printf("))\n");
  783. # printf("#define TheInstance(obj)  ((Instance)("); printf_type_pointable(instance_type); printf("))\n");
  784. # printf("#define TheSubr(obj)  ((Subr)("); printf_type_pointable(subr_type); printf("))\n");
  785. # printf("#define TheMachine(obj)  ((void*)("); printf_type_pointable(machine_type); printf("))\n");
  786. # printf("#define Car(obj)  (TheCons(obj)->car)\n");
  787. # printf("#define Cdr(obj)  (TheCons(obj)->cdr)\n");
  788. # printf("#define Symbol_value(obj)  (TheSymbol(obj)->symvalue)\n");
  789. # printf("#define Symbol_function(obj)  (TheSymbol(obj)->symfunction)\n");
  790. # printf("#define Symbol_plist(obj)  (TheSymbol(obj)->proplist)\n");
  791. # printf("#define Symbol_name(obj)  (TheSymbol(obj)->pname)\n");
  792. # printf("#define Symbol_package(obj)  (TheSymbol(obj)->homepackage)\n");
  793.   #if defined(WIDE_STRUCT) || defined(OBJECT_STRUCT)
  794.     printf("#define eq(obj1,obj2)  (as_oint(obj1) == as_oint(obj2))\n");
  795.   #else
  796.     printf("#define eq(obj1,obj2)  ((obj1) == (obj2))\n");
  797.   #endif
  798.   printf("#define nullp(obj)  (eq(obj,NIL))\n");
  799. # #if defined(cons_bit_o)
  800. #   #ifdef fast_mtypecode
  801. #     #ifdef WIDE_STRUCT
  802. #       printf("#define consp(obj)  (typecode(obj) & bit(%d))\n",cons_bit_t);
  803. #       printf("#define atomp(obj)  ((typecode(obj) & bit(%d))==0)\n",cons_bit_t);
  804. #     #else
  805. #       printf("#define consp(obj)  (wbit_test(as_oint(obj),%d))\n",cons_bit_o);
  806. #       printf("#define atomp(obj)  (!wbit_test(as_oint(obj),%d))\n",cons_bit_o);
  807. #     #endif
  808. #     printf("#define mconsp(obj)  (mtypecode(obj) & bit(%d))\n",cons_bit_t);
  809. #     printf("#define matomp(obj)  ((mtypecode(obj) & bit(%d))==0)\n",cons_bit_t);
  810. #   #else
  811. #     printf("#define consp(obj)  (wbit_test(as_oint(obj),%d))\n",cons_bit_o);
  812. #     printf("#define atomp(obj)  (!wbit_test(as_oint(obj),%d))\n",cons_bit_o);
  813. #     printf("#define mconsp(obj)  consp(obj)\n");
  814. #     printf("#define matomp(obj)  atomp(obj)\n");
  815. #   #endif
  816. # #else
  817. #   printf2("#define consp(obj)  ((typecode(obj) & ~%d) == %d)\n",(tint)imm_cons_mask,(tint)cons_type);
  818. #   printf2("#define atomp(obj)  (!((typecode(obj) & ~%d) == %d))\n",(tint)imm_cons_mask,(tint)cons_type);
  819. #   printf2("#define mconsp(obj)  ((mtypecode(obj) & ~%d) == %d)\n",(tint)imm_cons_mask,(tint)cons_type);
  820. #   printf2("#define matomp(obj)  (!((mtypecode(obj) & ~%d) == %d))\n",(tint)imm_cons_mask,(tint)cons_type);
  821. # #endif
  822. # printf("#define listp(obj)  (nullp(obj) || consp(obj))\n");
  823. # #if defined(symbol_bit_o)
  824. #   #ifdef fast_mtypecode
  825. #     #ifdef WIDE_STRUCT
  826. #       printf("#define symbolp(obj)  (typecode(obj) & bit(%d))\n",symbol_bit_t);
  827. #     #else
  828. #       printf("#define symbolp(obj)  (wbit_test(as_oint(obj),%d))\n",symbol_bit_o);
  829. #     #endif
  830. #     printf("#define msymbolp(obj)  (mtypecode(obj) & bit(%d))\n",symbol_bit_t);
  831. #   #else
  832. #     printf("#define symbolp(obj)  (wbit_test(as_oint(obj),%d))\n",symbol_bit_o);
  833. #     printf("#define msymbolp(obj)  symbolp(obj)\n");
  834. #   #endif
  835. # #else
  836. #   printf1("#define symbolp(obj)  (typecode(obj) == %d)\n",(tint)symbol_type);
  837. #   printf1("#define msymbolp(obj)  (mtypecode(obj) == %d)\n",(tint)symbol_type);
  838. # #endif
  839. # #ifdef fast_mtypecode
  840. #   #ifdef WIDE_STRUCT
  841. #     printf("#define numberp(obj)  (typecode(obj) & bit(%d))\n",number_bit_t);
  842. #   #else
  843. #     printf("#define numberp(obj)  (wbit_test(as_oint(obj),%d))\n",number_bit_o);
  844. #   #endif
  845. #   printf("#define mnumberp(obj)  (mtypecode(obj) & bit(%d))\n",number_bit_t);
  846. # #else
  847. #   printf("#define numberp(obj)  (wbit_test(as_oint(obj),%d))\n",number_bit_o);
  848. #   printf("#define mnumberp(obj)  numberp(obj)\n");
  849. # #endif
  850. # printf2("#define vectorp(obj)  ((tint)((typecode(obj) & ~%d)-1) <= (tint)%d)\n",(tint)(imm_array_mask | bit(notsimple_bit_t)),(tint)(svector_type-1));
  851. # printf2("#define mvectorp(obj)  ((tint)((mtypecode(obj) & ~%d)-1) <= (tint)%d)\n",(tint)(imm_array_mask | bit(notsimple_bit_t)),(tint)(svector_type-1));
  852. # printf2("#define simple_vector_p(obj)  ((typecode(obj) & ~%d) == %d)\n",(tint)imm_array_mask,(tint)svector_type);
  853. # printf2("#define m_simple_vector_p(obj)  ((mtypecode(obj) & ~%d) == %d)\n",(tint)imm_array_mask,(tint)svector_type);
  854. # printf2("#define general_vector_p(obj)  ((typecode(obj) & ~%d) == %d)\n",(tint)(imm_array_mask | bit(notsimple_bit_t)),(tint)svector_type);
  855. # printf2("#define m_general_vector_p(obj)  ((mtypecode(obj) & ~%d) == %d)\n",(tint)(imm_array_mask | bit(notsimple_bit_t)),(tint)svector_type);
  856. # printf2("#define simple_string_p(obj)  ((typecode(obj) & ~%d) == %d)\n",(tint)imm_array_mask,(tint)sstring_type);
  857. # printf2("#define m_simple_string_p(obj)  ((mtypecode(obj) & ~%d) == %d)\n",(tint)imm_array_mask,(tint)sstring_type);
  858. # printf2("#define stringp(obj)  ((typecode(obj) & ~%d) == %d)\n",(tint)(imm_array_mask | bit(notsimple_bit_t)),(tint)sstring_type);
  859. # printf2("#define mstringp(obj)  ((mtypecode(obj) & ~%d) == %d)\n",(tint)(imm_array_mask | bit(notsimple_bit_t)),(tint)sstring_type);
  860. # printf2("#define simple_bit_vector_p(obj)  ((typecode(obj) & ~%d) == %d)\n",(tint)imm_array_mask,(tint)sbvector_type);
  861. # printf2("#define m_simple_bit_vector_p(obj)  ((mtypecode(obj) & ~%d) == %d)\n",(tint)imm_array_mask,(tint)sbvector_type);
  862. # printf("#define bit_vector_p(obj)  \\\n");
  863. # printf4("  (((typecode(obj) & ~%d) == %d) || (((typecode(obj) & ~%d) == %d) \\\n",(tint)imm_array_mask,(tint)sbvector_type,(tint)imm_array_mask,(tint)bvector_type);
  864. # printf("       && ((TheArray(obj)->flags & %d) == %d) \\\n",arrayflags_atype_mask,Atype_Bit);
  865. # printf("  )   )\n");
  866. # printf("#define m_bit_vector_p(obj)  \\\n");
  867. # printf4("  (((mtypecode(obj) & ~%d) == %d) || (((mtypecode(obj) & ~%d) == %d) \\\n",(tint)imm_array_mask,(tint)sbvector_type,(tint)imm_array_mask,(tint)bvector_type);
  868. # printf("       && ((TheArray(obj)->flags & %d) == %d) \\\n",arrayflags_atype_mask,Atype_Bit);
  869. # printf("  )   )\n");
  870. # printf2("#define arrayp(obj)  ((tint)((typecode(obj) & ~%d) - 1) <= (tint)%d)\n",(tint)imm_array_mask,(tint)(vector_type-1));
  871. # printf1("#define instancep(obj)  (typecode(obj)==%d)\n",(tint)instance_type);
  872. # printf1("#define minstancep(obj)  (mtypecode(obj)==%d)\n",(tint)instance_type);
  873. # #ifdef case_structure
  874. #   printf1("#define structurep(obj)  (typecode(obj)==%d)\n",(tint)structure_type);
  875. #   printf1("#define mstructurep(obj)  (mtypecode(obj)==%d)\n",(tint)structure_type);
  876. # #else
  877. #   printf("#define structurep(obj)  (orecordp(obj) && (TheRecord(obj)->rectype == %d))\n",Rectype_Structure);
  878. #   printf("#define mstructurep(obj)  (morecordp(obj) && (TheRecord(obj)->rectype == %d))\n",Rectype_Structure);
  879. # #endif
  880. # printf1("#define orecordp(obj)  (typecode(obj)==%d)\n",(tint)orecord_type);
  881. # printf1("#define morecordp(obj)  (mtypecode(obj)==%d)\n",(tint)orecord_type);
  882. # printf("#define packagep(obj)  (orecordp(obj) && (TheRecord(obj)->rectype == %d))\n",Rectype_Package);
  883. # printf1("#define charp(obj)  (typecode(obj)==%d)\n",(tint)char_type);
  884. # printf1("#define mcharp(obj)  (mtypecode(obj)==%d)\n",(tint)char_type);
  885. # printf2("#define string_char_p(obj)  ((as_oint(obj) & ~%x) == type_zero_oint(%d))\n",((oint)char_code_mask_c) << oint_data_shift,(tint)char_type);
  886. # printf2("#define integerp(obj)  ((typecode(obj) & ~%d) == %d)\n",(tint)((fixnum_type|bignum_type|bit(sign_bit_t)) & ~fixnum_type),(tint)fixnum_type);
  887. # printf2("#define mintegerp(obj)  ((mtypecode(obj) & ~%d) == %d)\n",(tint)((fixnum_type|bignum_type|bit(sign_bit_t)) & ~fixnum_type),(tint)fixnum_type);
  888. # printf2("#define fixnump(obj)  ((typecode(obj) & ~%d) == %d)\n",(tint)bit(sign_bit_t),(tint)fixnum_type);
  889. # printf2("#define mfixnump(obj)  ((mtypecode(obj) & ~%d) == %d)\n",(tint)bit(sign_bit_t),(tint)fixnum_type);
  890.   printf1("#define posfixnump(obj)  (typecode(obj) == %d)\n",(tint)fixnum_type);
  891. # printf1("#define mposfixnump(obj)  (mtypecode(obj) == %d)\n",(tint)fixnum_type);
  892. # printf2("#define bignump(obj)  ((typecode(obj) & ~%d) == %d)\n",(tint)bit(sign_bit_t),(tint)bignum_type);
  893. # printf2("#define mbignump(obj)  ((mtypecode(obj) & ~%d) == %d)\n",(tint)bit(sign_bit_t),(tint)bignum_type);
  894. # printf2("#define ratiop(obj)  ((typecode(obj) & ~%d) == %d)\n",(tint)bit(sign_bit_t),(tint)ratio_type);
  895. # printf2("#define mratiop(obj)  ((mtypecode(obj) & ~%d) == %d)\n",(tint)bit(sign_bit_t),(tint)ratio_type);
  896. # printf2("#define floatp(obj)  ((typecode(obj) & ~%d) == %d)\n",(tint)((sfloat_type|ffloat_type|dfloat_type|lfloat_type|bit(sign_bit_t)) & ~sfloat_type),(tint)sfloat_type);
  897. # printf2("#define mfloatp(obj)  ((mtypecode(obj) & ~%d) == %d)\n",(tint)((sfloat_type|ffloat_type|dfloat_type|lfloat_type|bit(sign_bit_t)) & ~sfloat_type),(tint)sfloat_type);
  898. # printf2("#define short_float_p(obj)  ((typecode(obj) & ~%d) == %d)\n",(tint)bit(sign_bit_t),(tint)sfloat_type);
  899. # printf2("#define m_short_float_p(obj)  ((mtypecode(obj) & ~%d) == %d)\n",(tint)bit(sign_bit_t),(tint)sfloat_type);
  900. # printf2("#define single_float_p(obj)  ((typecode(obj) & ~%d) == %d)\n",(tint)bit(sign_bit_t),(tint)ffloat_type);
  901. # printf2("#define m_single_float_p(obj)  ((mtypecode(obj) & ~%d) == %d)\n",(tint)bit(sign_bit_t),(tint)ffloat_type);
  902. # printf2("#define double_float_p(obj)  ((typecode(obj) & ~%d) == %d)\n",(tint)bit(sign_bit_t),(tint)dfloat_type);
  903. # printf2("#define m_double_float_p(obj)  ((mtypecode(obj) & ~%d) == %d)\n",(tint)bit(sign_bit_t),(tint)dfloat_type);
  904. # printf2("#define long_float_p(obj)  ((typecode(obj) & ~%d) == %d)\n",(tint)bit(sign_bit_t),(tint)lfloat_type);
  905. # printf2("#define m_long_float_p(obj)  ((mtypecode(obj) & ~%d) == %d)\n",(tint)bit(sign_bit_t),(tint)lfloat_type);
  906. # printf1("#define complexp(obj)  (typecode(obj) == %d)\n",(tint)complex_type);
  907. # printf1("#define mcomplexp(obj)  (mtypecode(obj) == %d)\n",(tint)complex_type);
  908.   #ifdef fast_mtypecode
  909.     #ifdef WIDE_STRUCT
  910.       printf("#define positivep(obj)  ((typecode(obj) & bit(%d)) == 0)\n",sign_bit_t);
  911.     #else
  912.       printf("#define positivep(obj)  (!wbit_test(as_oint(obj),%d))\n",sign_bit_o);
  913.     #endif
  914. #   printf("#define mpositivep(obj)  ((mtypecode(obj) & bit(%d)) == 0)\n",sign_bit_t);
  915.   #else
  916.     printf("#define positivep(obj)  (!wbit_test(as_oint(obj),%d))\n",sign_bit_o);
  917. #   printf("#define mpositivep(obj)  positivep(obj)\n");
  918.   #endif
  919.   printf2("#define uint8_p(obj)  ((as_oint(obj) & ~%x) == %x)\n",(oint)0xFF << oint_data_shift,as_oint(Fixnum_0));
  920.   printf3("#define sint8_p(obj)  (((as_oint(obj) ^ (positivep(obj) ? 0 : %x)) & ~%x) == %x)\n",as_oint(Fixnum_minus1)^as_oint(Fixnum_0),(oint)0x7F << oint_data_shift,as_oint(Fixnum_0));
  921.   printf2("#define uint16_p(obj)  ((as_oint(obj) & ~%x) == %x)\n",(oint)0xFFFF << oint_data_shift,as_oint(Fixnum_0));
  922.   printf3("#define sint16_p(obj)  (((as_oint(obj) ^ (positivep(obj) ? 0 : %x)) & ~%x) == %x)\n",as_oint(Fixnum_minus1)^as_oint(Fixnum_0),(oint)0x7FFF << oint_data_shift,as_oint(Fixnum_0));
  923.   #if (oint_data_len>=32)
  924.     printf2("#define uint32_p(obj)  ((as_oint(obj) & ~%x) == %x)\n",(oint)0xFFFFFFFF << oint_data_shift,as_oint(Fixnum_0));
  925.   #else
  926.     printf5("#define uint32_p(obj)  ((typecode(obj)==%d) || ((typecode(obj)==%d) && (TheBignum(obj)->length <= %d) && ((TheBignum(obj)->length < %d) || (TheBignum(obj)->data[0] < (uintD)bit(%d)) )))\n",(tint)fixnum_type,(tint)bignum_type,ceiling(33,intDsize),ceiling(33,intDsize),32%intDsize);
  927.   #endif
  928.   #if (oint_data_len>=31)
  929.     printf3("#define sint32_p(obj)  (((as_oint(obj) ^ (positivep(obj) ? 0 : %x)) & ~%x) == %x)\n",as_oint(Fixnum_minus1)^as_oint(Fixnum_0),(oint)0x7FFFFFFF << oint_data_shift,as_oint(Fixnum_0));
  930.   #else
  931.     printf7("#define sint32_p(obj)  (((typecode(obj) & ~%d) == %d) || (((typecode(obj) & ~%d) == %d) && (TheBignum(obj)->length <= %d) && ((TheBignum(obj)->length < %d) || ((TheBignum(obj)->data[0] ^ (positivep(obj) ? (uintD)0 : ~(uintD)0)) < (uintD)bit(%d)) )))\n",(tint)bit(sign_bit_t),(tint)fixnum_type,(tint)bit(sign_bit_t),(tint)bignum_type,ceiling(32,intDsize),ceiling(32,intDsize),31%intDsize);
  932.   #endif
  933.   printf5("#define uint64_p(obj)  ((typecode(obj)==%d) || ((typecode(obj)==%d) && (TheBignum(obj)->length <= %d) && ((TheBignum(obj)->length < %d) || (TheBignum(obj)->data[0] < (uintD)bit(%d)) )))\n",(tint)fixnum_type,(tint)bignum_type,ceiling(65,intDsize),ceiling(65,intDsize),64%intDsize);
  934.   printf7("#define sint64_p(obj)  (((typecode(obj) & ~%d) == %d) || (((typecode(obj) & ~%d) == %d) && (TheBignum(obj)->length <= %d) && ((TheBignum(obj)->length < %d) || ((TheBignum(obj)->data[0] ^ (positivep(obj) ? (uintD)0 : ~(uintD)0)) < (uintD)bit(%d)) )))\n",(tint)bit(sign_bit_t),(tint)fixnum_type,(tint)bit(sign_bit_t),(tint)bignum_type,ceiling(64,intDsize),ceiling(64,intDsize),63%intDsize);
  935. # #if (int_bitsize==16)
  936. #   printf("#define uint_p  uint16_p\n");
  937. #   printf("#define sint_p  sint16_p\n");
  938. # #else
  939. #   printf("#define uint_p  uint32_p\n");
  940. #   printf("#define sint_p  sint32_p\n");
  941. # #endif
  942. # #if (long_bitsize==32)
  943. #   printf("#define ulong_p  uint32_p\n");
  944. #   printf("#define slong_p  sint32_p\n");
  945. # #else
  946. #   printf("#define ulong_p  uint64_p\n");
  947. #   printf("#define slong_p  sint64_p\n");
  948. # #endif
  949.   #if defined(GNU) && defined(I80Z86) && !defined(NO_ASM)
  950.     printf("#define SP()  ({var aint __SP; __asm__ __volatile__ (\"movl %%esp,%0\" : \"=g\" (__SP) : ); __SP; })\n");
  951.   #endif
  952.   #ifndef STACK_register
  953.     printf("extern object* STACK;\n");
  954.   #else
  955.     /* With g++: "global register variable follows a function definition" */
  956.     printf("#ifndef IN_MODULE_CC\n");
  957.     printf("  register object* STACK __asm__(\"%s\");\n",STACK_register);
  958.     #ifdef HAVE_SAVED_REGISTERS
  959.       printf("  register long STACK_reg __asm__(\"%s\");\n",STACK_register);
  960.     #endif
  961.     printf("#endif\n");
  962.   #endif
  963.   #if defined(HAVE_SAVED_STACK)
  964.     printf("extern object* saved_STACK;\n");
  965.     printf("#define begin_call()  saved_STACK = STACK\n");
  966.     printf("#define end_call()  saved_STACK = (object*)NULL\n");
  967.     #ifdef HAVE_SAVED_REGISTERS
  968.       printf("extern struct registers\n");
  969.       printf("              {\n");
  970.       printf("                long STACK_register_contents;\n");
  971.       printf("                long mv_count_register_contents;\n");
  972.       printf("                long value1_register_contents;\n");
  973.       printf("                struct registers *prev;\n");
  974.       printf("              } *callback_saved_registers;\n");
  975.       printf("#define begin_callback()  \\\n");
  976.       printf("  { struct registers *registers = alloca(sizeof(struct registers)); \\\n");
  977.       printf("    registers->prev = callback_saved_registers; \\\n");
  978.       printf("    registers->STACK_register_contents = STACK_reg; \\\n");
  979.       printf("    registers->mv_count_register_contents = mv_count_reg; \\\n");
  980.       printf("    registers->value1_register_contents   = value1_reg;   \\\n");
  981.       printf("    callback_saved_registers = registers; \\\n");
  982.       printf("    STACK = saved_STACK; end_call(); \\\n");
  983.       printf("    }\n");
  984.       printf("#define end_callback()  \\\n");
  985.       printf("  { struct registers *registers = callback_saved_registers; \\\n");
  986.       printf("    begin_call(); \\\n");
  987.       printf("    STACK_reg = registers->STACK_register_contents;\\\n");
  988.       printf("    mv_count_reg = registers->mv_count_register_contents;\\\n");
  989.       printf("    value1_reg = registers->value1_register_contents;\\\n");
  990.       printf("    callback_saved_registers = registers->prev;\\\n");
  991.       printf("    }\n");
  992.     #else
  993.       printf("#define begin_callback()  setSTACK(STACK = saved_STACK); end_call()\n");
  994.       printf("#define end_callback()  begin_call()\n");
  995.     #endif
  996.   #elif defined(EMUNIX) && defined(WINDOWS)
  997.     printf("#define begin_call()  if ((aint)SP() > (aint)SP_start) alloca((aint)SP() - (aint)SP_start)\n");
  998.     printf("#define end_call()\n");
  999.     printf("#define begin_callback()\n");
  1000.     printf("#define end_callback()\n");
  1001.   #else
  1002.     #if defined(HAVE_SAVED_SUBR_SELF)
  1003.       printf("extern object saved_subr_self;\n");
  1004.       printf("#define begin_call()  saved_subr_self = subr_self\n");
  1005.       printf("#define end_call()  subr_self = saved_subr_self\n");
  1006.       printf("#define begin_callback()  end_call()\n");
  1007.       printf("#define end_callback()  begin_call()\n");
  1008.     #else
  1009.       printf("#define begin_call()\n");
  1010.       printf("#define end_call()\n");
  1011.       printf("#define begin_callback()  end_call()\n");
  1012.       printf("#define end_callback()  begin_call()\n");
  1013.     #endif
  1014.   #endif
  1015. # #if defined(AMIGAOS) || defined(NO_ASYNC_INTERRUPTS) || !defined(HAVE_SAVED_STACK)
  1016. #   printf("#define begin_system_call()\n");
  1017. #   printf("#define end_system_call()\n");
  1018. # #else
  1019. #   printf("#define begin_system_call()  begin_call()\n");
  1020. #   printf("#define end_system_call()  end_call()\n");
  1021. # #endif
  1022.   #if (defined(EMUNIX) && defined(WINDOWS))
  1023.     extern void* SP_start;
  1024.   #endif
  1025. # printf("#define check_STACK()  if (STACK_overflow()) STACK_ueber()\n");
  1026. # #ifdef STACK_DOWN
  1027. #   printf("#define STACK_overflow()  ( (aint)STACK < (aint)STACK_bound )\n");
  1028. #   printf("#define get_space_on_STACK(n)  if ( (aint)STACK < (aint)STACK_bound + (aint)(n) ) STACK_ueber()\n");
  1029. # #else
  1030. #   printf("#define STACK_overflow()  ( (aint)STACK > (aint)STACK_bound )\n");
  1031. #   printf("#define get_space_on_STACK(n)  if ( (aint)STACK + (aint)(n) > (aint)STACK_bound ) STACK_ueber()\n");
  1032. # #endif
  1033. # printf("extern void* STACK_bound;\n");
  1034. # printf("nonreturning_function(extern, STACK_ueber, (void));\n");
  1035. # printf("nonreturning_function(extern, fehler_notreached, (const char * file, uintL line));\n");
  1036. # #ifndef LANGUAGE_STATIC
  1037. #   printf("extern uintL language;\n");
  1038. # #endif
  1039. # printf("extern void asciz_out _ARGS((const char * asciz));\n");
  1040. # printf("#define dez_out(x)  dez_out_((uintL)(x))\n");
  1041. # printf("extern void dez_out_ _ARGS((uintL zahl));\n");
  1042. # printf("#define hex_out(x)  hex_out_((uintL)(x))\n");
  1043. # printf("extern void hex_out_ _ARGS((uintL zahl));\n");
  1044. # printf("extern void mem_hex_out _ARGS((void* buf, uintL count));\n");
  1045. # printf("extern object allocate_cons _ARGS((void));\n");
  1046. # printf("extern object make_symbol _ARGS((object string));\n");
  1047. # printf("extern object allocate_vector _ARGS((uintL len));\n");
  1048. # printf("extern object allocate_bit_vector _ARGS((uintL len));\n");
  1049. # printf("extern object allocate_string _ARGS((uintL len));\n");
  1050. # printf("extern object make_string _ARGS((const uintB* charptr, uintL len));\n");
  1051. # #ifdef asciz_length
  1052. #   #if defined(GNU) && (SAFETY < 2) && (__GNUC__ >= 2)
  1053. #     printf("#define asciz_length(a)  ((uintL)__builtin_strlen(a))\n");
  1054. #   #else
  1055. #     printf("#define asciz_length(a)  ((uintL)strlen(a))\n");
  1056. #   #endif
  1057. # #else
  1058. #   printf("extern uintL asciz_length _ARGS((const char * asciz));\n");
  1059. # #endif
  1060. # #ifdef asciz_length
  1061. #   printf("#define asciz_equal(a1,a2)  (__builtin_strcmp(a1,a2)==0)\n");
  1062. # #else
  1063. #   printf("extern boolean asciz_equal _ARGS((const char * asciz1, const char * asciz2));\n");
  1064. # #endif
  1065.   printf("extern object asciz_to_string _ARGS((const char * asciz));\n");
  1066. # printf("extern object string_to_asciz _ARGS((object obj));\n");
  1067. # printf("#define TheAsciz(obj)  ((char*)(&TheSstring(obj)->data[0]))\n");
  1068. # printf("typedef Values subr_norest_function _ARGS((void));\n");
  1069. # printf("typedef Values subr_rest_function _ARGS((reg4 uintC argcount, reg3 object* rest_args_pointer));\n");
  1070.   printf("extern struct subr_tab_ {\n");
  1071.   #undef LISPFUN
  1072.   #define LISPFUN(name,req_anz,opt_anz,rest_flag,key_flag,key_anz,keywords)  \
  1073.     printf("  subr_ %s;\n",STRING(D_##name));
  1074.   #include "subr.c"
  1075.   #undef LISPFUN
  1076.   printf("} subr_tab_data;\n");
  1077. # #if !defined(MAP_MEMORY_TABLES)
  1078. #   printf("#define subr_tab  subr_tab_data\n");
  1079. #   printf1("#define subr_tab_ptr_as_object(subr_addr)  (type_constpointer_object(%d,subr_addr))\n",(tint)subr_type);
  1080. #   printf("#define L(name)  subr_tab_ptr_as_object(&subr_tab.D_%sname)\n",glue);
  1081. # #else
  1082. #   printf1("#define subr_tab_addr  ((struct subr_tab_ *)type_zero_oint(%d))\n",(tint)subr_type);
  1083. #   printf("#define subr_tab  (*subr_tab_addr)\n");
  1084. #   printf("#define subr_tab_ptr_as_object(subr_addr)  (as_object((oint)(subr_addr)))\n");
  1085. #   printf("#define L(name)  subr_tab_ptr_as_object(&subr_tab_addr->D_%sname)\n",glue);
  1086. # #endif
  1087.   printf("extern struct symbol_tab_ {\n");
  1088.   #define LISPSYM(name,printname,package)  \
  1089.     printf("  symbol_ %s;\n",STRING(S_##name));
  1090.   #include "constsym.c"
  1091.   #undef LISPSYM
  1092.   printf("} symbol_tab_data;\n");
  1093.   printf("#define S(name)  S_help_(S_%sname)\n",glue);
  1094.   #if !defined(MAP_MEMORY_TABLES)
  1095.     printf("#define symbol_tab  symbol_tab_data\n");
  1096.     printf1("#define S_help_(name)  (type_constpointer_object(%d,&symbol_tab.name))\n",(tint)symbol_type);
  1097.   #else
  1098.     printf1("#define symbol_tab_addr ((struct symbol_tab_ *)type_zero_oint(%d))\n",(tint)symbol_type);
  1099. #   printf("#define symbol_tab  (*symbol_tab_addr)\n");
  1100.     printf("#define S_help_(name)  (as_object((oint)(&symbol_tab_addr->name)))\n");
  1101.   #endif
  1102.   printf("#define NIL  S(nil)\n");
  1103.   printf("#define T    S(t)\n");
  1104.   printf("extern struct object_tab_ object_tab;\n");
  1105.   printf("extern uintC module_count;\n");
  1106.   printf("typedef struct { char* packname; char* symname; } subr_initdata;\n");
  1107.   printf("typedef struct { char* initstring; } object_initdata;\n");
  1108.   printf("typedef struct module_ { char* name; subr_* stab; uintC* stab_size; object* otab; uintC* otab_size; boolean initialized; subr_initdata* stab_initdata; object_initdata* otab_initdata; void (*initfunction1) _ARGS((struct module_ *)); void (*initfunction2) _ARGS((struct module_ *));");
  1109.   #ifdef DYNAMIC_MODULES
  1110.     printf(" struct module_ * next;");
  1111.   #endif
  1112.   printf(" } module_;\n");
  1113.   #ifdef DYNAMIC_MODULES
  1114.     printf("BEGIN_DECLS\n");
  1115.     printf("extern void add_module (module_ * new_module);\n");
  1116.     printf("END_DECLS\n");
  1117.   #else
  1118.     printf("extern module_ modules[];\n");
  1119.   #endif
  1120.   #ifdef STACK_DOWN
  1121.     printf("#define STACK_(n)  (STACK[(sintP)(n)])\n");
  1122.     printf("#define skipSTACKop  +=\n");
  1123. #   printf("#define STACKop      +\n");
  1124.   #else
  1125.     printf("#define STACK_(n)  (STACK[-1-(sintP)(n)])\n");
  1126.     printf("#define skipSTACKop  -=\n");
  1127. #   printf("#define STACKop      -\n");
  1128.   #endif
  1129.   #if defined(GNU) && defined(MC680X0) && !defined(NO_ASM) && !defined(WIDE)
  1130.     #ifdef STACK_DOWN
  1131.       printf("#define pushSTACK(obj)  ({ __asm__ __volatile__ (\"movel %%0,%s%s@-\" : : \"g\" ((object)(obj)) : \"%s\" ); })\n",REGISTER_PREFIX,STACK_register,STACK_register);
  1132.       printf("#define popSTACK()  ({var object __result; __asm__ __volatile__ (\"movel %s%s@+,%%0\" : \"=g\" (__result) : : \"%s\" ); __result; })\n",REGISTER_PREFIX,STACK_register,STACK_register);
  1133.     #else
  1134.       printf("#define pushSTACK(obj)  ({ __asm__ __volatile__ (\"movel %%0,%s%s@+\" : : \"g\" ((object)(obj)) : \"%s\" ); })\n",REGISTER_PREFIX,STACK_register,STACK_register);
  1135.       printf("#define popSTACK()  ({var object __result; __asm__ __volatile__ (\"movel %s%s@-,%%0\" : \"=g\" (__result) : : \"%s\" ); __result; })\n",REGISTER_PREFIX,STACK_register,STACK_register);
  1136.     #endif
  1137.   #else
  1138.     printf("#define pushSTACK(obj)  (STACK_(-1) = (obj), STACK skipSTACKop -1)\n");
  1139.     printf("#define popSTACK()  (STACK skipSTACKop 1, STACK_(-1))\n");
  1140.   #endif
  1141. # printf("#define skipSTACK(n)  (STACK skipSTACKop (sintP)(n))\n");
  1142. # { int i;
  1143. #   for (i=0; i<=10; i++) printf("#define STACK_%d  (STACK_(%d))\n",i,i);
  1144. # }
  1145. # printf("#define mv_limit %d\n",mv_limit);
  1146.   #if !defined(mv_count_register)
  1147.     printf("extern uintC mv_count;\n");
  1148.   #else
  1149.     printf("#ifndef IN_MODULE_CC\n");
  1150.     printf("register uintC mv_count __asm__(\"%s\");\n",mv_count_register);
  1151.     #if defined(HAVE_SAVED_REGISTERS)
  1152.       printf("register long mv_count_reg __asm__(\"%s\");\n",mv_count_register);
  1153.     #endif
  1154.     printf("#endif\n");
  1155.   #endif
  1156.   printf("extern object mv_space [%d];\n",mv_limit-1);
  1157.   #if !defined(value1_register)
  1158.     printf("#define value1  mv_space[0]\n");
  1159.   #else
  1160.     printf("#ifndef IN_MODULE_CC\n");
  1161.     printf("  register object value1 __asm__(\"%s\");\n",value1_register);
  1162.     #if defined(HAVE_SAVED_REGISTERS)
  1163.       printf("  register long value1_reg __asm__(\"%s\");\n",value1_register);
  1164.     #endif
  1165.     printf("#endif\n");
  1166.   #endif
  1167. # printf("#define value2  mv_space[1]\n");
  1168. # printf("#define value3  mv_space[2]\n");
  1169. # printf("nonreturning_function(extern, fehler_mv_zuviel, (object caller));\n");
  1170.   #if !defined(subr_self_register)
  1171.     printf("extern object subr_self;\n");
  1172.   #else
  1173.     #
  1174.     printf("#ifndef IN_MODULE_CC\n");
  1175.     printf("  register object subr_self __asm__(\"%s\");\n",subr_self_register);
  1176.     #if defined(HAVE_SAVED_REGISTERS)
  1177.       printf("  register long subr_self_reg __asm__(\"%s\");\n",subr_self_register);
  1178.     #endif
  1179.     printf("#endif\n");
  1180.   #endif
  1181. # printf("#define args_end_pointer  STACK\n");
  1182. # printf("#define set_args_end_pointer(new_args_end_pointer)  STACK = (new_args_end_pointer)\n");
  1183. # #ifdef STACK_DOWN
  1184. #   printf("#define NEXT(argpointer)  (*(--(argpointer)))\n");
  1185. #   printf("#define BEFORE(argpointer)  (*((argpointer)++))\n");
  1186. # #else
  1187. #   printf("#define NEXT(argpointer)  (*((argpointer)++))\n");
  1188. #   printf("#define BEFORE(argpointer)  (*(--(argpointer)))\n");
  1189. # #endif
  1190. # printf("#define Next(pointer)  (*(STACKpointable(pointer) STACKop -1))\n");
  1191. # printf("#define Before(pointer)  (*(STACKpointable(pointer) STACKop 0))\n");
  1192. # printf("extern Values apply _ARGS((object fun, uintC args_on_stack, object other_args));\n");
  1193.   printf("extern Values funcall _ARGS((object fun, uintC argcount));\n");
  1194. # printf("extern Values eval _ARGS((object form));\n");
  1195.   printf("#define LISPFUNN(name,req_anz)  LISPFUN(name,req_anz,0,norest,nokey,0,NIL)\n");
  1196.   printf("#define LISPFUN_B(name,req_anz,opt_anz,rest_flag,key_flag,key_anz,keywords)  global Values C_%sname subr_%srest_flag%s_function_args\n",glue,glue,glue);
  1197.   #ifdef ANSI
  1198.     printf("#define subr_norest_function_args  (void)\n");
  1199.     printf("#define subr_rest_function_args  (reg4 uintC argcount, reg3 object* rest_args_pointer)\n");
  1200.   #else
  1201.     printf("#define subr_norest_function_args  ()\n");
  1202.     printf("#define subr_rest_function_args  (argcount,rest_args_pointer)  var reg4 uintC argcount; var reg3 object* rest_args_pointer;\n");
  1203.   #endif
  1204.   printf("#define LISPFUN_F(name,req_anz,opt_anz,rest_flag,key_flag,key_anz,keywords)  { (lisp_function)(&C_%sname), 0, 0, 0, req_anz, opt_anz, (uintB)subr_%srest_flag, (uintB)subr_%skey_flag, key_anz, },\n",glue,glue,glue);
  1205.   printf("#define LISPFUN  LISPFUN_B\n");
  1206. # printf("extern object allocate_bit_vector_0 _ARGS((uintL len));\n");
  1207. # printf("extern uintB up_case _ARGS((uintB ch));\n");
  1208. # printf("extern uintB down_case _ARGS((uintB ch));\n");
  1209. # printf("extern uintB* unpack_string _ARGS((object string, uintL* len));\n");
  1210. # printf("extern object make_list _ARGS((uintL len));\n");
  1211. # printf("extern object listof _ARGS((uintC len));\n");
  1212. # printf("typedef enum { condition, serious_condition, error, program_error, control_error, arithmetic_error, division_by_zero, floating_point_overflow, floating_point_underflow, cell_error, unbound_variable, undefined_function, type_error, package_error, print_not_readable, stream_error, end_of_file, file_error, storage_condition, warning, } conditiontype;\n");
  1213. # printf("nonreturning_function(extern, fehler, (conditiontype errortype, const char * errorstring));\n");
  1214. # printf("nonreturning_function(extern, fehler_list, (object obj));\n");
  1215. # printf("nonreturning_function(extern, fehler_symbol, (object obj));\n");
  1216. # printf("nonreturning_function(extern, fehler_kein_svector, (object caller, object obj));\n");
  1217. # printf("nonreturning_function(extern, fehler_vector, (object obj));\n");
  1218. # printf("nonreturning_function(extern, fehler_char, (object obj));\n");
  1219. # printf("nonreturning_function(extern, fehler_string_char, (object obj));\n");
  1220. # printf("nonreturning_function(extern, fehler_string, (object obj));\n");
  1221. # printf("nonreturning_function(extern, fehler_sstring, (object obj));\n");
  1222.   printf("#define check_string_char(obj)  if (!string_char_p(obj)) { fehler_string_char(obj); }\n");
  1223.   printf("#define check_uint8(obj)  if (!uint8_p(obj)) { fehler_uint8(obj); }\n");
  1224.   printf("#define check_sint8(obj)  if (!sint8_p(obj)) { fehler_sint8(obj); }\n");
  1225.   printf("#define check_uint16(obj)  if (!uint16_p(obj)) { fehler_uint16(obj); }\n");
  1226.   printf("#define check_sint16(obj)  if (!sint16_p(obj)) { fehler_sint16(obj); }\n");
  1227.   printf("#define check_uint32(obj)  if (!uint32_p(obj)) { fehler_uint32(obj); }\n");
  1228.   printf("#define check_sint32(obj)  if (!sint32_p(obj)) { fehler_sint32(obj); }\n");
  1229.   printf("#define check_uint64(obj)  if (!uint64_p(obj)) { fehler_uint64(obj); }\n");
  1230.   printf("#define check_sint64(obj)  if (!sint64_p(obj)) { fehler_sint64(obj); }\n");
  1231.   printf("#define check_uint(obj)  if (!uint_p(obj)) { fehler_uint(obj); }\n");
  1232.   printf("#define check_sint(obj)  if (!sint_p(obj)) { fehler_sint(obj); }\n");
  1233.   printf("#define check_ulong(obj)  if (!ulong_p(obj)) { fehler_ulong(obj); }\n");
  1234.   printf("#define check_slong(obj)  if (!slong_p(obj)) { fehler_slong(obj); }\n");
  1235.   printf("#define check_ffloat(obj)  if (!single_float_p(obj)) { fehler_ffloat(obj); }\n");
  1236.   printf("#define check_dfloat(obj)  if (!double_float_p(obj)) { fehler_dfloat(obj); }\n");
  1237.   printf("nonreturning_function(extern, fehler_uint8, (object obj));\n");
  1238.   printf("nonreturning_function(extern, fehler_sint8, (object obj));\n");
  1239.   printf("nonreturning_function(extern, fehler_uint16, (object obj));\n");
  1240.   printf("nonreturning_function(extern, fehler_sint16, (object obj));\n");
  1241.   printf("nonreturning_function(extern, fehler_uint32, (object obj));\n");
  1242.   printf("nonreturning_function(extern, fehler_sint32, (object obj));\n");
  1243.   printf("nonreturning_function(extern, fehler_uint64, (object obj));\n");
  1244.   printf("nonreturning_function(extern, fehler_sint64, (object obj));\n");
  1245.   printf("nonreturning_function(extern, fehler_uint, (object obj));\n");
  1246.   printf("nonreturning_function(extern, fehler_sint, (object obj));\n");
  1247.   printf("nonreturning_function(extern, fehler_ulong, (object obj));\n");
  1248.   printf("nonreturning_function(extern, fehler_slong, (object obj));\n");
  1249.   printf("nonreturning_function(extern, fehler_sfloat, (object obj));\n");
  1250.   printf("nonreturning_function(extern, fehler_dfloat, (object obj));\n");
  1251. # printf("extern object find_package _ARGS((object string));\n");
  1252. # printf("extern uintBWL intern _ARGS((object string, object pack, object* sym_));\n");
  1253. # printf("extern object intern_keyword _ARGS((object string));\n");
  1254. # printf("extern boolean eql _ARGS((object obj1, object obj2));\n");
  1255. # printf("extern boolean equal _ARGS((object obj1, object obj2));\n");
  1256. # printf("extern boolean equalp _ARGS((object obj1, object obj2));\n");
  1257. # printf("extern object get _ARGS((object symbol, object key));\n");
  1258.   printf("extern object L_to_I _ARGS((sint32 wert));\n");
  1259.   #if (intLsize<=oint_data_len)
  1260.     printf("#define UL_to_I(wert)  fixnum((uintL)(wert))\n");
  1261.   #else
  1262.     printf("extern object UL_to_I _ARGS((uintL wert));\n");
  1263.   #endif
  1264.   printf("extern object L2_to_I _ARGS((sint32 wert_hi, uint32 wert_lo));\n");
  1265.   printf("extern object UL2_to_I _ARGS((uint32 wert_hi, uint32 wert_lo));\n");
  1266.   #ifdef intQsize
  1267.     printf("extern object Q_to_I (sint64 wert);\n");
  1268.     printf("extern object UQ_to_I (uint64 wert);\n");
  1269.   #endif
  1270.   printf("#define uint8_to_I(val)  fixnum((uint8)(val))\n");
  1271.   printf("#define sint8_to_I(val)  L_to_I((sint32)(sint8)(val))\n");
  1272.   printf("#define uint16_to_I(val)  fixnum((uint16)(val))\n");
  1273.   printf("#define sint16_to_I(val)  L_to_I((sint32)(sint16)(val))\n");
  1274.   printf("#define uint32_to_I(val)  UL_to_I((uint32)(val))\n");
  1275.   printf("#define sint32_to_I(val)  L_to_I((sint32)(val))\n");
  1276.   #ifdef intQsize
  1277.     printf("#define uint64_to_I(val)  UQ_to_I((uint64)(val))\n");
  1278.     printf("#define sint64_to_I(val)  Q_to_I((sint64)(val))\n");
  1279.   #else
  1280.     printf("#define uint64_to_I(val)  UL2_to_I((uint32)((val)>>32),(uint32)(val))\n");
  1281.     printf("#define sint64_to_I(val)  L2_to_I((sint32)((val)>>32),(uint32)(val))\n");
  1282.   #endif
  1283.   #if (int_bitsize==16)
  1284.     printf("#define uint_to_I(val)  uint16_to_I(val)\n");
  1285.     printf("#define sint_to_I(val)  sint16_to_I(val)\n");
  1286.   #else # (int_bitsize==32)
  1287.     printf("#define uint_to_I(val)  uint32_to_I(val)\n");
  1288.     printf("#define sint_to_I(val)  sint32_to_I(val)\n");
  1289.   #endif
  1290.   #if (long_bitsize==32)
  1291.     printf("#define ulong_to_I(val)  uint32_to_I(val)\n");
  1292.     printf("#define slong_to_I(val)  sint32_to_I(val)\n");
  1293.   #else # (long_bitsize==64)
  1294.     printf("#define ulong_to_I(val)  uint64_to_I(val)\n");
  1295.     printf("#define slong_to_I(val)  sint64_to_I(val)\n");
  1296.   #endif
  1297.   printf("extern uintL I_to_UL _ARGS((object obj));\n");
  1298.   printf("extern sintL I_to_L _ARGS((object obj));\n");
  1299.   #ifdef HAVE_LONGLONG
  1300.     printf("extern uint64 I_to_UQ _ARGS((object obj));\n");
  1301.     printf("extern sint64 I_to_Q _ARGS((object obj));\n");
  1302.   #endif
  1303.   printf("#define I_to_uint8(obj)  (uint8)(as_oint(obj) >> %d)\n",oint_data_shift);
  1304.   printf("#define I_to_sint8(obj)  (sint8)(as_oint(obj) >> %d)\n",oint_data_shift);
  1305.   printf("#define I_to_uint16(obj)  (uint16)(as_oint(obj) >> %d)\n",oint_data_shift);
  1306.   printf("#define I_to_sint16(obj)  (sint16)(as_oint(obj) >> %d)\n",oint_data_shift);
  1307.   #if (oint_data_len>=32)
  1308.     printf("#define I_to_uint32(obj)  (uint32)(as_oint(obj) >> %d)\n",oint_data_shift);
  1309.   #else
  1310.     printf("#define I_to_uint32(obj)  I_to_UL(obj)\n");
  1311.   #endif
  1312.   #if (oint_data_len>=31)
  1313.     printf("#define I_to_sint32(obj)  (sint32)(as_oint(obj) >> %d)\n",oint_data_shift);
  1314.   #else
  1315.     printf("#define I_to_sint32(obj)  I_to_L(obj)\n");
  1316.   #endif
  1317.   printf("#define I_to_uint64(obj)  I_to_UQ(obj)\n");
  1318.   printf("#define I_to_sint64(obj)  I_to_Q(obj)\n");
  1319.   #if (int_bitsize==16)
  1320.     printf("#define I_to_uint  I_to_uint16\n");
  1321.     printf("#define I_to_sint  I_to_sint16\n");
  1322.   #else # (int_bitsize==32)
  1323.     printf("#define I_to_uint  I_to_uint32\n");
  1324.     printf("#define I_to_sint  I_to_sint32\n");
  1325.   #endif
  1326.   #if (long_bitsize==32)
  1327.     printf("#define I_to_ulong  I_to_uint32\n");
  1328.     printf("#define I_to_slong  I_to_sint32\n");
  1329.   #else # (long_bitsize==64)
  1330.     printf("#define I_to_ulong  I_to_uint64\n");
  1331.     printf("#define I_to_slong  I_to_sint64\n");
  1332.   #endif
  1333. # printf("extern object I_1_plus_I _ARGS((object x));\n");
  1334. # printf("extern object I_minus1_plus_I _ARGS((object x));\n");
  1335. # printf("extern object I_I_plus_I _ARGS((object x, object y));\n");
  1336. # printf("extern object I_I_minus_I _ARGS((object x, object y));\n");
  1337.   printf("extern object c_float_to_FF _ARGS((ffloatjanus* val_));\n");
  1338.   printf("extern void FF_to_c_float _ARGS((object obj, ffloatjanus* val_));\n");
  1339.   printf("extern object c_double_to_DF _ARGS((dfloatjanus* val_));\n");
  1340.   printf("extern void DF_to_c_double _ARGS((object obj, dfloatjanus* val_));\n");
  1341.   #ifdef DYNAMIC_FFI
  1342.     printf("extern void register_foreign_variable _ARGS((void* address, const char * name, uintBWL flags, uintL size));\n");
  1343.     printf("extern void register_foreign_function _ARGS((void* address, const char * name, uintWL flags));\n");
  1344.     printf("extern object convert_from_foreign _ARGS((object fvd, void* data));\n");
  1345.     printf("extern void convert_to_foreign_mallocing _ARGS((object fvd, object obj, void* data));\n");
  1346.     printf("extern void convert_to_foreign_nomalloc _ARGS((object fvd, object obj, void* data));\n");
  1347.   #endif
  1348. # printf("\n");
  1349.   printf("#endif /* _CLISP_H */\n");
  1350.   if (ferror(stdout)) { exit(1); }
  1351.   exit(0);
  1352. }
  1353.