| 29 | |
| 30 | |
| 31 | lString8 readFileToString( const char * fname ) |
| 32 | { |
| 33 | lString8 buf; |
| 34 | LVStreamRef stream = LVOpenFileStream(fname, LVOM_READ); |
| 35 | if (!stream) |
| 36 | return buf; |
| 37 | int sz = stream->GetSize(); |
| 38 | if (sz>0) |
| 39 | { |
| 40 | buf.insert( 0, sz, ' ' ); |
| 41 | stream->Read( buf.modify(), sz, NULL ); |
| 42 | } |
| 43 | return buf; |
| 44 | } |
| 45 | |
| 46 | |
| 47 | class MyXWindowApp |