mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
1998-09-04 Roland McGrath <roland@baalperazim.frob.com>
* string/argz.h (argz_extract, argz_next): Use `const' for ARGZ param. * string/argz-next.c, string/argz-extract.c: Fix defns.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
1998-09-04 Roland McGrath <roland@baalperazim.frob.com>
|
||||||
|
|
||||||
|
* string/argz.h (argz_extract, argz_next): Use `const' for ARGZ param.
|
||||||
|
* string/argz-next.c, string/argz-extract.c: Fix defns.
|
||||||
|
|
||||||
1998-09-03 Roland McGrath <roland@baalperazim.frob.com>
|
1998-09-03 Roland McGrath <roland@baalperazim.frob.com>
|
||||||
|
|
||||||
* mach/Makefile: Use -include for mach-syscalls.mk to silence warning.
|
* mach/Makefile: Use -include for mach-syscalls.mk to silence warning.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/* Routines for dealing with '\0' separated arg vectors.
|
/* Routines for dealing with '\0' separated arg vectors.
|
||||||
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
Copyright (C) 1995, 96, 97, 98 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Written by Miles Bader <miles@gnu.ai.mit.edu>
|
Written by Miles Bader <miles@gnu.org>
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU Library General Public License as
|
modify it under the terms of the GNU Library General Public License as
|
||||||
@ -23,7 +23,7 @@
|
|||||||
/* Puts pointers to each string in ARGZ, plus a terminating 0 element, into
|
/* Puts pointers to each string in ARGZ, plus a terminating 0 element, into
|
||||||
ARGV, which must be large enough to hold them all. */
|
ARGV, which must be large enough to hold them all. */
|
||||||
void
|
void
|
||||||
__argz_extract (char *argz, size_t len, char **argv)
|
__argz_extract (const char *argz, size_t len, char **argv)
|
||||||
{
|
{
|
||||||
while (len > 0)
|
while (len > 0)
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/* Iterate through the elements of an argz block.
|
/* Iterate through the elements of an argz block.
|
||||||
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
Copyright (C) 1995, 96, 97, 98 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Written by Miles Bader <miles@gnu.ai.mit.edu>
|
Written by Miles Bader <miles@gnu.org>
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU Library General Public License as
|
modify it under the terms of the GNU Library General Public License as
|
||||||
@ -22,7 +22,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
char *
|
char *
|
||||||
__argz_next (char *argz, size_t argz_len, const char *entry)
|
__argz_next (const char *argz, size_t argz_len, const char *entry)
|
||||||
{
|
{
|
||||||
if (entry)
|
if (entry)
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* Routines for dealing with '\0' separated arg vectors.
|
/* Routines for dealing with '\0' separated arg vectors.
|
||||||
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
Copyright (C) 1995, 96, 97, 98 Free Software Foundation, Inc.
|
||||||
Written by Miles Bader <miles@gnu.ai.mit.edu>
|
Written by Miles Bader <miles@gnu.org>
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU Library General Public License as
|
modify it under the terms of the GNU Library General Public License as
|
||||||
@ -60,8 +60,10 @@ extern size_t argz_count __P ((__const char *__argz, size_t __len));
|
|||||||
|
|
||||||
/* Puts pointers to each string in ARGZ into ARGV, which must be large enough
|
/* Puts pointers to each string in ARGZ into ARGV, which must be large enough
|
||||||
to hold them all. */
|
to hold them all. */
|
||||||
extern void __argz_extract __P ((char *__argz, size_t __len, char **__argv));
|
extern void __argz_extract __P ((__const char *__argz, size_t __len,
|
||||||
extern void argz_extract __P ((char *__argz, size_t __len, char **__argv));
|
char **__argv));
|
||||||
|
extern void argz_extract __P ((__const char *__argz, size_t __len,
|
||||||
|
char **__argv));
|
||||||
|
|
||||||
/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
|
/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
|
||||||
except the last into the character SEP. */
|
except the last into the character SEP. */
|
||||||
@ -128,14 +130,14 @@ extern error_t argz_replace (char **__argz, size_t *__argz_len,
|
|||||||
for (entry = argz; entry; entry = argz_next (argz, argz_len, entry))
|
for (entry = argz; entry; entry = argz_next (argz, argz_len, entry))
|
||||||
...;
|
...;
|
||||||
*/
|
*/
|
||||||
extern char *__argz_next __P ((char *argz, size_t __argz_len,
|
extern char *__argz_next __P ((__const char *argz, size_t __argz_len,
|
||||||
__const char *entry));
|
__const char *entry));
|
||||||
extern char *argz_next __P ((char *argz, size_t __argz_len,
|
extern char *argz_next __P ((__const char *argz, size_t __argz_len,
|
||||||
__const char *entry));
|
__const char *entry));
|
||||||
|
|
||||||
#ifdef __USE_EXTERN_INLINES
|
#ifdef __USE_EXTERN_INLINES
|
||||||
extern inline char *
|
extern inline char *
|
||||||
__argz_next (char *__argz, size_t __argz_len, __const char *__entry)
|
__argz_next (__const char *__argz, size_t __argz_len, __const char *__entry)
|
||||||
{
|
{
|
||||||
if (__entry)
|
if (__entry)
|
||||||
{
|
{
|
||||||
@ -148,7 +150,7 @@ __argz_next (char *__argz, size_t __argz_len, __const char *__entry)
|
|||||||
return __argz_len > 0 ? __argz : 0;
|
return __argz_len > 0 ? __argz : 0;
|
||||||
}
|
}
|
||||||
extern inline char *
|
extern inline char *
|
||||||
argz_next (char *__argz, size_t __argz_len, __const char *__entry)
|
argz_next (__const char *__argz, size_t __argz_len, __const char *__entry)
|
||||||
{
|
{
|
||||||
return __argz_next (__argz, __argz_len, __entry);
|
return __argz_next (__argz, __argz_len, __entry);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user