Jeong-Rae Cho (e-mail : chojr@kict.re.kr) has ported Aladdin to Windows using DJGPP compiler, the GNU gcc complier for Dos or Windows platform. DJGPP with bison & flex utility is available from www.delorie.com.
The method to compile is as follows:
%{ #include#include "defs.h" #include "units.h" #include "matrix.h" #include "fe_database.h" #include "symbol.h" #include "code.h" extern FILE *fin; <- inserted extern FILE *finp; <- inserted #define Code2(c1,c2) Code(c1); Code(c2) #define Code3(c1,c2,c3) Code(c1); Code(c2); Code(c3) #define Code5(c1,c2,c3,c4,c5) Code(c1); Code(c2); Code(c3); Code(c4); Code(c5)
for (i = 0; i < NO_PARAMETERS; i++) { s = build_table(fe_parameters[i].name, QUAN, 0.0); s->u.q = (QUANTITY *) MyCalloc(1,sizeof(QUANTITY)); s->u.q->value = fe_parameters[i].value; if(UNITS_SWITCH==ON) { s->u.q->dimen = (DIMENSIONS *)MyCalloc(1,sizeof(DIMENSIONS)); ZeroUnits(s->u.q->dimen); s->u.q->dimen->units_type = SI_US; } }
CC = gcc
in Makefile
> bison -y -d grammar.y > ren y.tab.c grammar.c > make
Using Visual C++ 6.0, the step-by-step procedure for creating a Windows version of Aladdin 2.1 is as follows:
%{ #include#include "defs.h" #include "units.h" #include "matrix.h" #include "fe_database.h" #include "symbol.h" #include "code.h" extern FILE *fin; <- inserted extern FILE *finp; <- inserted #define Code2(c1,c2) Code(c1); Code(c2) #define Code3(c1,c2,c3) Code(c1); Code(c2); Code(c3) #define Code5(c1,c2,c3,c4,c5) Code(c1); Code(c2); Code(c3); Code(c4); Code(c5)
for (i = 0; i < NO_PARAMETERS; i++) { s = build_table(fe_parameters[i].name, QUAN, 0.0); s->u.q = (QUANTITY *) MyCalloc(1,sizeof(QUANTITY)); s->u.q->value = fe_parameters[i].value; if(UNITS_SWITCH==ON) { s->u.q->dimen = (DIMENSIONS *)MyCalloc(1,sizeof(DIMENSIONS)); ZeroUnits(s->u.q->dimen); s->u.q->dimen->units_type = SI_US; } }
m1 = val_arg(arg_ptr, MATRIX*);
> bison -y -d grammar.y > ren y.tab.c grammar.c
The above method is for Aladdin version 2.1. If version 1.0, additional correction is needed;
Developed in August 2000 by Mark Austin,
Copyright © 2000, Mark Austin, University of Maryland.