]> git.tdb.fi Git - libs/core.git/blob - source/seek.cpp
Move class members and comments around
[libs/core.git] / source / seek.cpp
1 #ifdef WIN32
2 #include <windows.h>
3 #endif
4 #include "except.h"
5 #include "seek.h"
6
7 namespace Msp {
8 namespace IO {
9
10 int sys_seek_type(SeekType st)
11 {
12 #ifdef WIN32
13         if(st==S_BEG)
14                 return FILE_BEGIN;
15         else if(st==S_CUR)
16                 return FILE_CURRENT;
17         else if(st==S_END)
18                 return FILE_END;
19 #else
20         if(st==S_BEG)
21                 return SEEK_SET;
22         else if(st==S_CUR)
23                 return SEEK_CUR;
24         else if(st==S_END)
25                 return SEEK_END;
26 #endif
27
28         throw InvalidParameterValue("Invalid seek type");
29 }
30
31 } // namespace IO
32 } // namespace Msp