Cygwin: mmap: allow remapping part of an existing anonymous mapping
[newlib-cygwin.git] / newlib / libc / argz / argz_count.c
blob4c0007ce23bfeb7fc6a22541a728d65646b3d490
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 <argz.h>
9 #include <stddef.h>
10 #include <sys/types.h>
12 size_t
13 argz_count (const char *argz,
14 size_t argz_len)
16 int i;
17 size_t count = 0;
19 for (i = 0; i < argz_len; i++)
21 if (argz[i] == '\0')
22 count++;
24 return count;