diff options
Diffstat (limited to 'Build/source/texk/web2c/omegafonts/list_routines.c')
-rw-r--r-- | Build/source/texk/web2c/omegafonts/list_routines.c | 178 |
1 files changed, 4 insertions, 174 deletions
diff --git a/Build/source/texk/web2c/omegafonts/list_routines.c b/Build/source/texk/web2c/omegafonts/list_routines.c index 1c1d109e8ff..adb5cd68891 100644 --- a/Build/source/texk/web2c/omegafonts/list_routines.c +++ b/Build/source/texk/web2c/omegafonts/list_routines.c @@ -24,17 +24,7 @@ along with Omega; if not, write to the Free Software Foundation, Inc., #include "cpascal.h" #include "list_routines.h" -list -cons (void *x, list L) -{ -list temp; -temp = (list) xmalloc(sizeof(cell)); -temp->contents = x; -temp->ptr = L; -return temp; -} - -list +static list list1 (void *x) { list temp; @@ -44,45 +34,7 @@ temp->ptr = NULL; return temp; } -list -list2 (void *x, void *y) -{ -list temp, temp1; -temp = (list) xmalloc(sizeof(cell)); -temp1 = (list) xmalloc(sizeof(cell)); -temp->contents = x; -temp->ptr = temp1; -temp1->contents = y; -temp1->ptr = NULL; -return temp; -} - -list -append (list K, list L) -{ -if (K==NULL) return L; -return cons(K->contents, append(K->ptr, L)); -} - -list -append1 (list L, void *x) -{ -return (append(L,list1(x))); -} - - -/* Attribute-value list functions */ - -av_list -av_cons (int attr, int val, av_list L) -{ -av_list temp; -temp = (av_list) xmalloc(sizeof(av_cell)); -temp->attribute = attr; -temp->value = val; -temp->ptr = L; -return temp; -} +/* Attribute-value list function */ av_list av_list1 (int attr, int val) @@ -95,48 +47,7 @@ temp->ptr = NULL; return temp; } -av_list -av_list2 (int attr, int val, int attr1, int val1) -{ -av_list temp, temp1; -temp = (av_list) xmalloc(sizeof(av_cell)); -temp1 = (av_list) xmalloc(sizeof(av_cell)); -temp->attribute = attr; -temp->value = val; -temp->ptr = temp1; -temp1->attribute = attr1; -temp1->value = val1; -temp1->ptr = NULL; -return temp; -} - -av_list -av_append (av_list K, av_list L) -{ -if (K==NULL) return L; -return av_cons(K->attribute, K->value, av_append(K->ptr, L)); -} - -av_list -av_append1 (av_list L, int attr, int val) -{ -return (av_append(L,av_list1(attr, val))); -} - - -/* Index-value list functions */ - -in_list -in_cons (int val, in_list N, in_list L) -{ -in_list temp; -temp = (in_list) xmalloc(sizeof(in_cell)); -temp->index = 0; -temp->value = val; -temp->actual = N; -temp->ptr = L; -return temp; -} +/* Index-value list function */ in_list in_list1 (int val, in_list N) @@ -150,50 +61,7 @@ temp->ptr = NULL; return temp; } -in_list -in_list2 (int val, in_list N, int val1, in_list N1) -{ -in_list temp, temp1; -temp = (in_list) xmalloc(sizeof(in_cell)); -temp1 = (in_list) xmalloc(sizeof(in_cell)); -temp->index = 0; -temp->value = val; -temp->actual = N; -temp->ptr = temp1; -temp1->index = 0; -temp1->value = val1; -temp1->actual = N1; -temp1->ptr = NULL; -return temp; -} - -in_list -in_append (in_list K, in_list L) -{ -if (K==NULL) return L; -return in_cons(K->value, K->actual, in_append(K->ptr, L)); -} - -in_list -in_append1 (in_list L, int val, in_list N) -{ -return (in_append(L,in_list1(val, N))); -} - -/* Attribute-value list functions */ - -hash_list -hash_cons (int x, int y, int new_class, int lig_z, hash_list L) -{ -hash_list temp; -temp = (hash_list) xmalloc(sizeof(hash_cell)); -temp->x = x; -temp->y = y; -temp->new_class = new_class; -temp->lig_z = lig_z; -temp->ptr = L; -return temp; -} +/* Attribute-value list function */ hash_list hash_list1 (int x, int y, int new_class, int lig_z) @@ -208,44 +76,6 @@ temp->ptr = NULL; return temp; } -hash_list -hash_list2(int x,int y,int new_class,int lig_z,int x1,int y1,int class1,int lig_z1) -{ -hash_list temp, temp1; -temp = (hash_list) xmalloc(sizeof(hash_cell)); -temp1 = (hash_list) xmalloc(sizeof(hash_cell)); -temp->x = x; -temp->y = y; -temp->new_class = new_class; -temp->lig_z = lig_z; -temp->ptr = temp1; -temp1->x = x1; -temp1->y = y1; -temp1->new_class = class1; -temp1->lig_z = lig_z1; -temp1->ptr = NULL; -return temp; -} - -hash_list -hash_append (hash_list K, hash_list L) -{ -if (K==NULL) return L; -return hash_cons(K->x, K->y, K->new_class, K->lig_z, hash_append(K->ptr, L)); -} - -hash_list -hash_append1 (hash_list L, int x, int y, int new_class, int lig_z) -{ -return (hash_append(L,hash_list1(x, y, new_class, lig_z))); -} - -void -init_queue(queue *q) -{ - q->front = NULL; - q->tail = NULL; -} void append_to_queue(queue *q, void *content) |