home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 1 / GoldFishApril1994_CD1.img / d1xx / d114 / vt100 / fixes / amiga.8989 < prev    next >
Text File  |  1987-11-21  |  1KB  |  39 lines

  1. Article 8989 of comp.sys.amiga:
  2. Path: mcdsun!noao!hao!oddjob!mimsy!cvl!umd5!brl-adm!husc6!necntc!ames!aurora!labrea!rocky!rokicki
  3. From: rokicki@rocky.STANFORD.EDU (Tomas Rokicki)
  4. Newsgroups: comp.sys.amiga
  5. Subject: Re: VT100R2.7 fix: allow more than 24 rows (31 for PAL Amiga)
  6. Message-ID: <660@rocky.STANFORD.EDU>
  7. Date: 12 Oct 87 04:32:58 GMT
  8. References: <1533@sics.se>
  9. Reply-To: rokicki@rocky.UUCP (Tomas Rokicki)
  10. Organization: Stanford University Computer Science Department
  11. Lines: 24
  12.  
  13. /*
  14.  *   Folks, I've seen this done wrong too many times.
  15.  *   This is one way to do it right; the other way is
  16.  *   with GetScreenData().  Choose one and use it; don't
  17.  *   go chasing down the damn list of screens looking
  18.  *   for the biggest!  Geez.
  19.  */
  20. #include "gfxbase.h" /* and whatever else is necessary */
  21. struct IntuitionBase *IntuitionBase ;
  22. struct GfxBase *GfxBase ;
  23. int screenwidth ;    /* hires screen width */
  24. int screenheight ;   /* non-interlace screen height */
  25. init() {
  26.    if ((IntuitionBase=(struct IntuitionBase *)OpenLibrary(
  27.          "intuition.library", 33L))==NULL)       /* we need 1.2 */
  28.       error("! I ain't feeling well today, ma") ;
  29.    if ((GfxBase=(struct GfxBase *)OpenLibrary("graphics.library", 0L))==NULL)
  30.       error("! dang, the graphics library ain't there") ;
  31.    screenwidth = GfxBase->NormalDisplayColumns ;
  32.    screenheight = GfxBase->NormalDisplayRows ;
  33. }
  34. /*
  35.  *   Now, wasn't that easy?
  36.  */
  37.  
  38.  
  39.