Welcome to mirror list, hosted at ThFree Co, Russian Federation.

argz_stringify.c « argz « libc « newlib - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 739c9e1ec63098b7c73ab4b63aabc04215e48f45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* Copyright (C) 2002 by  Red Hat, Incorporated. All rights reserved.
 *
 * Permission to use, copy, modify, and distribute this software
 * is freely granted, provided that this notice is preserved.
 */

#include <sys/types.h>

void
argz_stringify (char *argz, size_t argz_len, int sep)
{
  size_t i;

  /* len includes trailing \0, which we don't want to replace. */
  for (i = 0; i < argz_len - 1; i++)
    {
      if (argz[i] == '\0')
        argz[i] = sep;
    }
}