diff options
author | stbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9> | 2015-09-18 15:15:18 +0000 |
---|---|---|
committer | stbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9> | 2015-09-18 15:15:18 +0000 |
commit | 8b2630a82fbecfd57fa38aebb397a755936690e5 (patch) | |
tree | a9cfcd7bb5bea87d63fc8ef81c8456a130a249bc /src/sys-files.c | |
parent | e57c8295ebe92b58ca3e68fa8ea8f70d4b0b4cee (diff) | |
download | lighttpd-master.tar.gz |
git-svn-id: svn://svn.lighttpd.net/lighttpd/trunk@3041 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'src/sys-files.c')
-rw-r--r-- | src/sys-files.c | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/src/sys-files.c b/src/sys-files.c deleted file mode 100644 index 2a9079a3..00000000 --- a/src/sys-files.c +++ /dev/null @@ -1,66 +0,0 @@ -#include "sys-files.h" - -#ifdef _WIN32 -#include "buffer.h" -DIR *opendir(const char *dn) { - DIR *d = malloc(sizeof(*d)); - - if (INVALID_HANDLE_VALUE == (d->h = FindFirstFile(dn, &(d->finddata)))) { - free(d); - return NULL; - } - - return d; -} - -struct dirent *readdir(DIR *d) { - if (!d->dent.d_name) { - /* opendir has set a finddata already, push it out */ - - d->dent.d_name = d->finddata.cFileName; - return &(d->dent); - } - if (FindNextFile(d->h, &(d->finddata))) { - d->dent.d_name = d->finddata.cFileName; - return &(d->dent); - } else { - return NULL; - } -} - -void closedir(DIR *d) { - FindClose(d); - - free(d); -} - -buffer *pathname_unix2local(buffer *fn) { - size_t i; - - for (i = 0; i < fn->used; i++) { - if (fn->ptr[i] == '/') { - fn->ptr[i] = '\\'; - } - } - - return fn; -} - -buffer *filename_unix2local(buffer *fn) { - size_t i; - - for (i = 0; i < fn->used; i++) { - if (fn->ptr[i] == '/') { - fn->ptr[i] = '\\'; - } - } -#if 0 - buffer_prepare_append(fn, 4); - memmove(fn->ptr + 4, fn->ptr, fn->used); - memcpy(fn->ptr, "\\\\?\\", 4); - fn->used += 4; -#endif - return fn; -} -#endif - |