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 d

⟦e709c1481⟧ TextFile

    Length: 2745 (0xab9)
    Types: TextFile
    Names: »dict.h«

Derivation

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

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.  */

/* dict.h */
/* Interfaces for GhostScript dictionary package */

/* Define the maximum size of a dictionary */
extern uint dict_max_size;

/* Create a dictionary */
extern int dict_create(P2(uint, ref *));

/* Look up in a dictionary.  Store a pointer to the value slot */
/* where found, or to the (value) slot for inserting. */
/* Return 1 if found, 0 if not and there is room for a new entry, */
/* or e_dictfull if the dictionary is full and the key is missing. */
/* The caller is responsible for ensuring key is not a null. */
extern int dict_find(P3(ref * /*dict*/, ref * /*key*/, ref ** /*ppvalue*/));

/* Enter a key-value pair in a dictionary. */
/* Return 0 or e_dictfull. */
extern int dict_put(P3(ref * /*dict*/, ref * /*key*/, ref * /*pvalue*/));

/* Look up a key on the dictionary stack. */
/* Return a pointer to its value, or 0 if not found. */
extern ref *dict_search(P2(ref * /*key*/, ref * /*dsp*/));

/* Return the number of elements in a dictionary. */
extern uint dict_length(P1(ref *));

/* Return the capacity of a dictionary. */
extern uint dict_maxlength(P1(ref *));

/* Copy one dictionary into another. */
/* Return 0 or e_dictfull. */
extern int dict_copy(P2(ref * /*from*/, ref * /*to*/));

/* Grow or shrink a dictionary. */
/* Return 0 or e_dictfull. */
extern int dict_resize(P2(ref *, uint));

/* Prepare to enumerate a dictionary. */
/* Return an integer suitable for the first call to dict_next. */
extern int dict_first(P1(ref *));

/* Enumerate the next element of a dictionary. */
/* index is initially the result of a call on dict_first. */
/* Either store a key and value at eltp[0] and eltp[1] */
/* and return an updated index, or return -1 */
/* to signal that there are no more elements in the dictionary. */
extern int dict_next(P3(ref *, int /*index*/, ref * /*eltp*/));