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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.17.0/] [newlib/] [libc/] [argz/] [argz_count.c] - Blame information for rev 171

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 148 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.