Back to index

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

Go to the source code of this file.

Defines

#define MAX_EXTRA_TABLES   16
#define MAX_TABLE_ENTRIES   256

Functions

void compute_ofm_extra_stuff (void)
void output_ofm_extra_stuff (void)
void init_all_tables (void)
void init_font_ivalue (unsigned tab)
void init_font_penalty (unsigned tab)
void init_font_mvalue (unsigned tab)
void init_font_fvalue (unsigned tab)
void init_font_rule (unsigned tab)
void init_font_glue (unsigned tab)
void init_font_ivalue_entry (unsigned index)
void init_font_penalty_entry (unsigned index)
void init_font_mvalue_entry (unsigned index)
void init_font_fvalue_entry (unsigned index)
void init_font_rule_entry (unsigned index)
void init_font_glue_entry (unsigned index)
void set_font_ivalue_definition (unsigned val)
void set_font_penalty_definition (unsigned val)
void set_font_mvalue_definition (fix fval)
void set_font_fvalue_definition (fix fval)
void set_font_rule_measure (unsigned measure, fix fval)
void set_font_glue_width (fix width)
void set_font_glue_shrink_stretch (unsigned shrink_stretch, fix width, unsigned order)
void set_font_glue_type (unsigned type)
void set_font_glue_character (unsigned c)
void set_font_glue_rule (unsigned rule_table, unsigned rule_index)
void set_character_ivalue (unsigned table, unsigned index)
void set_character_penalty (unsigned table, unsigned index)
void set_character_mvalue (unsigned table, unsigned index)
void set_character_fvalue (unsigned table, unsigned index)
void set_character_rule (unsigned table, unsigned index)
void set_character_glue (unsigned table, unsigned index)

Variables

unsigned * ivalue_tables [MAX_EXTRA_TABLES]
unsigned * penalty_tables [MAX_EXTRA_TABLES]
fixfvalue_tables [MAX_EXTRA_TABLES]
fixmvalue_tables [MAX_EXTRA_TABLES]
rulerule_tables [MAX_EXTRA_TABLES]
glueglue_tables [MAX_EXTRA_TABLES]
unsigned max_ivalue_entry [MAX_EXTRA_TABLES]
unsigned max_penalty_entry [MAX_EXTRA_TABLES]
unsigned max_fvalue_entry [MAX_EXTRA_TABLES]
unsigned max_mvalue_entry [MAX_EXTRA_TABLES]
unsigned max_rule_entry [MAX_EXTRA_TABLES]
unsigned max_glue_entry [MAX_EXTRA_TABLES]
unsigned no_ivalue_tables = 0
unsigned no_penalty_tables = 0
unsigned no_fvalue_tables = 0
unsigned no_mvalue_tables = 0
unsigned no_rule_tables = 0
unsigned no_glue_tables = 0
unsigned * cur_ivalue_table
unsigned * cur_penalty_table
fixcur_mvalue_table
fixcur_fvalue_table
rulecur_rule_table
gluecur_glue_table
unsigned cur_ivalue_table_index
unsigned cur_penalty_table_index
unsigned cur_mvalue_table_index
unsigned cur_fvalue_table_index
unsigned cur_rule_table_index
unsigned cur_glue_table_index
unsigned * cur_ivalue_entry
unsigned * cur_penalty_entry
fixcur_mvalue_entry
fixcur_fvalue_entry
rulecur_rule_entry
gluecur_glue_entry
unsigned nki = 0
unsigned nwi = 0
unsigned nkp = 0
unsigned nwp = 0
unsigned nkm = 0
unsigned nwm = 0
unsigned nkf = 0
unsigned nwf = 0
unsigned nkr = 0
unsigned nwr = 0
unsigned nkg = 0
unsigned nwg = 0

Define Documentation

#define MAX_EXTRA_TABLES   16

Definition at line 31 of file extra_routines.c.

#define MAX_TABLE_ENTRIES   256

Definition at line 32 of file extra_routines.c.


Function Documentation

Definition at line 90 of file extra_routines.c.

{
    unsigned i=0;

    if (ofm_level >= OFM_LEVEL1) {
        nki = no_ivalue_tables;
        nkp = no_penalty_tables;
        nkm = no_mvalue_tables;
        nkf = no_fvalue_tables;
        nkr = no_rule_tables;
        nkg = no_glue_tables;
        for (i=0; i<nki; i++) {
            nwi += max_ivalue_entry[i];
        }
        for (i=0; i<nkp; i++) {
            nwp += max_penalty_entry[i];
        }
        for (i=0; i<nkm; i++) {
            nwm += max_mvalue_entry[i];
        }
        for (i=0; i<nkf; i++) {
            nwf += max_fvalue_entry[i];
        }
        for (i=0; i<nkr; i++) {
            nwr += 3 * max_rule_entry[i];
        }
        for (i=0; i<nkg; i++) {
            nwg += 4 * max_glue_entry[i];
        }
    }
}

Here is the caller graph for this function:

Definition at line 131 of file extra_routines.c.

{
     unsigned i=0;

     for (i=0; i<MAX_EXTRA_TABLES; i++) {
         ivalue_tables[i] = NULL;
         penalty_tables[i] = NULL;
         fvalue_tables[i] = NULL;
         mvalue_tables[i] = NULL;
         rule_tables[i] = NULL;
         glue_tables[i] = NULL;
     }
}
void init_font_fvalue ( unsigned  tab)

Definition at line 215 of file extra_routines.c.

{
     unsigned j;

     if (tab>=MAX_EXTRA_TABLES)
         internal_error_1("init_font_fvalue (tab=%d)", tab);
     if (fvalue_tables[tab] != NULL) {
         warning_1("FVALUE table (D %d) previously defined; "
                   "old value ignored", tab);
         cur_fvalue_table = fvalue_tables[tab];
         for (j=0; j<MAX_TABLE_ENTRIES; j++) {
              cur_fvalue_table[j] = 0;
         }
     } else {
         no_fvalue_tables++;
         fvalue_tables[tab] =
             (fix *) xmalloc(MAX_TABLE_ENTRIES*sizeof(unsigned));
         cur_fvalue_table = fvalue_tables[tab];
     }
     max_fvalue_entry[tab] = 0;
}

Here is the call graph for this function:

void init_font_fvalue_entry ( unsigned  index)

Definition at line 325 of file extra_routines.c.

Here is the call graph for this function:

void init_font_glue ( unsigned  tab)

Definition at line 263 of file extra_routines.c.

{
     unsigned j;

     if (tab>=MAX_EXTRA_TABLES)
         internal_error_1("init_font_glue (tab=%d)", tab);
     if (glue_tables[tab] != NULL) {
         warning_1("GLUE table (D %d) previously defined; "
                   "old value ignored", tab);
         cur_glue_table = glue_tables[tab];
         for (j=0; j<MAX_TABLE_ENTRIES; j++) {
              cur_glue_table[j].glue_width = 0;
              cur_glue_table[j].glue_stretch = 0;
              cur_glue_table[j].glue_shrink = 0;
              cur_glue_table[j].glue_stretch_order = 0;
              cur_glue_table[j].glue_shrink_order = 0;
              cur_glue_table[j].glue_type = 0;
              cur_glue_table[j].glue_arg_type = GLUEARG_NONE;
              cur_glue_table[j].glue_arg1 = 0;
              cur_glue_table[j].glue_arg2 = 0;
         }
     } else {
         no_glue_tables++;
         glue_tables[tab] =
             (glue *) xmalloc(MAX_TABLE_ENTRIES*sizeof(glue));
         cur_glue_table = glue_tables[tab];
     }
     max_glue_entry[tab] = 0;
}

Here is the call graph for this function:

void init_font_glue_entry ( unsigned  index)

Definition at line 345 of file extra_routines.c.

Here is the call graph for this function:

void init_font_ivalue ( unsigned  tab)

Definition at line 146 of file extra_routines.c.

{
     unsigned j;

     if (tab>=MAX_EXTRA_TABLES)
         internal_error_1("init_font_ivalue (tab=%d)", tab);
     if (ivalue_tables[tab] != NULL) {
         warning_1("IVALUE table (D %d) previously defined; "
                   "old value ignored", tab);
         cur_ivalue_table = ivalue_tables[tab];
         for (j=0; j<MAX_TABLE_ENTRIES; j++) {
              cur_ivalue_table[j] = 0;
         }
     } else {
         no_ivalue_tables++;
         ivalue_tables[tab] =
             (unsigned *) xmalloc(MAX_TABLE_ENTRIES*sizeof(unsigned));
         cur_ivalue_table = ivalue_tables[tab];
     }
     max_ivalue_entry[tab] = 0;
}

Here is the call graph for this function:

void init_font_ivalue_entry ( unsigned  index)

Definition at line 295 of file extra_routines.c.

Here is the call graph for this function:

void init_font_mvalue ( unsigned  tab)

Definition at line 192 of file extra_routines.c.

{
     unsigned j;

     if (tab>=MAX_EXTRA_TABLES)
         internal_error_1("init_font_mvalue (tab=%d)", tab);
     if (mvalue_tables[tab] != NULL) {
         warning_1("MVALUE table (D %d) previously defined; "
                   "old value ignored", tab);
         cur_mvalue_table = mvalue_tables[tab];
         for (j=0; j<MAX_TABLE_ENTRIES; j++) {
              cur_mvalue_table[j] = 0;
         }
     } else {
         no_mvalue_tables++;
         mvalue_tables[tab] =
             (fix *) xmalloc(MAX_TABLE_ENTRIES*sizeof(unsigned));
         cur_mvalue_table = mvalue_tables[tab];
     }
     max_mvalue_entry[tab] = 0;
}

Here is the call graph for this function:

void init_font_mvalue_entry ( unsigned  index)

Definition at line 315 of file extra_routines.c.

Here is the call graph for this function:

void init_font_penalty ( unsigned  tab)

Definition at line 169 of file extra_routines.c.

{
     unsigned j;

     if (tab>=MAX_EXTRA_TABLES)
         internal_error_1("init_font_penalty (tab=%d)", tab);
     if (penalty_tables[tab] != NULL) {
         warning_1("IVALUE table (D %d) previously defined; "
                   "old value ignored", tab);
         cur_penalty_table = ivalue_tables[tab];
         for (j=0; j<MAX_TABLE_ENTRIES; j++) {
              cur_penalty_table[j] = 0;
         }
     } else {
         no_penalty_tables++;
         penalty_tables[tab] =
             (unsigned *) xmalloc(MAX_TABLE_ENTRIES*sizeof(unsigned));
         cur_penalty_table = ivalue_tables[tab];
     }
     max_penalty_entry[tab] = 0;
}

Here is the call graph for this function:

void init_font_penalty_entry ( unsigned  index)

Definition at line 305 of file extra_routines.c.

Here is the call graph for this function:

void init_font_rule ( unsigned  tab)

Definition at line 238 of file extra_routines.c.

{
     unsigned j;

     if (tab>=MAX_EXTRA_TABLES)
         internal_error_1("init_font_rule (tab=%d)", tab);
     if (rule_tables[tab] != NULL) {
         warning_1("RULE table (D %d) previously defined; "
                   "old value ignored", tab);
         cur_rule_table = rule_tables[tab];
         for (j=0; j<MAX_TABLE_ENTRIES; j++) {
              cur_rule_table[j].rule_wd = 0;
              cur_rule_table[j].rule_dp = 0;
              cur_rule_table[j].rule_ht = 0;
         }
     } else {
         no_rule_tables++;
         rule_tables[tab] =
             (rule *) xmalloc(MAX_TABLE_ENTRIES*sizeof(rule));
         cur_rule_table = rule_tables[tab];
     }
     max_rule_entry[tab] = 0;
}

Here is the call graph for this function:

void init_font_rule_entry ( unsigned  index)

Definition at line 335 of file extra_routines.c.

Here is the call graph for this function:

Definition at line 123 of file extra_routines.c.

{
    if (ofm_level >= OFM_LEVEL1) {
        fatal_error_0("OFM level 1 not currently supported");
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void set_character_fvalue ( unsigned  table,
unsigned  index 
)

Definition at line 464 of file extra_routines.c.

{
    fatal_error_0("CHARFVALUE not currently supported");
}

Here is the call graph for this function:

void set_character_glue ( unsigned  table,
unsigned  index 
)

Definition at line 476 of file extra_routines.c.

{
    fatal_error_0("CHARGLUE not currently supported");
}

Here is the call graph for this function:

void set_character_ivalue ( unsigned  table,
unsigned  index 
)

Definition at line 446 of file extra_routines.c.

{
    fatal_error_0("CHARIVALUE not currently supported");
}

Here is the call graph for this function:

void set_character_mvalue ( unsigned  table,
unsigned  index 
)

Definition at line 458 of file extra_routines.c.

{
    fatal_error_0("CHARMVALUE not currently supported");
}

Here is the call graph for this function:

void set_character_penalty ( unsigned  table,
unsigned  index 
)

Definition at line 452 of file extra_routines.c.

{
    fatal_error_0("CHARPENALTY not currently supported");
}

Here is the call graph for this function:

void set_character_rule ( unsigned  table,
unsigned  index 
)

Definition at line 470 of file extra_routines.c.

{
    fatal_error_0("CHARRULE not currently supported");
}

Here is the call graph for this function:

Definition at line 374 of file extra_routines.c.

{
     *cur_fvalue_entry = fval;
}
void set_font_glue_character ( unsigned  c)
void set_font_glue_rule ( unsigned  rule_table,
unsigned  rule_index 
)

Definition at line 438 of file extra_routines.c.

void set_font_glue_shrink_stretch ( unsigned  shrink_stretch,
fix  width,
unsigned  order 
)

Definition at line 406 of file extra_routines.c.

{
     switch (shrink_stretch) {
         case GLUE_SHRINK: {
             cur_glue_entry->glue_shrink = width; break;
             cur_glue_entry->glue_shrink_order = order; break;
         }
         case GLUE_STRETCH: {
             cur_glue_entry->glue_stretch_order = order; break;
         }
         default: {
             internal_error_1("set_font_rule_measure (shrink_stretch=%d)",
                              shrink_stretch);
         }
     }
}

Here is the call graph for this function:

void set_font_glue_type ( unsigned  type)

Definition at line 425 of file extra_routines.c.

Definition at line 400 of file extra_routines.c.

void set_font_ivalue_definition ( unsigned  val)

Definition at line 356 of file extra_routines.c.

Definition at line 368 of file extra_routines.c.

{
     *cur_mvalue_entry = fval;
}
void set_font_penalty_definition ( unsigned  val)

Definition at line 362 of file extra_routines.c.

void set_font_rule_measure ( unsigned  measure,
fix  fval 
)

Definition at line 380 of file extra_routines.c.

{
     switch (measure) {
         case RULE_WD: {
             cur_rule_entry->rule_wd = fval; break;
         }
         case RULE_HT: {
             cur_rule_entry->rule_ht = fval; break;
         }
         case RULE_DP: {
             cur_rule_entry->rule_dp = fval; break;
         }
         default: {
             internal_error_1("set_font_rule_measure (measure=%d)", measure);
         }
     }
}

Here is the call graph for this function:


Variable Documentation

Definition at line 72 of file extra_routines.c.

Definition at line 58 of file extra_routines.c.

Definition at line 65 of file extra_routines.c.

Definition at line 74 of file extra_routines.c.

Definition at line 60 of file extra_routines.c.

Definition at line 67 of file extra_routines.c.

unsigned* cur_ivalue_entry

Definition at line 69 of file extra_routines.c.

unsigned* cur_ivalue_table

Definition at line 55 of file extra_routines.c.

Definition at line 62 of file extra_routines.c.

Definition at line 71 of file extra_routines.c.

Definition at line 57 of file extra_routines.c.

Definition at line 64 of file extra_routines.c.

unsigned* cur_penalty_entry

Definition at line 70 of file extra_routines.c.

unsigned* cur_penalty_table

Definition at line 56 of file extra_routines.c.

Definition at line 63 of file extra_routines.c.

Definition at line 73 of file extra_routines.c.

Definition at line 59 of file extra_routines.c.

Definition at line 66 of file extra_routines.c.

Definition at line 36 of file extra_routines.c.

Definition at line 39 of file extra_routines.c.

Definition at line 34 of file extra_routines.c.

Definition at line 43 of file extra_routines.c.

Definition at line 46 of file extra_routines.c.

Definition at line 41 of file extra_routines.c.

Definition at line 44 of file extra_routines.c.

Definition at line 42 of file extra_routines.c.

Definition at line 45 of file extra_routines.c.

Definition at line 37 of file extra_routines.c.

unsigned nkf = 0

Definition at line 82 of file extra_routines.c.

unsigned nkg = 0

Definition at line 86 of file extra_routines.c.

unsigned nki = 0

Definition at line 76 of file extra_routines.c.

unsigned nkm = 0

Definition at line 80 of file extra_routines.c.

unsigned nkp = 0

Definition at line 78 of file extra_routines.c.

unsigned nkr = 0

Definition at line 84 of file extra_routines.c.

unsigned no_fvalue_tables = 0

Definition at line 50 of file extra_routines.c.

unsigned no_glue_tables = 0

Definition at line 53 of file extra_routines.c.

unsigned no_ivalue_tables = 0

Definition at line 48 of file extra_routines.c.

unsigned no_mvalue_tables = 0

Definition at line 51 of file extra_routines.c.

unsigned no_penalty_tables = 0

Definition at line 49 of file extra_routines.c.

unsigned no_rule_tables = 0

Definition at line 52 of file extra_routines.c.

unsigned nwf = 0

Definition at line 83 of file extra_routines.c.

unsigned nwg = 0

Definition at line 87 of file extra_routines.c.

unsigned nwi = 0

Definition at line 77 of file extra_routines.c.

unsigned nwm = 0

Definition at line 81 of file extra_routines.c.

unsigned nwp = 0

Definition at line 79 of file extra_routines.c.

unsigned nwr = 0

Definition at line 85 of file extra_routines.c.

Definition at line 35 of file extra_routines.c.

Definition at line 38 of file extra_routines.c.