ANSI to K&R

D

Doug

Hi,

I'm trying to compile dumb-frotz (an Infocom interpreter) on my TRS-80
Model 4. The compiler (MC from Misosys) is circa 1985. I've used
unprotoize from GCC but there are still things to change (to a K&R
standard I suppose). In particular, I'm stuck on this:

FROTZ/H: line 385: error 10: Missing ';'
extern const char*story_name;
^

I have no experience with K&R style C. Any gurus able to help me out?

Thanks,
Doug
 
M

Mark Odell

Doug said:
Hi,

I'm trying to compile dumb-frotz (an Infocom interpreter) on my TRS-80
Model 4. The compiler (MC from Misosys) is circa 1985. I've used
unprotoize from GCC but there are still things to change (to a K&R
standard I suppose). In particular, I'm stuck on this:

FROTZ/H: line 385: error 10: Missing ';'
extern const char*story_name;
^

I have no experience with K&R style C. Any gurus able to help me out?

I don't think 'const' was part of really-old-C. Can you remove const for
this definition and extern to see if it fixes your error?
 
D

David Resnick

Doug said:
Hi,

I'm trying to compile dumb-frotz (an Infocom interpreter) on my TRS-80
Model 4. The compiler (MC from Misosys) is circa 1985. I've used
unprotoize from GCC but there are still things to change (to a K&R
standard I suppose). In particular, I'm stuck on this:

FROTZ/H: line 385: error 10: Missing ';'
extern const char*story_name;
^

I have no experience with K&R style C. Any gurus able to help me out?

Thanks,
Doug

const wasn't a keyword in K&R C. Try removing it, perhaps that is your
issue.

You can see some of the differences between K&R C and C89 in Appendix
C of K&R 2.

-David
 
D

Doug

Hi,

I'm trying to compile dumb-frotz (an Infocom interpreter) on my TRS-80
Model 4. The compiler (MC from Misosys) is circa 1985. I've used
unprotoize from GCC but there are still things to change (to a K&R
standard I suppose). In particular, I'm stuck on this:

FROTZ/H: line 385: error 10: Missing ';'
extern const char*story_name;
^

I have no experience with K&R style C. Any gurus able to help me out?

Thanks,
Doug

Removing const solved the problem. Thanks for the help Mark and Dave.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,196
Latest member
ScottChare

Latest Threads

Top