Path: utzoo!mnetor!uunet!husc6!mit-eddie!bbn!uwmcsd1!marque!brianb From: brianb@marque.mu.edu (Brian Bebeau) Newsgroups: comp.sys.att Subject: Re: compiler error in term.h Message-ID: <47@marque.mu.edu> Date: 23 Feb 88 20:58:40 GMT References: <696@chutepc.UUCP> Reply-To: brianb@marque.UUCP (Brian Bebeau) Organization: Marquette University, Milwaukee, WI Lines: 51 Keywords: UNIXpc, 3.51 In article <696@chutepc.UUCP> chute@chutepc.UUCP (Chris Chute MD) writes: >I have tried to compile the rolodex program that recently came over the net >on comp.sources.unix (in 4 parts). I left the TERMINFO defined. I am >running release 3.51 of the UNIXpc with 3.51 development set and Terminfo >development set (Rel 3.0) installed. > The compiler complained about syntax in the include file, an experience I >have never had before. The complait (on file clear.c) is as follows: > >"/usr/include/term.h", line 725: syntax error >"/usr/include/term.h", line 725: cannot recover from earlier errors: goodbye! > >The relavent parts of term.h are provided for your reading pleasure: > >724 #ifndef NONSTANDARD >725 SGTTY Ottyb, /* original state of the terminal */ >726 Nttyb; /* current state of the terminal */ >727 #endif > >Any thoughts? > >Chris Chute M.D. IntN: chute@hscfvax.harvard.edu >Harvard School of Public Health UUCP: chute@chutepc.uucp Yes, I just fixed this about three hours ago. SGTTY is undefined so it complains. SGTTY is defined in curses.h. Just put in #include before the term.h include. Since you'll be using curses, I think it's probably also a good idea to put a #ifndef TERMINFO #endif pair around the stdio.h include since from what I've read it's not a good idea to include both stdio and curses in the same program. You may also have a problem with toolsdir/ctools.c at line 640. If it complains about redefining sprintf, comment out the #ifdef UNIX and leave the int sprintf, as our UNIX system defines sprintf as an int valued function (3B15). Make sure you use the proper Makefile, both in the normal directory and toolsdir. I compiled it fine after this and it works great! --------------------------------------------------------------------------- Brian Bebeau Marquette University DOMAIN: brianb@marque.mu.edu UUCP: {rutgers,ihnp4,harvard}!uwvax!marque!brianb {rutgers,uunet}!marque!brianb ARPA: brianb%marque.uucp@csd1.milw.wisc.edu BITNET: 6877BEBE@MUCSD ---------------------------------------------------------------------------