Ignore:
Timestamp:
08/27/15 00:05:32 (8 years ago)
Author:
Maciej Komosinski
Message:

The NO_STD_IN_OUT_ERR macro excludes entire functions, not their contents

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/common/virtfile/stdiofile.cpp

    r375 r425  
    88#include <common/log.h>
    99#include <common/Convert.h>
     10#ifdef __ANDROID__
     11#include <common/dirs.h>
     12#include <common/platform/android/AndroidAPK_DIR.h>
     13#endif
    1014
    1115VirtFILE* StdioFileSystem::Vfopen(const char *path, const char *mode)
     
    2428{
    2529        //log_printf("Vopendir %s",path);
     30#ifdef __ANDROID__
     31        int resources_prefix_length=getAppResourcesDir().length();
     32        if (strncmp(path, getAppResourcesDir().c_str(), resources_prefix_length) == 0) //it is a resources dir
     33        {
     34                VirtDIR *vd = AndroidAPK_DIR::opendir(path+resources_prefix_length+1); //+1 because we also skip '/' and start with a "relative" dir, otherwise it does not work.
     35                return vd;
     36        }
     37#endif
     38
    2639#ifdef _WIN32
    2740        DIRTYPE *d = wopendir(Convert::utf8ToUtf16(path).c_str());
     
    3851}
    3952
     53#ifndef NO_STD_IN_OUT_ERR
    4054void StdioFILE::setStdio()
    4155{
    42 #ifndef NO_STD_IN_OUT_ERR
    4356        static StdioFILEDontClose si(stdin);
    4457        static StdioFILEDontClose so(stdout);
     
    4760        setVstdout(&so);
    4861        setVstderr(&se);
     62}
    4963#endif
    50 }
    5164
    5265dirent* StdioDIR::Vreaddir()
Note: See TracChangeset for help on using the changeset viewer.