Back to index

glibc  2.9
Functions
wmemset.c File Reference
#include <wchar.h>

Go to the source code of this file.

Functions

wchar_t * wmemset (wchar_t *s, wchar_t c, size_t n)

Function Documentation

wchar_t* wmemset ( wchar_t *  s,
wchar_t  c,
size_t  n 
)

Definition at line 24 of file wmemset.c.

{
  register wchar_t *wp = s;

  while (n >= 4)
    {
      wp[0] = c;
      wp[1] = c;
      wp[2] = c;
      wp[3] = c;
      wp += 4;
      n -= 4;
    }

  if (n > 0)
    {
      wp[0] = c;

      if (n > 1)
       {
         wp[1] = c;

         if (n > 2)
           wp[2] = c;
       }
    }

  return s;
}

Here is the caller graph for this function: