#ident "$URL: svn://elmer/devel/SVN/SDDAS/trunk/libCfg/prt_str.c $ %D% SwRI" #include "StrHier.h" #include "LinkList.h" #include "ItemValue.h" prt_str(s) char *s; { static int sp = 0; StrHier S; LinkList l; char *spc, spaces[100]; int i; memset(spaces, 0, 100); sp += s; spc = (char *)memset(spaces, ' ', sp); for (i = 0, l = L; l != 0; l = l->next, i++) { S = (StrHier)l->data; if (i % 5 == 0) printf("\n%d %s", sp/3, spc); printf("%2d - %s ", SNUM(S), SNAME(S)); if (SUBINFO(S)) prt_item(SUBINFO(S)); if (SUBLIST(S)) { prt_strhier(SUBLIST(S), 3); i = -1; } } sp -= s; } prt_item(V) void *V; { int i; ItemValue_t *I; I = (ItemValue_t *)V; printf("\n%s - ", I->Item); for (i=0; in_Values; i++) { printf("%s ", I->Value[i]); } if (I->next) prt_item(I->next); }