mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
Megacommit of many files.
Mostly, several functions that take pointers as arguments, almost always char * pointers, had those pointers qualified with "const". Those that returned pointers to previously const-qualified arguments had their return values qualified as const. Some structure members were qualified as const to retain that attribute from the variables from which they were assigned. The macro DE_CONST was added to isc/util.h to deal with a handful of very special places where something is qualified as const but really needs to have its const qualifier removed. Also cleaned up a few places where variable names clashed with reserved identifiers. (Which mostly works fine, but strictly speaking is undefined by the standard.) Minor other ISC style cleanups.
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: base64.c,v 1.13 2000/05/16 05:19:46 tale Exp $ */
|
||||
/* $Id: base64.c,v 1.14 2000/06/01 17:20:18 tale Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -36,18 +36,22 @@
|
||||
* These static functions are also present in lib/dns/rdata.c. I'm not
|
||||
* sure where they should go. -- bwelling
|
||||
*/
|
||||
static isc_result_t str_totext(char *source, isc_buffer_t *target);
|
||||
static isc_result_t gettoken(isc_lex_t *lexer, isc_token_t *token,
|
||||
isc_tokentype_t expect, isc_boolean_t eol);
|
||||
static isc_result_t mem_tobuffer(isc_buffer_t *target, void *base,
|
||||
unsigned int length);
|
||||
static isc_result_t
|
||||
str_totext(const char *source, isc_buffer_t *target);
|
||||
|
||||
static isc_result_t
|
||||
gettoken(isc_lex_t *lexer, isc_token_t *token, isc_tokentype_t expect,
|
||||
isc_boolean_t eol);
|
||||
|
||||
static isc_result_t
|
||||
mem_tobuffer(isc_buffer_t *target, void *base, unsigned int length);
|
||||
|
||||
static const char base64[] =
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
||||
|
||||
isc_result_t
|
||||
isc_base64_totext(isc_region_t *source, int wordlength,
|
||||
char *wordbreak, isc_buffer_t *target)
|
||||
const char *wordbreak, isc_buffer_t *target)
|
||||
{
|
||||
char buf[5];
|
||||
unsigned int loops = 0;
|
||||
@@ -157,7 +161,7 @@ isc_base64_tobuffer(isc_lex_t *lexer, isc_buffer_t *target, int length) {
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
str_totext(char *source, isc_buffer_t *target) {
|
||||
str_totext(const char *source, isc_buffer_t *target) {
|
||||
unsigned int l;
|
||||
isc_region_t region;
|
||||
|
||||
|
Reference in New Issue
Block a user