/*
* Mini tee implementation for busybox
*
- * Copyright (C) 1999,2000 by Lineo, inc.
- * Written by Matt Kraai <kraai@alumni.carnegiemellon.edu>
+ * Copyright (C) 2000,2001 by Matt Kraai <kraai@alumni.carnegiemellon.edu>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
mode = "a";
break;
default:
- usage(tee_usage);
+ show_usage();
}
}
files = (FILE **)xmalloc(sizeof(FILE *) * (argc - optind + 1));
files[nfiles++] = stdout;
while (optind < argc) {
- if ((files[nfiles++] = fopen(argv[optind++], mode)) == NULL) {
+ if ((files[nfiles++] = wfopen(argv[optind++], mode)) == NULL) {
nfiles--;
- perror_msg("%s", argv[optind-1]);
status = 1;
}
}