2 * C version by Wessel Dankers <wsl@fruit.eu.org>
4 * This code is in the public domain.
16 void print_usage(const char *progname) {
17 fprintf(stderr, "Command line usage: %s [flags] -- prefix [recipients]\n", progname);
21 int main(int argc, char **argv) {
22 char **opts, **opt, *pfx;
29 opts = malloc((2 * argc + 1) * sizeof (* opts)); /* __MEM_CHECKED__ */
38 "Command line usage: %s [flags] -- prefix [recipients]\n",
47 for(i = 2; i < argc; ) {
48 if(!strcmp(argv[i], "--")) {
61 execvp(opts[0], opts);