delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/06/04:57:36

From: peuha AT cc DOT helsinki DOT fi (Esa A E Peuha)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: gettextinfo(), cprintf() question
Date: 6 Mar 1997 07:36:40 GMT
Organization: University of Helsinki
Lines: 48
Message-ID: <5fls68$38a@oravannahka.Helsinki.FI>
References: <Pine DOT GSO DOT 3 DOT 93 DOT 970304152406 DOT 8608A-100000 AT euler DOT uncg DOT edu>
Reply-To: Esa DOT Peuha AT helsinki DOT fi
NNTP-Posting-Host: kruuna-ether.helsinki.fi
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

W. L. Estes (wlestes AT hamlet DOT uncg DOT edu) wrote:
: When i attempt to compile the following:

: #include <conio.h>

: int main()
: {
:   struct text_info {
:     unsigned char winleft;
:     unsigned char wintop;
:     unsigned char winright;
:     unsigned char winbottom;
:     unsigned char attribute;
:     unsigned char normattr;
:     unsigned char currmode;
:     unsigned char screenheight;
:     unsigned char screenwidth;
:     unsigned char curx;
:     unsigned char cury;
: } ;

This should be needless (already defined in header files).

: text_info *foo;

Change to "text_info foo;"

: gettextinfo (*foo);

Change to "gettextinfo(&foo);"

: cprintf ("%u", foo.screenheight);
: return 0;
: }

: I am told that text_info and foo are undeclared. what should i be doing?

See above.

: and what about the call to cprintf? is that gonna work, if not what should
: that be? i just wanna print the screenheight.

Why not use ScreenRows function (defined in pc.h)?

--
Esa Peuha
student of mathematics at the University of Helsinki
http://www.helsinki.fi/~peuha/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019