home *** CD-ROM | disk | FTP | other *** search
- /*
- pp_out: pretty print the output of command structure.
-
- Kenneth Ingham
-
- Copyright (C) 1987 The University of New Mexico
- */
-
- #include "defs.h"
-
- pp_out(type,of)
- int type;
- union out_fmt_u of;
- {
- struct rel_out_st *rp;
- struct col_out_st *cp;
-
- switch(type) {
- case RELATIVE:
- rp = of.rel_fmt;
- while (rp != NULL) {
- printf(" %d %s %% %c", rp->field, rp->name,
- TCHAR(rp->type));
- rp = rp->next;
- }
- break;
- case COLUMN:
- cp = of.col_fmt;
- while (cp != NULL) {
- printf(" %d - %d %s %% %c", cp->start,
- cp->end, cp->name, TCHAR(cp->type));
- cp = cp->next;
- }
- break;
- default:
- printf("Impossible value for outfmt type: %d\n", type);
- break;
- }
- }
-