Mercurial > hg > xmms-sid
comparison src/xs_support.h @ 657:acaba070cf49
Lots of cosmetic code cleanups; synced the de-gettextification from Audacious-SID, I suppose it makes some sense ...
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 02 Apr 2008 19:46:59 +0300 |
parents | 7a2d62a249a4 |
children | b0743dc9165d |
comparison
equal
deleted
inserted
replaced
656:e9257f006f41 | 657:acaba070cf49 |
---|---|
14 | 14 |
15 #ifdef AUDACIOUS_PLUGIN | 15 #ifdef AUDACIOUS_PLUGIN |
16 #include <audacious/plugin.h> | 16 #include <audacious/plugin.h> |
17 #include <audacious/output.h> | 17 #include <audacious/output.h> |
18 #include <audacious/util.h> | 18 #include <audacious/util.h> |
19 #define HAVE_MEMSET | |
20 #else | 19 #else |
21 #include <xmms/plugin.h> | 20 #include <xmms/plugin.h> |
22 #include <xmms/util.h> | 21 #include <xmms/util.h> |
23 #include <xmms/titlestring.h> | 22 #include <xmms/titlestring.h> |
24 #endif | 23 #endif |
66 | 65 |
67 | 66 |
68 /* VFS replacement functions | 67 /* VFS replacement functions |
69 */ | 68 */ |
70 #ifdef __AUDACIOUS_NEWVFS__ | 69 #ifdef __AUDACIOUS_NEWVFS__ |
71 #include <audacious/vfs.h> | 70 #define xs_file_t VFSFile |
72 #define t_xs_file VFSFile | |
73 #define xs_fopen(a,b) aud_vfs_fopen(a,b) | 71 #define xs_fopen(a,b) aud_vfs_fopen(a,b) |
74 #define xs_fclose(a) aud_vfs_fclose(a) | 72 #define xs_fclose(a) aud_vfs_fclose(a) |
75 #define xs_fgetc(a) aud_vfs_getc(a) | 73 #define xs_fgetc(a) aud_vfs_getc(a) |
76 #define xs_fread(a,b,c,d) aud_vfs_fread(a,b,c,d) | 74 #define xs_fread(a,b,c,d) aud_vfs_fread(a,b,c,d) |
77 #define xs_feof(a) aud_vfs_feof(a) | 75 #define xs_feof(a) aud_vfs_feof(a) |
78 #define xs_ferror(a) (0) | 76 #define xs_ferror(a) (0) |
79 #define xs_ftell(a) aud_vfs_ftell(a) | 77 #define xs_ftell(a) aud_vfs_ftell(a) |
80 #define xs_fseek(a,b,c) aud_vfs_fseek(a,b,c) | 78 #define xs_fseek(a,b,c) aud_vfs_fseek(a,b,c) |
81 #else | 79 #else |
82 #define t_xs_file FILE | 80 #define xs_file_t FILE |
83 t_xs_file *xs_fopen(const gchar *, const gchar *); | 81 #define xs_fopen(a,b) fopen(a,b) |
84 gint xs_fclose(t_xs_file *); | 82 #define xs_fclose(a) fclose(a) |
85 gint xs_fgetc(t_xs_file *); | 83 #define xs_fgetc(a) fgetc(a) |
86 size_t xs_fread(void *, size_t, size_t, t_xs_file *); | 84 #define xs_fread(a,b,c,d) fread(a,b,c,d) |
87 gint xs_feof(t_xs_file *); | 85 #define xs_feof(a) feof(a) |
88 gint xs_ferror(t_xs_file *); | 86 #define xs_ferror(a) ferror(a) |
89 glong xs_ftell(t_xs_file *); | 87 #define xs_ftell(a) ftell(a) |
90 gint xs_fseek(t_xs_file *, glong, gint); | 88 #define xs_fseek(a,b,c) fseek(a,b,c) |
91 #endif | 89 #endif |
92 guint16 xs_fread_be16(t_xs_file *); | 90 guint16 xs_fread_be16(xs_file_t *); |
93 guint32 xs_fread_be32(t_xs_file *); | 91 guint32 xs_fread_be32(xs_file_t *); |
94 gint xs_fload_buffer(const gchar *, guint8 **, size_t *); | 92 gint xs_fload_buffer(const gchar *, guint8 **, size_t *); |
95 | 93 |
96 | 94 |
97 /* Misc functions | 95 /* Misc functions |
98 */ | 96 */ |
103 gchar *xs_strrchr(gchar *, const gchar); | 101 gchar *xs_strrchr(gchar *, const gchar); |
104 void xs_findnext(const gchar *, size_t *); | 102 void xs_findnext(const gchar *, size_t *); |
105 void xs_findeol(const gchar *, size_t *); | 103 void xs_findeol(const gchar *, size_t *); |
106 void xs_findnum(const gchar *, size_t *); | 104 void xs_findnum(const gchar *, size_t *); |
107 | 105 |
108 #ifdef HAVE_MEMSET | |
109 #define xs_memset memset | |
110 #else | |
111 void *xs_memset(void *, int, size_t); | |
112 #endif | |
113 | |
114 #ifdef __cplusplus | 106 #ifdef __cplusplus |
115 } | 107 } |
116 #endif | 108 #endif |
117 #endif /* XS_SUPPORT_H */ | 109 #endif /* XS_SUPPORT_H */ |