54
54
const char *filename, char sep)
57
58
unsigned int taglen = strlen(tag);
59
struct param *i, *params = NULL;
59
61
if (streq(tag, "filename")) {
60
62
printf("%s%c", filename, sep);
66
if (streq(tag, "parm"))
64
69
for (j = 0; j < tags->cnt; j++) {
65
70
const char *info = tags->str[j];
66
if (strncmp(info, tag, taglen) == 0 && info[taglen] == '=')
67
printf("%s%c", info + taglen + 1, sep);
72
/* We expect this in parm and parmtype. */
73
char *colon = strchr(info, ':');
75
/* We store these for handling at the end */
76
if (strstarts(info, "parm=") && colon) {
77
i = add_param(info + strlen("parm="), ¶ms);
81
if (strstarts(info, "parmtype=") && colon) {
82
i = add_param(info + strlen("parmtype="), ¶ms);
87
if (strncmp(info, tag, taglen) == 0 && info[taglen] == '=')
88
printf("%s%c", info + taglen + 1, sep);
91
/* Now show parameters. */
92
for (i = params; i; i = i->next) {
94
printf("%s (%s)%c", i->name, i->type, sep);
96
printf("%s%s (%s)%c", i->name, i->param, i->type, sep);
98
printf("%s%s%c", i->name, i->param, sep);
125
static struct option options[] =
156
static const struct option options[] =
127
158
{"author", 0, 0, 'a'},
128
159
{"description", 0, 0, 'd'},