home *** CD-ROM | disk | FTP | other *** search
- /*
- pp_change: pretty print the change format.
-
- Kenneth Ingham
-
- Copyright (C) 1987 The University of New Mexico
- */
-
- #include "defs.h"
-
- pp_change(cf)
- struct change_fmt_st *cf;
- {
- while (cf != NULL) {
- switch(cf->type) {
- case PERCENT:
- printf("\t\t%s %5.2f %%", cf->name,
- cf->fmt.percent*100);
- break;
- case ABSOLUTE:
- printf("\t\t%s %6.2f", cf->name,
- cf->fmt.abs_amount);
- break;
- case MAX_MIN:
- printf("\t\t%s %6.2f %6.2f", cf->name,
- cf->fmt.max_min.min,
- cf->fmt.max_min.max);
- break;
- case STRING:
- printf("\t\t%s \"%s\"", cf->name,
- cf->fmt.str_value);
- break;
- default:
- printf("Impossible change format type: %d\n",
- cf->type);
- break;
- }
- if (cf->next != NULL)
- printf(" ;\n");
- else
- printf(" .\n");
- cf = cf->next;
- }
- }
-