/* -*-mode:c-*-
name: chtml-cmp.c
purpose: C program template for implementing "chtml :p=c"
output of C language data.
created: 16-JUN-1998, George J. Carrette
$Id: chtml-cmp.c,v 1.2 1998/06/16 19:09:22 gjc Exp $
Output of C data structures by:
$$CHTML_CMP_SCM$$
$$COMMENT$$
Unique objects in heap = $$HEAP_DIMENSION$$
Total Array size needed = $$ARRAY_DIMENSION$$
Procedure name defined = $$PROC_NAME$$
Note that the beginning and end of heap and array spaces are padded.
This helps in debugging certain kinds of problems.
*/
#include
#include
#include "chtml.h"
struct chtml *$$PROC_NAME$$(void);
static $$CONST$$ struct chtml $$PROC_NAME$$_heap[$$HEAP_DIMENSION$$+2];
static $$CONST$$ struct chtml * $$PROC_NAME$$_array[$$ARRAY_DIMENSION$$+2];
struct chtml *$$PROC_NAME$$(void)
{return((struct chtml *)&$$PROC_NAME$$_heap[1]);}
#ifdef DEBUG_MAIN
int main(int argc,char **argv)
{struct chtml *x,*y;
int j; x = $$PROC_NAME$$();
printf("$$PROC_NAME$$ returned %p\n",x);
printf(" sizeof($$PROC_NAME$$_heap) = %d\n",sizeof($$PROC_NAME$$_heap));
printf(" sizeof($$PROC_NAME$$_array) = %d\n",sizeof($$PROC_NAME$$_array));
if (argc <= 1) chtml_debug_print(x,NULL);
for(j=1;j
{CHTML_ARRAY,$$OBJ_SIZE$$,&$$PROC_NAME$$_array[$$OBJ_VALUE$$+1]},
{CHTML_NUMBER,$$OBJ_SIZE$$,(void *)$$OBJ_VALUE$$},
{CHTML_STRING,$$OBJ_SIZE$$,$$OBJ_VALUE$$},
{CHTML_SYMBOL,$$OBJ_SIZE$$,$$OBJ_VALUE$$},
{CHTML_ILLEGAL,0,NULL}};
static $$CONST$$ struct chtml * $$PROC_NAME$$_array[$$ARRAY_DIMENSION$$+2] = {
NULL,
&$$PROC_NAME$$_heap[$$OBJ_PTR$$+1],
NULL};