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

 
Output of file : 1106130A contained in archive : CUJ9306.ZIP
/* cp.c: Copy files */

#include
#include
#include
#include

extern int filecopy(char *, char *);
static void cp(char *, char *);

main(int argc, char **argv)
{
int i;
struct stat finfo;
char *target = argv[argc-1];

/* Make sure target is a directory */
assert(argc >= 3);
assert(stat(target,&finfo) == 0 &&
(finfo.st_mode & S_IFDIR));

/* Copy files */
for (i = 1; i < argc-1; ++i)
cp(argv[i],target);
return 0;
}

static void cp(char *file, char *target)
{
static char newfile[FILENAME_MAX];

/* Combine target and source file for a full pathname */
sprintf(newfile,"%s/%s",target,file);
fprintf(stderr,"copying %s to %s\n",file,newfile);
if (filecopy(file,newfile) != 0)
fputs("cp: Copy failed\n",stderr);
}



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

  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/