home *** CD-ROM | disk | FTP | other *** search
- QFIX.C v 1.01 by Shaun Case Feb 21 1991
- Released to the public domain Feb 22 1991
-
- Platform: PC clones under MS DOS 2.10 or higher (?)
- Supports CGA/EGA/VGA/MCGA.
- Untested on Hercules and MDA.
-
- Purpose: Qfix gets around Qedit's annoying habit of
- not restoring the screen when it terminates
- if it detects that it is unregistered. To
- combat this annoyance, Qfix will save the current
- screen to a disk file, and later restore it.
-
- Instructions:
-
- To use Qfix, you should rename Qedit from Q.EXE to
- QEDIT.EXE, and create the following batchfile,
- called Q.BAT:
-
-
- @echo off
- qfix save f:\tmp\q.sav
- qedit %1 %2 %3 %4 %5 %6 %7 %8 %9
- qfix restore f:\tmp\q.sav
-
-
- Replace f:\tmp\ above to any path that contains
- at least 15k free space. The size of the save
- file varies, depending on the mode you are in.
- You can count on something between 2k (for 40X25
- mode) and ~12k for 132X43 (the mode I use.)
-
- Make sure that the above batch file is in your path.
-
- I put QCONFIG.DAT, Q.BAT, QEDIT.EXE, and QFIX.EXE all
- in a RAMDISK (which is what f:\tmp is on my system.)
- This makes everything run really, really fast, and
- you won't notice the screen being restored at all
- after you have used it for a while. If you use it
- on a floppy system, well, it's going to be pretty
- darn slow.
-
- If you are using a version of DOS older than 3.30,
- you should replace the first line of the batch file
- above with just "echo off", with no '@' in front.
- The '@' just keeps the "echo off" message from being
- displayed, and looks a little nicer.
-
- Using Qfix under MDA:
-
- You will have to patch the program with MDA's starting
- address, and recompile. This should be relatively
- painless.
-
-
- For god's sake, get a color card! You've been in the dark
- ages long enough.
-
- Note on source:
-
- The source is written under Turbo C 2.0, but was compiled
- under Borland C++ 2.0. Either should work fine. This executable
- and the source are in the public domain. Use them any way
- you want -- use them in your own programs, make them into
- games, art, plant mulch, or sell them at a profit. I don't
- care. If for some reason you want to contact me (other than
- for flames, especially if you work for Semware! <nirg>) then
- you can send me mail at atman%ecst.csuchico.edu@RELAY.CS.NET.
-
-
- By the way, you may wonder why I used the save to disk approach
- to solving this problem. Here are the main reasons I did it
- the way I did, rather than making a TSR or patching the Qedit
- code directly:
-
- 1) TSRs are hard to write, and waste memory that could be used
- to edit files.
- 2) This method will work for any version of Qedit that does
- this nasty trick, or for any other program that destroys the
- screen and doesn't put it back. (Really bad programming
- practice, if you ask me.)
- 3) I want people to appreciate what a fast 386 and a ramdisk
- can do for you. I like making good use of available
- resources, and anyone who still uses a floppy based PC
- system probably doesn't mind the screen not being restored.
- God knows they've been putting up with enough from
- their machine as it is.
- 4) People get mean when you patch their executables.
- Also, this method, as far as I know, is legal, whereas
- patching executables probably isn't in all cases.
- 5) Bus stop F'tang F'tang Ole Biscuit Barrel. Fnord.
-
- Moralizing:
-
- Incidentally, I do sort of believe in registering shareware,
- if you get the urge, but what I really believe in is
- donating both your executables AND YOUR SOURCE to anything
- useful you write into the PUBLIC DOMAIN! If more people
- would share code, the world would be a better place. For
- instance, this code should save and restore most video modes
- correctly. It is my sincere hope that someone uses this
- code (or at least some of it) when writing screen savers.
- I currently use one called EXPLOSIV, which only restores
- HALF my screen when I am in 132X43 mode. It is quite
- annoying. Anyhow, here it is, and happy Qediting! ($55
- is a bit pricey, don't you think?)
-
- Future Versions:
-
- Future versions will have the following feature(s):
-
- - Save screen info to EMS, if available
- - Support for MDA
-
- Future versions may have the following features:
-
- - Hercules support
- - Save screen info to XMS, if available
-
- All future versions will also be in the public domain.
-
-
- Shaun Case, 6/6/91
-
-