File: [local] / OpenXM / src / k097 / dm.c (download)
Revision 1.4, Thu Jun 16 05:07:24 2005 UTC (19 years, 3 months ago) by takayama
Branch: MAIN
CVS Tags: R_1_3_1-2, RELEASE_1_2_3_12, KNOPPIX_2006, DEB_REL_1_2_3-9 Changes since 1.3: +2 -2
lines
The initialization of the variables of the type struct object
are added. It is necessary to initialize the field "attr"
(object attribute) of stuct object. cf. misc-2005/06/gfan/opt.sm1 test2.
|
/* $OpenXM: OpenXM/src/k097/dm.c,v 1.4 2005/06/16 05:07:24 takayama Exp $ */
#include <stdio.h>
#include "d.h"
int K00_verbose = 0;
extern int DebugMode;
/* dm.c main program of d. */
main(int argc, char *argv[]) {
int i;
DebugMode = 0;
if (argc >= 2) {
for (i=1; i < argc; i++) {
if (strcmp(argv[i],"-DebugMode") == 0) {
/* fprintf(stderr,"DebugMode = 1\n"); */
DebugMode = 1;
}else{
fprintf(stderr,"d0 -DebugMode\n");
}
}
}
parseAfile(stdin);
/* parseAstring("print(1+2);\nx=1+2;\n"); tests */
KCparse();
exit(0);
}
void pkkan(s)
char *s;
{
printf("%s",s);
}
void *mymalloc(int size) {
return((void *)malloc(size));
}
void *GC_malloc(int size) {
return((void *)malloc(size));
}
void *sGC_malloc(int size) {
return ((void *) GC_malloc(size));
}
sendKan(int p) { /* do nothing */ }
/* test new function */
void testNewFunction(objectp op)
{
if (op->tag != Sstring) {
fprintf(stderr,"The argument must be given as an argment of load.\n");
return;
}
fprintf(stderr,"Now execute .. <<%s>> \n",op->lc.str);
parseAstring(op->lc.str);
fprintf(stderr,"\nDone.\n");
}
struct object KSpop() {
struct object obj = OINIT;
obj.tag = 0;
fprintf(stderr," Do not use Test.\n");
return(obj);
}
void pkdebug(char *s0,char *s1, char *s2,char *s3) {
if (DebugMode) {
pkkan(" db.DebugStack setstack $");
pkkan(s0); pkkan(s1); pkkan(s2); pkkan(s3);
pkkan("$ stdstack \n");
}
}
void pkdebug2(void) {
if (DebugMode) {
pkkan(" db.DebugStack setstack pop stdstack \n");
}
}