home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume26 / hp2pbm / part01 / mem.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-12-11  |  357 b   |  20 lines

  1. /*    Adapter clone routines 1.1 91/12/03 00:34:49 */
  2.  
  3. #ifdef    NOMEM
  4.  
  5. memcpy(to, from, len)
  6. char *to, *from;
  7. int len; {
  8.     /* Well, yeah, I could use Duff's device, but what the hey,
  9.        it's *your* fault for not having a decent O/S */
  10.     while(len--) *to++ = *from++;
  11. }
  12.  
  13. memset(buf, c, cnt)
  14. char *buf, c;
  15. int cnt; {
  16.     while(cnt--) *buf++ = c;
  17. }
  18.  
  19. #endif
  20.