Category : Files from Magazines
Archive   : CUJ9306.ZIP
Filename : 1106132A

 
Output of file : 1106132A contained in archive : CUJ9306.ZIP
/* list.c: Print a directory listing */

#include
#include
#include
#include
#include
#include
#include

static char *attr_str(short attr);

main()
{
DIR *dirp = opendir("."); /* Current dir */
struct dirent *entry;
struct stat finfo;

assert(dirp);
while ((entry = readdir(dirp)) != NULL)
{
stat(entry->d_name,&finfo);
printf(
"%-12.12s %s %8ld %s",
strlwr(entry->d_name),
attr_str(finfo.st_mode),
finfo.st_size,
ctime(&finfo.st_mtime)
);
}
closedir(dirp);
return 0;
}

static char *attr_str(short attr)
{
static char s[4];

strcpy(s,"---");
if (attr & S_IFDIR)
s[0] = 'd';
if (attr & S_IREAD)
s[1] = 'r';
if (attr & S_IWRITE)
s[2] = 'w';
return s;
}



  3 Responses to “Category : Files from Magazines
Archive   : CUJ9306.ZIP
Filename : 1106132A

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/