Merge pull request #222 from rkta/Wall
Fix all reported warnings when -Wall is enabled and enable -Wall by default. While there, move OPTS to end of CFLAGS. This allows the user to override default options.
This commit is contained in:
+1
-1
@@ -35,7 +35,7 @@ RC_DIR = @RC_DIR@
|
|||||||
ETC_DIR = $(sysconfdir)
|
ETC_DIR = $(sysconfdir)
|
||||||
CONF_DIR = $(sysconfdir)/$(PACKAGE)
|
CONF_DIR = $(sysconfdir)/$(PACKAGE)
|
||||||
|
|
||||||
CFLAGS = $(OPTS) -I. -I$(top_srcdir) @CFLAGS@ $(CPPFLAGS) $(DEFS)
|
CFLAGS = -Wall -I. -I$(top_srcdir) @CFLAGS@ $(CPPFLAGS) $(DEFS) $(OPTS)
|
||||||
WCCFLAGS = @WCCFLAGS@
|
WCCFLAGS = @WCCFLAGS@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
DEFS = @DEFS@ -DAUXBIN_DIR=\"$(AUXBIN_DIR)\" \
|
DEFS = @DEFS@ -DAUXBIN_DIR=\"$(AUXBIN_DIR)\" \
|
||||||
|
|||||||
@@ -520,10 +520,8 @@ Sprintf(char *fmt, ...)
|
|||||||
case SP_PREC:
|
case SP_PREC:
|
||||||
if (IS_ALPHA(*f)) {
|
if (IS_ALPHA(*f)) {
|
||||||
/* conversion char. */
|
/* conversion char. */
|
||||||
double vd;
|
|
||||||
int vi;
|
int vi;
|
||||||
char *vs;
|
char *vs;
|
||||||
void *vp;
|
|
||||||
|
|
||||||
switch (*f) {
|
switch (*f) {
|
||||||
case 'l':
|
case 'l':
|
||||||
@@ -545,7 +543,7 @@ Sprintf(char *fmt, ...)
|
|||||||
case 'e':
|
case 'e':
|
||||||
case 'G':
|
case 'G':
|
||||||
case 'E':
|
case 'E':
|
||||||
vd = va_arg(ap, double);
|
va_arg(ap, double);
|
||||||
len += (p > 0) ? p : 15;
|
len += (p > 0) ? p : 15;
|
||||||
break;
|
break;
|
||||||
case 'c':
|
case 'c':
|
||||||
@@ -558,11 +556,11 @@ Sprintf(char *fmt, ...)
|
|||||||
len += (p > vi) ? p : vi;
|
len += (p > vi) ? p : vi;
|
||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
vp = va_arg(ap, void *);
|
va_arg(ap, void *);
|
||||||
len += 10;
|
len += 10;
|
||||||
break;
|
break;
|
||||||
case 'n':
|
case 'n':
|
||||||
vp = va_arg(ap, void *);
|
va_arg(ap, void *);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
status = SP_NORMAL;
|
status = SP_NORMAL;
|
||||||
|
|||||||
@@ -239,7 +239,7 @@ writeBufferName(Buffer *buf, int n)
|
|||||||
void
|
void
|
||||||
gotoLine(Buffer *buf, int n)
|
gotoLine(Buffer *buf, int n)
|
||||||
{
|
{
|
||||||
char msg[32];
|
char msg[36];
|
||||||
Line *l = buf->firstLine;
|
Line *l = buf->firstLine;
|
||||||
|
|
||||||
if (l == NULL)
|
if (l == NULL)
|
||||||
@@ -284,7 +284,7 @@ gotoLine(Buffer *buf, int n)
|
|||||||
void
|
void
|
||||||
gotoRealLine(Buffer *buf, int n)
|
gotoRealLine(Buffer *buf, int n)
|
||||||
{
|
{
|
||||||
char msg[32];
|
char msg[36];
|
||||||
Line *l = buf->firstLine;
|
Line *l = buf->firstLine;
|
||||||
|
|
||||||
if (l == NULL)
|
if (l == NULL)
|
||||||
|
|||||||
@@ -1368,15 +1368,14 @@ cursorRight(Buffer *buf, int n)
|
|||||||
{
|
{
|
||||||
int i, delta = 1, cpos, vpos2;
|
int i, delta = 1, cpos, vpos2;
|
||||||
Line *l = buf->currentLine;
|
Line *l = buf->currentLine;
|
||||||
Lineprop *p;
|
|
||||||
|
|
||||||
if (buf->firstLine == NULL)
|
if (buf->firstLine == NULL)
|
||||||
return;
|
return;
|
||||||
if (buf->pos == l->len && !(l->next && l->next->bpos))
|
if (buf->pos == l->len && !(l->next && l->next->bpos))
|
||||||
return;
|
return;
|
||||||
i = buf->pos;
|
i = buf->pos;
|
||||||
p = l->propBuf;
|
|
||||||
#ifdef USE_M17N
|
#ifdef USE_M17N
|
||||||
|
Lineprop *p = l->propBuf;
|
||||||
while (i + delta < l->len && p[i + delta] & PC_WCHAR2)
|
while (i + delta < l->len && p[i + delta] & PC_WCHAR2)
|
||||||
delta++;
|
delta++;
|
||||||
#endif
|
#endif
|
||||||
@@ -1419,13 +1418,12 @@ cursorLeft(Buffer *buf, int n)
|
|||||||
{
|
{
|
||||||
int i, delta = 1, cpos;
|
int i, delta = 1, cpos;
|
||||||
Line *l = buf->currentLine;
|
Line *l = buf->currentLine;
|
||||||
Lineprop *p;
|
|
||||||
|
|
||||||
if (buf->firstLine == NULL)
|
if (buf->firstLine == NULL)
|
||||||
return;
|
return;
|
||||||
i = buf->pos;
|
i = buf->pos;
|
||||||
p = l->propBuf;
|
|
||||||
#ifdef USE_M17N
|
#ifdef USE_M17N
|
||||||
|
Lineprop *p = l->propBuf;
|
||||||
while (i - delta > 0 && p[i - delta] & PC_WCHAR2)
|
while (i - delta > 0 && p[i - delta] & PC_WCHAR2)
|
||||||
delta++;
|
delta++;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -253,8 +253,10 @@ checkType(Str s, Lineprop **oprop, Linecolor **ocolor)
|
|||||||
char *es = NULL;
|
char *es = NULL;
|
||||||
#endif
|
#endif
|
||||||
int do_copy = FALSE;
|
int do_copy = FALSE;
|
||||||
|
#ifdef USE_M17N
|
||||||
int i;
|
int i;
|
||||||
int plen = 0, clen;
|
int plen = 0, clen;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (prop_size < s->length) {
|
if (prop_size < s->length) {
|
||||||
prop_size = (s->length > LINELEN) ? s->length : LINELEN;
|
prop_size = (s->length > LINELEN) ? s->length : LINELEN;
|
||||||
@@ -429,7 +431,6 @@ checkType(Str s, Lineprop **oprop, Linecolor **ocolor)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
plen = get_mclen(str);
|
|
||||||
mode = get_mctype(str) | effect;
|
mode = get_mctype(str) | effect;
|
||||||
#ifdef USE_ANSI_COLOR
|
#ifdef USE_ANSI_COLOR
|
||||||
if (color) {
|
if (color) {
|
||||||
@@ -439,6 +440,7 @@ checkType(Str s, Lineprop **oprop, Linecolor **ocolor)
|
|||||||
#endif
|
#endif
|
||||||
*(prop++) = mode;
|
*(prop++) = mode;
|
||||||
#ifdef USE_M17N
|
#ifdef USE_M17N
|
||||||
|
plen = get_mclen(str);
|
||||||
if (plen > 1) {
|
if (plen > 1) {
|
||||||
mode = (mode & ~PC_WCHAR1) | PC_WCHAR2;
|
mode = (mode & ~PC_WCHAR1) | PC_WCHAR2;
|
||||||
for (i = 1; i < plen; i++) {
|
for (i = 1; i < plen; i++) {
|
||||||
@@ -2019,13 +2021,15 @@ static char Base64Table[] =
|
|||||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||||
|
|
||||||
Str
|
Str
|
||||||
base64_encode(const unsigned char *src, size_t len)
|
base64_encode(const char *src, size_t len)
|
||||||
{
|
{
|
||||||
Str dest;
|
Str dest;
|
||||||
const unsigned char *in, *endw;
|
const unsigned char *in, *endw, *s;
|
||||||
unsigned long j;
|
unsigned long j;
|
||||||
size_t k;
|
size_t k;
|
||||||
|
|
||||||
|
s = (unsigned char*)src;
|
||||||
|
|
||||||
k = len;
|
k = len;
|
||||||
if (k % 3)
|
if (k % 3)
|
||||||
k += 3 - (k % 3);
|
k += 3 - (k % 3);
|
||||||
@@ -2041,9 +2045,9 @@ base64_encode(const unsigned char *src, size_t len)
|
|||||||
return Strnew();
|
return Strnew();
|
||||||
}
|
}
|
||||||
|
|
||||||
in = src;
|
in = s;
|
||||||
|
|
||||||
endw = src + len - 2;
|
endw = s + len - 2;
|
||||||
|
|
||||||
while (in < endw) {
|
while (in < endw) {
|
||||||
j = *in++;
|
j = *in++;
|
||||||
@@ -2056,9 +2060,9 @@ base64_encode(const unsigned char *src, size_t len)
|
|||||||
Strcatc(dest, Base64Table[j & 0x3f]);
|
Strcatc(dest, Base64Table[j & 0x3f]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (src + len - in) {
|
if (s + len - in) {
|
||||||
j = *in++;
|
j = *in++;
|
||||||
if (src + len - in) {
|
if (s + len - in) {
|
||||||
j = j << 8 | *in++;
|
j = j << 8 | *in++;
|
||||||
j = j << 8;
|
j = j << 8;
|
||||||
Strcatc(dest, Base64Table[(j >> 18) & 0x3f]);
|
Strcatc(dest, Base64Table[(j >> 18) & 0x3f]);
|
||||||
|
|||||||
@@ -1290,7 +1290,7 @@ AuthDigestCred(struct http_auth *ha, Str uname, Str pw, ParsedURL *pu,
|
|||||||
tmp = Strnew_m_charp(uname->ptr, ":",
|
tmp = Strnew_m_charp(uname->ptr, ":",
|
||||||
qstr_unquote(get_auth_param(ha->param, "realm"))->ptr,
|
qstr_unquote(get_auth_param(ha->param, "realm"))->ptr,
|
||||||
":", pw->ptr, NULL);
|
":", pw->ptr, NULL);
|
||||||
MD5(tmp->ptr, strlen(tmp->ptr), md5);
|
MD5((unsigned char *)tmp->ptr, strlen(tmp->ptr), md5);
|
||||||
a1buf = digest_hex(md5);
|
a1buf = digest_hex(md5);
|
||||||
|
|
||||||
if (algorithm) {
|
if (algorithm) {
|
||||||
@@ -1303,7 +1303,7 @@ AuthDigestCred(struct http_auth *ha, Str uname, Str pw, ParsedURL *pu,
|
|||||||
tmp = Strnew_m_charp(a1buf->ptr, ":",
|
tmp = Strnew_m_charp(a1buf->ptr, ":",
|
||||||
qstr_unquote(nonce)->ptr,
|
qstr_unquote(nonce)->ptr,
|
||||||
":", qstr_unquote(cnonce)->ptr, NULL);
|
":", qstr_unquote(cnonce)->ptr, NULL);
|
||||||
MD5(tmp->ptr, strlen(tmp->ptr), md5);
|
MD5((unsigned char *)tmp->ptr, strlen(tmp->ptr), md5);
|
||||||
a1buf = digest_hex(md5);
|
a1buf = digest_hex(md5);
|
||||||
}
|
}
|
||||||
else if (strcasecmp(algorithm->ptr, "MD5") == 0)
|
else if (strcasecmp(algorithm->ptr, "MD5") == 0)
|
||||||
@@ -1325,23 +1325,23 @@ AuthDigestCred(struct http_auth *ha, Str uname, Str pw, ParsedURL *pu,
|
|||||||
Str ebody;
|
Str ebody;
|
||||||
ebody = Strfgetall(fp);
|
ebody = Strfgetall(fp);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
MD5(ebody->ptr, strlen(ebody->ptr), md5);
|
MD5((unsigned char *)ebody->ptr, strlen(ebody->ptr), md5);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
MD5("", 0, md5);
|
MD5((unsigned char *)"", 0, md5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
MD5(request->body, request->length, md5);
|
MD5((unsigned char *)request->body, request->length, md5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
MD5("", 0, md5);
|
MD5((unsigned char *)"", 0, md5);
|
||||||
}
|
}
|
||||||
Strcat_char(tmp, ':');
|
Strcat_char(tmp, ':');
|
||||||
Strcat(tmp, digest_hex(md5));
|
Strcat(tmp, digest_hex(md5));
|
||||||
}
|
}
|
||||||
MD5(tmp->ptr, strlen(tmp->ptr), md5);
|
MD5((unsigned char *)tmp->ptr, strlen(tmp->ptr), md5);
|
||||||
a2buf = digest_hex(md5);
|
a2buf = digest_hex(md5);
|
||||||
|
|
||||||
if (qop_i >= QOP_AUTH) {
|
if (qop_i >= QOP_AUTH) {
|
||||||
@@ -1359,7 +1359,7 @@ AuthDigestCred(struct http_auth *ha, Str uname, Str pw, ParsedURL *pu,
|
|||||||
":", qstr_unquote(cnonce)->ptr,
|
":", qstr_unquote(cnonce)->ptr,
|
||||||
":", qop_i == QOP_AUTH ? "auth" : "auth-int",
|
":", qop_i == QOP_AUTH ? "auth" : "auth-int",
|
||||||
":", a2buf->ptr, NULL);
|
":", a2buf->ptr, NULL);
|
||||||
MD5(tmp->ptr, strlen(tmp->ptr), md5);
|
MD5((unsigned char *)tmp->ptr, strlen(tmp->ptr), md5);
|
||||||
rd = digest_hex(md5);
|
rd = digest_hex(md5);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -1369,7 +1369,7 @@ AuthDigestCred(struct http_auth *ha, Str uname, Str pw, ParsedURL *pu,
|
|||||||
tmp = Strnew_m_charp(a1buf->ptr, ":",
|
tmp = Strnew_m_charp(a1buf->ptr, ":",
|
||||||
qstr_unquote(get_auth_param(ha->param, "nonce"))->
|
qstr_unquote(get_auth_param(ha->param, "nonce"))->
|
||||||
ptr, ":", a2buf->ptr, NULL);
|
ptr, ":", a2buf->ptr, NULL);
|
||||||
MD5(tmp->ptr, strlen(tmp->ptr), md5);
|
MD5((unsigned char *)tmp->ptr, strlen(tmp->ptr), md5);
|
||||||
rd = digest_hex(md5);
|
rd = digest_hex(md5);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3803,7 +3803,7 @@ process_button(struct parsed_tag *tag)
|
|||||||
{
|
{
|
||||||
Str tmp = NULL;
|
Str tmp = NULL;
|
||||||
char *p, *q, *r, *qq = "";
|
char *p, *q, *r, *qq = "";
|
||||||
int qlen, v;
|
int v;
|
||||||
|
|
||||||
if (cur_form_id < 0) {
|
if (cur_form_id < 0) {
|
||||||
char *s = "<form_int method=internal action=none>";
|
char *s = "<form_int method=internal action=none>";
|
||||||
@@ -3847,7 +3847,6 @@ process_button(struct parsed_tag *tag)
|
|||||||
}
|
}
|
||||||
if (q) {
|
if (q) {
|
||||||
qq = html_quote(q);
|
qq = html_quote(q);
|
||||||
qlen = strlen(q);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Strcat_charp(tmp, "<pre_int>"); */
|
/* Strcat_charp(tmp, "<pre_int>"); */
|
||||||
@@ -4002,7 +4001,6 @@ void
|
|||||||
process_option(void)
|
process_option(void)
|
||||||
{
|
{
|
||||||
char begin_char = '[', end_char = ']';
|
char begin_char = '[', end_char = ']';
|
||||||
int len;
|
|
||||||
|
|
||||||
if (cur_select == NULL || cur_option == NULL)
|
if (cur_select == NULL || cur_option == NULL)
|
||||||
return;
|
return;
|
||||||
@@ -4013,6 +4011,7 @@ process_option(void)
|
|||||||
if (cur_option_label == NULL)
|
if (cur_option_label == NULL)
|
||||||
cur_option_label = cur_option;
|
cur_option_label = cur_option;
|
||||||
#ifdef MENU_SELECT
|
#ifdef MENU_SELECT
|
||||||
|
int len;
|
||||||
if (!select_is_multiple) {
|
if (!select_is_multiple) {
|
||||||
len = get_Str_strwidth(cur_option_label);
|
len = get_Str_strwidth(cur_option_label);
|
||||||
if (len > cur_option_maxwidth)
|
if (len > cur_option_maxwidth)
|
||||||
@@ -7601,7 +7600,6 @@ loadGopherSearch0(URLFile *uf, ParsedURL *pu)
|
|||||||
{
|
{
|
||||||
Str tmp;
|
Str tmp;
|
||||||
char *volatile p, *volatile q;
|
char *volatile p, *volatile q;
|
||||||
MySignalHandler(*volatile prevtrap) (SIGNAL_ARG) = NULL;
|
|
||||||
#ifdef USE_M17N
|
#ifdef USE_M17N
|
||||||
wc_ces doc_charset = DocumentCharset;
|
wc_ces doc_charset = DocumentCharset;
|
||||||
#endif
|
#endif
|
||||||
@@ -8166,7 +8164,6 @@ int
|
|||||||
save2tmp(URLFile uf, char *tmpf)
|
save2tmp(URLFile uf, char *tmpf)
|
||||||
{
|
{
|
||||||
FILE *ff;
|
FILE *ff;
|
||||||
int check;
|
|
||||||
clen_t linelen = 0, trbyte = 0;
|
clen_t linelen = 0, trbyte = 0;
|
||||||
MySignalHandler(*volatile prevtrap) (SIGNAL_ARG) = NULL;
|
MySignalHandler(*volatile prevtrap) (SIGNAL_ARG) = NULL;
|
||||||
static JMP_BUF env_bak;
|
static JMP_BUF env_bak;
|
||||||
@@ -8183,8 +8180,8 @@ save2tmp(URLFile uf, char *tmpf)
|
|||||||
goto _end;
|
goto _end;
|
||||||
}
|
}
|
||||||
TRAP_ON;
|
TRAP_ON;
|
||||||
check = 0;
|
|
||||||
#ifdef USE_NNTP
|
#ifdef USE_NNTP
|
||||||
|
int check = 0;
|
||||||
if (uf.scheme == SCM_NEWS) {
|
if (uf.scheme == SCM_NEWS) {
|
||||||
char c;
|
char c;
|
||||||
while (c = UFgetc(&uf), !iseos(uf.stream)) {
|
while (c = UFgetc(&uf), !iseos(uf.stream)) {
|
||||||
|
|||||||
@@ -551,13 +551,12 @@ loadImage(Buffer *buf, int flag)
|
|||||||
}
|
}
|
||||||
#else /* !DONT_CALL_GC_AFTER_FORK */
|
#else /* !DONT_CALL_GC_AFTER_FORK */
|
||||||
if ((cache->pid = fork()) == 0) {
|
if ((cache->pid = fork()) == 0) {
|
||||||
Buffer *b;
|
|
||||||
/*
|
/*
|
||||||
* setup_child(TRUE, 0, -1);
|
* setup_child(TRUE, 0, -1);
|
||||||
*/
|
*/
|
||||||
setup_child(FALSE, 0, -1);
|
setup_child(FALSE, 0, -1);
|
||||||
image_source = cache->file;
|
image_source = cache->file;
|
||||||
b = loadGeneralFile(cache->url, cache->current, NULL, 0, NULL);
|
loadGeneralFile(cache->url, cache->current, NULL, 0, NULL);
|
||||||
/* TODO make sure removing this didn't break anything
|
/* TODO make sure removing this didn't break anything
|
||||||
if (!b || !b->real_type || strncasecmp(b->real_type, "image/", 6))
|
if (!b || !b->real_type || strncasecmp(b->real_type, "image/", 6))
|
||||||
unlink(cache->file);
|
unlink(cache->file);
|
||||||
@@ -734,7 +733,7 @@ getImageSize(ImageCache * cache)
|
|||||||
{
|
{
|
||||||
Str tmp;
|
Str tmp;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
int w = 0, h = 0;
|
unsigned int w = 0, h = 0;
|
||||||
|
|
||||||
if (!activeImage)
|
if (!activeImage)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -752,7 +751,7 @@ getImageSize(ImageCache * cache)
|
|||||||
f = popen(tmp->ptr, "r");
|
f = popen(tmp->ptr, "r");
|
||||||
if (!f)
|
if (!f)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
while (fscanf(f, "%d %d", &w, &h) < 0) {
|
while (fscanf(f, "%u %u", &w, &h) < 0) {
|
||||||
if (feof(f))
|
if (feof(f))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -821,7 +821,7 @@ growbuf_reserve(struct growbuf *gb, int leastarea)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
growbuf_append(struct growbuf *gb, const char *src, int len)
|
growbuf_append(struct growbuf *gb, const unsigned char *src, int len)
|
||||||
{
|
{
|
||||||
growbuf_reserve(gb, gb->length + len);
|
growbuf_reserve(gb, gb->length + len);
|
||||||
memcpy(&gb->ptr[gb->length], src, len);
|
memcpy(&gb->ptr[gb->length], src, len);
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ extern void growbuf_init_without_GC(struct growbuf *gb);
|
|||||||
extern void growbuf_clear(struct growbuf *gb);
|
extern void growbuf_clear(struct growbuf *gb);
|
||||||
extern Str growbuf_to_Str(struct growbuf *gb);
|
extern Str growbuf_to_Str(struct growbuf *gb);
|
||||||
extern void growbuf_reserve(struct growbuf *gb, int leastarea);
|
extern void growbuf_reserve(struct growbuf *gb, int leastarea);
|
||||||
extern void growbuf_append(struct growbuf *gb, const char *src, int len);
|
extern void growbuf_append(struct growbuf *gb, const unsigned char *src, int len);
|
||||||
#define GROWBUF_ADD_CHAR(gb,ch) ((((gb)->length>=(gb)->area_size)?growbuf_reserve(gb,(gb)->length+1):(void)0),(void)((gb)->ptr[(gb)->length++] = (ch)))
|
#define GROWBUF_ADD_CHAR(gb,ch) ((((gb)->length>=(gb)->area_size)?growbuf_reserve(gb,(gb)->length+1):(void)0),(void)((gb)->ptr[(gb)->length++] = (ch)))
|
||||||
|
|
||||||
extern char *w3m_auxbin_dir();
|
extern char *w3m_auxbin_dir();
|
||||||
|
|||||||
@@ -418,7 +418,6 @@ ssl_check_cert_ident(X509 * x, char *hostname)
|
|||||||
if (alt) {
|
if (alt) {
|
||||||
int n;
|
int n;
|
||||||
GENERAL_NAME *gn;
|
GENERAL_NAME *gn;
|
||||||
X509V3_EXT_METHOD *method;
|
|
||||||
Str seen_dnsname = NULL;
|
Str seen_dnsname = NULL;
|
||||||
|
|
||||||
n = sk_GENERAL_NAME_num(alt);
|
n = sk_GENERAL_NAME_num(alt);
|
||||||
@@ -459,7 +458,7 @@ ssl_check_cert_ident(X509 * x, char *hostname)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
method = X509V3_EXT_get(ex);
|
X509V3_EXT_get(ex);
|
||||||
sk_GENERAL_NAME_free(alt);
|
sk_GENERAL_NAME_free(alt);
|
||||||
if (i < n) /* Found a match */
|
if (i < n) /* Found a match */
|
||||||
match_ident = TRUE;
|
match_ident = TRUE;
|
||||||
|
|||||||
@@ -77,8 +77,6 @@ static Str strCurrentBuf;
|
|||||||
static int use_hist;
|
static int use_hist;
|
||||||
#ifdef USE_M17N
|
#ifdef USE_M17N
|
||||||
static void ins_char(Str str);
|
static void ins_char(Str str);
|
||||||
#else
|
|
||||||
static void ins_char(char c);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char *
|
char *
|
||||||
|
|||||||
@@ -380,17 +380,19 @@ localcgi_post(char *uri, char *qstr, FormList *request, char *referer)
|
|||||||
cgi_dir = mydirname(file);
|
cgi_dir = mydirname(file);
|
||||||
#endif
|
#endif
|
||||||
cgi_basename = mybasename(file);
|
cgi_basename = mybasename(file);
|
||||||
pid = open_pipe_rw(&fr, NULL);
|
pid = open_pipe_rw(&fr, NULL); /* open_pipe_rw() forks */
|
||||||
/* Don't invoke gc after here, or the program might crash in some platforms */
|
/* Don't invoke gc after here, or the program might crash in some platforms */
|
||||||
if (pid < 0) {
|
if (pid < 0) {
|
||||||
if (fw)
|
if (fw)
|
||||||
fclose(fw);
|
fclose(fw);
|
||||||
return NULL;
|
return NULL;
|
||||||
} else if (pid) {
|
} else if (pid) {
|
||||||
|
/* parent */
|
||||||
if (fw)
|
if (fw)
|
||||||
fclose(fw);
|
fclose(fw);
|
||||||
return fr;
|
return fr;
|
||||||
}
|
}
|
||||||
|
/* child */
|
||||||
setup_child(TRUE, 2, fw ? fileno(fw) : -1);
|
setup_child(TRUE, 2, fw ? fileno(fw) : -1);
|
||||||
|
|
||||||
set_cgi_environ(name, file, uri);
|
set_cgi_environ(name, file, uri);
|
||||||
@@ -433,4 +435,9 @@ localcgi_post(char *uri, char *qstr, FormList *request, char *referer)
|
|||||||
file, cgi_basename, strerror(errno));
|
file, cgi_basename, strerror(errno));
|
||||||
exit(1);
|
exit(1);
|
||||||
#endif
|
#endif
|
||||||
|
/*
|
||||||
|
* Suppress compiler warning: function might return no value
|
||||||
|
* This code is never reached.
|
||||||
|
*/
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -394,10 +394,15 @@ die_oom(size_t bytes)
|
|||||||
{
|
{
|
||||||
fprintf(stderr, "Out of memory: %lu bytes unavailable!\n", (unsigned long)bytes);
|
fprintf(stderr, "Out of memory: %lu bytes unavailable!\n", (unsigned long)bytes);
|
||||||
exit(1);
|
exit(1);
|
||||||
|
/*
|
||||||
|
* Suppress compiler warning: function might return no value
|
||||||
|
* This code is never reached.
|
||||||
|
*/
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char **argv, char **envp)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
Buffer *newbuf = NULL;
|
Buffer *newbuf = NULL;
|
||||||
char *p;
|
char *p;
|
||||||
@@ -1808,15 +1813,11 @@ static int
|
|||||||
dispincsrch(int ch, Str buf, Lineprop *prop)
|
dispincsrch(int ch, Str buf, Lineprop *prop)
|
||||||
{
|
{
|
||||||
static Buffer sbuf;
|
static Buffer sbuf;
|
||||||
static Line *currentLine;
|
|
||||||
static int pos;
|
|
||||||
char *str;
|
char *str;
|
||||||
int do_next_search = FALSE;
|
int do_next_search = FALSE;
|
||||||
|
|
||||||
if (ch == 0 && buf == NULL) {
|
if (ch == 0 && buf == NULL) {
|
||||||
SAVE_BUFPOSITION(&sbuf); /* search starting point */
|
SAVE_BUFPOSITION(&sbuf); /* search starting point */
|
||||||
currentLine = sbuf.currentLine;
|
|
||||||
pos = sbuf.pos;
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1865,8 +1866,6 @@ dispincsrch(int ch, Str buf, Lineprop *prop)
|
|||||||
arrangeCursor(Currentbuf);
|
arrangeCursor(Currentbuf);
|
||||||
srchcore(str, searchRoutine);
|
srchcore(str, searchRoutine);
|
||||||
arrangeCursor(Currentbuf);
|
arrangeCursor(Currentbuf);
|
||||||
currentLine = Currentbuf->currentLine;
|
|
||||||
pos = Currentbuf->pos;
|
|
||||||
}
|
}
|
||||||
displayBuffer(Currentbuf, B_FORCE_REDRAW);
|
displayBuffer(Currentbuf, B_FORCE_REDRAW);
|
||||||
clear_mark(Currentbuf->currentLine);
|
clear_mark(Currentbuf->currentLine);
|
||||||
|
|||||||
@@ -1100,7 +1100,7 @@ process_mMouse(int btn, int x, int y)
|
|||||||
{
|
{
|
||||||
Menu *menu;
|
Menu *menu;
|
||||||
int mselect, i;
|
int mselect, i;
|
||||||
static int press_btn = MOUSE_BTN_RESET, press_x, press_y;
|
static int press_btn = MOUSE_BTN_RESET, press_y;
|
||||||
char c = ' ';
|
char c = ' ';
|
||||||
|
|
||||||
menu = CurrentMenu;
|
menu = CurrentMenu;
|
||||||
@@ -1169,7 +1169,6 @@ process_mMouse(int btn, int x, int y)
|
|||||||
|
|
||||||
if (btn != MOUSE_BTN4_DOWN_RXVT || press_btn == MOUSE_BTN_RESET) {
|
if (btn != MOUSE_BTN4_DOWN_RXVT || press_btn == MOUSE_BTN_RESET) {
|
||||||
press_btn = btn;
|
press_btn = btn;
|
||||||
press_x = x;
|
|
||||||
press_y = y;
|
press_y = y;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ defhashfunc(HashItem_ss *, int, hss_i)
|
|||||||
/* *INDENT-ON* */
|
/* *INDENT-ON* */
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char *argv[], char **envp)
|
main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
FILE *f;
|
FILE *f;
|
||||||
Hash_ss *hash;
|
Hash_ss *hash;
|
||||||
|
|||||||
@@ -235,7 +235,6 @@ InputStream
|
|||||||
openNewsStream(ParsedURL *pu)
|
openNewsStream(ParsedURL *pu)
|
||||||
{
|
{
|
||||||
char *host, *mode, *group, *p;
|
char *host, *mode, *group, *p;
|
||||||
Str tmp;
|
|
||||||
int port, status;
|
int port, status;
|
||||||
|
|
||||||
if (pu->file == NULL || *pu->file == '\0')
|
if (pu->file == NULL || *pu->file == '\0')
|
||||||
@@ -262,7 +261,7 @@ openNewsStream(ParsedURL *pu)
|
|||||||
mode = NULL;
|
mode = NULL;
|
||||||
if (current_news.host) {
|
if (current_news.host) {
|
||||||
if (!strcmp(current_news.host, host) && current_news.port == port) {
|
if (!strcmp(current_news.host, host) && current_news.port == port) {
|
||||||
tmp = news_command(¤t_news, "MODE", mode ? mode : "READER",
|
news_command(¤t_news, "MODE", mode ? mode : "READER",
|
||||||
&status);
|
&status);
|
||||||
if (status != 200 && status != 201)
|
if (status != 200 && status != 201)
|
||||||
news_close(¤t_news);
|
news_close(¤t_news);
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
*
|
*
|
||||||
* Created: Wed Feb 10 12:47:03 1999
|
* Created: Wed Feb 10 12:47:03 1999
|
||||||
*/
|
*/
|
||||||
extern int main(int argc, char **argv, char **envp);
|
extern int main(int argc, char **argv);
|
||||||
extern void nulcmd(void);
|
extern void nulcmd(void);
|
||||||
extern void pushEvent(int cmd, void *data);
|
extern void pushEvent(int cmd, void *data);
|
||||||
extern MySignalHandler intTrap(SIGNAL_ARG);
|
extern MySignalHandler intTrap(SIGNAL_ARG);
|
||||||
@@ -831,4 +831,4 @@ void srand48(long);
|
|||||||
long lrand48(void);
|
long lrand48(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern Str base64_encode(const unsigned char *src, size_t len);
|
extern Str base64_encode(const char *src, size_t len);
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
main()
|
main(void)
|
||||||
{
|
{
|
||||||
char *cp;
|
char *cp;
|
||||||
Display *dpy;
|
Display *dpy;
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ push_symbol(Str str, char symbol, int width, int n)
|
|||||||
#endif
|
#endif
|
||||||
p = alt_symbol[(unsigned char)symbol % N_SYMBOL];
|
p = alt_symbol[(unsigned char)symbol % N_SYMBOL];
|
||||||
for (i = 0; i < 2 && *p; i++, p++)
|
for (i = 0; i < 2 && *p; i++, p++)
|
||||||
buf[i] = (*p == ' ') ? NBSP_CODE : *p;
|
buf[i] = (*p == ' ') ? (char)NBSP_CODE : *p;
|
||||||
|
|
||||||
Strcat(str, Sprintf("<_SYMBOL TYPE=%d>", symbol));
|
Strcat(str, Sprintf("<_SYMBOL TYPE=%d>", symbol));
|
||||||
for (; n > 0; n--)
|
for (; n > 0; n--)
|
||||||
|
|||||||
@@ -419,7 +419,7 @@ suspend_or_pushdata(struct table *tbl, char *line)
|
|||||||
#ifdef USE_M17N
|
#ifdef USE_M17N
|
||||||
#define PUSH_TAG(str,n) Strcat_charp_n(tagbuf, str, n)
|
#define PUSH_TAG(str,n) Strcat_charp_n(tagbuf, str, n)
|
||||||
#else
|
#else
|
||||||
#define PUSH_TAG(str,n) Strcat_char(tagbuf, *str)
|
#define PUSH_TAG(str,n) Strcat_char(tagbuf, *str), (void)n
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int visible_length_offset = 0;
|
int visible_length_offset = 0;
|
||||||
@@ -1524,7 +1524,7 @@ check_table_height(struct table *t)
|
|||||||
short maxcell;
|
short maxcell;
|
||||||
short size;
|
short size;
|
||||||
int *height;
|
int *height;
|
||||||
} cell;
|
} cell = {0};
|
||||||
int space = 0;
|
int space = 0;
|
||||||
|
|
||||||
cell.size = 0;
|
cell.size = 0;
|
||||||
|
|||||||
@@ -356,7 +356,7 @@ char *ttyname(int);
|
|||||||
#define SETCHMODE(var,mode) ((var) = (((var)&~C_WHICHCHAR) | mode))
|
#define SETCHMODE(var,mode) ((var) = (((var)&~C_WHICHCHAR) | mode))
|
||||||
#ifdef USE_M17N
|
#ifdef USE_M17N
|
||||||
#define SETCH(var,ch,len) ((var) = New_Reuse(char, (var), (len) + 1), \
|
#define SETCH(var,ch,len) ((var) = New_Reuse(char, (var), (len) + 1), \
|
||||||
strncpy((var), (ch), (len)), (var)[len] = '\0')
|
strncpy((var), (ch), (len + 1)))
|
||||||
#else
|
#else
|
||||||
#define SETCH(var,ch,len) ((var) = (ch))
|
#define SETCH(var,ch,len) ((var) = (ch))
|
||||||
#endif
|
#endif
|
||||||
@@ -737,7 +737,7 @@ save_first_animation_frame(const char *path)
|
|||||||
|
|
||||||
/* Header */
|
/* Header */
|
||||||
|
|
||||||
if (len != st.st_size || strncmp(header, "GIF89a", 6) != 0) {
|
if (len != st.st_size || strncmp((char *)header, "GIF89a", 6) != 0) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -181,7 +181,7 @@ insert_bookmark(char *bmark, struct parsed_tagarg *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char *argv[], char **envp)
|
main(void)
|
||||||
{
|
{
|
||||||
extern char *getenv();
|
extern char *getenv();
|
||||||
char *p;
|
char *p;
|
||||||
|
|||||||
+1
-1
@@ -164,7 +164,7 @@ editMailcap(char *mailcap, struct parsed_tagarg *args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char *argv[], char **envp)
|
main(void)
|
||||||
{
|
{
|
||||||
Str mailcapfile;
|
Str mailcapfile;
|
||||||
extern char *getenv();
|
extern char *getenv();
|
||||||
|
|||||||
Reference in New Issue
Block a user