fixed off-by-one bug
[swftools.git] / lib / os.h
blob3efd8f3060e26707678b13532af91a3687b3f38d
1 /* os.h
3 header file for operating system dependent functions
5 Part of the swftools package.
7 Copyright (c) 2005 Matthias Kramm <kramm@quiss.org>
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
24 #ifndef __os_h__
25 #define __os_h__
26 #include "../config.h"
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
32 extern char path_seperator;
34 #ifdef WIN32
35 char* getRegistryEntry(char*path);
36 int setRegistryEntry(char*key,char*value);
37 #endif
39 typedef struct _memfile {
40 void*data;
41 int len;
42 } memfile_t;
43 memfile_t* memfile_open(const char*path);
44 void memfile_close(memfile_t*file);
46 char* getInstallationPath();
47 char* concatPaths(const char*base, const char*add);
48 char* stripFilename(const char*filename, const char*newext);
50 char* mktempname(char*buffer, const char*ext);
52 void move_file(const char*from, const char*to);
53 char file_exists(const char*filename);
55 #ifdef __cplusplus
57 #endif
59 #endif