Changeset 81 for cpp/gdk/stdiofile.cpp


Ignore:
Timestamp:
02/08/13 03:29:17 (11 years ago)
Author:
Maciej Komosinski
Message:

improved parsing of properties (e.g. in f0 genotypes)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/gdk/stdiofile.cpp

    r66 r81  
    44
    55#include "stdiofile.h"
    6 #include "nonstd.h"
    7 #include "nonstd_io.h"
     6#include "nonstd_dir.h"
     7#include "nonstd_stdio.h"
     8#include "framsg.h"
    89
    910VirtFILE* StdioFileSystem::Vfopen(const char* path,const char*mode)
    1011{
    11 FILE *f=fopen(path,mode);
    12 if (f) return new StdioFILE(f,path); else return 0;
     12        //FMprintf("Vfopen %s %s",path,mode);
     13        FILE *f=fopen(path,mode);
     14        //FMprintf("%p",f);
     15        if (f) return new StdioFILE(f,path); else return 0;
    1316}
    1417
    1518VirtDIR* StdioFileSystem::Vopendir(const char* path)
    1619{
    17 #ifndef _MSC_VER
    18 DIR *d=opendir(path);
    19 if (d) return new StdioDIR(d); else
    20 #endif
    21 return 0;
     20        //FMprintf("Vopendir %s",path);
     21        DIR *d=opendir(path);
     22        //FMprintf("%p",d);
     23        if (d) return new StdioDIR(d); else return 0;
    2224}
    2325
    2426int StdioFileSystem::Vfexists(const char* path)
    25 {return fileExists(path);}
     27{
     28        return fileExists(path);
     29}
    2630
    2731void StdioFILE::setStdio()
    2832{
    29 static StdioFILEDontClose si(stdin);
    30 static StdioFILEDontClose so(stdout);
    31 static StdioFILEDontClose se(stderr);
    32 setVstdin(&si);
    33 setVstdout(&so);
    34 setVstderr(&se);
     33        static StdioFILEDontClose si(stdin);
     34        static StdioFILEDontClose so(stdout);
     35        static StdioFILEDontClose se(stderr);
     36        setVstdin(&si);
     37        setVstdout(&so);
     38        setVstderr(&se);
    3539}
    3640
    37 #ifndef _MSC_VER
    3841dirent* StdioDIR::Vreaddir()
    3942{
    40 return readdir(dir);
     43        //FMprintf("Vreaddir %s",dir);
     44        return readdir(dir);
    4145}
    42 #endif
Note: See TracChangeset for help on using the changeset viewer.