compiler error in term.h

Brian Bebeau brianb at marque.mu.edu
Wed Feb 24 06:58:40 AEST 1988


In article <696 at chutepc.UUCP> chute at 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 at hscfvax.harvard.edu
>Harvard School of Public Health		UUCP: chute at 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 <curses.h>
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 at marque.mu.edu 
  UUCP:  {rutgers,ihnp4,harvard}!uwvax!marque!brianb
	 {rutgers,uunet}!marque!brianb
  ARPA:  brianb%marque.uucp at csd1.milw.wisc.edu
BITNET:  6877BEBE at MUCSD
---------------------------------------------------------------------------



More information about the Comp.sys.att mailing list