Ignore:
Timestamp:
11/07/14 17:51:01 (9 years ago)
Author:
Maciej Komosinski
Message:

Sources support both 32-bit and 64-bit, and more compilers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/virtfile/stringfile.h

    r207 r247  
    1616  public:
    1717StringFILE(SString& s):str(s),pos(0) {}
    18 int Vread(void *ptr, size_t size, size_t nmemb);
    19 int Vwrite(const void *ptr, size_t size, size_t nmemb) {str.append((const char*)ptr,size*nmemb); return size*nmemb;}
     18size_t Vread(void *ptr, size_t size, size_t nmemb);
     19size_t Vwrite(const void *ptr, size_t size, size_t nmemb) {str.append((const char*)ptr,(int)(size*nmemb)); return size*nmemb;}
    2020int Veof() {return pos>=str.len();}
    2121int Vputc(int c) {str+=(char)c; return c;}
    22 int Vputs(const char *s) {str.append(s,strlen(s)); return 0;}
     22int Vputs(const char *s) {str.append(s,(int)strlen(s)); return 0;}
    2323int Vgetc();
    2424char *Vgets(char *s, int size);
    2525int Vseek(long offset, int whence);
    26 int Vtell() {return pos;}
     26long Vtell() {return pos;}
    2727int Vflush() {return 0;}
    2828};
Note: See TracChangeset for help on using the changeset viewer.