2 * C version by Wessel Dankers <wsl@fruit.eu.org>
4 * This code is in the public domain.
13 void print_usage(const char *progname) {
14 fprintf(stderr, "Command line usage: %s [flags] -- prefix [recipients]\n", progname);
18 int main(int argc, char **argv) {
19 char **opts, **opt, *pfx;
26 opts = malloc((2 * argc + 1) * sizeof (* opts)); /* __MEM_CHECKED__ */
35 "Command line usage: %s [flags] -- prefix [recipients]\n",
44 for(i = 2; i < argc; ) {
45 if(!strcmp(argv[i], "--")) {
58 execvp(opts[0], opts);