elks-enhanced
public
Read
Owner: themaster
Branch: master
Commits: 6893
Updated: 2026-04-19 00:15
Git CLI clone URL
git clone https://www.xt-emporium.com/git/elks-enhanced.git
Fullscreen desktop URL
Code
Commits
History
Branches
Bug Reports
Discussions
Compare
Settings
elks-enhanced
/
elkscmd
/
busyelks
/
cmd
/
rm.c
File editor
#include <string.h> #include <sys/stat.h> #include <unistd.h> int rm_main (argc,argv) int argc; char **argv; { int i/*, recurse = 0, interact =0*/; struct stat sbuf; int fd,er; /* if (((argv[1][0] == '-') && (argv[1][1] == 'r')) || ((argv[2][0] == '-') && (argv[2][1] == 'r'))) recurse = 1; if (((argv[1][0] == '-') && (argv[1][1] == 'i')) || ((argv[2][0] == '-') && (argv[2][1] == 'i'))) interact = 1; */ for(i=/*recurse+interact+*/1;i<argc;i++) { if (argv[i][0] != '-') { if (!lstat(argv[i],&sbuf)) { if (unlink(argv[i])) { write(STDERR_FILENO,"rm: could not remove ",21); write(STDERR_FILENO,argv[i],strlen(argv[i])); write(STDERR_FILENO,"\n",1); exit(1); } } } } exit(0); }
Commit message
This repository is read-only for this account.
Repository snapshot
Current branch
master
Visibility
public
Your access
Read
Remote
Configured
File activity
View file history