ack42/
ack42/npcs/a/
ack42/npcs/c/
ack42/npcs/e/
ack42/npcs/f/
ack42/npcs/h/
ack42/npcs/i/
ack42/npcs/l/
ack42/npcs/n/
ack42/npcs/o/
ack42/npcs/p/
ack42/npcs/r/
ack42/npcs/s/
ack42/npcs/w/
ack42/player/c/
ack42/player/s/
ack42/player/z/
/* copies one file from unix to dos */

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "doshack.h"

int main(int argc, char ** argv)
{
 char * temp;
 FILE * temp_file;
 char buffer[2048];
 char src[256],dest[256];

 if (argc < 3)
 { 
  printf("Usage: mydos <unix-file> <dos-file>\n");
  return 1;
 }
 
 strcpy(src,argv[1]);
 strcpy(dest,argv[2]);
 
 temp_file=fopen(src,"r");
 if (temp_file==NULL)
 {
  fprintf(stderr,"Cannot open file %s.\n",argv[1]);
  return 1;
 }
 else
  fclose(temp_file);
  
 temp=dos_fname(dest,ACT_CREATE);
 
 if (temp==NULL)
 {
  fprintf(stderr,"Cannot create a destination file.\n");
  return 1;
 }
 
 strcpy(buffer,"cp -v ");
 strcat(buffer,argv[1]);
 strcat(buffer," ");
 strcat(buffer,temp);

 system(buffer);

 exit (0); 
 return 0;
}