this way they'll go into .rodata, decreasing memory pressure.
#define KEY_MAX 30000
#define SALT_MAX 8
-static unsigned char b64[] =
+static const unsigned char b64[] =
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
static char *to64(char *s, unsigned int u, int n)
memcpy(s->buf, p, len);
}
-static unsigned char b64[] =
+static const unsigned char b64[] =
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
static char *to64(char *s, unsigned int u, int n)
memcpy(s->buf, p, len);
}
-static unsigned char b64[] =
+static const unsigned char b64[] =
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
static char *to64(char *s, unsigned int u, int n)
#include <wctype.h>
-static unsigned char table[] = {
+static const unsigned char table[] = {
#include "alpha.h"
};
#include <wctype.h>
-static unsigned char table[] = {
+static const unsigned char table[] = {
#include "punct.h"
};
#include <wchar.h>
-static unsigned char table[] = {
+static const unsigned char table[] = {
#include "nonspacing.h"
};
-static unsigned char wtable[] = {
+static const unsigned char wtable[] = {
#include "wide.h"
};
z100 = Q(z4, 25);
z400 = Q(z100, 4);
day += year*365 + z4 - z100 + z400 +
- month[(int []){0,31,59,90,120,151,181,212,243,273,304,334}];
+ month[(const int []){0,31,59,90,120,151,181,212,243,273,304,334}];
return (long long)day*86400
+ tm->tm_hour*3600 + tm->tm_min*60 + tm->tm_sec
- -946684800; /* the dawn of time :) */