Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include
File: argz.h
/* Routines for dealing with '\0' separated arg vectors.
[0] Fix | Delete
Copyright (C) 1995-2018 Free Software Foundation, Inc.
[1] Fix | Delete
This file is part of the GNU C Library.
[2] Fix | Delete
[3] Fix | Delete
The GNU C Library is free software; you can redistribute it and/or
[4] Fix | Delete
modify it under the terms of the GNU Lesser General Public
[5] Fix | Delete
License as published by the Free Software Foundation; either
[6] Fix | Delete
version 2.1 of the License, or (at your option) any later version.
[7] Fix | Delete
[8] Fix | Delete
The GNU C Library is distributed in the hope that it will be useful,
[9] Fix | Delete
but WITHOUT ANY WARRANTY; without even the implied warranty of
[10] Fix | Delete
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
[11] Fix | Delete
Lesser General Public License for more details.
[12] Fix | Delete
[13] Fix | Delete
You should have received a copy of the GNU Lesser General Public
[14] Fix | Delete
License along with the GNU C Library; if not, see
[15] Fix | Delete
<http://www.gnu.org/licenses/>. */
[16] Fix | Delete
[17] Fix | Delete
#ifndef _ARGZ_H
[18] Fix | Delete
#define _ARGZ_H 1
[19] Fix | Delete
[20] Fix | Delete
#include <features.h>
[21] Fix | Delete
#include <errno.h>
[22] Fix | Delete
#include <string.h> /* Need size_t, and strchr is called below. */
[23] Fix | Delete
[24] Fix | Delete
__BEGIN_DECLS
[25] Fix | Delete
[26] Fix | Delete
/* error_t may or may not be available from errno.h, depending on the
[27] Fix | Delete
operating system. */
[28] Fix | Delete
#ifndef __error_t_defined
[29] Fix | Delete
# define __error_t_defined 1
[30] Fix | Delete
typedef int error_t;
[31] Fix | Delete
#endif
[32] Fix | Delete
[33] Fix | Delete
/* Make a '\0' separated arg vector from a unix argv vector, returning it in
[34] Fix | Delete
ARGZ, and the total length in LEN. If a memory allocation error occurs,
[35] Fix | Delete
ENOMEM is returned, otherwise 0. The result can be destroyed using free. */
[36] Fix | Delete
extern error_t __argz_create (char *const __argv[], char **__restrict __argz,
[37] Fix | Delete
size_t *__restrict __len) __THROW;
[38] Fix | Delete
extern error_t argz_create (char *const __argv[], char **__restrict __argz,
[39] Fix | Delete
size_t *__restrict __len) __THROW;
[40] Fix | Delete
[41] Fix | Delete
/* Make a '\0' separated arg vector from a SEP separated list in
[42] Fix | Delete
STRING, returning it in ARGZ, and the total length in LEN. If a
[43] Fix | Delete
memory allocation error occurs, ENOMEM is returned, otherwise 0.
[44] Fix | Delete
The result can be destroyed using free. */
[45] Fix | Delete
extern error_t argz_create_sep (const char *__restrict __string,
[46] Fix | Delete
int __sep, char **__restrict __argz,
[47] Fix | Delete
size_t *__restrict __len) __THROW;
[48] Fix | Delete
[49] Fix | Delete
/* Returns the number of strings in ARGZ. */
[50] Fix | Delete
extern size_t __argz_count (const char *__argz, size_t __len)
[51] Fix | Delete
__THROW __attribute_pure__;
[52] Fix | Delete
extern size_t argz_count (const char *__argz, size_t __len)
[53] Fix | Delete
__THROW __attribute_pure__;
[54] Fix | Delete
[55] Fix | Delete
/* Puts pointers to each string in ARGZ into ARGV, which must be large enough
[56] Fix | Delete
to hold them all. */
[57] Fix | Delete
extern void __argz_extract (const char *__restrict __argz, size_t __len,
[58] Fix | Delete
char **__restrict __argv) __THROW;
[59] Fix | Delete
extern void argz_extract (const char *__restrict __argz, size_t __len,
[60] Fix | Delete
char **__restrict __argv) __THROW;
[61] Fix | Delete
[62] Fix | Delete
/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
[63] Fix | Delete
except the last into the character SEP. */
[64] Fix | Delete
extern void __argz_stringify (char *__argz, size_t __len, int __sep) __THROW;
[65] Fix | Delete
extern void argz_stringify (char *__argz, size_t __len, int __sep) __THROW;
[66] Fix | Delete
[67] Fix | Delete
/* Append BUF, of length BUF_LEN to the argz vector in ARGZ & ARGZ_LEN. */
[68] Fix | Delete
extern error_t argz_append (char **__restrict __argz,
[69] Fix | Delete
size_t *__restrict __argz_len,
[70] Fix | Delete
const char *__restrict __buf, size_t __buf_len)
[71] Fix | Delete
__THROW;
[72] Fix | Delete
[73] Fix | Delete
/* Append STR to the argz vector in ARGZ & ARGZ_LEN. */
[74] Fix | Delete
extern error_t argz_add (char **__restrict __argz,
[75] Fix | Delete
size_t *__restrict __argz_len,
[76] Fix | Delete
const char *__restrict __str) __THROW;
[77] Fix | Delete
[78] Fix | Delete
/* Append SEP separated list in STRING to the argz vector in ARGZ &
[79] Fix | Delete
ARGZ_LEN. */
[80] Fix | Delete
extern error_t argz_add_sep (char **__restrict __argz,
[81] Fix | Delete
size_t *__restrict __argz_len,
[82] Fix | Delete
const char *__restrict __string, int __delim)
[83] Fix | Delete
__THROW;
[84] Fix | Delete
[85] Fix | Delete
/* Delete ENTRY from ARGZ & ARGZ_LEN, if it appears there. */
[86] Fix | Delete
extern void argz_delete (char **__restrict __argz,
[87] Fix | Delete
size_t *__restrict __argz_len,
[88] Fix | Delete
char *__restrict __entry) __THROW;
[89] Fix | Delete
[90] Fix | Delete
/* Insert ENTRY into ARGZ & ARGZ_LEN before BEFORE, which should be an
[91] Fix | Delete
existing entry in ARGZ; if BEFORE is NULL, ENTRY is appended to the end.
[92] Fix | Delete
Since ARGZ's first entry is the same as ARGZ, argz_insert (ARGZ, ARGZ_LEN,
[93] Fix | Delete
ARGZ, ENTRY) will insert ENTRY at the beginning of ARGZ. If BEFORE is not
[94] Fix | Delete
in ARGZ, EINVAL is returned, else if memory can't be allocated for the new
[95] Fix | Delete
ARGZ, ENOMEM is returned, else 0. */
[96] Fix | Delete
extern error_t argz_insert (char **__restrict __argz,
[97] Fix | Delete
size_t *__restrict __argz_len,
[98] Fix | Delete
char *__restrict __before,
[99] Fix | Delete
const char *__restrict __entry) __THROW;
[100] Fix | Delete
[101] Fix | Delete
/* Replace any occurrences of the string STR in ARGZ with WITH, reallocating
[102] Fix | Delete
ARGZ as necessary. If REPLACE_COUNT is non-zero, *REPLACE_COUNT will be
[103] Fix | Delete
incremented by number of replacements performed. */
[104] Fix | Delete
extern error_t argz_replace (char **__restrict __argz,
[105] Fix | Delete
size_t *__restrict __argz_len,
[106] Fix | Delete
const char *__restrict __str,
[107] Fix | Delete
const char *__restrict __with,
[108] Fix | Delete
unsigned int *__restrict __replace_count);
[109] Fix | Delete
[110] Fix | Delete
/* Returns the next entry in ARGZ & ARGZ_LEN after ENTRY, or NULL if there
[111] Fix | Delete
are no more. If entry is NULL, then the first entry is returned. This
[112] Fix | Delete
behavior allows two convenient iteration styles:
[113] Fix | Delete
[114] Fix | Delete
char *entry = 0;
[115] Fix | Delete
while ((entry = argz_next (argz, argz_len, entry)))
[116] Fix | Delete
...;
[117] Fix | Delete
[118] Fix | Delete
or
[119] Fix | Delete
[120] Fix | Delete
char *entry;
[121] Fix | Delete
for (entry = argz; entry; entry = argz_next (argz, argz_len, entry))
[122] Fix | Delete
...;
[123] Fix | Delete
*/
[124] Fix | Delete
extern char *__argz_next (const char *__restrict __argz, size_t __argz_len,
[125] Fix | Delete
const char *__restrict __entry) __THROW;
[126] Fix | Delete
extern char *argz_next (const char *__restrict __argz, size_t __argz_len,
[127] Fix | Delete
const char *__restrict __entry) __THROW;
[128] Fix | Delete
[129] Fix | Delete
#ifdef __USE_EXTERN_INLINES
[130] Fix | Delete
__extern_inline char *
[131] Fix | Delete
__NTH (__argz_next (const char *__argz, size_t __argz_len,
[132] Fix | Delete
const char *__entry))
[133] Fix | Delete
{
[134] Fix | Delete
if (__entry)
[135] Fix | Delete
{
[136] Fix | Delete
if (__entry < __argz + __argz_len)
[137] Fix | Delete
__entry = strchr (__entry, '\0') + 1;
[138] Fix | Delete
[139] Fix | Delete
return __entry >= __argz + __argz_len ? (char *) NULL : (char *) __entry;
[140] Fix | Delete
}
[141] Fix | Delete
else
[142] Fix | Delete
return __argz_len > 0 ? (char *) __argz : 0;
[143] Fix | Delete
}
[144] Fix | Delete
__extern_inline char *
[145] Fix | Delete
__NTH (argz_next (const char *__argz, size_t __argz_len,
[146] Fix | Delete
const char *__entry))
[147] Fix | Delete
{
[148] Fix | Delete
return __argz_next (__argz, __argz_len, __entry);
[149] Fix | Delete
}
[150] Fix | Delete
#endif /* Use extern inlines. */
[151] Fix | Delete
[152] Fix | Delete
__END_DECLS
[153] Fix | Delete
[154] Fix | Delete
#endif /* argz.h */
[155] Fix | Delete
[156] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function