예제 #1
0
void
print_xerox_face(int face)
{
    if ((face < F_MIN) || (face > F_MAX)) {
	internal_error_1("print_xerox_face (face=%d)", face);
    }
    out("F "); out(xerox_faces[face]);
}
예제 #2
0
void
out_extensible_piece(unsigned piece)
{
    if ((piece < E_MIN) || (piece > E_MAX)) {
	internal_error_1("out_extensible_piece (piece=%d)", piece);
    }
    out(extensible_pieces[piece]);
}
예제 #3
0
void
out_glue_order(unsigned order)
{
    if ((order < O_MIN) || (order > O_MAX)) {
	internal_error_1("out_glue_order (order=%d)", order);
    }
    out(glue_orders[order]);
}
예제 #4
0
void
out_glue_kind(unsigned kind)
{
    if ((kind < K_MIN) || (kind > K_MAX)) {
	internal_error_1("out_glue_kind (kind=%d)", kind);
    }
    out(glue_kinds[kind]);
}
예제 #5
0
void
out_rule_measure(unsigned measure)
{
    if ((measure < RULE_MIN) || (measure > RULE_MAX)) {
	internal_error_1("out_rule_measure (measure=%d)", measure);
    }
    out(rule_measures[measure]);
}
예제 #6
0
void
out_move_direction(unsigned direction)
{
    if ((direction < M_MIN) || (direction > M_MAX)) {
	internal_error_1("out_move_direction (direction=%d)", direction);
    }
    out(move_directions[direction]);
}
예제 #7
0
void
out_accent_kind(unsigned kind)
{
    if ((kind < ACC_TOP) || (kind > ACC_BOT)) {
	internal_error_1("out_accent_kind (kind=%d)", kind);
    }
    out(accent_kinds[kind]);
}
예제 #8
0
void
out_named_parameter(unsigned parameter)
{
    if ((parameter < P_MIN) || (parameter > P_MAX)) {
	internal_error_1("out_named_parameter (parameter = %d)", parameter);
    }
    out(named_parameters[parameter]);
}
예제 #9
0
void
out_ligature_command(unsigned command)
{
    if ((command < L_MIN) || (command > L_MAX) ||
        (ligature_commands[command]==NULL)) {
	internal_error_1("out_ligature_command (command=%d)", command);
    }
    out(ligature_commands[command]);
}
예제 #10
0
void
out_character_measure(unsigned measure)
{
    if ((measure < C_MIN) || (measure > C_MAX) ||
        (character_measures[measure]==NULL)) {
	internal_error_1("out_character_measure (measure=%d)", measure);
    }
    out(character_measures[measure]);
}
예제 #11
0
void
out_named_mathex_parameter(unsigned parameter)
{
    if ((parameter < P_MATHEX_MIN) || (parameter > P_MATHEX_MAX) ||
        (named_mathex_parameters[parameter]==NULL)) {
	internal_error_1("out_named_mathex_parameter (parameter=%d)",parameter);
    }
    out(named_mathex_parameters[parameter]);
}
예제 #12
0
void
out_shrink_stretch(unsigned shrink_stretch)
{
    if ((shrink_stretch < GLUE_MIN) || (shrink_stretch > GLUE_MAX)) {
	internal_error_1("out_shrink_stretch (shrink_stretch=%d)",
                         shrink_stretch);
    }
    out(glue_shrink_stretch[shrink_stretch]);
}
예제 #13
0
void
out_type_direction(unsigned direction)
{
    if ((direction < DIR_MIN) || (direction > DIR_MAX)) {
	internal_error_1("out_type_direction (direction=%d)", direction);
    }
    out(type_directions[direction/8]); out(" ");
    out(actual_directions[direction%8]);
}
예제 #14
0
void
append_command_2(unsigned cmd_0, unsigned max_n,
                 unsigned cmd_1, unsigned actual)
{
    if ((actual < 0) || (actual > 0x7fffffff))
        internal_error_1("append_command (actual=%d)", actual);
    if ((cmd_0 + actual) <= max_n)
        append_to_packet(cmd_0 + actual);
    else
        append_command(cmd_1, actual);
}
예제 #15
0
void
out_int(unsigned val, unsigned base)
{
	register unsigned j=0, acc=val;
	if (val < 0) internal_error_1("out_int (val=%d)", val);
	if (base==16)      out("H ");
	else if (base==10) out("D ");
	else if (base==8)  out("O ");
	else internal_error_1("out_int (base=%d)", base);
	do {
		digits[j] = acc % base;
		j++;
		acc = acc / base;
	} while (acc > 0);
/*
        if ((base==16) && (ec>=0x100)) {
            while (j<4) { digits[j] = 0; j++; }
        }
*/
	out_digits(j);
}
예제 #16
0
void
append_command(unsigned cmd_1, unsigned actual)
{
    if ((cmd_1 != DVI_SET_1) && (cmd_1 != DVI_FNT_1) &&
        (cmd_1 != DVI_FNT_DEF_1) && (cmd_1 != DVI_XXX_1)) {
        internal_error_1("append_command (cmd_1=%d)", cmd_1);
    }
    if (actual < 0x100) {
        append_to_packet(cmd_1);
        append_to_packet(actual);
    } else if (actual < 0x10000) {
        append_to_packet(cmd_1 + 1);
        append_to_packet(actual >> 8);
        append_to_packet(actual & 0xff);
    } else if (actual < 0x1000000) {
예제 #17
0
static int
l_hash_input(unsigned p, unsigned c)
{

    four_entries *entry = lig_kern_table+p;
    unsigned y = entry->entries[1];
    unsigned t = entry->entries[2];
    unsigned cc = LIG_SIMPLE;
    unsigned zz = entry->entries[3];
    unsigned key;
    hash_list L1;

    if (t >= KERN_FLAG) zz = y;
    else {
        switch(t) {
             case L_0:
             case L_Ax:   { break; }
             case L_Bx:
             case L_ABxx: { zz = y; break; }
             case L_B:
             case L_ABx:  { cc = LIG_LEFT_Z;  break; }
             case L_A:    { cc = LIG_RIGHT_Z; break; }
             case L_AB:   { cc = LIG_BOTH_Z;  break; }
             default: {
                 internal_error_1("l_hash_input (case=%d)", t);
             }
        }
    }
    key = (c & 0x7fff)*(y & 0x7fff) % PRIME;
    L1 = hash_table[key];
    if ((L1 == NULL) || (c < L1->x) || ((c == L1->x) && (y < L1->y)))
        hash_table[key] = hash_list1(c,y,cc,zz,L1);
    else {
        hash_list L2 = L1->ptr;
        while ((L2 != NULL) && ((c > L2->x) || ((c == L2->x) && (y > L2->y)))) {
            L1 = L2;
            L2 = L2->ptr;
        }
        if ((L2 == NULL) || (c < L2->x) || ((c == L2->x) && (y < L2->y)))
            L1->ptr = hash_list1(c,y,cc,zz,L2);
        else
            return FALSE;
    }
    return TRUE;
}
예제 #18
0
static int
l_f(hash_list h, unsigned x, unsigned y)
{
    switch(h->new_class) {
         case LIG_SIMPLE: {break;}
         case LIG_LEFT_Z: {
             h->new_class = LIG_PENDING;
             h->lig_z = l_eval(h->lig_z, y);
             h->new_class = LIG_SIMPLE;
             break;
         }
         case LIG_RIGHT_Z: {
             h->new_class = LIG_PENDING;
             h->lig_z = l_eval(x, h->lig_z);
             h->new_class = LIG_SIMPLE;
             break;
         }
         case LIG_BOTH_Z: {
             h->new_class = LIG_PENDING;
             h->lig_z = l_eval(l_eval(x,h->lig_z), y);
             h->new_class = LIG_SIMPLE;
             break;
         }
         case LIG_PENDING: {
             x_lig_cycle = x;
             y_lig_cycle = y;
             h->lig_z = CHAR_ERROR;
             h->new_class = LIG_SIMPLE;
             break;
         }
         default: {
             internal_error_1("f (new_class=%d)", h->new_class);
         }
    }
    return (h->lig_z);
}