compiler error in term.h, and <curses.h> vs. <stdio.h>

Mike Ditto ford at kenobi.UUCP
Sun Feb 28 04:19:34 AEST 1988


Posting-Front-End: GNU Emacs 18.41.10 of Fri Oct  2 1987 on kenobi (usg-unix-v)


In article <47 at marque.mu.edu> brianb at marque.mu.edu (Brian Bebeau) writes:

> 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. 

There is absolutely nothing wrong with using stdio and curses in the
same program, and #include-ing their respective header files is
harmless.  In fact, <curses.h> NEEDS <stdio.h> in order to work, and
will include it automatically.  If you #include <stdio.h> It's
probably best to include it first, since <curses.h> will automatically
#include <stdio.h> only if it hasn't already been included.

Perhaps what Brian was thinking of was the fact that writing to the
terminal with stdio functions while a curses screen is displayed can
prevent curses from working properly.

					-=] Ford [=-

"Well, he didn't know what to do, so	(In Real Life:  Mike Ditto)
he decided to look at the government,	ford%kenobi at crash.CTS.COM
to see what they did, and scale it	...!sdcsvax!crash!kenobi!ford
down and run his life that way." -- Laurie Anderson



More information about the Comp.sys.att mailing list