DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: ┃ T d ┃
Length: 1857 (0x741) Types: TextFile Names: »delete_f.c«
└─⟦8ee07855d⟧ Bits:30000545 8mm tape, Rational 1000, DTIA 2_1_6 └─ ⟦0c25cb74a⟧ »DATA« └─⟦038380b96⟧ └─⟦d0624311f⟧ Bits:30000529 8mm tape, Rational 1000, DTIA 2_1_7 └─ ⟦f494b5154⟧ »DATA« └─⟦038380b96⟧ └─ ⟦this⟧ »delete_f.c« └─⟦8ee07855d⟧ Bits:30000545 8mm tape, Rational 1000, DTIA 2_1_6 └─ ⟦0c25cb74a⟧ »DATA« └─⟦0732ea0cf⟧ └─⟦d0624311f⟧ Bits:30000529 8mm tape, Rational 1000, DTIA 2_1_7 └─ ⟦f494b5154⟧ »DATA« └─⟦0732ea0cf⟧ └─ ⟦this⟧ »../../dtia/release_apollo_2.1/delete_f.c« └─⟦8ee07855d⟧ Bits:30000545 8mm tape, Rational 1000, DTIA 2_1_6 └─ ⟦0c25cb74a⟧ »DATA« └─⟦25fab149a⟧ └─⟦d0624311f⟧ Bits:30000529 8mm tape, Rational 1000, DTIA 2_1_7 └─ ⟦f494b5154⟧ »DATA« └─⟦25fab149a⟧ └─ ⟦this⟧ »../../dtia/release_sun_2.1/delete_f.c« └─⟦8ee07855d⟧ Bits:30000545 8mm tape, Rational 1000, DTIA 2_1_6 └─ ⟦0c25cb74a⟧ »DATA« └─⟦be254d495⟧ └─⟦d0624311f⟧ Bits:30000529 8mm tape, Rational 1000, DTIA 2_1_7 └─ ⟦f494b5154⟧ »DATA« └─⟦be254d495⟧ └─ ⟦this⟧ »../../dtia/release_aix_2.1/delete_f.c« └─⟦8ee07855d⟧ Bits:30000545 8mm tape, Rational 1000, DTIA 2_1_6 └─ ⟦0c25cb74a⟧ »DATA« └─⟦c67979795⟧ └─⟦d0624311f⟧ Bits:30000529 8mm tape, Rational 1000, DTIA 2_1_7 └─ ⟦f494b5154⟧ »DATA« └─⟦c67979795⟧ └─ ⟦this⟧ »../../dtia/release_hp_2.1/delete_f.c«
#ifndef lint #ifndef DEBUG static char SCCS_id[] = "@(#)delete_f.c 2.1 90/08/02 19:04:46 Copyright(c) 1990 by Rational."; #else static char SCCS_id[] = "@(#)delete_f.c DEBUG 2.1 90/08/02 19:04:46 Copyright(c) 1990 by Rational."; #endif #endif #define DELETE_F #include "talk.h" #undef DELETE_F extern int errno; static int error_number=E_OK; static int recursive=FALSE; int delete_f_recursive_in(r) int r; { recursive = r; error_number = E_OK; return E_OK; } #define ISDIR(ss) (ss.st_mode&S_IFDIR) /* Is it a directory ? */ static int delete_recursive(s) char *s; { struct stat st; DIR *dirp; #ifdef APOLLO struct direct *dp; #define NULL_DP ((struct direct *)NULL) #else struct dirent *dp; #define NULL_DP ((struct dirent *)NULL) #endif if (stat(s,&st) == -1) { error_number = errno; return -1; } if (!ISDIR(st)) { if (unlink(s) == -1) { error_number = errno; return -1; } } else { if (chdir(s) == -1) { error_number = errno; return -1; } dirp = opendir("."); if (dirp == (DIR *)NULL) { error_number = errno; return -1; } for (dp=readdir(dirp);dp!=NULL_DP;dp=readdir(dirp)) { if (dp->d_name[0] == '.') continue; if (delete_recursive(dp->d_name) == -1) { closedir(dirp); return -1; } } closedir(dirp); if (chdir("..") == -1) { error_number = errno; return -1; } if (rmdir(s) == -1) { error_number = errno; return -1; } } return E_OK; } int delete_f_remote_file_in(str) char *str; { struct stat st; int error; if (recursive) { error = delete_recursive(str); chdir(get_user_home()); } else { error= (stat(str,&st) == -1) ? -1 : (ISDIR(st) ? rmdir(str) : unlink(str)); if (error == -1) error_number = errno; } return E_OK; } int delete_f_options_in(options) char *options; { return E_OK; } int delete_f_end() { return error_number; }