w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

list_routines.c
Go to the documentation of this file.
1 /* list_routines.c: Types used in this program.
2 
3 This file is part of Omega,
4 which is based on the web2c distribution of TeX,
5 
6 Copyright (c) 1994--2001 John Plaice and Yannis Haralambous
7 
8 Omega is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12 
13 Omega is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17 
18 You should have received a copy of the GNU General Public License
19 along with Omega; if not, write to the Free Software Foundation, Inc.,
20 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
21 
22 */
23 
24 #include "cpascal.h"
25 #include "list_routines.h"
26 
27 static list
28 list1 (void *x)
29 {
30 list temp;
31 temp = (list) xmalloc(sizeof(cell));
32 temp->contents = x;
33 temp->ptr = NULL;
34 return temp;
35 }
36 
37 /* Attribute-value list function */
38 
39 av_list
40 av_list1 (int attr, int val)
41 {
43 temp = (av_list) xmalloc(sizeof(av_cell));
44 temp->attribute = attr;
45 temp->value = val;
46 temp->ptr = NULL;
47 return temp;
48 }
49 
50 /* Index-value list function */
51 
52 in_list
54 {
56 temp = (in_list) xmalloc(sizeof(in_cell));
57 temp->index = 0;
58 temp->value = val;
59 temp->actual = N;
60 temp->ptr = NULL;
61 return temp;
62 }
63 
64 /* Attribute-value list function */
65 
67 hash_list1 (int x, int y, int new_class, int lig_z, hash_list N)
68 {
70 temp = (hash_list) xmalloc(sizeof(hash_cell));
71 temp->x = x;
72 temp->y = y;
73 temp->new_class = new_class;
74 temp->lig_z = lig_z;
75 temp->ptr = N;
76 return temp;
77 }
78 
79 
80 void
82 {
83  if (q->front == NULL) {
84  q->front = list1(content);
85  q->tail = q->front;
86  } else {
87  q->tail->ptr = list1(content);
88  q->tail = q->tail->ptr;
89  }
90 }
q
Definition: afm2pl.c:2287
char * temp
Definition: dvidvi.c:137
#define NULL
Definition: ftobjs.h:61
kerning y
Definition: ttdriver.c:212
#define xmalloc(size)
Definition: writet1.c:33
av_list av_list1(int attr, int val)
Definition: list_routines.c:40
in_list in_list1(int val, in_list N)
Definition: list_routines.c:53
void append_to_queue(queue *q, void *content)
Definition: list_routines.c:81
static list list1(void *x)
Definition: list_routines.c:28
hash_list hash_list1(int x, int y, int new_class, int lig_z, hash_list N)
Definition: list_routines.c:67
cell * list
Definition: list_routines.h:30
hash_cell * hash_list
Definition: list_routines.h:55
av_cell * av_list
Definition: list_routines.h:37
in_cell * in_list
Definition: list_routines.h:45
float x
Definition: cordic.py:15
Definition: strexpr.c:21
val
Definition: tex4ht.c:3227
long unsigned N
Definition: tex4ht.c:2765
static node * new_class(parser_state *p, node *c, node *s, node *b)
Definition: y.tab.c:776