Replace some int's with size_t. Use %ld and cast to long when printing

size_t's.
This commit is contained in:
martin 2003-02-19 16:53:26 +00:00
parent cfa07275ad
commit 93f473507c
3 changed files with 9 additions and 9 deletions

View File

@ -244,8 +244,8 @@ int nls_setrecode(const char *, const char *);
int nls_setlocale(const char *);
char* nls_str_toext(char *, const char *);
char* nls_str_toloc(char *, const char *);
void* nls_mem_toext(void *, const void *, int);
void* nls_mem_toloc(void *, const void *, int);
void* nls_mem_toext(void *, const void *, size_t);
void* nls_mem_toloc(void *, const void *, size_t);
char* nls_str_upper(char *, const char *);
char* nls_str_lower(char *, const char *);

View File

@ -125,7 +125,7 @@ char *
nls_str_toloc(char *dst, const char *src)
{
char *p = dst;
int inlen, outlen;
size_t inlen, outlen;
if (!iconv_loaded)
return strcpy(dst, src);
@ -147,7 +147,7 @@ char *
nls_str_toext(char *dst, const char *src)
{
char *p = dst;
int inlen, outlen;
size_t inlen, outlen;
if (!iconv_loaded)
return strcpy(dst, src);
@ -166,11 +166,11 @@ nls_str_toext(char *dst, const char *src)
}
void *
nls_mem_toloc(void *dst, const void *src, int size)
nls_mem_toloc(void *dst, const void *src, size_t size)
{
char *p = dst;
const char *s = src;
int inlen, outlen;
size_t inlen, outlen;
if (!iconv_loaded)
return memcpy(dst, src, size);
@ -191,11 +191,11 @@ nls_mem_toloc(void *dst, const void *src, int size)
}
void *
nls_mem_toext(void *dst, const void *src, int size)
nls_mem_toext(void *dst, const void *src, size_t size)
{
char *p = dst;
const char *s = src;
int inlen, outlen;
size_t inlen, outlen;
if (size == 0)
return NULL;

View File

@ -344,7 +344,7 @@ rc_getstring(struct rcfile *rcp, const char *section, const char *key,
if (error)
return error;
if (strlen(value) >= maxlen) {
warnx("line too long for key '%s' in section '%s', max = %d\n", key, section, maxlen);
warnx("line too long for key '%s' in section '%s', max = %ld\n", key, section, (long)maxlen);
return EINVAL;
}
strcpy(dest, value);