diff --git a/src/basenc.c b/src/basenc.c index 5effa3f..fea4984 100644 --- a/src/basenc.c +++ b/src/basenc.c @@ -35,11 +35,11 @@ #include "xbinary-io.h" #if BASE_TYPE == 42 -#define AUTHORS \ +# define AUTHORS \ proper_name ("Simon Josefsson"), \ proper_name ("Assaf Gordon") #else -#define AUTHORS proper_name ("Simon Josefsson") +# define AUTHORS proper_name ("Simon Josefsson") #endif #if BASE_TYPE == 32 @@ -51,11 +51,10 @@ #elif BASE_TYPE == 42 # include "base32.h" # include "base64.h" -# include "xalloc.h" # include # define PROGRAM_NAME "basenc" #else -#error missing/invalid BASE_TYPE definition +# error missing/invalid BASE_TYPE definition #endif @@ -213,7 +212,7 @@ verify (DEC_BLOCKSIZE % 12 == 0); /* So complete encoded blocks are used. */ #elif BASE_TYPE == 42 -#define BASE_LENGTH base_length +# define BASE_LENGTH base_length /* Note that increasing this may decrease performance if --ignore-garbage is used, because of the memmove operation below. */ @@ -390,7 +389,7 @@ base32_decode_ctx_wrapper (struct base_decode_context *ctx, /* ABCDEFGHIJKLMNOPQRSTUVWXYZ234567 to 0123456789ABCDEFGHIJKLMNOPQRSTUV */ -const char base32_norm_to_hex[32+9] = { +static const char base32_norm_to_hex[32+9] = { /*0x32, 0x33, 0x34, 0x35, 0x36, 0x37, */ 'Q', 'R', 'S', 'T', 'U', 'V', @@ -412,7 +411,7 @@ const char base32_norm_to_hex[32+9] = { /* 0123456789ABCDEFGHIJKLMNOPQRSTUV to ABCDEFGHIJKLMNOPQRSTUVWXYZ234567 */ -const char base32_hex_to_norm[32+9] = { +static const char base32_hex_to_norm[32+9] = { /* from: 0x30 .. 0x39 ('0' to '9') */ /* to:*/ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', @@ -663,14 +662,14 @@ z85_decode_ctx_init (struct base_decode_context *ctx) } -#define Z85_LO_CTX_TO_32BIT_VAL(ctx) \ +# define Z85_LO_CTX_TO_32BIT_VAL(ctx) \ (((ctx)->z85ctx.octets[1] * 85 * 85 * 85) + \ ((ctx)->z85ctx.octets[2] * 85 * 85) + \ ((ctx)->z85ctx.octets[3] * 85) + \ ((ctx)->z85ctx.octets[4])) -#define Z85_HI_CTX_TO_32BIT_VAL(ctx) \ +# define Z85_HI_CTX_TO_32BIT_VAL(ctx) \ ((ctx)->z85ctx.octets[0] * 85 * 85 * 85 * 85 ) /*