htinit(hexdig, USC "ABCDEF", 0x10 + 10);
}
#else
-static unsigned char hexdig[256] = {
+static const unsigned char hexdig[256] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
/* For heb_number_to_chars escape sequences of אבגדהוזחטיכלמנסעפצקרשת
ISO-8859-8 Hebrew alphabet */
-static char alef_bet[25] = "0\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEB\xEC\xEE\xF0\xF1\xF2\xF4\xF6\xF7\xF8\xF9\xFA";
+static const char alef_bet[25] = "0\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEB\xEC\xEE\xF0\xF1\xF2\xF4\xF6\xF7\xF8\xF9\xFA";
#define CAL_JEWISH_ADD_ALAFIM_GERESH 0x2
#define CAL_JEWISH_ADD_ALAFIM 0x4
smart_str_appendc(pretval, *(char *)p);
char_cnt--;
} else {
- static char qp_digits[] = "0123456789ABCDEF";
+ static const char qp_digits[] = "0123456789ABCDEF";
smart_str_appendc(pretval, '=');
smart_str_appendc(pretval, qp_digits[(*p >> 4) & 0x0f]);
smart_str_appendc(pretval, qp_digits[(*p & 0x0f)]);
* into URLs.
*/
-static char hexconvtab[] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ,-";
+static const char hexconvtab[] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ,-";
static void bin_to_readable(unsigned char *in, size_t inlen, char *out, size_t outlen, char nbits) /* {{{ */
{
#define ADD_HEADER(a) sapi_add_header(a, strlen(a), 1);
#define MAX_STR 512
-static char *month_names[] = {
+static const char *month_names[] = {
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
};
-static char *week_days[] = {
+static const char *week_days[] = {
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"
};
static xmlNodePtr to_xml_hexbin(encodeTypePtr type, zval *data, int style, xmlNodePtr parent)
{
- static char hexconvtab[] = "0123456789ABCDEF";
+ static const char hexconvtab[] = "0123456789ABCDEF";
xmlNodePtr ret, text;
unsigned char *str;
zval tmp;
}
};
-static unsigned char BF_itoa64[64 + 1] =
+static const unsigned char BF_itoa64[64 + 1] =
"./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
-static unsigned char BF_atoi64[0x60] = {
+static const unsigned char BF_atoi64[0x60] = {
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 0, 1,
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 64, 64, 64, 64, 64,
64, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
static php_conv_err_t php_conv_base64_encode_convert(php_conv_base64_encode *inst, const char **in_p, size_t *in_left, char **out_p, size_t *out_left);
static void php_conv_base64_encode_dtor(php_conv_base64_encode *inst);
-static unsigned char b64_tbl_enc[256] = {
+static const unsigned char b64_tbl_enc[256] = {
'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P',
'Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f',
'g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v',
unsigned int lb_cnt;
unsigned int trail_ws;
int opts;
- static char qp_digits[] = "0123456789ABCDEF";
+ static const char qp_digits[] = "0123456789ABCDEF";
line_ccnt = inst->line_ccnt;
opts = inst->opts;
*/
PHPAPI zend_string * _php_math_longtobase(zend_long arg, int base)
{
- static char digits[] = "0123456789abcdefghijklmnopqrstuvwxyz";
+ static const char digits[] = "0123456789abcdefghijklmnopqrstuvwxyz";
char buf[(sizeof(zend_ulong) << 3) + 1];
char *ptr, *end;
zend_ulong value;
*/
PHPAPI zend_string * _php_math_zvaltobase(zval *arg, int base)
{
- static char digits[] = "0123456789abcdefghijklmnopqrstuvwxyz";
+ static const char digits[] = "0123456789abcdefghijklmnopqrstuvwxyz";
if ((Z_TYPE_P(arg) != IS_LONG && Z_TYPE_P(arg) != IS_DOUBLE) || base < 2 || base > 36) {
return ZSTR_EMPTY_ALLOC();
#define MD5_MAGIC "$1$"
#define MD5_MAGIC_LEN 3
-static unsigned char itoa64[] = /* 0 ... 63 => ascii - 64 */
+static const unsigned char itoa64[] = /* 0 ... 63 => ascii - 64 */
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
/* Convert a 16/32 bit integer to Base64 string representation */
size_t i, _small, str_len, code, last;
char soundex[4 + 1];
- static char soundex_table[26] =
+ static const char soundex_table[26] =
{0, /* A */
'1', /* B */
'2', /* C */
int php_tag_find(char *tag, size_t len, const char *set);
/* this is read-only, so it's ok */
-ZEND_SET_ALIGNED(16, static char hexconvtab[]) = "0123456789abcdef";
+ZEND_SET_ALIGNED(16, static const char hexconvtab[]) = "0123456789abcdef";
/* localeconv mutex */
#ifdef ZTS
For added safety, we only leave -_. unencoded.
*/
-static unsigned char hexchars[] = "0123456789ABCDEF";
+static const unsigned char hexchars[] = "0123456789ABCDEF";
static zend_always_inline zend_string *php_url_encode_impl(const char *s, size_t len, zend_bool raw) /* {{{ */ {
register unsigned char c;
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: strlcat.c,v 1.17 2016/10/14 18:19:04 dtucker Exp $";
+static const char *rcsid = "$OpenBSD: strlcat.c,v 1.17 2016/10/14 18:19:04 dtucker Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: strlcpy.c,v 1.15 2016/10/16 17:37:39 dtucker Exp $";
+static const char *rcsid = "$OpenBSD: strlcpy.c,v 1.15 2016/10/16 17:37:39 dtucker Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>