[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

trying to figure out the logic...

From: D. Stimits
Subject: trying to figure out the logic...
Date: Fri, 09 May 2003 03:08:36 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2b) Gecko/20021018

This isn't a bug, but I'm perplexed in trying to figure out something in how ncurses is implemented (this is ncurses 5.3, redhat 7.3). I'm looking at the type SCREEN, and see it typedef'd to struct screen. I'm looking because I am trying to figure out how a SCREEN* can provide a WINDOW*. My discovery is that, recursively within /usr/include/, that struct screen is never prototyped. I even ran gcc with a -E to preprocess it and stop, the output never gave the prototype of struct screen, only the alias with typedef struct screen SCREEN. Being that it always uses only a pointer to the SCREEN, perhaps it only needs to know the size of a pointer, and thus the actual knowledge of struct screen is not needed in the client application. But where in the heck is struct screen prototyped? And how does one use the SCREEN* from newterm() to get a WINDOW* that many of the other calls require? I ran gdb on this and told it to give me the value of the struct, and found it is rather large and complex, then did a recursive grep on the members from gdb, and still could not find the file with those members...is the actual struct only touched within the libraries, and all clients use only pointers, thus removing the need to declare the actual struct screen contents within client apps?

D. Stimits, stimits AT attbi DOT com

reply via email to

[Prev in Thread] Current Thread [Next in Thread]