From lechner Tue Oct 15 03:06:53 1996 Subject: Re: chgen on a PC - excellent! (what version/path to source did you use?) To: Owen_McGonagle_at_notes@smtp.cspi.com Date: Tue, 15 Oct 1996 03:05:36 -0400 (EDT) RJLRef: ~/96f522/chgen2PC_owenMcG.hlp Please tell the path of your starting point. I presume you could also compile the pr_util content produced by chgen? CAn you identify the (.c or .h) files containing your fixes? Or, better, upload your version so we can do diff on it. > > > Hello Prof. Lechner, > > Just for your information. I got chgen running on a PC using the Borland > C/C++ . I am not yet a windows > programmer -- the version I have running is a 16-bit version. I had to > make minor changes to the code > to get it to build and execute properly (the major problem was the 64k > data section size restriction): > > 1. A macro incorrectly commenting a variable as "var" instead of > #var (the preprocessor needs to do its thing). > 2. A procedure returning a type "int" instead of "struct *" (the > default 16-bit return int was not getting > converted properly). > 3. To get it to fit into the 64k data space, the Borland compiler > luckily includes a compiler switch that > stores string literals into text space. Otherwise, > the fprintf(fp,".................") type calls put the literals in data > space and immediately cause chgen to exceed 64k. > 4. The Borland compiler is ANSI and I could not figure out how to > keep it from complaining about > "old sytle" procedure call syntax. Therefore, I had to convert > a few routines to get the > compiler to stop complaining. > > I successfully built and ran the student/roster state model example. > > I plan on moving on the timer and JPsim state model examples. > > Maybe another student in the class would like to get it up and running on > a PC? >