Changeset 207 for cpp/frams/virtfile


Ignore:
Timestamp:
04/03/14 01:25:40 (11 years ago)
Author:
Maciej Komosinski
Message:

StringFILE's Vprintf can now handle strings of any length

Location:
cpp/frams/virtfile
Files:
2 edited

Legend:

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

    r204 r207  
    4343}
    4444
    45 int StringFILE::Vprintf(const char *format, va_list args)
    46 {
    47 char *buf=str.directAppend(10000);
    48 vsnprintf(buf,10000,format,args);
    49 int n=strlen(buf); // todo: strlen moze wyjsc poza siebie jezeli printf nie da 0S
    50 str.endAppend(n);
    51 return n;
    52 }
    53 
    5445int StringFILE::Vseek(long offset, int whence)
    5546{
  • cpp/frams/virtfile/stringfile.h

    r204 r207  
    2323int Vgetc();
    2424char *Vgets(char *s, int size);
    25 int Vprintf(const char *format, va_list args);
    2625int Vseek(long offset, int whence);
    2726int Vtell() {return pos;}
    28 void Vrewind() {pos=0;}
    2927int Vflush() {return 0;}
    3028};
Note: See TracChangeset for help on using the changeset viewer.