home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / lan / soss.arj / RPC / BCOPY.C < prev    next >
C/C++ Source or Header  |  1991-02-22  |  849b  |  61 lines

  1. /*
  2.  *  bcopy.c --
  3.  *      Implements bcopy(2) and bzero(2) byte operations.
  4.  *
  5.  *  Author:
  6.  *      See-Mong Tan, 6/26/88
  7.  */
  8.  
  9. #include <stdio.h>
  10.  
  11. /*
  12.  *  bcopy(char *s1, char *s2, int len) --
  13.  *      Copies len bytes from s1 to s2
  14.  */
  15. bcopy(s1, s2, len)
  16.     char *s1, *s2;
  17.     int len;
  18. {
  19.     for(; len > 0; len--)
  20.         *s2++ = *s1++;
  21. }
  22.  
  23. bcopy_nf(s1, s2, len)
  24.     char *s1;
  25.     char far *s2;
  26.     int len;
  27. {
  28.     for(; len > 0; len--)
  29.         *s2++ = *s1++;
  30. }
  31.  
  32. bcopy_fn(s1, s2, len)
  33.     char far *s1;
  34.     char *s2;
  35.     int len;
  36. {
  37.     for(; len > 0; len--)
  38.         *s2++ = *s1++;
  39. }
  40.  
  41. bcopy_ff(s1, s2, len)
  42.     char far *s1;
  43.     char far *s2;
  44.     int len;
  45. {
  46.     for(; len > 0; len--)
  47.         *s2++ = *s1++;
  48. }
  49.  
  50. /*
  51.  *  bzero(char *s, int len) --
  52.  *      Places len zero byes in s
  53.  */
  54. bzero(s, len)
  55.     char *s;
  56.     int len;
  57. {
  58.     for(; len > 0; len--)
  59.         *s++ = (char) 0;
  60. }
  61.