apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject cvs commit: apr-iconv/util iconv_stream.c
Date Wed, 28 May 2003 14:07:16 GMT
martin      2003/05/28 07:07:16

  Modified:    util     iconv_stream.c
  Log:
  [Porting] fix type, make it compile on non-gcc
  
  Revision  Changes    Path
  1.5       +4 -4      apr-iconv/util/iconv_stream.c
  
  Index: iconv_stream.c
  ===================================================================
  RCS file: /home/cvs/apr-iconv/util/iconv_stream.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -u -r1.4 -r1.5
  --- iconv_stream.c	28 Jun 2001 05:54:23 -0000	1.4
  +++ iconv_stream.c	28 May 2003 14:07:16 -0000	1.5
  @@ -39,7 +39,7 @@
   
   #define buf_size 4096
   
  -iconv_stream *iconv_stream_open(iconv_t cd, void *handle,
  +iconv_stream *iconv_stream_open(apr_iconv_t cd, void *handle,
                                   iconv_stream_func method)
   {
       iconv_stream *res = malloc(sizeof(iconv_stream));
  @@ -114,7 +114,7 @@
               if (left > size)
                   left = size;
               memcpy(stream->buf_ptr, buf, left);
  -            (const char *)buf += left;
  +            buf = ((const char *)buf) + left;
               size -= left;
               stream->buf_ptr += left;
               res = iconv_write(handle, stream->buffer,
  @@ -141,7 +141,7 @@
                   return -1;
               res = 0;
           }
  -        (const char *)buf += res;
  +        buf = ((const char *)buf) + res;
           size -= res;
       } while (size && res);
       if (!size)
  @@ -164,7 +164,7 @@
       return (res && !ferror((FILE *)handle)) ? res : -1;
   }
   
  -iconv_stream *iconv_ostream_fopen(iconv_t cd, FILE *handle)
  +iconv_stream *iconv_ostream_fopen(apr_iconv_t cd, FILE *handle)
   {
       return iconv_stream_open(cd, handle, fwrite_wrapper);
   }
  
  
  

Mime
View raw message