Signed-off-by: Stefan Tauner stefan.tauner@student.tuwien.ac.at --- print_wiki.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/print_wiki.c b/print_wiki.c index 83f1ad9..7c39486 100644 --- a/print_wiki.c +++ b/print_wiki.c @@ -77,6 +77,7 @@ static const char chip_th[] = "\ | align="center" | Min \n| align="center" | Max\n\n";
static const char programmer_th[] = "\ +! align="left" | Programmer\n\ ! align="left" | Vendor\n\ ! align="left" | Device\n\ ! align="center" | IDs\n\ @@ -314,14 +315,17 @@ static void print_supported_devs_wiki_helper(const struct programmer_entry prog) int i = 0; static int c = 0; const struct dev_status *devs = prog.devs.status; + const unsigned int count = count_supported_devs_wiki(devs);
/* Alternate colors if the vendor changes. */ c = !c;
for (i = 0; devs[i].vendor_name != NULL; i++) { - printf("|- bgcolor="#%s"\n| %s || %s || %04x:%04x || {{%s}}\n", (c) ? "eeeeee" : "dddddd", - devs[i].vendor_name, devs[i].device_name, devs[i].vendor_id, devs[i].device_id, - (devs[i].status == NT) ? "?3" : "OK"); + printf("|- bgcolor="#%s"\n", (c) ? "eeeeee" : "dddddd"); + if (i == 0) + printf("| rowspan="%u" | %s |", count, prog.name); + printf("| %s || %s || %04x:%04x || {{%s}}\n", devs[i].vendor_name, devs[i].device_name, + devs[i].vendor_id, devs[i].device_id, (devs[i].status == NT) ? "?3" : "OK"); } }