- else if ($1 == ".SH" && insh == 1) {
- if (i > 0 && name != NULL) {
- namesect = sprintf("%s (%s)", name, sect)
- printf("%-20.20s", namesect)
- printf(" - ")
- for (j = 0; j < i-1; j++)
- printf("%s ", desc[j])
- printf("%s\n", desc[i-1])
+ else if (($1 == ".br" && insh == 1)\
+ || ($1 == ".SH" && insh == 1)\
+ || ($1 == ".Sh" && inSh == 1)) {
+ if (i > 0 && nc > 0) {
+ for (k= 1; k <= nc; k++) {
+ namesect = sprintf("%s (%s)", name[k], sect)
+ printf("%s", namesect)
+ printf(" - ")
+ for (j = 0; j < i-1; j++)
+ printf("%s ", desc[j])
+ printf("%s\n", desc[i-1])
+ }