4 * Delete lots of files (saves typing in Makefiles)
6 * © 1998 Straylight/Edgeware
9 /*----- Licensing note ----------------------------------------------------*
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2, or (at your option)
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program. If not, write to the Free Software Foundation,
23 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 /*----- Header files ------------------------------------------------------*/
38 /*----- Install programs --------------------------------------------------*/
40 static int exitstat = 0; /* Exit status */
44 * Arguments: @const char *f@ = pointer to filename
48 * Use: Expunges a file.
51 static void wipe(const char *f)
55 e = _swix(OS_FSControl, _in(0) | _in(1) | _in(3), 27, f, 0);
57 fprintf(stderr, "ssrclean: error deleting `%s': %s\n",
65 * Arguments: @int argc@ = number of arguments
66 * @char *argv[]@ = list of arguments
68 * Returns: Zero if all went well
70 * Use: Deletes files. This is an `rm' rip-off
73 int main(int argc, char *argv[])
77 /* --- Expand wildcards in the arguments --- */
79 cmdreplace(&argc, &argv);
81 /* --- Report an error if there aren't enough arguments --- */
84 fprintf(stderr, "Usage: ssrclean FILE [FILE...]\n");
88 /* --- Wipe things --- */
90 for (i = 1; i < argc; i++)
98 /*----- That's all, folks -------------------------------------------------*/