OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [newlib-1.18.0/] [newlib-1.18.0-or32-1.0rc2/] [newlib/] [libc/] [argz/] [argz_count.c] - Blame information for rev 520

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 207 jeremybenn
/* Copyright (C) 2002 by  Red Hat, Incorporated. All rights reserved.
2
 *
3
 * Permission to use, copy, modify, and distribute this software
4
 * is freely granted, provided that this notice is preserved.
5
 */
6
 
7
#include <_ansi.h>
8
#include <argz.h>
9
#include <stddef.h>
10
#include <sys/types.h>
11
 
12
size_t
13
_DEFUN (argz_count, (argz, argz_len),
14
       const char *argz _AND
15
       size_t argz_len)
16
{
17
  int i;
18
  size_t count = 0;
19
 
20
  for (i = 0; i < argz_len; i++)
21
    {
22
      if (argz[i] == '\0')
23
        count++;
24
    }
25
  return count;
26
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.