Back to index

tetex-bin  3.0
Defines | Functions | Variables
param_routines.c File Reference
#include "cpascal.h"
#include "list_routines.h"
#include "manifests.h"
#include "header_routines.h"
#include "param_routines.h"
#include "print_routines.h"
#include "out_routines.h"
#include "error_routines.h"
#include "out_ofm.h"

Go to the source code of this file.

Defines

#define PARAM_MIN   1

Functions

void init_parameters (void)
void set_param_word (int index, int val)
void retrieve_parameters (unsigned char *table)
void print_parameters (void)
void output_ofm_parameter (void)
void output_ofm_one_parameter (unsigned i, fix param)

Variables

av_list param_list = NULL
int param_max = PARAM_MIN-1
int param_started = FALSE
unsigned np = 0

Define Documentation

#define PARAM_MIN   1

Definition at line 34 of file param_routines.c.


Function Documentation

Definition at line 43 of file param_routines.c.

{
    if (param_started==TRUE)
    warning_0("FONTDIMEN previously defined;  all old parameters ignored");
    if (param_list!=NULL) {
        av_list L1 = param_list, L2;
        while (L1 != NULL) {
           L2 = L1->ptr;
           free(L1);
           L1 = L2;
        }
    }
    param_list = NULL;
    param_max = PARAM_MIN-1;
    np=param_max;
    param_started = TRUE;
}

Here is the call graph for this function:

void output_ofm_one_parameter ( unsigned  i,
fix  param 
)

Definition at line 150 of file param_routines.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 132 of file param_routines.c.

{
    unsigned i=1, j;

    av_list L = param_list;

    while(L != NULL) {
       j=lattr(L);
       while (i<j) {
           output_ofm_one_parameter(i, 0);
           i++;
       }
       output_ofm_one_parameter(i, lval(L));
       L = L->ptr; i++;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 118 of file param_routines.c.

{
    av_list L = param_list;

    print_font_dimension();
    while (L != NULL) {
       print_parameter(lattr(L), lval(L));
       L = L->ptr;
    }
    right();
}

Here is the call graph for this function:

Here is the caller graph for this function:

void retrieve_parameters ( unsigned char *  table)

Definition at line 98 of file param_routines.c.

{
    int value;
    unsigned i;
    unsigned np_prime = np;

    param_list = NULL;
    for (i=1; i<=np_prime; i++) {
        value = ((table[4*i] & 0xff) << 24) |
                ((table[4*i+1] & 0xff) << 16) |
                ((table[4*i+2] & 0xff) << 8) |
                (table[4*i+3] & 0xff);
        if ((i<=7) | (value != 0)) {
           set_param_word(i, value);
        }
    }
    np = np_prime;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void set_param_word ( int  index,
int  val 
)

Definition at line 62 of file param_routines.c.

{
    av_list L1, L2;

    if (index < PARAM_MIN) {
        warning_0("PARAMETER index must be at least 1; ignored");
        return;
    }
    L1 = param_list;
    if (L1 == NULL) {
        param_list = av_list1(index, val);
        param_max = index;
        np=param_max;
    } else {
        L2 = L1->ptr;
        while ((L2 != NULL) && (lattr(L2) <= index)) {
            L1 = L2;
            L2 = L2->ptr;
        }
        if (index < lattr(L1)) {
            param_list = av_list1(index, val);
            param_list->ptr = L1;
       } else if (index == lattr(L1)) {
        warning_1("PARAMETER index (%d) previously defined; "
                  "old value ignored", index);
            lval(L1)  = val;
        } else {
            if (L2==NULL) {param_max=index; np=param_max;}
            L2 = av_list1(index, val);
            L2->ptr = L1->ptr;
            L1->ptr = L2;
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

unsigned np = 0

Definition at line 40 of file param_routines.c.

Definition at line 36 of file param_routines.c.

Definition at line 37 of file param_routines.c.

Definition at line 38 of file param_routines.c.