Article View: comp.os.os2.programmer
Article #17Re: VioGetMode in MSC 6.00A
From: Mark Hessling
Date: Tue, 27 Oct 1992 22:22
Date: Tue, 27 Oct 1992 22:22
51 lines
2395 bytes
2395 bytes
hank@ducvax.auburn.edu writes: >Is there a known bug in the MSC 6.00A version of VioGetMode? >I'm trying to use Walter's recent post of PCcurses and sc under OS/2 1.3. >(His port is for OS/2 2.0.) >There are a few changes (and some bugs--no reply from Walter so far) needed, >but a short test program using VioGetMode fails sometimes. >I have >static PVIOMODEINFO modeinfo = NULL; >... >modeinfo = (PVIOMODEINFO) malloc(sizeof(VIOMODEINFO)); >VioGetMode(modeinfo,0); >The row and col in modeinfo are sometimes wrong. >I'm using the large-memory model. All I needed for sc was the screen rows >and columns. If I hard-code the screensize, sc works under OS/2 1.3 (in >preliminary tests). >Anyone have problems with VioGetMode? >Remarks on sc, spreadsheet calc 6.21, and PCcurses. Walter modified >curses to use 'vscan'. His use of 'vscan' indicates that it should be >'vsscan' (unless Watcom C is different than gcc). I wrote a hack to handle >vscan under MSC. The "save before exit" feature needs a different filename >under OS/2 (easy to fix). >-- >--Darrel Hankerson hank@ducvax.auburn.edu The problem is you have to tell VioGetMode the size of the return buffer. This code is part of PDCurses for DOS and OS/2 (a rewrite and update to PCCurses 1.4 for DOS that includes color, pads and most System V R3.2 functions) and works: VIOMODEINFO modeInfo; modeInfo.cb = sizeof(modeInfo); VioGetMode(&modeInfo, 0); Cheers, Mark ------------------------------------------------------------------------ Mark Hessling Email: mark@snark.itc.gu.edu.au DBA,ITS Phone: +617 875 7691 Griffith University Fax: +617 875 7877 Nathan, Brisbane QLD 4111 Australia *** PDCurses Maintainer *** ------------------------------------------------------------------------
Technical Details
Message-ID:
<mark.720224567@snark>Path:
arc1-ca.pugleaf.net!sparky!uunet!pmafire!news.dell.com!swrinde!sgiblab!munnari.oz.au!bunyip.cc.uq.oz.au!griffin!snark!markReferences:
<1992Oct27.001633.1@ducvax.auburn.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!pmafire!news.dell.com!swrinde!sgiblab!munnari.oz.au!bunyip.cc.uq.oz.au!griffin!snark!mark From: mark@snark.itc.gu.edu.au (Mark Hessling) Subject: Re: VioGetMode in MSC 6.00A Message-ID: <mark.720224567@snark> Sender: news@griffin.itc.gu.edu.au Nntp-Posting-Host: snark.itc.gu.edu.au Organization: ITC, Griffith University, Brisbane, Australia References: <1992Oct27.001633.1@ducvax.auburn.edu> Date: 27 Oct 92 22:22:47 GMT Lines: 51