[BACK]Return to dm.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / k097

Annotation of OpenXM/src/k097/dm.c, Revision 1.1.1.1

1.1       maekawa     1:
                      2: #include <stdio.h>
                      3: #include "d.h"
                      4:
                      5: int K00_verbose = 0;
                      6: extern int DebugMode;
                      7:
                      8: /* dm.c main program of d. */
                      9: main(int argc, char *argv[]) {
                     10:   int i;
                     11:   DebugMode = 0;
                     12:   if (argc >= 2) {
                     13:     for (i=1; i < argc; i++) {
                     14:       if (strcmp(argv[i],"-DebugMode") == 0) {
                     15:        /* fprintf(stderr,"DebugMode = 1\n"); */
                     16:        DebugMode = 1;
                     17:       }else{
                     18:        fprintf(stderr,"d0 -DebugMode\n");
                     19:       }
                     20:     }
                     21:   }
                     22:   parseAfile(stdin);
                     23:   /*  parseAstring("print(1+2);\nx=1+2;\n"); tests */
                     24:   KCparse();
                     25:   exit(0);
                     26: }
                     27:
                     28:
                     29: void pkkan(s)
                     30: char *s;
                     31: {
                     32:   printf("%s",s);
                     33: }
                     34:
                     35: void *mymalloc(int size) {
                     36:   return((void *)malloc(size));
                     37: }
                     38:
                     39: void *GC_malloc(int size) {
                     40:   return((void *)malloc(size));
                     41: }
                     42:
                     43: sendKan(int p) { /* do nothing */ }
                     44:
                     45: /*           test new function           */
                     46: void testNewFunction(objectp op)
                     47: {
                     48:   if (op->tag != Sstring) {
                     49:     fprintf(stderr,"The argument must be given as an argment of load.\n");
                     50:     return;
                     51:   }
                     52:   fprintf(stderr,"Now execute .. <<%s>> \n",op->lc.str);
                     53:   parseAstring(op->lc.str);
                     54:   fprintf(stderr,"\nDone.\n");
                     55: }
                     56:
                     57: struct object KSpop() {
                     58:   struct object obj;
                     59:   obj.tag = 0;
                     60:   fprintf(stderr," Do not use Test.\n");
                     61:   return(obj);
                     62: }
                     63:
                     64: void pkdebug(char *s0,char *s1, char *s2,char *s3) {
                     65:   if (DebugMode) {
                     66:     pkkan(" db.DebugStack setstack $");
                     67:     pkkan(s0); pkkan(s1); pkkan(s2); pkkan(s3);
                     68:     pkkan("$  stdstack \n");
                     69:   }
                     70: }
                     71:
                     72: void pkdebug2(void) {
                     73:   if (DebugMode) {
                     74:     pkkan(" db.DebugStack setstack pop stdstack \n");
                     75:   }
                     76: }
                     77:

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>