source: buchla-68k/libsm/memset.c@ bf89cfb

Last change on this file since bf89cfb was bf89cfb, checked in by Thomas Lopatic <thomas@…>, 7 years ago

No more warnings in vlib.

  • Property mode set to 100644
File size: 426 bytes
RevLine 
[f40a309]1/*
2 =============================================================================
3 memset.c -- fill memory
4 Version 1 -- 1987-06-12
5
[5c13d64]6 Set an array of n chars starting at vp to the character c.
7 Return vp.
[f40a309]8 =============================================================================
9*/
10
[b28a12e]11#include "ram.h"
[6262b5c]12
[bf89cfb]13void *memset(void *vp, uint8_t c, int16_t n)
[f40a309]14{
[bf89cfb]15 uint8_t *cp = vp;
[f40a309]16
[5c13d64]17 while (--n >= 0)
18 *cp++ = c;
[f40a309]19
[5c13d64]20 return(vp);
[f40a309]21}
Note: See TracBrowser for help on using the repository browser.