[comp.sources.amiga] v90i062: FixIntuition - avoids lockup from lace/non-lace screen switching, Part01/01

Amiga-Request@cs.odu.edu (Amiga Sources/Binaries Moderator) (02/11/90)

Submitted-by: "KOCH, KARL W" <kochk@uservx.afwl.af.mil>
Posting-number: Volume 90, Issue 062
Archive-name: util/fixintuit

[ uuencoded executable included.  ...tad ]

I got this file from a local BBS and use it continuously on my Amiga
whose WorkBench screen is in hi-res.  I have never had a problem with
it.  I run ARPS commands, ARP-shell, VirusX4.0, Xoper2.2, GraBBit, and
DMouse along with the FixIntuition.  Previous to running FixIntuition,
my computer would lock up when switching between hi- and lo-res
screens.  I have not had that problem since I have run FixIntuition.

Karl Koch
kochk@uservx.afwl.af.mil
koch@arom-sun.afwl.af.mil

#!/bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 1 (of 1)."
# Contents:  FixIntuition.c FixIntuition.uu fixintuition.lnk readme
# Wrapped by tadguy@xanth on Sat Feb 10 14:26:23 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'FixIntuition.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'FixIntuition.c'\"
else
echo shar: Extracting \"'FixIntuition.c'\" \(927 characters\)
sed "s/^X//" >'FixIntuition.c' <<'END_OF_FILE'
X#include <proto/exec.h>
X#include <exec/libraries.h>
X#include <stdio.h>
X#include <string.h>
X#include <stdlib.h>
X#include <proto/dos.h>
X#include <proto/intuition.h> /* be sure LockIBase, UnlockIBase, ViewAddress */
X#include <intuition/intuitionbase.h>
X#include <graphics/view.h>
X
X/***********
X/*
X/* Using Lattice 5.0X : lc -v -O -cf FixIntuition
X/* Blink with FixIntuition.lnk
X/*
X/************/
Xvoid main(void);
X
Xvoid main()
X{
X ULONG lock;
X struct View *view;
X struct ViewPort *vp;
X 
X  if (!(IntuitionBase = 
X   (struct IntuitionBase *)OpenLibrary("intuition.library",33L)))
X    {
X     exit(0);
X    }
X  if (IntuitionBase->LibNode.lib_Version > 35)
X   {
X    CloseLibrary((struct Library *)IntuitionBase);
X    exit(0);
X   }
X  while(1)
X   {
X    lock = LockIBase( 4L );
X    view = ViewAddress();
X    for(vp=view->ViewPort;vp;vp = vp->Next)
X     if (vp->Modes & VP_HIDE) vp->DHeight = 0;
X    UnlockIBase(lock);
X    Delay(15L);
X   }
X}
END_OF_FILE
if test 927 -ne `wc -c <'FixIntuition.c'`; then
    echo shar: \"'FixIntuition.c'\" unpacked with wrong size!
fi
# end of 'FixIntuition.c'
fi
if test -f 'FixIntuition.uu' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'FixIntuition.uu'\"
else
echo shar: Extracting \"'FixIntuition.uu'\" \(2646 characters\)
sed "s/^X//" >'FixIntuition.uu' <<'END_OF_FILE'
Xbegin 664 FixIntuition
XM```#\P`````````#``````````(```%J````(@```(D```/I```!:B1()`!)!
XM^0````!'^0```(!R`"`\````:6`")L%1R/_\+'@`!"E.`+@I3P#`0JP`O"9N:
XM`11P`"(\```P`$ZN_LXI:P"8`+1*JP"L9P``<"`/D*\`!`:`````@"E``(1AY
XM``$N(&L`K-'(T<@B:``0T\G3R2`"<@`2&2E)`,C0@5*`0F=2@`)`__Z?P%6`T
XM0G<(`"`"4X#4@1^R```@`%."4<C_]A^\`"`@`%."'[$@`"``4<K_^")/+PE@Z
XM``!X*6L`.@"$<']2@-&L`(1A``#"0>L`7$ZN_H!!ZP!<3J[^C"E``+PO`"1`W
XM("H`)&<2+&P"%"!`(B@``"E!`+1.KO^"(BH`(&<:)#P```/M3J[_XBE``,1G(
XM"N6(($`G:``(`*0@;`"\+PA(;`"`(&@`)"EH``0`R$ZZ`'A.N@#@<`!@!"`O9
XM``0O`"`L`*QG!"!`3I!.N@0H+'@`!")L`A1.KOYB3KH`3DJL`+QG&B(L`,1GR
XM!$ZN_]PL>``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`+!G!$ZZ`%XB!RQL`A1.KO_<<``N'TYU+P<N+P`(<``I0`"82H=K2
XM(KZL`!1L'"`'YX!![`#,2K`(`&<.(`?G@$'L`,S1P"`(8`AP"2E``A!P`"X?_
XM3G4``````````````````$CG`0)P`"(\```P`"QX``1.KO[.+@`"AP``,`!*4
XMAV8$<`!@($JL`+!G&"!L`+!.D$J`9@1P`&`,2'@`%$ZZ`!)83R`'3-]`@$YU:
XM8;1.=0``2.<'`"XO`!`@+``44X`L`$I&:S`@!DC`YX!![`#,*C`(`$H%9QH(-
XM!0`"9A0@!DC`YX!![`#,+S`(!$ZZ_PA83U-&8,PO!TZZ^])83TS?`.!.=0``U
XM2.<`,B9L`A@@"V<4)%,B2R`K``@L>``$3J[_+B9*8.B1R"E(`API2`(83-],=
XM`$YU```#[`````$````!```"U@````(````"````#`````8````````#\@``7
XM`^D````B2.<!$D/L``!P(2QX``1.KOW8*4`"#$J`9@A"ITZZ`&)83R!L`@PP\
XM*``4<B.P06,2(D@L>``$3J[^8D*G3KH`0EA/<`0L;`(,3J[^8BX`3J[^VB!`7
XM)E!@#@@K``4`(&<$0FL`&B93(`MF[B!'+&P"#$ZN_EQR#RQL`A1.KO\Z8,).=
XM^0```S!P80```^P````!`````````((````````#\@```^H````@:6YT=6ET.
XM:6]N+FQI8G)A<GD````````H````.@``````````````````````````````+
XM`````````````%P`````````````````````````````````````````````<
XM``````````````````````````````````````````````/L`````@````(`S
X/```Z````&`````````/R'
X``
Xend
Xsize 1860
END_OF_FILE
if test 2646 -ne `wc -c <'FixIntuition.uu'`; then
    echo shar: \"'FixIntuition.uu'\" unpacked with wrong size!
fi
# end of 'FixIntuition.uu'
fi
if test -f 'fixintuition.lnk' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'fixintuition.lnk'\"
else
echo shar: Extracting \"'fixintuition.lnk'\" \(86 characters\)
sed "s/^X//" >'fixintuition.lnk' <<'END_OF_FILE'
XFROM LIB:c.o+"fix.o"
XTO "FixIntuition"
XLIB LIB:lc.lib
XBATCH
XDEFINE __main=__tinymain
X
END_OF_FILE
if test 86 -ne `wc -c <'fixintuition.lnk'`; then
    echo shar: \"'fixintuition.lnk'\" unpacked with wrong size!
fi
# end of 'fixintuition.lnk'
fi
if test -f 'readme' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'readme'\"
else
echo shar: Extracting \"'readme'\" \(366 characters\)
sed "s/^X//" >'readme' <<'END_OF_FILE'
XHere is a fix for the intuition switch screen lace problem as
Xdescribed by jmackraz on bix.  It is a hack but it works.
Xto use it type :
Xrun <nil: >nil: FixIntuition
XShould run at a prio of about 2-4 I would think.
XThis version checks every 1/4 of a sec to fix the
Xsystem view structs!
X
XSomeone will surely do a better one but this works!
X
X-Roger
X
XThanks jmackraz!
X
END_OF_FILE
if test 366 -ne `wc -c <'readme'`; then
    echo shar: \"'readme'\" unpacked with wrong size!
fi
# end of 'readme'
fi
echo shar: End of archive 1 \(of 1\).
cp /dev/null ark1isdone
MISSING=""
for I in 1 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have the archive.
    rm -f ark[1-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0
-- 
Mail submissions (sources or binaries) to <amiga@cs.odu.edu>.
Mail comments to the moderator at <amiga-request@cs.odu.edu>.
Post requests for sources, and general dicussion to comp.sys.amiga.