/[winpt]/trunk/Src/wptFileCBS.cpp
ViewVC logotype

Diff of /trunk/Src/wptFileCBS.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 463 by twoaday, Tue Oct 9 09:07:28 2012 UTC revision 464 by twoaday, Tue Oct 9 09:27:57 2012 UTC
# Line 28  Line 28 
28  #include "wptErrors.h"  #include "wptErrors.h"
29  #include "wptTypes.h"  #include "wptTypes.h"
30  #include "wptW32API.h"  #include "wptW32API.h"
31    #include "wptUTF8.h"
32    
33  void progress_callback (void *opaque, const char *what, int type,  void progress_callback (void *opaque, const char *what, int type,
34                          int off, int max);                          int off, int max);
# Line 51  read_cb (void *handle, void *buffer, siz Line 51  read_cb (void *handle, void *buffer, siz
51          return -1;          return -1;
52      }      }
53    
54    
55        /* UTF8 klude: Remove byte order marker */
56        if (nread > 3 && cb->off == 0 && !memcmp(buffer, UTF8_BOM, 3)) {
57            BYTE *buf = (BYTE*)buffer;
58            memmove(buf, buf + 3, nread - 3);
59            nread -= 3;
60        }
61    
62      /* XXX: there is a sync problem with the progress dialog. */      /* XXX: there is a sync problem with the progress dialog. */
63      if (pfx != NULL)      if (pfx != NULL)
64          progress_callback (pfx, NULL, 0, cb->off, cb->size);          progress_callback (pfx, NULL, 0, cb->off, cb->size);

Legend:
Removed from v.463  
changed lines
  Added in v.464

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26