- } elsif($return->[0] eq 'string') {
- push(@c, " return dequote(disorder_simple(c, $return->[1]p, \"$cmd\"",
- map(", $_->[1]", @$args),
- ", (char *)0), $return->[1]p);\n");
- } elsif($return->[0] eq 'boolean') {
- push(@c, " char *v;\n",
- " int rc;\n",
- " if((rc = disorder_simple(c, &v, \"$cmd\"",
- map(", $_->[1]", @$args),
- ", (char *)0)))\n",
- " return rc;\n",
- " return boolean(\"$cmd\", v, $return->[1]p);\n");
- } elsif($return->[0] eq 'integer') {
- push(@c, " char *v;\n",
- " int rc;\n",
- "\n",
- " if((rc = disorder_simple(c, &v, \"$cmd\"",
- map(", $_->[1]", @$args),
- ", (char *)0)))\n",
- " return rc;\n",
- " *$return->[1]p = atol(v);\n",
- " xfree(v);\n",
- " return 0;\n");
- } elsif($return->[0] eq 'user') {
- push(@c, " char *u;\n",
- " int rc;\n",
- " if((rc = disorder_simple(c, &u, \"$cmd\"",
- map(", $_->[1]", @$args),
- " )))\n",
- " return rc;\n",
- " c->user = u;\n",
- " return 0;\n");
- } elsif($return->[0] eq 'body') {
- push(@c, " return disorder_simple_list(c, $return->[1]p, n$return->[1]p, \"$cmd\"",
- map(", $_->[1]", @$args),
- ", (char *)0);\n");
- } elsif($return->[0] eq 'queue') {
- push(@c, " return somequeue(c, \"$cmd\", $return->[1]p);\n");
- } elsif($return->[0] eq 'queue-one') {