alt.tvShow header Prev. Next
Everybody Hates Chris episode http://groups.google.com
ericmatteson2003november (ericmatteson2003november@hotmail.com) 2008/12/07 20:29

Episode of Everybody (At Microsoft) Hates Chris
Everybody Hates Chris
Improving xwview02.c
Copyright C 2008 by Eric Matteson. Permission is granted
to copy the plain text version of this script and to publish
it on the Internet.
Non-profit uses including student films and speech
classes are also allowed.
 Scene 1   Chris and Greg in Cafeteria at table
CHRIS
 Last summer there was a Star Wars Movie ( Script on the
Internet ) that had a story about a science fiction
website that claimed that Linux was going to be used
to compile and run Microsoft Windows programs.
 They even had some example header files and a
c program to display bitmaps in monochrome first
for Microsoft Windows and then their special header
files with Linux.
 What is so special about Microsoft Windows ?
Why not just write everything to run on Linux
XWindows directly without a Star Wars header file ?
GREG
 Microsoft Windows is important to teachers because
there are textbooks about Microsoft Windows API programming
in the C language.
CHRIS
 We do not have any of those textbooks here in the
Glenoak Community College library.
 I found a very old monochrome picture viewer program in C
for XWindows that is even dumber than the Microsoft Windows
version in the more recent Star Wars Movie (Script).
 I want you to help me fix it up.
GREG
What needs fixing ?
CHRIS
If you resize the XWindow it looks like turning the
horizontal hold on a TV so it no longer works.
It is the xwview02.c bitmap picture viewer program
in C written directly for Linux XWindows.
  [ xwview02.c ]
http://groups.google.com/group/comp.os.linux.advocacy/msg/cc11b8a2ad0bf294?dmode=source&hl=en

I downloaded it and copied it to xwview13.c and changed
all its internal names from xwview02.c to xwview13.c
What is the next step to fix it ??
Come over to my place tonight.
 (Scene 2 at Chrises place)
Chris and Greg wait for Chrises computer to boot up.
  O.K. booting the Kernel
eventually, XWindows starts and Chris uses edelev10
to open up xwview13.c
GREG
 Where is the place you figure out where to copy each pixel
to ?
 ( Chris moves the cursor to where the array subscript
is calculated based on x and y coordinates. There is
also a destination width. The destination width has to be
changed so that every destination width based on the screen
width being promoted up to the next multiple of 8 pixels
wide if not already evenly divisible by 8. )
CHRIS
 This is where the destination width is used to help calculate
the destination array subscript for a group of 8 pixels.
What do I do next ?
GREG
 Add 7 to the raw width before shifting it right by 3 bits.
Scince you will be adding other things on then shifting it to
the right three times later shift it to the left 3 times right
after the first right shift right 3 times after adding 7 to the
raw destination width in pixels at the beginning.
CHRIS
 I am adding in a new variable name here so I do not
redefine the incoming destination width argument.
Is this right ?
GREG
 Yes.
 ( Chris then compiles and tests xwview13.c and the
XWindow can finally be resized without destroying the
horizontal hold setting and the picture display is
stabilized ).
CHRIS
 The old clunker xwview02.c is based on the derivative
in which the current pixel is compared with the pixel
before it to its left. If it is brighter a bright pixel
is displayed otherwise a dark pixel is displayed.
 This derivative based method of interpreting pictures
usually is bunch of nonsense. I want the threshold
comparison capability of the Star Wars program for
MS-Windows imitation added onto it.
GREG
 Go to the place where the derivative is calculated.
( Just before the derivative is calculated there is
a mistake in which the adding on of each partial pixel
when a picture is shrunk is reset to zero too often.)
 Move that resetting of that comparison variable to
zero before the beginning of the two nested shrinking
loops.
CHRIS
 O.K. What is next ??
GREG
 Add in 14 threshold comparison modes and an array
of thresholds.
 ( Chris puts in the thresholds array. The chosen value in the
threshold comparison array has to be multiplied by
the square of the shrinkage factor so shrunken pictures
will be compared with a threshold that will make them look
the same brightness no matter what the shrinkage factor is. )
CHRIS
 I have the thresholds put in. Is there anything else ??
GREG
 Modify the c colormode to accept the 14 additional modes
based on the new threshold comparisons in addition to
unclamped and clamped derivative modes.
CHRIS
Is it really a c Colormode ?
GREG
Not in these versions. There is not even a greyscale
because our display routine is only one bit per pixel.
We will only be choosing 14 thresholds and two derivative
display modes.
CHRIS
 What is next ??
GREG
 Copy in some file finding subroutines for bitmap files and
then get error messages from the compiler that list
undefined symbols.
 ( Chris puts in some filename finding subroutines
from a more advanced picture displayer program and
the compiler lists undefined symbols. Then they are
put in. Then the compiler comes up with a second list
of undefined symbols and then they are put in.
Then xwview13.c compiles sucessfully .)
 Chris and greg finish up fixing things up.
   [ xwview13.c ]
http://groups.google.com/group/comp.os.linux.misc/msg/81f6ad0656fc5b5c?dmode=source

 (Scene 3 preparing for going to Museum)
 NARRATOR
The problem started with city councilpeople outlawing
homelessness at least in the daytime.
 City councilpeople who believe
that scince homelessness is a crime they then
ask public employees including L.A. County lifegaurds at the
beach to run over people who are suspected of
being homeless.
 After the lifeguards got away with running over four people
who were suspected of being homeless at the beach they then ran
over a pre-med student. First public employees run over
people who are suspected of being homeless and then they run over
students and anti-war protestors and then they will run over
suspected Republicans and then everyone else.
 There is no sidewalk on the way to the museum up in the hills.
  Chris and Greg walk to the museum in the mountains to do
a Museum report.
 CHRIS
If City councilpeople in cities including Los Angeles will
vote to abolish laws against sleeping outside and against
going to the bathroom outside and against eating outside
so being homeless becomes legal both day and night
then ALL PEDESTRIANS both homeless and non-homeless
will BE SAFER.
 GREG
How will recognizing peoples right to sleep outdoors both
all day and all night help all pedestrians ?
 CHRIS
Because after homeless people are no longer criminals then
City Councilpeople will then no longer have to ask public
employees to run over homeless people.
 Then public employees who drive will no longer have to drive
outside of the street. Access roads can be added to parks and
beaches so public employees will be limited to one day a week
mowing the lawn at the park and the other six days in each park
only drive on access roads to empty trash cans and
there will also be no more randomly driving all over
the sand at the beach. Lifeguard trucks have to be confined
to a two lane access road at the waterline instead of driving
all over the beach at random to continue to run over pedestrians.
 GREG
WE have to legalize homelessness in order to protect
all pedestrians both homeless and non-homeless.
 (Then Greg and Chris get past the no sidewalk area
and the museum access road is near a perpendicular
train track where a chain tows a train.
 At the Museum is a painting of nine apples.
 (Scene ?? Back at Glenoak Comunnity college)
Glenoak Community College has no safe way for pedestrians to
walk onto campus. The downhill road has a sidewalk on only
one side and the cross-campus segment has High Speed Shuttle
golf carts driving on the sidewalk.
 The long pedestrian walkway near the main construction
road that is marked ( To admissions ) has security patrols
on high speed bicycles. How do they get the bicycles
throgh there without scraping against the two surrounding
fences that are closest together ?? One fence faces a
closed field that used to be a park open to the public in
the daytime.
 The downhill side of the library has a narrow path that is
marked on the paperwork as a pedestrian path but medium
speed golf carts use it and occupy the entire space
between the construction fence and the buildings in a
narrow area so pedestrians are unable to get around
golf carts traveling the other direction.
 The uphill side of the library has High Speed Shuttles
that also drive through a narrow portion at high speed.
There is a broken air conditioner near the
library that has a large fence around it. Zoom TV camera
here near air conditioner.
 CHRIS
  See that mud patch ?? Put concrete
over it then shrink the fence around it so it is farther
away from the construction fence between the Fine Arts Building
and the library on the uphill side.
   Shrinking this fence around that air conditioner
is the easiest way to quickly widen one pedestrian path
so pedestrians will not have to be so close to speeding
high speed shuttles in a narrow area.
 GREG
EVERY PATH through Glenoak Community College is unsafe
for pedestrians. There is a narrow point on every internal path
and the external surounding sidewalks are driven on by
golf carts.
 CHRIS
Microsoft Windows is part of the establishment. We are helping
the FREE LINUX operating system compete with Microsoft Windows.
The new xwview13.c is better than the old xwview02.c and
we do not have to depend on simulating Microsoft Windows
on Linux because we can write and greatly improve programs
that directly run on Linux XWindows without needing to
pretend to be Microsoft Windows programs so
dfrview2.c for Windows is no longer our only option for
monchrome threshold based viewing.
In the past we advocated dual boot P.C. s that had both
Microsoft Windows and Linux. Now we have to consider the
possibility of starting a Linux monopoly.
----------------------------------------------------------
  The xwview13,c *.bmp picture file viewer program
was designed for 640*480 screens. Do not enlarge the
XWindow if the entire screen is larger
than 640*480
 Near the beginning of the program is declarations.
 char caap[48000];
48000 is big enough for 640 * 480 with 8 pixels per byte.
a 800 * 600 display will need 60000 bytes if the screen
is maximized for caap[
----------------------------------------------------------
 Everybody working at Glenoak Community College who loves
Microsoft Windows needs to lobby whosoever is in charge to
make the campus safer for pedestrians by widening pedestrian
paths and no longer driving Golf carts outside of the street.
  Failure to immediately improve pedestrian saftey will result
in Microsoft going out of business within a few months as
we continue to provide help to free Linux and the programs
that run on it. Free Linux has begun to compete with
Microsoft Windows.
 GREG
It is always wrong to drive on lawns and beaches and sidewalks.
When will the catholic church speak out against it ??
 CHRIS
Even though there are color picture viewer programs for Linux
we have improved the monochrome one-bit-per-pixel veiwer
program from xwview02.c to upgraded xwview13.c because monochome
one-bit-per-pixel viewing of pictures is much faster than color
and the older computers we have to use at school are slow
and we need to use one-bit-per-pixel picture viewing instead
of waiting for color pictures to be very slowly drawn.
 GREG
All 109 of Californias community colleges are unsafe for
pedestrians because unskilled school janitors often drive
golf carts on sidewalks and construction fences do not allow
enough room for pedestrians and golf carts to get around
each other safely. High Speed Shuttle golf carts have no seat
belts so please do not ride them.
 CHRIS
Money that was supposed to be spent on hiring new professors
to replace retired professors has been wasted on hiring
welfare recipients who have had welfare for five years
to do a make work job of driving people around campuses
all day in unsafe high speed shuttles that have no seat
belts and endanger their riders and pedestrians all over
campus at most of Californias 109 community college
campuses.
 GREG
Can you see why we want to improve Linux and programs that use
Linux so much that Microsoft Windows will no longer be needed ??
 CHRIS
Putting Microsoft out of business will change our recession
into a full nationwide depression in the United States.
Microsoft will no longer pay taxes after going out of
business and that will collapse the U.S. congress that is
already at the edge of bankruptcy.
 Improve pedestrian saftey NOW at community college
campuses or soon face a full economic depression.
 GREG
If every community college golf cart driver is laid off
then new teachers can be hired to replace recently retired
teachers who retired after 2001.
( written by Eric Matteson )
 [ Link to previous episode of Everybody Hates Chris ]
http://groups.google.com/group/alt.tv/msg/1528d1d3b7df8f4d?hl=en&


Next Prev. Article List         Favorite