00001 /* 00002 * wxChecksums 00003 * Copyright (C) 2003-2004 Julien Couot 00004 * 00005 * This program is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU General Public License 00007 * as published by the Free Software Foundation; either version 2 00008 * of the License, or (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00018 */ 00019 00020 /** 00021 * \file osdep.hpp 00022 * OS dependant utility functions. 00023 */ 00024 00025 00026 #ifndef INC_OSDEP_HPP 00027 #define INC_OSDEP_HPP 00028 00029 //--------------------------------------------------------------------------- 00030 // For compilers that support precompilation, includes "wx.h". 00031 #include <wx/wxprec.h> 00032 00033 #ifdef __BORLANDC__ 00034 #pragma hdrstop 00035 #endif 00036 00037 #ifndef WX_PRECOMP 00038 // Include your minimal set of headers here, or wx.h 00039 #include <wx/wx.h> 00040 #endif 00041 #include <wx/filename.h> 00042 //--------------------------------------------------------------------------- 00043 00044 00045 // Define the off_t type to use 00046 #if defined(wxC_USE_LARGE_FILES) 00047 /// Use an 64 bits off_t type. 00048 typedef wxLongLong_t wxCOff_t; 00049 /// Version of the getFileLength function to use (system ou 64 bits). 00050 #define wxCGetFileLength getFileLength64 00051 #else 00052 /// Use the system off_t type. 00053 typedef off_t wxCOff_t; 00054 /// Version of the getFileLength function to use (system ou 64 bits). 00055 #define wxCGetFileLength getFileLength 00056 #endif // defined(wxC_USE_LARGE_FILES) 00057 00058 00059 // Gets the length of a file 00060 off_t getFileLength(const wxChar* fileName); 00061 00062 #if defined(wxC_USE_LARGE_FILES) 00063 // Gets the length of a file 00064 wxLongLong_t getFileLength64(const wxChar* fileName); 00065 //--------------------------------------------------------------------------- 00066 #endif // defined(wxC_USE_LARGE_FILES) 00067 00068 00069 // Gets the absolute paths where the resources of the program can be placed. 00070 wxArrayString getResourcesPaths(); 00071 00072 #if defined(__WXMSW__) 00073 // Gets the file name of the application executable 00074 wxFileName getAppPath(); 00075 00076 // Gets the file name of the current module 00077 wxFileName getModulePath(); 00078 #endif // __WXMSW__ 00079 //--------------------------------------------------------------------------- 00080 00081 00082 // Converts an UTF-8 string to the local encoded string. 00083 wxString UTF8toLocal(const wxString utf8); 00084 //--------------------------------------------------------------------------- 00085 00086 #endif // INC_OSDEP_HPP