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] - Diff between revs 207 and 520

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 207 Rev 520
/* Copyright (C) 2002 by  Red Hat, Incorporated. All rights reserved.
/* Copyright (C) 2002 by  Red Hat, Incorporated. All rights reserved.
 *
 *
 * Permission to use, copy, modify, and distribute this software
 * Permission to use, copy, modify, and distribute this software
 * is freely granted, provided that this notice is preserved.
 * is freely granted, provided that this notice is preserved.
 */
 */
 
 
#include <_ansi.h>
#include <_ansi.h>
#include <argz.h>
#include <argz.h>
#include <stddef.h>
#include <stddef.h>
#include <sys/types.h>
#include <sys/types.h>
 
 
size_t
size_t
_DEFUN (argz_count, (argz, argz_len),
_DEFUN (argz_count, (argz, argz_len),
       const char *argz _AND
       const char *argz _AND
       size_t argz_len)
       size_t argz_len)
{
{
  int i;
  int i;
  size_t count = 0;
  size_t count = 0;
 
 
  for (i = 0; i < argz_len; i++)
  for (i = 0; i < argz_len; i++)
    {
    {
      if (argz[i] == '\0')
      if (argz[i] == '\0')
        count++;
        count++;
    }
    }
  return count;
  return count;
}
}
 
 

powered by: WebSVN 2.1.0

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