fixes for host gcc 4.6.1
[zpugcc/jano.git] / toolchain / gcc / newlib / libc / argz / argz_count.c
blob0c8a816c1ad89ec6e3b10e7b89dac5cd370211bc
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 size_t
11 _DEFUN (argz_count, (argz, argz_len),
12 const char *argz _AND
13 size_t argz_len)
15 int i;
16 size_t count = 0;
18 for (i = 0; i < argz_len; i++)
20 if (argz[i] == '\0')
21 count++;
23 return count;