geoff@suneast.uucp (Geoff Arnold) (01/13/86)
Does anyone know of a quick and reliable way of detecting whether ANSI.SYS has been installed? -- #include <sys/disclaimer.h> /* co. lawyers: will this do? */ Geoff Arnold =-=-= Quick: 617-863-8870 x136 (but ya gotta catch me!) Sun Microsystems Inc.-=-=- Slower: {hplabs,ihnp4,nsc,pyramid}!sun!suneast!geoff East Coast Division. =-=-= Slowest:One Cranberry Hill, Lexington, MA 02173
greenber@phri.UUCP (Ross Greenberg) (01/16/86)
> Does anyone know of a quick and reliable way of detecting > whether ANSI.SYS has been installed? > -- A quick hack: Send the ANSI sequence to position your cursor to some location {x,y}. Send the ANSI sequence to read current cursor poition. If they match, you're running ANSI, else you're not. ross m. greenberg ihnp4!allegra!phri!greenber
elkins@ttidcc.UUCP (Richard Elkins) (01/20/86)
In article <2135@phri.UUCP> greenber@phri.UUCP (Ross Greenberg) writes: >> Does anyone know of a quick and reliable way of detecting >> whether ANSI.SYS has been installed? >> -- > >A quick hack: > Send the ANSI sequence to position your cursor to some location > {x,y}. > > Send the ANSI sequence to read current cursor poition. If > they match, you're running ANSI, else you're not. > >ross m. greenberg >ihnp4!allegra!phri!greenber Better make sure that you weren't already positioned at {x,y}, yes? Also, if ANSI.SYS is not installed, the results of prompting for a cursor position report would yield random results. A "slow hack" (no flames intended): Make sure that you are in one of the text modes. With ROM-BIOS, position to {0,0}. With ANSI.SYS, position to {1,0}. Use ROM-BIOS to fetch the current cursor coordinates. If {1,0} then ANSI.SYS is installed; otherwise not.
davidsen@steinmetz.UUCP (01/27/86)
In article <2135@phri.UUCP> greenber@phri.UUCP (Ross Greenberg) writes: >> Does anyone know of a quick and reliable way of detecting >> whether ANSI.SYS has been installed? >> -- > >A quick hack: > Send the ANSI sequence to position your cursor to some location > {x,y}. > > Send the ANSI sequence to read current cursor poition. If > they match, you're running ANSI, else you're not. > >ross m. greenberg >ihnp4!allegra!phri!greenber If you just read cursor position you will get: a) the current position if ANSI.SYS b) nothing is not ANSI.SYS Please explain why the cursor needs to be positioned (I may be missing something here). -- -bill davidsen seismo!rochester!steinmetz!--\ / \ ihnp4! unirot ------------->---> crdos1!davidsen \ / chinet! ---------------------/ (davidsen@ge-crd.ARPA) "It seemed like a good idea at the time..."
greenber@phri.UUCP (Ross Greenberg) (01/30/86)
In article <640@steinmetz.UUCP> davidsen@kbsvax.UUCP (Davidsen) writes: >(Quoting me) >> >>A quick hack: >> Send the ANSI sequence to position your cursor to some location >> {x,y}. >> >> Send the ANSI sequence to read current cursor poition. If >> they match, you're running ANSI, else you're not. >> > > >If you just read cursor position you will get: > a) the current position if ANSI.SYS > b) nothing is not ANSI.SYS >Please explain why the cursor needs to be positioned (I may be missing >something here). > The return *may* indicate a {0,0} co-ordinate, even if you're not running an ANSI emulator. So you positon it away from {0,0}, then you read it. If you get back *anything* that doesn't match what you expect, either 1)you're not running ANSI or 2)you have a bug :-) -- ------ ross m. greenberg ihnp4!allegra!phri!sysdes!greenber [phri rarely makes a guest-account user a spokesperson. Especially not me.]