Skip to content
Snippets Groups Projects
Commit 1fda2014 authored by Marcus Comstedt's avatar Marcus Comstedt
Browse files

char signedness fix.

Rev: src/modules/MIME/configure.in:1.2
Rev: src/modules/MIME/mime.c:1.6
parent 04468793
Branches
Tags
No related merge requests found
......@@ -3,4 +3,6 @@ AC_CONFIG_HEADER(config.h)
sinclude(../module_configure.in)
AC_C_CHAR_UNSIGNED
AC_OUTPUT(Makefile,echo FOO >stamp-h )
/*
* $Id: mime.c,v 1.5 1997/04/11 23:01:43 marcus Exp $
* $Id: mime.c,v 1.6 1997/04/17 16:42:43 marcus Exp $
*
* RFC1521 functionality for Pike
*
......@@ -9,7 +9,7 @@
#include "config.h"
#include "global.h"
RCSID("$Id: mime.c,v 1.5 1997/04/11 23:01:43 marcus Exp $");
RCSID("$Id: mime.c,v 1.6 1997/04/17 16:42:43 marcus Exp $");
#include "stralloc.h"
#include "types.h"
#include "pike_macros.h"
......@@ -19,6 +19,12 @@ RCSID("$Id: mime.c,v 1.5 1997/04/11 23:01:43 marcus Exp $");
#include "builtin_functions.h"
#include "error.h"
#ifdef __CHAR_UNSIGNED__
#define SIGNED signed
#else
#define SIGNED
#endif
/** Forward declarations of functions implementing Pike functions **/
......@@ -36,9 +42,9 @@ static void f_quote( INT32 args );
/** Global tables **/
static char base64tab[64] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
static char base64rtab[0x80-' '];
static SIGNED char base64rtab[0x80-' '];
static char qptab[16] = "0123456789ABCDEF";
static char qprtab[0x80-'0'];
static SIGNED char qprtab[0x80-'0'];
#define CT_CTL 0
#define CT_WHITE 1
......@@ -136,7 +142,7 @@ static void f_decode_base64( INT32 args )
instead. */
dynamic_buffer buf;
char *src;
SIGNED char *src;
INT32 cnt, d = 1;
int pads = 0;
......@@ -275,7 +281,7 @@ static void f_decode_qp( INT32 args )
so we'll use a dynamic buffer to hold the result. */
dynamic_buffer buf;
char *src;
SIGNED char *src;
INT32 cnt;
buf.s.str=NULL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment