From 28f2a701075bcf3c3cff13bfb748449a00b9fa2f Mon Sep 17 00:00:00 2001 From: Samuel Serapion Date: Mon, 15 Sep 2008 16:15:53 +0000 Subject: [PATCH] Tidy up code a bit svn path=/branches/ros-amd64-bringup/; revision=36260 --- reactos/lib/sdk/crt/stdio/file.c | 15 +++++++++++++++ reactos/lib/sdk/crt/stdio/stat64.c | 18 +++--------------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/reactos/lib/sdk/crt/stdio/file.c b/reactos/lib/sdk/crt/stdio/file.c index 2569daf8e03..210fc4f7072 100644 --- a/reactos/lib/sdk/crt/stdio/file.c +++ b/reactos/lib/sdk/crt/stdio/file.c @@ -116,6 +116,21 @@ static CRITICAL_SECTION FILE_cs; #define LOCK_FILES() do { EnterCriticalSection(&FILE_cs); } while (0) #define UNLOCK_FILES() do { LeaveCriticalSection(&FILE_cs); } while (0) +void stat64_to_stati64(const struct __stat64 *buf64, struct _stati64 *buf) +{ + buf->st_dev = buf64->st_dev; + buf->st_ino = buf64->st_ino; + buf->st_mode = buf64->st_mode; + buf->st_nlink = buf64->st_nlink; + buf->st_uid = buf64->st_uid; + buf->st_gid = buf64->st_gid; + buf->st_rdev = buf64->st_rdev; + buf->st_size = buf64->st_size; + buf->st_atime = buf64->st_atime; + buf->st_mtime = buf64->st_mtime; + buf->st_ctime = buf64->st_ctime; +} + static inline BOOL is_valid_fd(int fd) { return fd >= 0 && fd < fdend && (fdesc[fd].wxflag & WX_OPEN); diff --git a/reactos/lib/sdk/crt/stdio/stat64.c b/reactos/lib/sdk/crt/stdio/stat64.c index 37d806d1873..ef2441e1ca5 100644 --- a/reactos/lib/sdk/crt/stdio/stat64.c +++ b/reactos/lib/sdk/crt/stdio/stat64.c @@ -29,21 +29,10 @@ #define WCCMD (TOUL('c') << 32 | TOUL('m') << 16 | TOUL('d')) #define WCCOM (TOUL('c') << 32 | TOUL('o') << 16 | TOUL('m')) +HANDLE fdtoh(int fd); +void stat64_to_stati64(const struct __stat64 *buf64, struct _stati64 *buf); + #if _USE_STAT64 -void stat64_to_stati64(const struct __stat64 *buf64, struct _stati64 *buf) -{ - buf->st_dev = buf64->st_dev; - buf->st_ino = buf64->st_ino; - buf->st_mode = buf64->st_mode; - buf->st_nlink = buf64->st_nlink; - buf->st_uid = buf64->st_uid; - buf->st_gid = buf64->st_gid; - buf->st_rdev = buf64->st_rdev; - buf->st_size = buf64->st_size; - buf->st_atime = buf64->st_atime; - buf->st_mtime = buf64->st_mtime; - buf->st_ctime = buf64->st_ctime; -} //int _tstati64(const TCHAR* path, struct _stati64 * buf) //{ @@ -58,7 +47,6 @@ void stat64_to_stati64(const struct __stat64 *buf64, struct _stati64 *buf) #endif -HANDLE fdtoh(int fd); //file.c #if _USE_STAT64 int CDECL _tstat64(const _TCHAR *path, struct _stat64 *buf)