DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T t

⟦aef935af5⟧ TextFile

    Length: 6067 (0x17b3)
    Types: TextFile
    Names: »todo.doc«

Derivation

└─⟦a05ed705a⟧ Bits:30007078 DKUUG GNU 2/12/89
    └─⟦ff23ba0e6⟧ »./ghostscript-1.3.tar.Z« 
        └─⟦a24a58cd3⟧ 
            └─⟦this⟧ »todo.doc« 

TextFile

   Copyright (C) 1989 Aladdin Enterprises.  All rights reserved.
   Distributed by Free Software Foundation, Inc.

This file is part of Ghostscript.

Ghostscript is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
to anyone for the consequences of using it or for whether it serves any
particular purpose or works at all, unless he says so in writing.  Refer
to the Ghostscript General Public License for full details.

Everyone is granted permission to copy, modify and redistribute
Ghostscript, but only under the conditions described in the Ghostscript
General Public License.  A copy of this license is supposed to have been
given to you along with Ghostscript so you can know your rights and
responsibilities.  It should be in a file named COPYING.  Among other
things, the copyright notice and this notice must be preserved on all
copies.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

This file, todo.doc, contains a somewhat incoherent set of notes about
things that could be improved in Ghostscript.

This file applies to version 1.3 of Ghostscript.  For an overview of
Ghostscript and a list of the documentation files, see README.

Graphics
========

Implement a colorimage operator.  This takes as an argument an array of
color objects or gray levels (numbers) that correspond to the possible
sample values: 2, 4, 16, or 256 elements corresponding to 1-, 2-, 4-, or
8-bit samples.

Text
----

Pick an industry-standard packed representation for fonts.  It should be a
vector representation -- see Peter Karow's book (?) for a bunch of
alternative standards.

Storage manager
===============

Save & restore
--------------

Add an attribute bit that logically belongs to the slot where the
descriptor is stored, not to the descriptor.  The bit means "the contents
of this slot have been changed since the last save."

Keep two chains associated with the current save level:
	- a chain of <slot, contents> pairs that remembers the old
	  contents of slots (the "contents chain");
	- a chain of objects created since the last save (the "creation
	  chain").

When creating an object, if the save level is non-zero:
	- set the bit in all slots;
	- add the object to the current creation chain.

When storing into a slot, if the save level is non-zero:
	- If the bit isn't set, save the address and contents of the slot
	  on the current contents chain.
	- Set the bit after storing the new value.

To do a save:
	- reset the bit in all slots on both chains;
	- push the current (heads of the) chains;
	- reset the chains to empty.

To do a restore:
	- check all the stacks to make sure they don't contain references
	  to objects on the creation chain;
	- restore all the slots on the contents chain;
	- free all the objects on the creation chain;
	- pop the chain heads;
	- scan the newly restored contents chain, and set the bit in all
	  the slots it references;
	- scan the newly restored creation chain, and set the bit in all
	  the slots of each object.

Some unobvious things that need to be saved/restored:
	- Names added to the name table must be removed.
	- Dictionary access changes must be undone.
	- The packing state must be restored.

Note that if a save is in effect, no object should be freed.

Reclamation
-----------

Use deferred (Deutsch-Bobrow) reference counting to reclaim storage.
Defer references from the operand and execution stacks, but not from the
dictionary stack.  Put a prefix on every object that carries its type
and size.  Use the type to index a table of type descriptors.  One of
the elements of the type descriptor is a procedure that knows where to
find all the pointers embedded in the object.  (This is needed for
recursive freeing.)  For the library level, we need a bit in the prefix
to say "the client is holding a reference to this object", and explicit
freeing operations, because C doesn't give us the handles we need to
find references.

Handle subrange objects differently.  Define two new types t_subarray
and t_substring.  These carry their size, and point to an intermediate
object that references the main object and an offset within it.

Interpreter
-----------

Allocate stacks in chunks, again like obstack.  Detect overflow in the
interpreter (except for the few operators that can push an unbounded
amount of information) and skim off the top 20% of the current chunk
into a new one.  Detect underflow in the interpreter (except for the few
operators that take an unbounded number of operands) and pop back to the
previous chunk.  Do this for all 3 stacks.

Notes on reference counting
---------------------------

The current sources use a set of macros that are supposed to prepare the
way for a reference-counting storage manager.  Here is a list of places
where things are known not to work quite right.

In the following places, a ref* argument is passed to a procedure that
may store a pointer ref, possibly requiring reference counting.
	dict_create (pref)
	name_ref (pref)
	name_string_ref (psref)
	name_enter (pref)

The following places hold pointers that are not refs.
	name->pvalue
	dict_find ppvalue return value

There are many, many places in the scanner that store refs.  We haven't
done anything about any of them.

We do NOT count references from the graphics state.

The **REAL** to-do list
=======================

These are all the things that were on the list for release 1.3, and didn't
get done because I ran out of time.

Change X window size
	fixed vs. variable sizing
	output to specified window/rectangle
Check out halftones under X
Make stacks expandable
Implement echo
Implement %lineedit
Implement %statementedit
Do something for standard library directory:
	in the makefile, STANDARD_PREFIX="prefix" 2nd default
Handle undefined structures with ifdef?
Memory devices (mono/color)
include-less make
Automatically expand dicts
don't clear operand stack between interactive inputs
change FontMatrix Y scale to 1/9?
save & restore
dump on 'quit', reload on startup (?)