fixes for host gcc 4.6.1
[zpugcc/jano.git] / toolchain / gcc / newlib / libc / argz / argz_stringify.c
blob6ff5dd0013c1dbda229f33c91976b8b69db61731
1 /* Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
3 * Permission to use, copy, modify, and distribute this software
4 * is freely granted, provided that this notice is preserved.
5 */
7 #include <_ansi.h>
8 #include <sys/types.h>
10 void
11 _DEFUN (argz_stringify, (argz, argz_len, sep),
12 char *argz _AND
13 size_t argz_len _AND
14 int sep)
16 size_t i;
18 /* len includes trailing \0, which we don't want to replace. */
19 for (i = 0; i < argz_len - 1; i++)
21 if (argz[i] == '\0')
22 argz[i] = sep;