projects
/
privoxy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Include merges from changes.txt and recent Andreas +filter change.
[privoxy.git]
/
deanimate.c
diff --git
a/deanimate.c
b/deanimate.c
index
5eaccb3
..
1dbc665
100644
(file)
--- a/
deanimate.c
+++ b/
deanimate.c
@@
-1,4
+1,4
@@
-const char deanimate_rcs[] = "$Id: deanimate.c,v 1.
5 2001/09/10 10:16:06 oes
Exp $";
+const char deanimate_rcs[] = "$Id: deanimate.c,v 1.
7 2002/03/08 17:46:04 jongfoster
Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/deanimate.c,v $
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/deanimate.c,v $
@@
-37,6
+37,12
@@
const char deanimate_rcs[] = "$Id: deanimate.c,v 1.5 2001/09/10 10:16:06 oes Exp
*
* Revisions :
* $Log: deanimate.c,v $
*
* Revisions :
* $Log: deanimate.c,v $
+ * Revision 1.7 2002/03/08 17:46:04 jongfoster
+ * Fixing int/size_t warnings
+ *
+ * Revision 1.6 2002/03/07 03:46:17 oes
+ * Fixed compiler warnings
+ *
* Revision 1.5 2001/09/10 10:16:06 oes
* Silenced compiler warnings
*
* Revision 1.5 2001/09/10 10:16:06 oes
* Silenced compiler warnings
*
@@
-100,7
+106,7
@@
void buf_free(struct binbuffer *buf)
*
* Description : Ensure that a given binbuffer can hold a given amount
* of bytes, by reallocating its buffer if necessary.
*
* Description : Ensure that a given binbuffer can hold a given amount
* of bytes, by reallocating its buffer if necessary.
- * Allocate new mem in chunks of 10
00
bytes, so we don't
+ * Allocate new mem in chunks of 10
24
bytes, so we don't
* have to realloc() too often.
*
* Parameters :
* have to realloc() too often.
*
* Parameters :
@@
-117,7
+123,7
@@
int buf_extend(struct binbuffer *buf, size_t length)
if (buf->offset + length > buf->size)
{
if (buf->offset + length > buf->size)
{
- buf->size =
buf->size + length + 1000 - (buf->size + length) % 1000
;
+ buf->size =
((buf->size + length + (size_t)1023) & ~(size_t)1023)
;
newbuf = (char *)realloc(buf->buffer, buf->size);
if (newbuf == NULL)
newbuf = (char *)realloc(buf->buffer, buf->size);
if (newbuf == NULL)
@@
-198,7
+204,7
@@
int buf_copy(struct binbuffer *src, struct binbuffer *dst, size_t length)
* Returns : The byte on success, or 0 on failiure
*
*********************************************************************/
* Returns : The byte on success, or 0 on failiure
*
*********************************************************************/
-unsigned char buf_getbyte(struct binbuffer *src,
in
t offset)
+unsigned char buf_getbyte(struct binbuffer *src,
size_
t offset)
{
if (src->offset + offset < src->size)
{
{
if (src->offset + offset < src->size)
{
@@
-296,14
+302,14
@@
int gif_extract_image(struct binbuffer *src, struct binbuffer *dst)
*/
while((c = buf_getbyte(src, 0)))
{
*/
while((c = buf_getbyte(src, 0)))
{
- if (buf_copy(src, dst,
(size_t) c + 1
)) return 1;
+ if (buf_copy(src, dst,
1 + (size_t) c
)) return 1;
}
if (buf_copy(src, dst, 1)) return 1;
/*
* Trim and rewind the dst buffer
*/
}
if (buf_copy(src, dst, 1)) return 1;
/*
* Trim and rewind the dst buffer
*/
- if (NULL == (dst->buffer = (char *)realloc(dst->buffer,
(size_t)
dst->offset))) return 1;
+ if (NULL == (dst->buffer = (char *)realloc(dst->buffer, dst->offset))) return 1;
dst->size = dst->offset;
dst->offset = 0;
dst->size = dst->offset;
dst->offset = 0;