Changeset 212 in Main for trunk/Common/dir.c


Ignore:
Timestamp:
Oct 3, 2024, 2:44:55 AM (6 weeks ago)
Author:
Nishi
Message:

compiles on vc6

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Common/dir.c

    r150 r212  
    66
    77#include <sys/stat.h>
     8#ifndef _MSC_VER
    89#include <dirent.h>
     10#endif
    911#include <stdlib.h>
    1012#include <string.h>
     
    1719
    1820char** cm_scandir(const char* path) {
     21#ifdef _MSC_VER
     22        return NULL;
     23#else
    1924        DIR* dir = opendir(path);
    2025        if(dir != NULL) {
    2126                char** r = malloc(sizeof(*r));
     27                struct dirent* d;
    2228                r[0] = NULL;
    23                 struct dirent* d;
    2429                while((d = readdir(dir)) != NULL) {
    2530                        if(strcmp(d->d_name, ".") != 0 && strcmp(d->d_name, "..") != 0) {
     
    6166                return NULL;
    6267        }
     68#endif
    6369}
Note: See TracChangeset for help on using the changeset viewer.