mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
2002-08-03 Roland McGrath <roland@redhat.com>
* include/envz.h: Use libc_hidden_proto for envz_entry, enz_remove. * include/argz.h: Use libc_hidden_proto for argz_delete. * string/argz-delete.c: Add libc_hidden_def. * string/envz.c: Likewise. Use <envz.h>, not "envz.h".
This commit is contained in:
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
#include <string/argz.h>
|
#include <string/argz.h>
|
||||||
|
|
||||||
|
libc_hidden_proto (argz_delete)
|
||||||
|
|
||||||
extern size_t __argz_count_internal (__const char *__argz, size_t __len)
|
extern size_t __argz_count_internal (__const char *__argz, size_t __len)
|
||||||
__attribute_pure__ attribute_hidden;
|
__attribute_pure__ attribute_hidden;
|
||||||
extern void __argz_stringify_internal (char *__argz, size_t __len, int __sep)
|
extern void __argz_stringify_internal (char *__argz, size_t __len, int __sep)
|
||||||
|
@ -1 +1,8 @@
|
|||||||
|
#ifndef _ENVZ_H
|
||||||
|
|
||||||
#include <string/envz.h>
|
#include <string/envz.h>
|
||||||
|
|
||||||
|
libc_hidden_proto (envz_entry)
|
||||||
|
libc_hidden_proto (envz_remove)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -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,2002 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 Lesser General Public
|
modify it under the terms of the GNU Lesser General Public
|
||||||
@ -39,3 +39,4 @@ argz_delete (char **argz, size_t *argz_len, char *entry)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
libc_hidden_def (argz_delete)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/* Routines for dealing with '\0' separated environment vectors
|
/* Routines for dealing with '\0' separated environment vectors
|
||||||
Copyright (C) 1995, 1996, 1997, 1998, 2001 Free Software Foundation, Inc.
|
Copyright (C) 1995,96,97,98,2001,02 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 Lesser General Public
|
modify it under the terms of the GNU Lesser General Public
|
||||||
@ -21,7 +21,7 @@
|
|||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "envz.h"
|
#include <envz.h>
|
||||||
|
|
||||||
/* The character separating names from values in an envz. */
|
/* The character separating names from values in an envz. */
|
||||||
#define SEP '='
|
#define SEP '='
|
||||||
@ -54,6 +54,7 @@ envz_entry (const char *envz, size_t envz_len, const char *name)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
libc_hidden_def (envz_entry)
|
||||||
|
|
||||||
/* Returns a pointer to the value portion of the entry in ENVZ for NAME, or 0
|
/* Returns a pointer to the value portion of the entry in ENVZ for NAME, or 0
|
||||||
if there is none. */
|
if there is none. */
|
||||||
@ -81,6 +82,7 @@ envz_remove (char **envz, size_t *envz_len, const char *name)
|
|||||||
if (entry)
|
if (entry)
|
||||||
argz_delete (envz, envz_len, entry);
|
argz_delete (envz, envz_len, entry);
|
||||||
}
|
}
|
||||||
|
libc_hidden_def (envz_remove)
|
||||||
|
|
||||||
/* Adds an entry for NAME with value VALUE to ENVZ & ENVZ_LEN. If an entry
|
/* Adds an entry for NAME with value VALUE to ENVZ & ENVZ_LEN. If an entry
|
||||||
with the same name already exists in ENVZ, it is removed. If VALUE is
|
with the same name already exists in ENVZ, it is removed. If VALUE is
|
||||||
|
Reference in New Issue
Block a user