void print_colheaders(FILE *output, RbtHandle rbcolumns) { int colcount; RbtIterator colhandle; colcount = 1; /* Remember the hostname column */ /* Group column headings */ fprintf(output, "<TR>"); fprintf(output, "<TD ROWSPAN=2> </TD>\n"); /* For the prio column - in both row headers+dash rows */ fprintf(output, "<TD ROWSPAN=2> </TD>\n"); /* For the host column - in both row headers+dash rows */ for (colhandle = rbtBegin(rbcolumns); (colhandle != rbtEnd(rbcolumns)); colhandle = rbtNext(rbcolumns, colhandle)) { void *k1, *k2; char *colname; rbtKeyValue(rbcolumns, colhandle, &k1, &k2); colname = (char *)k1; colcount++; fprintf(output, " <TD ALIGN=CENTER VALIGN=BOTTOM WIDTH=45>\n"); fprintf(output, " <A HREF=\"%s\"><FONT %s><B>%s</B></FONT></A> </TD>\n", columnlink(colname), xgetenv("XYMONPAGECOLFONT"), colname); } fprintf(output, "</TR>\n"); fprintf(output, "<TR><TD COLSPAN=%d><HR WIDTH=\"100%%\"></TD></TR>\n\n", colcount); }
void print_colheaders(FILE *output, void * rbcolumns) { int colcount; xtreePos_t colhandle; colcount = 1; /* Remember the hostname column */ /* Group column headings */ fprintf(output, "<TR>"); fprintf(output, "<TD ROWSPAN=2> </TD>\n"); /* For the prio column - in both row headers+dash rows */ fprintf(output, "<TD ROWSPAN=2> </TD>\n"); /* For the host column - in both row headers+dash rows */ for (colhandle = xtreeFirst(rbcolumns); (colhandle != xtreeEnd(rbcolumns)); colhandle = xtreeNext(rbcolumns, colhandle)) { char *colname; colname = (char *)xtreeKey(rbcolumns, colhandle); colcount++; fprintf(output, " <TD ALIGN=CENTER VALIGN=BOTTOM WIDTH=45>\n"); fprintf(output, " <A HREF=\"%s\"><FONT %s><B>%s</B></FONT></A> </TD>\n", columnlink(colname), xgetenv("XYMONPAGECOLFONT"), colname); } fprintf(output, "</TR>\n"); fprintf(output, "<TR><TD COLSPAN=%d><HR WIDTH=\"100%%\"></TD></TR>\n\n", colcount); }