Changeset 5c13d64 in buchla-68k for libsm/memcpy.c


Ignore:
Timestamp:
07/09/2017 01:36:31 PM (7 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
0292fbb
Parents:
002f873
Message:

Use void pointers for mem*() functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libsm/memcpy.c

    r002f873 r5c13d64  
    44        Version 1 -- 1987-06-12
    55
    6         Copy s2 to s1, always copy n bytes.
    7         Return s1.
     6        Copy vp2 to vp1, always copy n bytes.
     7        Return vp1.
    88   =============================================================================
    99 */
    1010
    11 char *memcpy(char *s1, char *s2, int n)
     11void *memcpy(void *vp1, void *vp2, int n)
    1212{
    13         register char *os1 = s1;
     13        char *cp1 = vp1;
     14        char *cp2 = vp2;
    1415
    15         while (--n >= 0)
    16                 *s1++ = *s2++;
    17         return (os1);
     16        while (--n >= 0)
     17                *cp1++ = *cp2++;
     18
     19        return(vp1);
    1820}
Note: See TracChangeset for help on using the changeset viewer.