/*! * \param instr l'instruction à imprimer * \param addr son adresse */ void print_instruction(Instruction instr, unsigned addr) { printf("%s ", cop_names[instr.instr_generic._cop]); switch (instr.instr_generic._cop) { case ILLOP: case NOP: case RET: case HALT: break; case LOAD: case STORE: case ADD: case SUB: print_register(instr); print_op(instr); break; case BRANCH: case CALL: print_condition(instr); print_op(instr); break; case PUSH: case POP: print_op(instr); break; } }
static void print_conditions(NODE *n) { for(; n != NULL; n = n -> u.LIST.next){ print_condition(n->u.LIST.curr); if(n -> u.LIST.next != NULL) printf(" and"); } }
static bool print_condition (struct cldr_plural_condition_ty *condition, enum cldr_plural_condition parent, bool space, FILE *fp) { if (condition->type == CLDR_PLURAL_CONDITION_AND) { if (parent == CLDR_PLURAL_CONDITION_OR) fputc ('(', fp); print_condition (condition->value.conditions[0], CLDR_PLURAL_CONDITION_AND, false, fp); fprintf (fp, " && "); print_condition (condition->value.conditions[1], CLDR_PLURAL_CONDITION_AND, false, fp); if (parent == CLDR_PLURAL_CONDITION_OR) fputc (')', fp); return true; } else if (condition->type == CLDR_PLURAL_CONDITION_OR) { if (parent == CLDR_PLURAL_CONDITION_AND) fputc ('(', fp); print_condition (condition->value.conditions[0], CLDR_PLURAL_CONDITION_OR, false, fp); fprintf (fp, " || "); print_condition (condition->value.conditions[1], CLDR_PLURAL_CONDITION_OR, false, fp); if (parent == CLDR_PLURAL_CONDITION_AND) fputc (')', fp); return true; } else if (condition->type == CLDR_PLURAL_CONDITION_RELATION) { print_relation (condition->value.relation, parent, space, fp); return true; } return false; }
/* mvp 5-17-94 */ void print_consed_list_of_conditions(list * c, int indent) { for (; c != NIL; c = c->rest) { if (get_printer_output_column() >= COLUMNS_PER_LINE - 20) print("\n "); /* mvp 5-17-94 */ print_spaces(indent); print_condition(c->first); } }
void print_condition(fz_css_condition *cond) { if (cond->type == '=') printf("[%s=%s]", cond->key, cond->val); else if (cond->type == '[') printf("[%s]", cond->key); else printf("%c%s", cond->type, cond->val); if (cond->next) print_condition(cond->next); }
/** * \fn void print_instruction(Instruction instr, unsigned addr) * \brief Affiche une instruction en entière * \param i, l'instruction a afficher. */ void print_instruction(Instruction instr, unsigned addr){ printf("%s ",cop_names[instr.instr_generic._cop]); switch(instr.instr_generic._cop){ case LOAD: print_registre(instr); print_operande(instr); break; case STORE: print_registre(instr); print_operande(instr); break; case ADD: print_registre(instr); print_operande(instr); break; case SUB: print_registre(instr); print_operande(instr); break; case BRANCH: print_condition(instr); print_operande(instr); break; case CALL: print_condition(instr); print_operande(instr); break; case PUSH: print_operande(instr); break; case POP: print_operande(instr); break; default: break; } }
void print_selector(fz_css_selector *sel) { if (sel->combine) { putchar('('); print_selector(sel->left); if (sel->combine == ' ') printf(" "); else printf(" %c ", sel->combine); print_selector(sel->right); putchar(')'); } else if (sel->name) printf("%s", sel->name); else printf("*"); if (sel->cond) { print_condition(sel->cond); } }