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_stringify.c] - Blame information for rev 308

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
void
13
_DEFUN (argz_stringify, (argz, argz_len, sep),
14
       char *argz _AND
15
       size_t argz_len _AND
16
       int sep)
17
{
18
  size_t i;
19
 
20
  /* len includes trailing \0, which we don't want to replace. */
21
  if (argz_len > 1)
22
    for (i = 0; i < argz_len - 1; i++)
23
      {
24
        if (argz[i] == '\0')
25
          argz[i] = sep;
26
      }
27
}

powered by: WebSVN 2.1.0

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