Back to index

tetex-bin  3.0
list_routines.h
Go to the documentation of this file.
00001 /* list_routines.h: Types used in this program.
00002 
00003 This file is part of Omega,
00004 which is based on the web2c distribution of TeX,
00005 
00006 Copyright (c) 1994--2001 John Plaice and Yannis Haralambous
00007 
00008 Omega is free software; you can redistribute it and/or modify
00009 it under the terms of the GNU General Public License as published by
00010 the Free Software Foundation; either version 2 of the License, or
00011 (at your option) any later version.
00012 
00013 Omega is distributed in the hope that it will be useful,
00014 but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 GNU General Public License for more details.
00017 
00018 You should have received a copy of the GNU General Public License
00019 along with Omega; if not, write to the Free Software Foundation, Inc.,
00020 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
00021 
00022 */
00023 
00024 typedef int fix;
00025 
00026 typedef struct cell_struct {
00027     struct cell_struct *ptr;
00028     void *contents;
00029 } cell;
00030 typedef cell *list;
00031 
00032 typedef struct av_cell_struct {
00033     struct av_cell_struct *ptr;
00034     int attribute;
00035     int value;
00036 } av_cell;
00037 typedef av_cell *av_list;
00038 
00039 typedef struct in_cell_struct {
00040     struct in_cell_struct *ptr;
00041     struct in_cell_struct *actual;
00042     int value;
00043     int index;
00044 } in_cell;
00045 typedef in_cell *in_list;
00046 
00047 typedef struct hash_cell_struct {
00048     int x;
00049     int y;
00050     int new_class;
00051     int lig_z;
00052     struct hash_cell_struct *ptr;
00053 } hash_cell;
00054 
00055 typedef hash_cell *hash_list;
00056 
00057 typedef struct queue_struct {
00058     struct cell_struct *front;
00059     struct cell_struct *tail;
00060 } queue;
00061 
00062 extern list cons(void *, list);
00063 extern list list1(void *);
00064 extern list list2(void *, void *);
00065 extern list append(list, list);
00066 extern list append1(list, void *);
00067 
00068 extern av_list av_cons(int,int,  av_list);
00069 extern av_list av_list1(int,int);
00070 extern av_list av_list2(int,int,  int,int);
00071 extern av_list av_append(av_list,  av_list);
00072 extern av_list av_append1(av_list,  int,int);
00073 
00074 extern in_list in_cons(int,in_list,  in_list);
00075 extern in_list in_list1(int,in_list);
00076 extern in_list in_list2(int,in_list,  int,in_list);
00077 extern in_list in_append(in_list,  in_list);
00078 extern in_list in_append1(in_list,  int,in_list);
00079 
00080 extern hash_list hash_cons(int,int,int,int,  hash_list);
00081 extern hash_list hash_list1(int,int,int,int);
00082 extern hash_list hash_list2(int,int,int,int,  int,int,int,int);
00083 extern hash_list hash_append(hash_list,  hash_list);
00084 extern hash_list hash_append1(hash_list,  int,int,int,int);
00085 
00086 #define lattr(L) (L->attribute)
00087 #define lval(L) (L->value)
00088 
00089 typedef struct four_pieces_struct {
00090     unsigned int pieces[4];
00091 } four_pieces;
00092 
00093 typedef struct four_entries_struct {
00094     int entries[4];
00095 } four_entries;
00096 
00097 #define lb0(L) (((four_entries *)((L)->contents))->entries[0])
00098 #define lb1(L) (((four_entries *)((L)->contents))->entries[1])
00099 #define lb2(L) (((four_entries *)((L)->contents))->entries[2])
00100 #define lb3(L) (((four_entries *)((L)->contents))->entries[3])
00101 
00102 
00103 extern void init_queue(queue *);
00104 extern void append_to_queue(queue *, void *);