1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
/* Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
*/
#include <sys/stat.h>
#include <sys/types.h>
#include <stdio.h>
#define import_kernel
#define import_knames
#define import_spp
#include <iraf.h>
/* ZFRMDR -- Remove an existing directory.
*/
int
ZFRMDR (
PKCHAR *dir,
XINT *status
)
{
char osdir[SZ_PATHNAME];
register char *ip, *op;
/* Change pathnames like "a/b/c/" to "a/b/c". Probably not necessary,
* but...
*/
for (ip=(char *)dir, op=osdir; (*op = *ip++) != EOS; op++)
;
if (*--op == '/')
*op = EOS;
if (rmdir (osdir) == ERR)
*status = XERR;
else
*status = XOK;
return (*status);
}
|