
Popi change history.
--------------------

v3.2 - patchlevel 2. - 16th April 1992.
----------------------------------------

* From Stephan Wasserroth <wasserroth@fokus.berlin.gmd.dbp.de>
  Various improvements and bug fixes:

   - After :read-ing color images popi crashed when gray images were
     manipulated.
     Color: Default is working in grayscale. After :read-ing a color picture,
     it is possible to work in color and grayscale in the same session, but
     it is impossible to mix gray and color pictures. "new" becomes gray, if
     the input pictures are gray; "new" becomes color, if the input pictures
     are in color.

   - Working with pictures of different sizes was not as expected.
     The problem arises from the fact, that the pixel array is 2-dimensional
     but accessed with pointer arithmetic as 1-dimensional array. Now all
     pictures have their sizes in pict->width and pict->height, only "old"
     and "new" may have a larger allocated array than these values. Therefore
     I have extended the structure of a picture with pict->Xalloc. This is
     equal to pict->width for all pictures BUT "old" and "new", which have a
     value of Xsize (the current maximum size). Almost all accesses to the
     pixel array have been modified to take this into account. Now the drivers
     have to be modified again...  ---> look in next.m, how to do it.

   - Improved the way range errors are handled.
     A new special function, :range cut | minmax | wrap
     The current handling is shown when :list is executed.
     "cut" sets the pixel value of pixels outside of the current size to 0,
     "minmax" uses the pixel value of the nearest edge (like in the current
     version of popi),
     "wrap" wraps the picture around (the pixel index is computed modulo the
     current size).
     This holds true for the right hand side of an assignment, range errors on
     the left hand side ignore "minmax" setting and use "cut" instead.

   - Introduced a new special function :size to set the size of "old" AND
     "new" (both have always the same size). :size without parameters sets
     the maximum size (Xsize, Ysize respectively). The size of "new" defines
     the actual pixel array, which is manipulated, thus using a small value,
     one can test an effect very fast and after it is "right", it may applied
     to a larger area. By the way, :size doesn't allow a size greater than the
     current maximum size.

   - Support for conversion between color and grayscale images.

     The new functions:
       * :luma [image-name]
         Takes a color image and converts it to a grayscale image using the
         familar formula for computing luminiscence.

       * :explode [image-name]
         Self-destruction of a color image. Takes a color image and creates
         three grayscale images, one for each of red, green and blue. These
         are named as follow: "image" becomes "imager" (R), "imageg" (G) and
         "imageb" (B). Now You can modify single planes as you like.

       * :combine [image-name]
         I should have named this function :implode. It is the combination
         from three grayscale images named as in :explode into one color image.

       * :get red|green|blue image-name
         Extracts just one component from the given image.

       * :put red|green|blue image-name
         Put grayscale "old" into the given component of image-name.

v3.2 - patchlevel 1. - 5th March 1992.
----------------------------------------

* From Jorgen Gustafsson <jg@sysware.DK>
  I got popi v3.2.0 running on our old system (68030, Unix V.3.1 with
  matrox graphics board), just to see if it would work there (simple
  modification of nulldev to test it). I found a few bugs concerning
  memory allocation (these are the same bugs that annoyed me on an
  HP9000/425 - X11 system).

* From Jorgen Gustafsson <jg@sysware.DK>
  If popi is invoked without a picture on the command line, ntsc isn't
  allocated, on my system. Free to a null pointer gives a segmentation
  violation.

* From Jorgen Gustafsson <jg@sysware.DK>
  In dither.c, new_{red, green, blue} are static arrays and cannot be freed.

* From Stephan Wasserroth <wasserroth@fokus.berlin.gmd.dbp.de>
  Various improvements and bug fixes:

  - (Re)port of the NeXT-driver (supporting true color, tested on a NeXT-
    Dimension).
  - Either integer or floating point evaluation stack (a new Makefile
    variable).
  - "new=" works again. In fact, any picture name may be given without the
    "[x,y]" construct, i.e. "new=old+test" works.
  - floating point values are allowed, i.e. "new=old*2.3"
  - picture may be identified by "$n", i.e. ":disp $1"
  - a new function ":store". Used to store "old" in a named picture without
    writing it to the disk.

v3.2 - patchlevel 0. - 5th January 1992.
----------------------------------------

* Popi grammar is now a yacc file. This is based on the yacc grammar by
  Byron Rakitzis in his pico implementation.

* Removed :create and :run from the manual pages and the online help. These
  special functions aren't implemented yet.

* From Dave Spensley <davesp@ecs.comm.mot.com>
  Fixed up variable number of arguments to pm_message() and pm_error() in
  genps.c and libpbm.c.

* Included the sparcgen.c file with the popi distribution. This file contains
  the sparc runtime assembler routines, and is largely the work of Byron
  Rakitzis from his pico implementation. Note that it does not fully work yet.
  It is currently "commented" out in gen.c. This will be fixed up in a future
  patch.

* Popi no longer uses a pixel_t *** structure to point to the image. It's
  now pixel_t ** (ie. image->pix[color][(y*width)+x]). Apart from simplifying
  some really ugly code, this was needed to generate a correct image address
  for the sparc runtime assembler routines.


v3.1 - patchlevel 6. - 12th December 1991.
-----------------------------------------

* Fixed up :genps to correctly convert PBM/PGM/PPM files to PostScript. It
  now uses a modified version of the PBMPLUS utility pnmtops. To integrate
  easily into the existing program, the genps() routine writes the image
  out to a temporary file first. This will need to be improved. There is one
  new source file genps.c. Updated MANIFEST, FILES and Makefile.dist

* From Dave Spensley <davesp@ecs.comm.mot.com>
  If you specify picture names on the command line, popi core numbers because
  disp_resize is being called before disp_init. Added an extra parameter to the
  getpix() routine to get around this problem.

* From Dave Spensley <davesp@ecs.comm.mot.com>
  If you attempted to read in images with a command such as:

  :read "/path/to/imagename"

  then the image name was being incorrectly extracted.


v3.1 - patchlevel 5. - 3rd December 1991.
-----------------------------------------

* From Harry Langenbacher <harry@neuronz.Jpl.Nasa.Gov>
  You need "-traditional" to compile xview.c with gcc

* From Eric Haines <erich@eye.com>
  Hopefully added in the ability to get popi to compile and run under X11R3.
  There is a new Makefile definition X11R3 that needs to be uncommented.
  This hasn't been tested under R3, but does work under R4 when this defintion
  is uncommented. Not saying much, I know...

* Added a note to the README about the availability of popi via anonymous ftp.

* From <davesp@ecs.comm.mot.com>
  Various fixups to get popi to compile under BSD Unix on the Apollo.

  - Problems with PFLAGS in the Makefile. This is already defined and used.
    Changes PFLAGS to PARFLAGS.

  - Need an include for <time.h> in popi.h.

  - <stdlib.h> is available (as of Domain SR10).

  - The include for <values.h> has been removed from run.c. This is a System
    V specific include; not all O/S's have it. It was needed for the MAXLONG
    definition. Instead this is defined in popi.h (asuming it's not already
    been defined). Hopefully this is portable.

  - SIGRET line in the README file was incorrect.

* From Chris Stenton <gnome!jacs@swan.cl.cam.ac.uk>
  Problems with the *sprintf() declaration in popi.h when compiling on an
  Acorn Archimedes R260 Unix Workstation under RISC iX 1.2 and X11.4. I've
  just removed this declaration. It was only there to try to make lint happier.

* Enlarged on the note about PBMplus in the README file.

* From Glenn Huxtable <glenn@cs.uwa.oz.au>
  Problems with displaying on a monochrome NCD terminal, where BlackPixel = 0.
  Introduced a new variable rev_video which is set (in x11.c) and used in the
  halftone routine in dither.c.


v3.1 - patchlevel 4. - 8th October 1991.
----------------------------------------

* Displaying in monochrome via half-toning on an 8bit color screen now works
  correctly, for the X11 and SunView drivers.

* Toggling between :color, :grayscale and :mono now works correctly, for the
  X11 and SunView drivers.

* From Eric Haines <erich@eye.com>
  Added the following command line options:

  -O - overwrite (don't clear) screen
  -X # - X offset for image from corner of screen
  -Y # - Y offset for image from corner of screen

  The manual pages have been updated for these new options.

* From Eric Haines <erich@eye.com>
  Fixed up the hp.c driver for 8 and 24 bit graphics devices.

  A few comments:

  - HP now has shared link libraries, but they currently don't work correctly
    with their graphics software, hence the explicit paths all over the place.

  - The run.c file does range checking for some of the functions (log, pow,
    etc). The "out of range" messages are cut down by these, and a fatal
    coredumping bug is eliminated (assigning an absolutely huge float to a
    long - if the float is bigger than the long, HP dies, e.g. "i = 1e+30"
    is bad news).

  - The special.c file has some fixes for lint, too, and also correctly figures
    out the percent done, uniformly between modules.  More importantly, I've
    tried to make all the special commands do the same things to all three
    channels.

  - I fixed some (not all, just the obvious ones) lint problems.

* From Eric Haines <erich@eye.com>
  The gl.c driver incorrectly says:

    pixel_t *line;
  for disp_putline, it should be:

    pixel_t **line;

* Popi now correctly compiles for ANSI conformant compilers such as gcc and
  Suns' acc.

* Popi now correctly runs when compiled with gcc. gcc doesn't like strings
  allocated in read-only memory to be adjusted, so the setting of "old" and
  "new" to the images in main.c and io.c was incorrect.

* Fixed up a core dump when doing a :melt on a color image, by making the
  new colormap r/g/b arrays static variables.


v3.1 - patchlevel 3. - 23rd September 1991.
-------------------------------------------

* Fixed up the specials to work with images that had dimensions less than
  Xsize x Ysize.

* The halftone() routine in dither.c needed to specify the image width.

* Added in a 24->8bit dithering routine which will display the PPM images
  on 8bit color machines in color, instead of forcing the image to grayscale.

  This unfortunately has added yet another general disp_ routine called
  disp_colormap() which has been added to add the graphics drivers. The 24
  to 8 bit dither has been tested in the X11 and SunView drivers. The rest
  need to fixup this functionality.

* Added a fourth parameter to the disp_putline() routine which gives the
  number of colors used in the scanline passed in. Adjusted this routine
  in all the graphics drivers, testing it with the X11 and SunView versions.

* Modified the X11 driver. It now reads it's input from standard input, and
  writes to standard output, with errors going to standard error. This means
  it should be started from an xterm or cmdtool. It also uses either the
  select() or poll() call for looking for input on either standard input or
  handling X events. As well as setting the SELTYPE definition correctly in
  the Makefile[.dist], there are now two more new definitions; HASPOLL and
  NOSELECT. These need to be uncommented if appropriate. See the README and
  Makefile[.dist] for more details.

  NOTE: The case of a machine without either select() or poll() is not
        properly handled.

  Because the standard X11 cut & paste facilities are now available for
  manipulating the input, and because xterms and cmdtools can have scrollbars,
  the following entries have been removed from the TODO file:

  - From Eli Chiprout <uunet!mitel!chiprout@munnari.oz>
    It would be nice to have a last command recall so one could make slight
    variations in it.

  - From Stephen Frede <stephenf@softway.sw.oz.au>
    There needs to be a better way of doing error messages, esp for system
    errors. Pausing for 2 seconds and then overwriting with the sys_errlist
    text is no good. Besides which, it doesn't work. Errno was being
    overwritten (so I've introduced save_errno) but still the original text
    never gets displayed. The error window needs to be several lines long,
    and to scroll, or be overwritten by each new error.

  - The #list command needs to output somewhere better that stdout. A
    possibility here, is a -list command line option, which could be a file
    to open. Could allow for special "files" like stdout and stderr, but
    could also be /dev/ttyp5, /dev/console, /usr/person/popi.out (which
    could be tail -f'ed) or whatever...

  - The graphics interface for the workstation generic graphics drivers,
    needs to be substantially improved. Inclusion of a scrollbar to view
    previous commands, the ability to cut and paste commands, menu buttons
    to iconise and quit, picture settings etc.. Note that some of these
    options are available with the SunView and XView versions.

  - From Steve Howell <skh@widget.Corp.Sun.COM>
    Some kind of history or re-editing options would be nice. Being able to
    recall the command line and move the cursor to insert and delete
    characters would be a nice enhancement.

  - From Thomas M. Breuel <tmb@ai.mit.edu>
    A suggestion for the X11 driver: it would probably be much more useful if
    the "Expression" input and "Error" output just went to stdin/stdout. That
    way, cutting and pasting would work, past input could be accessed, and
    multiline input would look right.

* Adjusted all the specials to use the new 24 -> 8 bit dither code.

* Passed the width, height and number of colors for the image into the
  disp_imgstart() routine. Adjusted all the graphics drivers, testing the
  X11 and SunView ones.

* Added in three new special commands :color, :grayscale and :monochrome
  to allow results to be interactively displayed in different formats.

* From Martin A. Leisner <leisner.henr801c@xerox.com>
  Popi README says the X11 driver works under X11r2 and X11r3.
  [Changed to X11R4 and X11R5].

* From Rob Beukers <rob@dutetvd.ET.TUDelft.NL>
  Help message mentions :quit and :exit which don't work.

* From Rob Beukers <rob@dutetvd.ET.TUDelft.NL>
  Ibmpc version (386 with DOS 5.0, super VGA, 4M memory). Libpbm is not
  mentioned in popi.prj (is needed).

* From Rob Beukers <rob@dutetvd.ET.TUDelft.NL>
  The following options are not mentioned in the manual pages:
  -D, -i, -r+, -r- and -z. Also the help messages for popi command line
  options and the ? command are lacking.

* From Rich Morin <cfcl!rdm@apple.com>
  There were still a few problems with the manual page:
 
  - The examples are easier to read if a blank line is used to separate
    them from the preceding text (really).
 
  - The options are getting extensive enough that an alphabetical listing
    might make sense.

* From Rich Morin <cfcl!rdm@apple.com>
  It isn't handling the :r command properly.  It pushes an NL back
  onto the input (readimg - special.c:764), then complains about it
  when next it sees it.  Wazzup?

* Removed the following entries from the TODO file (which are now fixed):

  - From Rich Morin <cfcl!rdm@apple.com>
    Handling of partial "specials" is kludged a bit: grep KLUDGE in *.c to
    see how.

  - From Russ Nelson <nelson@sun.soe.clarkson.edu>
    It would be nice to be able to change the resolution of an image in the
    getpix() routine. Of course, this screws up any other images that you may
    have already created, but hey, life can be tough. Maybe each image should
    have its own resolution, and if a reference is made to a pixel that's
    off-screen, just return zero.

  - From Rich Morin <cfcl!rdm@apple.com>
    Ability to read/write odd-size files.

  - From Harry Langenbacher <harry@neuronz.Jpl.Nasa.Gov>
    what does the flag :
      -c+  Set the colour mode flag on. Do all work in RGB.
    do?   My image is still shown in grayscale.

  - From Ling Kan (sun!nosun!cadreor!ling)
    I have compiled popi using Xview, sunview and X11. All three versions core
    dumped on ppm image files, sometime it took a pbm file for a while then it
    aborts. All image files I tried to load into popi can be displayed by
    xloadimage.


v3.1 - patchlevel 2. - 12th September 1991.
-------------------------------------------

* From Thierry Leconte <Thierry.Leconte@irisa.fr>
  If I start from scratch and do:

  new[x,y]=x*y
  new[x,y]=old[x,y]/2

  I get a beautiful black image ... but :

  new[x,y]=x*y
  new[x,y]=x*y
  new[x,y]=old[x,y]/2

  works ...
  Perhaps I don't understand everythings but I think it's not really friendly.

  [When the old and new images are swapped at the end of a transformation in
   SwapOldNew() in run.c, their names also needed to be swapped.]

* From Thomas M. Breuel <tmb@ai.mit.edu>
  From Thierry Leconte <Thierry.Leconte@irisa.fr>
  popi core dumps when trying to manipulate image greater than 512x512.

  [Several things done to fix up this problem:

   - added three new fields (width, height, colors) to the SRC struct, which
     are set appropriately for each newly created image.

   - memory associated with a new image is cleared as it is malloced. A new
     definition (USE_BZERO) has been added to Makefile.dist (and documented
     in the README file), which should be uncommented if your system uses
     bzero() instead of memset().

   - the "old" and "new" images are initially created to 512x512 by default,
     or whatever was specified by the -x and -y command line options. These
     values are stored internally in Xsize and Ysize. When a new image is
     read in, if it's larger than Xsize or Ysize, then the new values are
     saved, and the existing "old" and "new" images are reallocated to the
     new maximum dimensions (preserving the previous contents, and clearing
     the new areas).

   - if a transformation involves images of different sizes, then range
     checking is performed against each images dimensions. If the required
     value is out of range, then the value used is equivalent to the closest
     valid pixel value. For example, trying to access pixel [512,0] of an
     image that is only 512 pixels wide, will return the value of pixel
     [511,0].

   - a new global routine disp_resize() has been added to all the graphics
     drivers. This is a stub in most of them, but has been fixed up for the
     X11, SunView and XView versions. Needs to be fixed up (if applicable)
     for the other graphics drivers.]

* Changed the SunView driver to use an off screen memory area and a non
  retained canvas, to allow correct resizing.

* Change the X11 and XView drivers to use a private colormap if it can't
  allocate all the colors needed from the default colormap.

* The X11 version now correctly terminates when quit from the window manager.


v3.1 - patchlevel 1. - 6th September 1991.
-----------------------------------------

* From Thomas Heller <PPH93%DMSWWU1A.BITNET@YALEVM.YCC.Yale.Edu>
  The mgr library uses a (global) function named parse(), which conflicts
  with the parse() function in expr.c. The popi parse() has been changed
  to do_parse().

* From Thierry Leconte <Thierry.Leconte@irisa.fr>
  The X11 driver doesn't work on my color X-terminal because you use GXset
  and GXclear as GC function for the drawarea function. In doing so you
  assume that the white pixel has value 0 and the black pixel a value 1
  which is not the case on my X-terminal.

* From Adrian F Clark <alien@essex.ac.uk>
  From Harry Langenbacher <harry@neuronz.Jpl.Nasa.Gov>
  References to poptopgm in Makefile.dist should really be for popitopgm.

* Made changes to get the X11 version compiling with gcc cleanly. ANSI
  prototype definitions in libpbm.c, libpbm.h and popi.h were incorrect,
  and various variables in special.c and x11.c needed to be recast.

* An incorrect references to the color variable in the oil() routine in
  special.c  was causing a core dumping when trying to process a PGM image.

* Some references to the img variable in the melt() routine in special.c,
  did not reference the color array correctly.

* Cleared the offscreen memory area "memarea", when it's initially created,
  so that when the popi window gets its first exposure event, it displays
  cleanly. This is with the X11 and XView versions.

* Added a section on sample settings to the README file.

* From Thomas Heller <<PPH93%DMSWWU1A.BITNET@YALEVM.YCC.Yale.Edu>
  Set of diffs for ibmpc.c which fix some problems when compiling with
  Microsoft C 5.1, on an IBM PC (386SX) with VGA, compiling using the
  small memory model.

  The problems have been:
  1. Distinguishing between MSC and Power C did not work, MSC also defines a
     max() macro in stdlib.h.
  2. MSC uses outp, not outportb. I redefined that between #if __MSC__
  3. The MSC FP_SEG and FP_OFF macros are wrong. They only work for far
     pointers. I supplied my own.

  [Need to check that these changes do not break the other versions of DOS
   popi.]

* Removed entries from the TODO file that are now fixed.


v3.1 - patchlevel 0. - 21st August 1991.
----------------------------------------

* Added mention of the popi mailing list to the README file.

* Popi can now correctly handle the reading of compressed image files from
  the command line.

* From Stephen Frede <stephenf@softway.sw.oz.au>
  - trunc() in special.c is a library routine on some machines, and the
    declaration in the header files conflicts. Changed name to "imtrunc".

  - signed is an ANSI keyword, and so should not be used as a function name
    in special.c - I have changed it to "dosigned()".

* Added all known problems, suggestions and comments received, to the TODO
  file.

* Ran the X11 version of popi through Saber-C fixing up compile time
  inconsistencies.
  - The color variable was being used before it was set in the oil()
    routine in special.c
  - various variables no longer used.

* From Adrian F. Clark <alien@essex.ac.uk>
  Backspacing/deleting back pass the beginning of input, caused a core dump.

* Range checking has been added to the OP_CRVAL case in prun() in run.c. This
  now allows examples like:

  -> :read "dmr"
  -> new[x,y]=dmr[x,y]+(Z/2 -dmr[x+2,y+2])

  -> :r "dmr"
  -> new[x,y]=dmr[x*2,y*2]

  to correctly work.

* The X11 (Xlib) and XView graphics drivers now build an image offscreen, so
  that they can correctly restore the image canvas for repaint events.

* All references to revtable in x11.c and xview.c have been removed.

* Prepared popi distribution for release to comp.sources.misc.

v3.0 - patchlevel 7. - 25th March 1991.
---------------------------------------

* Fixed up the % operator in the op_op table.

* Fixed up handling of the Images array in the OP_CRVAL case in the switch
  table in prun().

v3.0 - patchlevel 6. - 17th January 1991.
-----------------------------------------

* From Russ Nelson <nelson@sun.soe.clarkson.edu>
  Makefile.dist changes for DOS. Borland's Make doesn't grok .keep_changes,
  nor the lint_*:; lint ...  lines.  I commented out .keep_changes, and split
  out the line_*:; lines into more vanilla dependencies

* Fixed up color support for the XView graphics driver. Still needs to be
  tested on a TrueColor display.

* Added in PBM support when reading images. PBM files are simply converted to
  a grayscale image that has two values; 0 or 1. The nature of PBMPLUS is such
  that ppm automatic should support pgm and pbm.

v3.0 - patchlevel 5. - 14th January 1991.
-----------------------------------------

* From Rich Morin <cfcl!rdm@apple.com>

  - polar.c, main.c, popi.h

    Tidied up a bit. Couldn't find any basic speed up, unfortunately... The
    calculation takes ~120 seconds on my Sun-3/60. Hypot's time could be cut
    almost in half, but it takes only 25% of the time, so the gain would be
    only 12.5%, and the kludge is pretty hairy.

    Set up a control flag named tcache; it controls caching of trig values
    for all four quadrants in "/usr/tmp/popi.<Xsize>.<Ysize>".
    Might want to save only quadrant 2 (the cache file for 512x512 is
    currently 1MB).
 
    N.B. FREAD and FWRITE were defined in popi.h, but never used. They
    conflicted with definitions in <fcntl.h>, so I killed them.
 
  - special.c, io.c, popi.h
 
    Set :ofmt up as a command, like :signed. It corresponds to the -o flag.

v3.0 - patchlevel 4. - 9th January 1991.
----------------------------------------

* popi will now attempt to read the old format image file auto-magically if
  it detects that the image file is not in pgm or ppm format. Even if it read
  a grayscale image in the old format, it will still write it out in pgm
  format, unless the user has given the -o command line option. The manual
  pages have been updated to mention all this.

* The command line options at the beginning of the manual pages have been
  rearranged in alphabetical order.

v3.0 - patchlevel 3. - 3rd January 1991.
----------------------------------------

* From Rich Morin <cfcl!rdm@apple.com>
  The basic SunView interface seems to be functional. The following glitches
  were fixed:

  :l        -  didn't show possibilities on ambiguous abbreviations fixed:
               special (special.c)

  ?         -  printed specials as #w..., not :w... fixed: HelpMsg, help
               (special.c)

  ^D        -  hung popi input, generated huge error log fixed: disp_getchar
               (sunview.c)

  **<<May want to check for similar bugs in other drivers>>**

  popi -\?  -  usage message was incomplete
               fixes: filled out usage table a bit: UsageMsg (main.c) also
               sorted option parsing switch: get_options (main.c)

  popi -d   -  dumped core if no argument was given
  popi -g   -  dumped core if no argument was given kludged: get_options
               (main.c)

  Fixed some minor fluff in the manual page:

  magic cookie for specials is now :, not #.
  magic cookie (?) for color I/O is no longer needed.
  Its "it's" was wrong, now it's "its"... CFCL is only one laboratory (if
  that).

  New files:

  * popitopgm.c - a small filter to convert old format popi image files to
                  pgm format. See the README and manual pages for more
                  details.

v3.0 - patchlevel 2. - 31st December 1990.
------------------------------------------

* Converted the image reading/writing routines to use pgm (portable graymap)
  for greyscale images, and ppm (portable pixmap) for color images. The
  manuals pages have been updated to include a new section describing the
  image formats. The README file had been modified to included the appropriate
  copyright messages. The FILES and MANIFEST files have been modified to
  mention the new files.

* From Russ Nelson <nelson@sun.soe.clarkson.edu>
  The command line is now too long for DOS compilers. All DOS compilers will
  have this problem: Turbo C, MS-C, MS-Quick C, and Mix C. The solution used,
  has been to put all the object files but main into a library, and link using
  that library. This keeps the Makefile the same for everyone, but it makes it
  slightly harder to maintain because of the addition of library commands.

  New files:

  * libpbm.c - the PBM/PGM/PPM routines needed by popi. These have been
               taken from the PBMPLUS package, and modified appropriately for
               popi.
 
  * libpbm.h - definitions and declaration for the PBM/PGM/PPM routines used
               by popi. Used in libpbm.c and io.c.

v3.0 - patchlevel 1. - 28th December 1990.
------------------------------------------

* The X11 (Xlib) version was creating a pixmap of the full image size every
  time it was drawing a scanline. The pixmap only needed to be one pixel high.

* Rewrote the XView version in the same style as the SunView driver.

v3.0 - patchlevel 0. - Started 21st December 1990.
--------------------------------------------------

* From Russ Nelson <nelson@image.soe.clarkson.edu>
  Incorporated various efficiency changes.

* From Rich Morin <cfcl!rdm@apple.com>
  - Added a -c flag - color (RGB) calculation, display, and I/O (NTSC luma
    display on non-24-bit monitors)
 
  - Added a -s flag, #signed - signed I/O
 
  - Added 24-bit monitor support under SunView
 
  - Added smallest unambiguous name recognition for special commands (eg, #r)
 
  - Added table-driven messages about special commands in #help

  - Assorted bug fixes

* Generated a Makefile.dist, which will need to be copied over to Makefile.
  This saves stomping on everybodies toes when changes to the Makefile need
  to be made.

* Reversed the order of information in the CHANGES file. The latest entries
  are now first.

* Created MANIFEST and FILES files for popi. Moved the troffable manual pages
  to popi.man, and the plain text version to popi.man.text. Updated the TODO
  file with a list of all the new problems and suggested enhancements since
  the previous version was posted to the net. The README file has been
  reordered into various sections, with a contents at the front.

* Indented the code in debug.c, expr.c, io.c, lex.c main.c, polar.c, run.c,
  special.c and popi.h to the same style.

* Replaced the threshold half-toning with floyd-steinberg error diffusion
  dithering (taken from xloadimage).

v2.1 - patchlevel 6. - Posted to comp.sources.bugs (May 1990).
--------------------------------------------------------------

* From Russ Nelson <nelson@image.soe.clarkson.edu>
  Previously most tokens were represented as their character equivalents.
  These have been changed to numeric defines so that many compilers can
  generate better code for the switch statement in prun().

* Added some debugging to help trace tokens.

* From K. Palaniappan <palani@uirvld.csl.uiuc.edu>
  Fixed the out of range problem at CRVAL in prun().

v2.1 - patchlevel 5. - Posted to comp.sources.bugs (January 1990).
------------------------------------------------------------------

* There is now an optional compilation parameter. If DEF_SIZE is defined, the
  image will be square and that size by default. If DEF_X and/or DEF_Y are
  defined, the image will be the size given by the definitions. Makefile has
  been modified to add a definition of -DDEF_SIZE=128 for the PC versions.

  New files:

  * gl.c     - a graphics driver for the public domain gl graphics package
               from Glenn Geers <glenn@extro.ucc.su.oz>. Glenn has used this
               to port to the 386 Xenix box.
               See the comments at the beginning of the gl graphics driver
               for more information on just what devices and O/S's are
               supported.

  * g_init.c - a new version of the g_init.c file that comes with the gl
               graphics package, which includes 386 mods.

v2.1 - patchlevel 4. Posted to comp.sources.bugs (January 1990).
----------------------------------------------------------------

* The size of the input buffer for typing has been changed from 80 to 256
  characters.

* The SunView driver has been completely rewritten. It now has a scrollable
  text window for command input, and a canvas window of the correct size for
  displaying the images. There is a panel with a "% done" slider which is
  displayed as it is generating the next image. The SunView driver therefore
  no longer uses graphics.c.

* The comment for the exportable routines in each graphics driver has been
  changed from "ten routines" to "the routines". There are now only nine
  routines.

* The declaration for the variable total in getpix in file io.c was in the
  wrong position, and prevented the file from successfully compiling. This
  problem was introduced in patch #3.

* Added disp_percentdone(100) calls to the oil and tile routines in special.c.

* In disp_perecentdone in graphics.c, a check is now made that the new percent
  value is different from the old one, otherwise the routine returns
  immediately. This dramatically improves the performance of server based
  graphics drivers.

* The routine ImgAlloc in io.c was incorrectly mallocing an area based on the
  variable Xsize. This should have been Ysize.

* Two small adjustments to the HP graphics driver.

* Introduces the : operator to denote special functions. This replaces the #
  operator, which is currently retained for backward compatibility, but with
  no guarantee that this will always remain so. The manual page has been
  updated to reflect this change.

* The popi help message has been updated to include several missing functions
  plus the new functions.
 
* Inclusion of the :quit, :exit and :q functions. Guess what they do!
 
  New files:
 
  * next.m  - a graphics driver for the NeXT from Joe Freeman of NeXT. Note
              that a different OCFLAGS value in the Makefile should be used.
 
  * CHANGES - documented history of the changes made with each new popi patch.

v2.1 - patchlevel 3. - Posted to comp.sources.bugs (December 1989).
-------------------------------------------------------------------

* Checking has been added to prevent constructs such as: dmr[x+1,y+1]=....
  causing a segmentation fault.

* The X11 driver has been fixed to correctly display on monochrome screens
  where the black pixel isn't 1.

* New commands #create and #run have been added.

* ungetc is now handled in the main popi code, so the graphics routine
  disp_ungetc is no longer needed.

* Fixed a few typos in the manual page.

* Adjusted a few inefficiencies found in expr.c, io.c and main.c

* Several changes to allow a potential change in the image data structure.

  New files:

  * popi.man - this is a plain text version of the popi manual page (popi.1)
               for those people who do not have the ability to format popi.1.

  * hp.c     - a graphics driver for an HP display from Eric Haines - 3D/Eye
               Inc, Ithaca, NY.

v2.1 - patchlevel 2. - Released to comp.sources.misc (December 1989).
---------------------------------------------------------------------
