diff options
author | svn2git <svn2git@FreeBSD.org> | 1994-07-01 08:00:00 +0000 |
---|---|---|
committer | svn2git <svn2git@FreeBSD.org> | 1994-07-01 08:00:00 +0000 |
commit | 5e0e9b99dc3fc0ecd49d929db0d57c784b66f481 (patch) | |
tree | e779b5a6edddbb949b7990751b12d6f25304ba86 /gnu/libexec/uucp/libunix/corrup.c | |
parent | a16f65c7d117419bd266c28a1901ef129a337569 (diff) |
Diffstat (limited to 'gnu/libexec/uucp/libunix/corrup.c')
-rw-r--r-- | gnu/libexec/uucp/libunix/corrup.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/gnu/libexec/uucp/libunix/corrup.c b/gnu/libexec/uucp/libunix/corrup.c new file mode 100644 index 000000000000..87f19e668894 --- /dev/null +++ b/gnu/libexec/uucp/libunix/corrup.c @@ -0,0 +1,33 @@ +/* corrup.c + Save a file in the .Corrupt directory. */ + +#include "uucp.h" + +#include "sysdep.h" +#include "uudefs.h" +#include "system.h" + +char * +zsysdep_save_corrupt_file (zfile) + const char *zfile; +{ + const char *zslash; + char *zto; + + zslash = strrchr (zfile, '/'); + if (zslash == NULL) + zslash = zfile; + else + ++zslash; + + zto = zsappend3 (zSspooldir, CORRUPTDIR, zslash); + + if (! fsysdep_move_file (zfile, zto, TRUE, FALSE, FALSE, + (const char *) NULL)) + { + ubuffree (zto); + return NULL; + } + + return zto; +} |