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

  1. /*--------------------------------------*/
  2. /*                    */
  3. /*             FTRANS(X,X,X)            */
  4. /*                    */
  5. /* Transfers data from one file to      */
  6. /* another.  The first argument is the  */
  7. /* sending file descripter. The second  */
  8. /* is the receiving file descripter. The*/
  9. /* third argument is the number of bytes*/
  10. /* to transfer.                */
  11. /*                    */
  12. /*--------------------------------------*/
  13. # include "stdio.h"
  14. void ftrans(fd1,fd2,a)
  15. int a;
  16. FILE *fd1,*fd2;
  17. {
  18.         int j;
  19.         for (j=0;j<a;j++)
  20.              putc(getc(fd1),fd2);
  21. }
  22.