home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / YADME10.LHA / YADME10 / src / unix.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-19  |  620 b   |  33 lines

  1. /* These functions replace the functions  which were previously   */
  2. /* linked from SAS/C lcr.lib, which is not available for MaxonC++ */
  3.  
  4. #include <string.h>
  5. #include <stdio.h>
  6.  
  7. void *movmem(const void *from, void *to, int len)
  8. {
  9.    return memmove(to, from, len);
  10. }
  11.  
  12. void *setmem(void *mem, int num, int value)
  13. {
  14.    return memset(mem, value, num);
  15. }
  16.  
  17. void strins(char *to, const char *from)
  18. {
  19.    char *tmp = (char *)malloc((size_t)(strlen(to) + 1));
  20.    if (tmp)
  21.    {
  22.       strcpy(tmp, to);
  23.       strcpy(to, from);
  24.       strcat(to, tmp);
  25.       free(tmp);
  26.    }
  27. }
  28.  
  29. int unlink(const char *name)
  30. {
  31.    return remove(name);
  32. }
  33.