home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 1 / FishNMoreVol1.bin / more / code_examples / librar / copee.c < prev    next >
Text File  |  1989-02-08  |  576b  |  27 lines

  1. /*--------------------------------------*/
  2. /*                    */
  3. /*              COPEE(X,X)        */
  4. /*                    */
  5. /* Copies the file given in the first    */
  6. /* argument to the file given in the    */
  7. /* second argument.  If there is a    */
  8. /* problem with the copying, a -1 is    */
  9. /* returned.  Otherwise, a zero is    */
  10. /* returned.                */
  11. /*                    */
  12. /*--------------------------------------*/
  13. # include "stdlib.h"
  14. copee(a,b)
  15. char *a,*b;
  16. {
  17.     char r[80],s[80];
  18.     int d;
  19.     putstring("copy ",r,80);
  20.     r[5]=0;
  21.     stradd(r,a,s);
  22.     stradd(s," ",r);
  23.     stradd(r,b,s);
  24.     d=system(s);
  25.     return(d);
  26. }
  27.