Back to index

tetex-bin  3.0
Functions | Variables
dimen_routines.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void set_character_measure (int, int)
void print_measures (void)
void init_measures (void)
void build_dimen_tables (void)
void retrieve_dimen_tables (void)
void print_dimen_tables (void)
void set_accent (unsigned)
void output_ofm_dimension (void)

Variables

intdimen_tables []
unsigned nw
unsigned nh
unsigned nd
unsigned ni

Function Documentation

Definition at line 216 of file dimen_routines.c.

{
    int delta;
    in_list L1;
    int i,j;

    switch(ofm_level) {
      case OFM_TFM:
        measure_max_entries = TFM_measure_max_entries;
        break;
      case OFM_LEVEL0: case OFM_LEVEL1:
        measure_max_entries = OFM0_measure_max_entries;
        break;
      default:
        measure_max_entries = OFM2_measure_max_entries;
    }
    for (i=C_MIN; i<=C_MAX; i++) {
        if (measure_max_entries[i] != 0) {
            delta=shorten(i,measure_max_entries[i]);
            set_indices(i,delta);
            dimen_tables[i] = (int *) malloc((measure_max[i]+1)*sizeof(int));
            L1 = measure_list[i];
            j=0;
            while (lval(L1) != INFINITY) {
                L1 = L1->actual;
                dimen_tables[i][j] = lval(L1);
                L1 = L1->ptr;
                j++;
            }
        }
    }
    nw = measure_max[C_WD];
    nh = measure_max[C_HT];
    nd = measure_max[C_DP];
    ni = measure_max[C_IC];
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 61 of file dimen_routines.c.

{
    register int i;
    for (i=C_MIN; i<=C_MAX; i++) {
        measure_list[i] = in_list1(INFINITY, NULL);
        measure_max[i] = 0;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 314 of file dimen_routines.c.

{
    int i, j;

    for (i=C_WD; i<=C_IC; i++) {
        out_ofm_4(0);
        for (j=0; j<measure_max[i]; j++) {
            out_ofm_4(dimen_tables[i][j]);
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 284 of file dimen_routines.c.

{
    int i, j;

    for (i=C_MIN; i<=C_MAX; i++) {
        if (measure_max[i] != 0) {
            left(); out("COMMENT"); out_ln();
            for (j=0; j<measure_max[i]; j++) {
                left(); 
                out_character_measure(i); out("_ENTRY");
                out(" "); out_int(j,10);
                out(" "); out_fix(dimen_tables[i][j]);
                right();
            }
            right();
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 110 of file dimen_routines.c.

{
    in_list L;
    register int i,j;

    for (i=C_MIN; i<=C_MAX; i++) {
       L = measure_list[i];
        if (L!=NULL) {
           j=0;
           out_character_measure(i);
           fprintf(stdout, ":\n");
            while (L != NULL) {
              fprintf(stdout, "   %d: ", j++);
              out_fix(lval(L));
              fprintf(stdout, "\n");
               L = L->ptr;
            }
           fprintf(stdout, "\n");
        }
    }
    fprintf(stdout, "--------------------------------\n");
}

Here is the call graph for this function:

Definition at line 254 of file dimen_routines.c.

{
    unsigned i, j;
    unsigned char *k;

    measure_max[C_WD] = nw;
    measure_max[C_HT] = nh;
    measure_max[C_DP] = nd;
    measure_max[C_IC] = ni;
    measure_base[C_WD] = ofm+width_base*4;
    measure_base[C_HT] = ofm+height_base*4;
    measure_base[C_DP] = ofm+depth_base*4;
    measure_base[C_IC] = ofm+italic_base*4;
    for (i=C_IC+1; i<=C_MAX; i++) {
        measure_max[i] = 0;
        dimen_tables[i] = NULL;
    }
    for (i=C_MIN; i<=C_MAX; i++) {
        dimen_tables[i] = (int *) malloc((measure_max[i]+1)*sizeof(int));
        for (j=0; j<measure_max[i]; j++) {
            k = measure_base[i]+4*j;
            dimen_tables[i][j] = (((*k)&0xff) << 24) |
                                 (((*(k+1))&0xff) << 16) |
                                 (((*(k+2))&0xff) << 8) |
                                 ((*(k+3))&0xff);
        }
    }
}

Here is the caller graph for this function:

void set_accent ( unsigned  )

Definition at line 304 of file dimen_routines.c.

{
    if ((kind<ACC_TOP) || (kind>ACC_BOT)) {
        warning_0("bad ACCENT value; ignored");
        kind = ACC_NONE;
    }
    current_character->accent = kind;
}

Here is the call graph for this function:

Definition at line 71 of file dimen_routines.c.

{
    in_list L1, L2, *the_list;

    if ((index < C_MIN) || (index > C_MAX)) {
        internal_error_1("set_character_measure (index=%d)", index);
        return;
    }
    the_list = measure_list+index;
    L1 = *the_list;
    if (L1 == NULL) {
       internal_error_0("set_character_measure (L1)");
    } else {
        L2 = L1->ptr;
        while ((L2 != NULL) && (lval(L2) <= val)) {
            L1 = L2;
            L2 = L2->ptr;
        }
        if (val < lval(L1)) {
            *the_list = in_list1(val, NULL);
            (*the_list)->ptr = L1;
            (*the_list)->actual = *the_list;
            measure_max[index]++;
            current_character->indices[index] = *the_list;
        } else if (val == lval(L1)) {
            current_character->indices[index] = L1;
        } else {
            L2 = in_list1(val, NULL);
            L2->ptr = L1->ptr;
            L2->actual = L2;
            L1->ptr = L2;
            measure_max[index]++;
            current_character->indices[index] = L2;
        }
    }
    /* print_measures(); */
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 52 of file dimen_routines.c.

unsigned nd

Definition at line 864 of file afm2tfm.c.

unsigned nh

Definition at line 864 of file afm2tfm.c.

unsigned ni

Definition at line 864 of file afm2tfm.c.

unsigned nw

Definition at line 864 of file afm2tfm.c.