ListworkS-1.1.sh.gz

snippets · 6.8 KB · 2010-03-30

List!workS 1.1 shell archive (shar) for MUF/TinyMUCK 2.1 or later.

Download   « Back to the snippets list

#!/bin/sh
# This is a shell archive (produced by shar 3.49)
# To extract the files from this archive, save it to a file, remove
# everything above the "!/bin/sh" line above, and type "sh file_name".
#
# made 09/12/1992 19:23 UTC by jrg@netcom
# Source directory /u4/jrg/Muf/Lists
#
# existing files will NOT be overwritten unless -c is specified
#
# This shar contains:
# length  mode       name
# ------ ---------- ------------------------------------------
#   7048 -rw-r--r-- DOC
#   1504 -rw-r--r-- INSTALLATION
#    833 -rw-r--r-- config.h
#   1717 -rw-r--r-- header.muf
#   6334 -rw------- lists.muf
#   2014 -rw------- setup.muck
#    167 -rw-r--r-- version.h
#
# ============= DOC ==============
if test -f 'DOC' -a X"$1" != X"-c"; then
	echo 'x - skipping DOC (File already exists)'
else
echo 'x - extracting DOC (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'DOC' &&
X
List!workS 1.1
X
by Festive!workS (jrg@netcom.com)
Last Revision: 28 Jul 1992
Document created: 19 Aug 1992
--
X
This document was created to acquaint you with List!workS, a
property-based linked-lists simulator for the MUF programming
language (used in TinyMUCK 2.1 and greater and TinyMAGE), and
provide helpful examples as to installation and usage.
X
X
List!workS is a flexible and easy-to-use MUF macro package that
allows programmers to store data in a two dimensional linked-list-type
form such that each property entry contains information read by
List!workS that point to the next and previous items in the 'list'.
X
To think of it in a simplified sense, a linked-list is a deck of cards...
You can always pick out the first card, and the last card in a deck,
and each card between them is both preceded and succeeded by another
card.  Each card also has a value (e.g. King of Hearts, Nine of Spades).
If the top card were to be a Jack of Clubs, and the next two cards, in
order, are the Six of Diamonds, and the Ace of Clubs, you could then
make of list of the properties of each card:
X	Deck:	First Card: Jc
X		Card After Jc: 6d
X		Card After 6d: Ac
X		Card Before Ac: 6d
X		Card Before 6d: Jc
You can, then, put cards in front of another, such that the first card
may now be the Seven of Spades, or any other operation involving a stack.
X
X
To begin a list, you simply need to add an item to it.  The first item
you add to the list will be the both the first and the last item in the
list, and the next
and previous fields will not mean much, yet, since there's nothing
else for it to point to.  The 'First Card' prop will now point to that
item.  To add another item, simply find an item to insert it in front
of or behind, and voila!  The program automagically keeps track of what
each item points to, and if you insert or delete an item, the next and
previous pointers of the adjoining items will be updated.
X
To read or traverse a list, simply get the first (last) item in the list,
and continue to get the next (previous) items until you either find the
one you want, or have traversed the enitre range.
X
X
For the technically inclined, here is the item template:
X	"<listname>-><field>": "<value>+<next field>-<previous field>"
X
There are a few non-traditional (for linked-lists) features employed
in List!workS that make usage simpler:
X
Each list, itself, has a name, and each item in the list not
only has a field (e.g. "Jd"), but also a corresponding variable value.
X
For instance, if you want a keep a list of login/out times for all
players, you would have a list called "timecard", with each item
having a field consisting of a player's name or dbref, and the each
item would have a corresponding time value for when they logged in.
You could then print out the entire list, scan it just for recent all
recent logins, or simply pick out the login time for a particular
player.
X
An example list of proprties would look like this:
X	"timecard(first)": "Parade"
X	"timecard(last)": "Sethlyn"
X	"timecard(count)": 4
X	"timecard->Parade": "6/19/92 10pm+foobar-"
X	"timecard->foobar": "12/31/69 12am+Paramour-Parade"
X	"timecard->Paramour": "2/5/92 3am+Sethlyn-foobar"
X	"timecard->Sethlyn": "5/15/92 7pm+-Paramour"
X
X
You can, as you may have already seen, pick out a list item by
name, if you know what you are looking for (e.g. a player's name
or dbref).
X
X
List!workS macros allow you to add, delete, and retrieve list
items with minimal effort, as well as other useful routines,
including a developer's set which can change the properties of
individual items (optional upload).
X
LIMITATIONS:
List fields should not have "->", "+", or "-" (can be set in configuration
file included with package).  Its only MUF... :)
This program expects all fields to be unique and to be non-null,
though value fields may be non-unique and/or null.
X
MACRO REFERENCE:
X
General usage macro set:
X
X	list-add
X		( {d:obj} {s:list} {s:field} {s:value} {s:prev} -- )
X		Adds <field> with <value> to <list> on <obj> after
X		<prev> field, or as first item if <prev> is null, and
X		updates all pointers for surrounding fields.
X	list-append
X		( {d:obj} {s:list} {s:field} {s:value} -- )
X		Simply adds <field> with <value> as last item to
X		<list> on <obj>.  If <list> doesn't exit, then <item>
X		is automatically first as well as last.
X	list-delete
X		( {d:obj} {s:list} {s:field} -- )
X		Deletes <field> in <list> on <obj> and updates pointers.
X	list-fields
X		( {d:obj} {s:list} -- {S:fields} )
X		Places all <fields> from <list> on <obj> on the stack
X		(and places the listcount on top)
X	list-getcount
X		( {d:obj} {s:list} -- {i:count} )
X		Returns <count> of items in <list> on <obj>
X	list-getfirst
X		( {d:obj} {s:list} -- {s:field} )
X		Returns the first <field> in <list> on <obj> (or
X		null if list does not exist)
X	list-getlast
X		( {d:obj} {s:list} -- {s:field} )
X		Returns the last <field> in <list> on <obj> (or
X		null if list does not exist)
X	list-getnext
X		( {d:obj} {s:list} {s:field} -- {s:next} )
X		Returns the <next> field after <field> in <list>
X		on <obj> or null if <field> is the last item or
X		does not exist.
X	list-getprev
X		( {d:obj} {s:list} {s:field} -- {s:prev} )
X		Returns the <prev> field before <field> in <list>
X		on <obj> or null if <field> is first item or does
X		not exist.
X	list-getval
X		( {d:obj} {s:list} {s:field} -- {s:value} )
X		Returns the <value> of <field> in <list> on
X		<obj> (or null if <field does not exist
X	list-member?
X		( {d:obj} {s:list} {s:field} -- {b:member?} )
X		Returns 1 (TRUE) if <field> is in <list> on <obj>,
X		0 (FALSE) if not.
X	list-remove
X		( {d:obj} {s:list} -- )
X		Removes entire list.
X
Developer's macro set:
X
X	list-save
X		( {d:obj} {s:list} {s:field} {s:value} {s:next} {s:prev} -- )
X		Saves entire property item in the form:
X			@set <obj> = <list>-><field>: <value>+<next>-<prev>
X			(can be changed in configuration file)
X	list-setcount
X		( {d:obj} {s:list} {i:count} -- )
X		Sets the itemcount of <list> on <obj> to <count>
X	list-setfirst
X		( {d:obj} {s:list} {s:field} -- )
X		Sets the 'first' pointer in <list> on <obj> to <field>
X	list-setlast
X		( {d:obj} {s:list} {s:field} -- )
X		Sets the 'last' pointer in <list> on <obj> to <field>
X	list-setnext
X		( {d:obj} {s:list} {s:field} {s:next} -- )
X		Sets the 'next' pointer for <field> in <list> on <obj>
X		to <next>
X	list-setprev
X		( {d:obj} {s:list} {s:field} {s:prev} -- )
X		Sets the 'prev' pointer for <field> in <list> on <obj>
X		to <prev>
X	list-setval
X		( {d:obj} {s:list} {s:field} {s:value} -- )
X		Sets the 'value' of <field> in <list> on <obj> to <value>
X	list-split
X		( {d:obj} {s:list} {s:field} -- {s:value} {s:next} {s:prev} )
X		Returns the <value> and <next> and <prev> pointers of
X		<field> in <list> on <obj>, all nulls if <field> does
X		not exist
X
--
Feel inclined to contact the author regarding any part or whole of
this package, including bug reports, troubleshooting, installation,
or usage.
X
No copyrights, but the author requests you register your usage via a
quick email not so that he may better provide 'customer support' (and he
will! :)
SHAR_EOF
chmod 0644 DOC ||
echo 'restore of DOC failed'
Wc_c="`wc -c < 'DOC'`"
test 7048 -eq "$Wc_c" ||
	echo 'DOC: original size 7048, current size' "$Wc_c"
fi
# ============= INSTALLATION ==============
if test -f 'INSTALLATION' -a X"$1" != X"-c"; then
	echo 'x - skipping INSTALLATION (File already exists)'
else
echo 'x - extracting INSTALLATION (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'INSTALLATION' &&
"INSTALLATION" -- List!workS installation guide
---
X
To install List!workS onto your TinyMUCK/MUF system, listen in...
X
You need to use cpp (usually /lib/cpp), the C-preprocessor.  It
gets called automagically everytime you compile C code with cc or
gcc.  If you don't have TinyFugue, I sincerely recommend you get
a copy, if not but to make this process much easier.
X
Tweak config.h to your liking.  To toggle settings on and off use
#define and #undef respectively.
X
X
Instructions with TinyFugue:
X
X	When connected to the target MUCK, make sure you are
X	in the correct directory with the /lcd command and then
X	type this:
X
X	/cpp -C -P <arguments> lists.muf
X
Without:
X
X	From your shell prompt, type:
X
X	/lib/cpp -C -P <arguments> lists.muf > lists.out
X
X	You will need to manually strip out all lines beginning
X	with a forward slash ("/") from lists.out as they are
X	TinyFugue directives (a quirky way of commenting code).
X	Then, with whatever means you may have, copy lists.out
X	into your MUCK.
X
<arguments> is substituted with any of the following:
X
X	-DPROG_NUM=#<this program>
X		Unless you do this, do not attempt to use the following:
X	-DKILL_MACS
X		Will kill all existing macros because most systems
X		will not allow anyone to rewrite existing macros.
X		You must be a wizard for this to work.
X	-DSETUP_MACS
X		Will set up all the macros for use with this program.
X
X
If you have any questions regarding any part of this, or any other
Festive!workS product, feel free to contact Parade (jrg@netcom.com).
SHAR_EOF
chmod 0644 INSTALLATION ||
echo 'restore of INSTALLATION failed'
Wc_c="`wc -c < 'INSTALLATION'`"
test 1504 -eq "$Wc_c" ||
	echo 'INSTALLATION: original size 1504, current size' "$Wc_c"
fi
# ============= config.h ==============
if test -f 'config.h' -a X"$1" != X"-c"; then
	echo 'x - skipping config.h (File already exists)'
else
echo 'x - extracting config.h (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'config.h' &&
/
/ config.h
/ This file contains configuration information.
/ #define/#undef to your liking.
/
X
/ If you have an rsplit macro or routine ( s1 s2 -- s3 s4 ), define this
/ to it
#undef RSPLIT .rsplit
X
/ To install a mini set without list programmers utilities
#undef MINISET
X
/ Define if your system makes use of propdirs
#define PROPDIRS
X
#ifdef PROPDIRS
X
#define FIRST "/(first)"
#define LAST "/(last)"
#define COUNT "/(count)"
#define HEADER "/->"
#define NEXT "+"
#define PREV "-"
X
#else
X
#define FIRST "(first)"
#define LAST "(last)"
#define COUNT "(count)"
#define HEADER "->"
#define NEXT "+"
#define PREV "-"
X
#endif /* PROPDIRS */
X
X
/ Customizable property prims...
X
#define GETPROPSTR getpropstr
#define GETPROPVAL getpropval
#define ADDPROPSTR 0 addprop
#define ADDPROPVAL "" swap addprop
#define REMOVE_PROP remove_prop
X
SHAR_EOF
chmod 0644 config.h ||
echo 'restore of config.h failed'
Wc_c="`wc -c < 'config.h'`"
test 833 -eq "$Wc_c" ||
	echo 'config.h: original size 833, current size' "$Wc_c"
fi
# ============= header.muf ==============
if test -f 'header.muf' -a X"$1" != X"-c"; then
	echo 'x - skipping header.muf (File already exists)'
else
echo 'x - extracting header.muf (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'header.muf' &&
/
/ header.muf
/ This file is used as the comment header for the program
/
X
(
X 
X    PROG_NAME VERSION
X    by Festive!workS  [AUTHOR]
X    Last revision: REVISION
X
X    A property-based linked lists simulator.
X
X    Lists cannot have neither NEXT nor PREV in their headers
X      to prevent program confusion.
X    This program expects all header fields to be unique and not to
X      be null, though value fields may be non-unique and/or null.
X  
X    list-add      -- Adds <field> with <val> after <prev> to list
X                     If <field> is "", then it will insert at first
X    list-append   -- Adds <field> with <val> at the end of the list
X    list-delete   -- Deletes <field>
X    list-fields   -- Places the names of all fields in list on stack with count
X    list-getcount -- Returns a <count> of items in list
X    list-getfirst -- Returns the <first> field
X    list-getlast  -- Returns the <last> field
X    list-getnext  -- Returns the <next> field after <field>
X    list-getprev  -- Returns the <prev> field before <field>
X    list-getval   -- Returns the <val> of <field>
X    list-member?  -- Returns 1 if <field> is in list, 0 if not
X    list-remove   -- Removes entire list
#ifndef MINISET
X    list-save     -- Saves entire <field>, <value>, <next>&<prev> fields 
X    list-setcount -- Sets the <count> of fields
X    list-setfirst -- Sets the <first> field pointer in list
X    list-setlast  -- Sets the <last> field pointer in list
X    list-setnext  -- Sets the <next> field pointer for <field> 
X    list-setprev  -- Sets the <prev> field pointer for <field>
X    list-setval   -- Sets the <val> for <field>
X    list-split    -- Splits <field> into <val> and <next>&<prev> field ptrs
#endif /* MINISET */
X 
)
SHAR_EOF
chmod 0644 header.muf ||
echo 'restore of header.muf failed'
Wc_c="`wc -c < 'header.muf'`"
test 1717 -eq "$Wc_c" ||
	echo 'header.muf: original size 1717, current size' "$Wc_c"
fi
# ============= lists.muf ==============
if test -f 'lists.muf' -a X"$1" != X"-c"; then
	echo 'x - skipping lists.muf (File already exists)'
else
echo 'x - extracting lists.muf (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'lists.muf' &&
/
/ lists.muf
/ This is the main body of the macro program.  It combines all the
/ other files using #include.  There shouldn't be any reason this
/ file would need to be edited.
/
X
#include "version.h"
#include "config.h"
X
@prog PROG_NAME
X
1 99999 d
i
X
#include "header.muf"
X 
#ifndef RSPLIT
#define RSPLIT RSplit
X  : RSplit ( s1 s2 -- s3 s4 )
X    swap over over swap rinstr dup not if pop pop swap ""
X    else 1 - strcut rot strlen strcut swap pop then
X  ;
#endif
X  
: List-GetFirst ( Object List -- Field )
X  FIRST strcat GETPROPSTR
;
: List-GetLast ( Object List -- Field )
X  LAST strcat GETPROPSTR
;
: List-GetCount ( Object List -- Count )
X  COUNT strcat GETPROPVAL
;
X  
: List-Split ( Object List Field -- Val Next Prev )
X  HEADER swap strcat strcat GETPROPSTR
X  NEXT RSPLIT PREV RSPLIT
;
X  
: List-GetNext ( Object List Field1 -- Field2 )
X  List-Split pop swap pop
;
: List-GetPrev ( Object List Field1 -- Field2 )
X  List-Split rot pop swap pop
;
: List-GetVal ( Object List Field -- Value )
X  List-Split pop pop
;
X  
: List-Member? ( Object List Field -- Member? )
X  HEADER swap strcat strcat GETPROPSTR if 1 else 0 then
;
X  
: List-SetFirst ( Object List Field -- )
X  swap FIRST strcat swap
X  dup "" strcmp not if pop
X    REMOVE_PROP
X  else
X    ADDPROPSTR
X  then
;
: List-SetLast ( Object List Field -- )
X  swap LAST strcat swap
X  dup "" strcmp not if pop
X    REMOVE_PROP
X  else
X    ADDPROPSTR
X  then
;
: List-SetCount ( Object List Count -- )
X  swap COUNT strcat swap
X  dup 0 = if pop
X    REMOVE_PROP
X  else
X    ADDPROPVAL
X  then
;
X  
: List-Save ( Object List Field Val Next Prev -- )
X  PREV swap strcat strcat NEXT swap strcat strcat
X  rot HEADER strcat rot strcat swap ADDPROPSTR
;
X  
: List-SetNext ( Object List ThisField NextField -- )
X  4 pick 4 pick 4 pick List-Split
X  4 rotate 2 put 
X  List-Save
;
: List-SetPrev ( Object List ThisField PrevField -- )
X  4 pick 4 pick 4 pick List-Split 
X  4 rotate 1 put 
X  List-Save
;
: List-SetVal ( Object List ThisField Value )
X  4 pick 4 pick 4 pick List-Split
X  4 rotate 3 put 
X  List-Save
;
X  
: List-Delete ( Object List Field -- )
X  3 pick 3 pick 3 pick List-GetPrev dup if
X    ( Object List Field Prev )
X    4 pick 4 pick 4 pick List-GetNext dup if ( Field is in middle of list )
X      ( Object List Field Prev Next )
X      5 pick 5 pick 3 pick 5 pick List-SetPrev
X      5 pick 5 pick 4 rotate 4 rotate List-SetNext
X    else pop ( Field is at end of list )
X      ( Object List Field Prev )
X      4 pick 4 pick 3 pick List-SetLast
X      4 pick 4 pick 3 rotate "" List-SetNext
X    then
X  else pop
X    ( Object List Field )
X    3 pick 3 pick 3 pick List-GetNext dup if ( Field is at beginning of list )
X      ( Object List Field Next ) 
X      4 pick 4 pick 3 pick List-SetFirst
X      4 pick 4 pick 3 rotate "" List-SetPrev
X    else pop ( Field is only element )
X      ( Object List Field )
X      3 pick 3 pick "" List-SetFirst
X      3 pick 3 pick "" List-SetLast
X    then
X  then
X  ( Object List Field )
X  3 pick 3 pick List-GetCount 1 - 4 pick 4 pick rot List-SetCount
X  HEADER swap strcat strcat REMOVE_PROP
; 
X  
: List-Remove ( Object List -- )
X  over over List-GetFirst dup "" strcmp not if pop
X    pop pop exit
X  then
X  3 pick 3 pick rot List-Delete
X  List-Remove
;
X  
: List-Add ( Object List Field Val Prev -- )
X  5 pick 5 pick List-GetLast over stringcmp not if  ( Append )
X    5 pick 5 pick List-GetFirst if  ( Add element to end of list )
X      5 pick 5 pick 3 pick 6 pick List-SetNext
X      5 pick 5 pick 5 pick List-SetLast
X      "" swap 
X    else pop ( New list )
X      4 pick 4 pick 4 pick List-SetFirst
X      4 pick 4 pick 4 pick List-SetLast
X      "" "" 
X    then
X  else  ( Insert )
X    dup not if pop ( Insert as first )
X      4 pick 4 pick List-GetFirst dup not if pop ( New List )
X        4 pick 4 pick 4 pick List-SetLast
X        "" "" 
X      else ( Insert at head )
X        ( Obj List Field Val First )
X        5 pick 5 pick 3 pick 6 pick List-SetPrev
X        5 pick 5 pick 5 pick 4 pick List-SetNext
X        ""
X      then
X      6 pick 6 pick 6 pick List-SetFirst
X    else  ( Insert in middle )
X      5 pick 5 pick 3 pick List-GetNext swap
X      ( Obj List Field Val Next Prev )
X      6 pick 6 pick 6 pick 5 pick List-SetNext
X      6 pick 6 pick 6 pick 4 pick List-SetPrev
X      6 pick 6 pick 3 pick 7 pick List-SetNext
X      6 pick 6 pick 4 pick 7 pick List-SetPrev
X    then
X  then
X  ( Object List Field Value Next Prev )
X  6 pick 6 pick List-GetCount 1 + 7 pick 7 pick rot List-SetCount
X  List-Save
;
X  
: List-Append ( Obj List Field Val -- )
X  4 pick 4 pick List-GetLast 
X  List-Add
;
X  
X  : List-Fields-loop ( FieldStack Obj List Field -- FieldStack )
X    dup "" strcmp not if pop
X      pop pop
X    else
X      dup -5 rotate
X      4 pick 1 + 4 put
X      3 pick 3 pick rot List-GetNext
X      List-Fields-loop
X    then
X  ;
: List-Fields ( Obj List -- FieldStack )
X  0 rot rot
X  over over List-GetFirst
X  List-Fields-loop
;
X  
: Lists ( Function -- )
dup "get" 3 strncmp not if
X  3 strcut swap pop
X  dup "count" strcmp not if pop List-GetCount exit then
X  dup "first" strcmp not if pop List-GetFirst exit then
X  dup "last"  strcmp not if pop List-GetLast  exit then
X  dup "next"  strcmp not if pop List-GetNext  exit then
X  dup "prev"  strcmp not if pop List-GetPrev  exit then
X  dup "val"   strcmp not if pop List-GetVal   exit then
then
dup "add"     strcmp not if pop List-Add      exit then
dup "append"  strcmp not if pop List-Append   exit then
dup "delete"  strcmp not if pop List-Delete   exit then
dup "fields"  strcmp not if pop List-Fields   exit then
dup "member?" strcmp not if pop List-Member?  exit then
dup "remove"  strcmp not if pop List-Remove   exit then
#ifndef MINISET
dup "set" 3 strncmp not if
X  3 strcut swap pop
X  dup "count" strcmp not if pop List-SetCount exit then
X  dup "first" strcmp not if pop List-SetFirst exit then
X  dup "last"  strcmp not if pop List-SetLast  exit then
X  dup "next"  strcmp not if pop List-SetNext  exit then
X  dup "prev"  strcmp not if pop List-SetPrev  exit then
X  dup "val"   strcmp not if pop List-SetVal   exit then
then
dup "save"    strcmp not if pop List-Save    exit then
dup "split"   strcmp not if pop List-Split   exit then
#endif /* MINISET */
;
.
c
X
#ifdef SETUP_MACS
#include "setup.muck"
#endif /* SETUP_MACS */
X
q
X
#ifdef PROG_NUM
@set PROG_NUM = L
#else
@set PROG_NAME = L
#endif
SHAR_EOF
chmod 0600 lists.muf ||
echo 'restore of lists.muf failed'
Wc_c="`wc -c < 'lists.muf'`"
test 6334 -eq "$Wc_c" ||
	echo 'lists.muf: original size 6334, current size' "$Wc_c"
fi
# ============= setup.muck ==============
if test -f 'setup.muck' -a X"$1" != X"-c"; then
	echo 'x - skipping setup.muck (File already exists)'
else
echo 'x - extracting setup.muck (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'setup.muck' &&
/
/ setup.muck
/ This script is called if SETUP_MACS is defined.  It can be called
/ by itself from inside the MUF editor.
/
X
#ifndef PROG_NUM
X
/echo % You must -DPROG_NUM=#<this program> to setup macros
X
#else
X
#ifdef KILL_MACS
list-add kill
list-append kill
list-delete kill
list-fields kill
list-getcount kill
list-getfirst kill
list-getlast kill
list-getnext kill
list-getprev kill
list-getval kill
list-member? kill
list-remove kill
#ifndef MINISET
list-save kill
list-setcount kill
list-setfirst kill
list-setlast kill
list-setnext kill
list-setprev kill
list-setval kill
list-split kill
#endif /* MINISET */
#endif /* KILL_MACS */
X
def list-add ( obj list field val prev -- ) "add" PROG_NUM CALL
def list-append ( obj list field val -- ) "append" PROG_NUM CALL
def list-delete ( obj list field -- ) "delete" PROG_NUM CALL
def list-fields ( obj list -- fieldstack ) "fields" PROG_NUM CALL
def list-getcount ( obj list -- count ) "getcount" PROG_NUM CALL
def list-getfirst ( obj list -- first ) "getfirst" PROG_NUM CALL
def list-getlast ( obj list -- last ) "getlast" PROG_NUM CALL
def list-getnext ( obj list field -- next ) "getnext" PROG_NUM CALL
def list-getprev ( obj list field -- prev ) "getprev" PROG_NUM CALL
def list-getval ( obj list field -- val ) "getval" PROG_NUM CALL
def list-member? ( obj list field -- member? ) "member?" PROG_NUM CALL
def list-remove ( obj list -- ) "remove" PROG_NUM CALL
X
#ifndef MINISET
X
def list-save ( obj list field val next prev -- ) "save" PROG_NUM CALL
def list-setcount ( obj list count -- ) "setcount" PROG_NUM CALL
def list-setfirst ( obj list first -- ) "setfirst" PROG_NUM CALL
def list-setlast ( obj list last -- ) "setlast" PROG_NUM CALL
def list-setnext ( obj list field next -- ) "setnext" PROG_NUM CALL
def list-setprev ( obj list field prev -- ) "setprev" PROG_NUM CALL
def list-setval ( obj list field val -- ) "setval" PROG_NUM CALL
def list-split ( obj list field -- val next prev ) "split" PROG_NUM CALL
X
#endif /* MINISET */
X
#endif /* PROG_NUM */
SHAR_EOF
chmod 0600 setup.muck ||
echo 'restore of setup.muck failed'
Wc_c="`wc -c < 'setup.muck'`"
test 2014 -eq "$Wc_c" ||
	echo 'setup.muck: original size 2014, current size' "$Wc_c"
fi
# ============= version.h ==============
if test -f 'version.h' -a X"$1" != X"-c"; then
	echo 'x - skipping version.h (File already exists)'
else
echo 'x - extracting version.h (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'version.h' &&
/
/ version.h
/ This file contains program information
/
X
#define PROG_NAME List!workS
#define AUTHOR jrg@netcom.com
#define VERSION 1.1
#define REVISION 28 Jul, 1992
SHAR_EOF
chmod 0644 version.h ||
echo 'restore of version.h failed'
Wc_c="`wc -c < 'version.h'`"
test 167 -eq "$Wc_c" ||
	echo 'version.h: original size 167, current size' "$Wc_c"
fi
exit 0

Site Stats

Snippets: 1791
Codebases: 571