Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/bind9/isc
File: string.h
/*
[0] Fix | Delete
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
[1] Fix | Delete
*
[2] Fix | Delete
* This Source Code Form is subject to the terms of the Mozilla Public
[3] Fix | Delete
* License, v. 2.0. If a copy of the MPL was not distributed with this
[4] Fix | Delete
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
[5] Fix | Delete
*
[6] Fix | Delete
* See the COPYRIGHT file distributed with this work for additional
[7] Fix | Delete
* information regarding copyright ownership.
[8] Fix | Delete
*/
[9] Fix | Delete
[10] Fix | Delete
#ifndef ISC_STRING_H
[11] Fix | Delete
#define ISC_STRING_H 1
[12] Fix | Delete
[13] Fix | Delete
/*! \file isc/string.h */
[14] Fix | Delete
[15] Fix | Delete
#include <inttypes.h>
[16] Fix | Delete
[17] Fix | Delete
#include <isc/formatcheck.h>
[18] Fix | Delete
#include <isc/lang.h>
[19] Fix | Delete
#include <isc/platform.h>
[20] Fix | Delete
#include <isc/types.h>
[21] Fix | Delete
[22] Fix | Delete
#include <string.h>
[23] Fix | Delete
[24] Fix | Delete
#ifdef ISC_PLATFORM_HAVESTRINGSH
[25] Fix | Delete
#include <strings.h>
[26] Fix | Delete
#endif
[27] Fix | Delete
[28] Fix | Delete
#define ISC_STRING_MAGIC 0x5e
[29] Fix | Delete
[30] Fix | Delete
ISC_LANG_BEGINDECLS
[31] Fix | Delete
[32] Fix | Delete
uint64_t
[33] Fix | Delete
isc_string_touint64(char *source, char **endp, int base);
[34] Fix | Delete
/*%<
[35] Fix | Delete
* Convert the string pointed to by 'source' to uint64_t.
[36] Fix | Delete
*
[37] Fix | Delete
* On successful conversion 'endp' points to the first character
[38] Fix | Delete
* after conversion is complete.
[39] Fix | Delete
*
[40] Fix | Delete
* 'base': 0 or 2..36
[41] Fix | Delete
*
[42] Fix | Delete
* If base is 0 the base is computed from the string type.
[43] Fix | Delete
*
[44] Fix | Delete
* On error 'endp' points to 'source'.
[45] Fix | Delete
*/
[46] Fix | Delete
[47] Fix | Delete
isc_result_t
[48] Fix | Delete
isc_string_copy(char *target, size_t size, const char *source);
[49] Fix | Delete
/*
[50] Fix | Delete
* Copy the string pointed to by 'source' to 'target' which is a
[51] Fix | Delete
* pointer to a string of at least 'size' bytes.
[52] Fix | Delete
*
[53] Fix | Delete
* Requires:
[54] Fix | Delete
* 'target' is a pointer to a char[] of at least 'size' bytes.
[55] Fix | Delete
* 'size' an integer > 0.
[56] Fix | Delete
* 'source' == NULL or points to a NUL terminated string.
[57] Fix | Delete
*
[58] Fix | Delete
* Ensures:
[59] Fix | Delete
* If result == ISC_R_SUCCESS
[60] Fix | Delete
* 'target' will be a NUL terminated string of no more
[61] Fix | Delete
* than 'size' bytes (including NUL).
[62] Fix | Delete
*
[63] Fix | Delete
* If result == ISC_R_NOSPACE
[64] Fix | Delete
* 'target' is undefined.
[65] Fix | Delete
*
[66] Fix | Delete
* Returns:
[67] Fix | Delete
* ISC_R_SUCCESS -- 'source' was successfully copied to 'target'.
[68] Fix | Delete
* ISC_R_NOSPACE -- 'source' could not be copied since 'target'
[69] Fix | Delete
* is too small.
[70] Fix | Delete
*/
[71] Fix | Delete
[72] Fix | Delete
void
[73] Fix | Delete
isc_string_copy_truncate(char *target, size_t size, const char *source);
[74] Fix | Delete
/*
[75] Fix | Delete
* Copy the string pointed to by 'source' to 'target' which is a
[76] Fix | Delete
* pointer to a string of at least 'size' bytes.
[77] Fix | Delete
*
[78] Fix | Delete
* Requires:
[79] Fix | Delete
* 'target' is a pointer to a char[] of at least 'size' bytes.
[80] Fix | Delete
* 'size' an integer > 0.
[81] Fix | Delete
* 'source' == NULL or points to a NUL terminated string.
[82] Fix | Delete
*
[83] Fix | Delete
* Ensures:
[84] Fix | Delete
* 'target' will be a NUL terminated string of no more
[85] Fix | Delete
* than 'size' bytes (including NUL).
[86] Fix | Delete
*/
[87] Fix | Delete
[88] Fix | Delete
isc_result_t
[89] Fix | Delete
isc_string_append(char *target, size_t size, const char *source);
[90] Fix | Delete
/*
[91] Fix | Delete
* Append the string pointed to by 'source' to 'target' which is a
[92] Fix | Delete
* pointer to a NUL terminated string of at least 'size' bytes.
[93] Fix | Delete
*
[94] Fix | Delete
* Requires:
[95] Fix | Delete
* 'target' is a pointer to a NUL terminated char[] of at
[96] Fix | Delete
* least 'size' bytes.
[97] Fix | Delete
* 'size' an integer > 0.
[98] Fix | Delete
* 'source' == NULL or points to a NUL terminated string.
[99] Fix | Delete
*
[100] Fix | Delete
* Ensures:
[101] Fix | Delete
* If result == ISC_R_SUCCESS
[102] Fix | Delete
* 'target' will be a NUL terminated string of no more
[103] Fix | Delete
* than 'size' bytes (including NUL).
[104] Fix | Delete
*
[105] Fix | Delete
* If result == ISC_R_NOSPACE
[106] Fix | Delete
* 'target' is undefined.
[107] Fix | Delete
*
[108] Fix | Delete
* Returns:
[109] Fix | Delete
* ISC_R_SUCCESS -- 'source' was successfully appended to 'target'.
[110] Fix | Delete
* ISC_R_NOSPACE -- 'source' could not be appended since 'target'
[111] Fix | Delete
* is too small.
[112] Fix | Delete
*/
[113] Fix | Delete
[114] Fix | Delete
void
[115] Fix | Delete
isc_string_append_truncate(char *target, size_t size, const char *source);
[116] Fix | Delete
/*
[117] Fix | Delete
* Append the string pointed to by 'source' to 'target' which is a
[118] Fix | Delete
* pointer to a NUL terminated string of at least 'size' bytes.
[119] Fix | Delete
*
[120] Fix | Delete
* Requires:
[121] Fix | Delete
* 'target' is a pointer to a NUL terminated char[] of at
[122] Fix | Delete
* least 'size' bytes.
[123] Fix | Delete
* 'size' an integer > 0.
[124] Fix | Delete
* 'source' == NULL or points to a NUL terminated string.
[125] Fix | Delete
*
[126] Fix | Delete
* Ensures:
[127] Fix | Delete
* 'target' will be a NUL terminated string of no more
[128] Fix | Delete
* than 'size' bytes (including NUL).
[129] Fix | Delete
*/
[130] Fix | Delete
[131] Fix | Delete
isc_result_t
[132] Fix | Delete
isc_string_printf(char *target, size_t size, const char *format, ...)
[133] Fix | Delete
ISC_FORMAT_PRINTF(3, 4);
[134] Fix | Delete
/*
[135] Fix | Delete
* Print 'format' to 'target' which is a pointer to a string of at least
[136] Fix | Delete
* 'size' bytes.
[137] Fix | Delete
*
[138] Fix | Delete
* Requires:
[139] Fix | Delete
* 'target' is a pointer to a char[] of at least 'size' bytes.
[140] Fix | Delete
* 'size' an integer > 0.
[141] Fix | Delete
* 'format' == NULL or points to a NUL terminated string.
[142] Fix | Delete
*
[143] Fix | Delete
* Ensures:
[144] Fix | Delete
* If result == ISC_R_SUCCESS
[145] Fix | Delete
* 'target' will be a NUL terminated string of no more
[146] Fix | Delete
* than 'size' bytes (including NUL).
[147] Fix | Delete
*
[148] Fix | Delete
* If result == ISC_R_NOSPACE
[149] Fix | Delete
* 'target' is undefined.
[150] Fix | Delete
*
[151] Fix | Delete
* Returns:
[152] Fix | Delete
* ISC_R_SUCCESS -- 'format' was successfully printed to 'target'.
[153] Fix | Delete
* ISC_R_NOSPACE -- 'format' could not be printed to 'target' since it
[154] Fix | Delete
* is too small.
[155] Fix | Delete
*/
[156] Fix | Delete
[157] Fix | Delete
void
[158] Fix | Delete
isc_string_printf_truncate(char *target, size_t size, const char *format, ...)
[159] Fix | Delete
ISC_FORMAT_PRINTF(3, 4);
[160] Fix | Delete
/*
[161] Fix | Delete
* Print 'format' to 'target' which is a pointer to a string of at least
[162] Fix | Delete
* 'size' bytes.
[163] Fix | Delete
*
[164] Fix | Delete
* Requires:
[165] Fix | Delete
* 'target' is a pointer to a char[] of at least 'size' bytes.
[166] Fix | Delete
* 'size' an integer > 0.
[167] Fix | Delete
* 'format' == NULL or points to a NUL terminated string.
[168] Fix | Delete
*
[169] Fix | Delete
* Ensures:
[170] Fix | Delete
* 'target' will be a NUL terminated string of no more
[171] Fix | Delete
* than 'size' bytes (including NUL).
[172] Fix | Delete
*/
[173] Fix | Delete
[174] Fix | Delete
[175] Fix | Delete
char *
[176] Fix | Delete
isc_string_regiondup(isc_mem_t *mctx, const isc_region_t *source);
[177] Fix | Delete
/*
[178] Fix | Delete
* Copy the region pointed to by r to a NUL terminated string
[179] Fix | Delete
* allocated from the memory context pointed to by mctx.
[180] Fix | Delete
*
[181] Fix | Delete
* The result should be deallocated using isc_mem_free()
[182] Fix | Delete
*
[183] Fix | Delete
* Requires:
[184] Fix | Delete
* 'mctx' is a point to a valid memory context.
[185] Fix | Delete
* 'source' is a pointer to a valid region.
[186] Fix | Delete
*
[187] Fix | Delete
* Returns:
[188] Fix | Delete
* a pointer to a NUL terminated string or
[189] Fix | Delete
* NULL if memory for the copy could not be allocated
[190] Fix | Delete
*
[191] Fix | Delete
*/
[192] Fix | Delete
[193] Fix | Delete
char *
[194] Fix | Delete
isc_string_separate(char **stringp, const char *delim);
[195] Fix | Delete
[196] Fix | Delete
#ifdef ISC_PLATFORM_NEEDSTRSEP
[197] Fix | Delete
#define strsep isc_string_separate
[198] Fix | Delete
#endif
[199] Fix | Delete
[200] Fix | Delete
#ifdef ISC_PLATFORM_NEEDMEMMOVE
[201] Fix | Delete
#define memmove(a,b,c) bcopy(b,a,c)
[202] Fix | Delete
#endif
[203] Fix | Delete
[204] Fix | Delete
size_t
[205] Fix | Delete
isc_string_strlcpy(char *dst, const char *src, size_t size);
[206] Fix | Delete
[207] Fix | Delete
[208] Fix | Delete
#ifdef ISC_PLATFORM_NEEDSTRLCPY
[209] Fix | Delete
#define strlcpy isc_string_strlcpy
[210] Fix | Delete
#endif
[211] Fix | Delete
[212] Fix | Delete
[213] Fix | Delete
size_t
[214] Fix | Delete
isc_string_strlcat(char *dst, const char *src, size_t size);
[215] Fix | Delete
[216] Fix | Delete
#ifdef ISC_PLATFORM_NEEDSTRLCAT
[217] Fix | Delete
#define strlcat isc_string_strlcat
[218] Fix | Delete
#endif
[219] Fix | Delete
[220] Fix | Delete
char *
[221] Fix | Delete
isc_string_strcasestr(const char *big, const char *little);
[222] Fix | Delete
[223] Fix | Delete
#ifdef ISC_PLATFORM_NEEDSTRCASESTR
[224] Fix | Delete
#define strcasestr isc_string_strcasestr
[225] Fix | Delete
#endif
[226] Fix | Delete
[227] Fix | Delete
ISC_LANG_ENDDECLS
[228] Fix | Delete
[229] Fix | Delete
#endif /* ISC_STRING_H */
[230] Fix | Delete
[231] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function