Mercurial > hg > xmms-sid
annotate src/xs_support.h @ 706:27fac414349d
Synchronize Aud-SID changes.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 12 Jun 2008 21:04:10 +0300 |
parents | b0743dc9165d |
children | 229fa2d043b9 |
rev | line source |
---|---|
526
fa95d942f226
Header cleanup; Moved some types from xmms-sid.h to xs_player.h; Renamed few functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
516
diff
changeset
|
1 #ifndef XS_SUPPORT_H |
fa95d942f226
Header cleanup; Moved some types from xmms-sid.h to xs_player.h; Renamed few functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
516
diff
changeset
|
2 #define XS_SUPPORT_H |
4 | 3 |
4 #ifdef __cplusplus | |
5 extern "C" { | |
6 #endif | |
7 | |
466
00a32ab5887d
Moved some things from xmms-sid.h to xs_support.h; File handling functions
Matti Hamalainen <ccr@tnsp.org>
parents:
452
diff
changeset
|
8 #ifdef HAVE_CONFIG_H |
00a32ab5887d
Moved some things from xmms-sid.h to xs_support.h; File handling functions
Matti Hamalainen <ccr@tnsp.org>
parents:
452
diff
changeset
|
9 #include <config.h> |
00a32ab5887d
Moved some things from xmms-sid.h to xs_support.h; File handling functions
Matti Hamalainen <ccr@tnsp.org>
parents:
452
diff
changeset
|
10 #endif |
00a32ab5887d
Moved some things from xmms-sid.h to xs_support.h; File handling functions
Matti Hamalainen <ccr@tnsp.org>
parents:
452
diff
changeset
|
11 |
00a32ab5887d
Moved some things from xmms-sid.h to xs_support.h; File handling functions
Matti Hamalainen <ccr@tnsp.org>
parents:
452
diff
changeset
|
12 #include <glib.h> |
226
858c09f59011
Moved some functions from xs_length.c here.
Matti Hamalainen <ccr@tnsp.org>
parents:
218
diff
changeset
|
13 #include <stdio.h> |
4 | 14 |
532 | 15 #ifdef AUDACIOUS_PLUGIN |
16 #include <audacious/plugin.h> | |
17 #include <audacious/output.h> | |
18 #else | |
19 #include <xmms/plugin.h> | |
535 | 20 #include <xmms/util.h> |
611
a751d2b85a7d
Merge in Tuple changes from Audacious-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
537
diff
changeset
|
21 #include <xmms/titlestring.h> |
532 | 22 #endif |
23 | |
466
00a32ab5887d
Moved some things from xmms-sid.h to xs_support.h; File handling functions
Matti Hamalainen <ccr@tnsp.org>
parents:
452
diff
changeset
|
24 #ifdef HAVE_ASSERT_H |
00a32ab5887d
Moved some things from xmms-sid.h to xs_support.h; File handling functions
Matti Hamalainen <ccr@tnsp.org>
parents:
452
diff
changeset
|
25 #include <assert.h> |
00a32ab5887d
Moved some things from xmms-sid.h to xs_support.h; File handling functions
Matti Hamalainen <ccr@tnsp.org>
parents:
452
diff
changeset
|
26 #else |
00a32ab5887d
Moved some things from xmms-sid.h to xs_support.h; File handling functions
Matti Hamalainen <ccr@tnsp.org>
parents:
452
diff
changeset
|
27 #define assert(x) /* stub */ |
00a32ab5887d
Moved some things from xmms-sid.h to xs_support.h; File handling functions
Matti Hamalainen <ccr@tnsp.org>
parents:
452
diff
changeset
|
28 #endif |
00a32ab5887d
Moved some things from xmms-sid.h to xs_support.h; File handling functions
Matti Hamalainen <ccr@tnsp.org>
parents:
452
diff
changeset
|
29 |
218 | 30 #ifdef HAVE_STRING_H |
31 #include <string.h> | |
32 #else | |
33 #ifdef HAVE_STRINGS_H | |
34 #include <strings.h> | |
35 #endif | |
36 #endif | |
37 | |
38 #ifdef HAVE_MEMORY_H | |
39 #include <memory.h> | |
40 #endif | |
41 | |
452
aec9f4beb401
New file reading functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
398
diff
changeset
|
42 |
619
6f9c5bb127e6
Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
43 /* Standard gettext macros |
6f9c5bb127e6
Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
44 */ |
6f9c5bb127e6
Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
45 #ifdef ENABLE_NLS |
6f9c5bb127e6
Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
46 # include <libintl.h> |
6f9c5bb127e6
Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
47 # undef _ |
6f9c5bb127e6
Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
48 # define _(String) dgettext (PACKAGE, String) |
6f9c5bb127e6
Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
49 # ifdef gettext_noop |
6f9c5bb127e6
Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
50 # define N_(String) gettext_noop (String) |
6f9c5bb127e6
Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
51 # else |
6f9c5bb127e6
Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
52 # define N_(String) (String) |
6f9c5bb127e6
Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
53 # endif |
611
a751d2b85a7d
Merge in Tuple changes from Audacious-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
537
diff
changeset
|
54 #else |
619
6f9c5bb127e6
Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
55 # define _LIBINTL_H |
6f9c5bb127e6
Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
56 # define textdomain(String) (String) |
6f9c5bb127e6
Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
57 # define gettext(String) (String) |
6f9c5bb127e6
Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
58 # define dgettext(Domain,Message) (Message) |
6f9c5bb127e6
Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
59 # define dcgettext(Domain,Message,Type) (Message) |
6f9c5bb127e6
Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
60 # define bindtextdomain(Domain,Directory) (Domain) |
6f9c5bb127e6
Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
61 # define _(String) (String) |
6f9c5bb127e6
Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
62 # define N_(String) (String) |
611
a751d2b85a7d
Merge in Tuple changes from Audacious-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
537
diff
changeset
|
63 #endif |
a751d2b85a7d
Merge in Tuple changes from Audacious-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
537
diff
changeset
|
64 |
619
6f9c5bb127e6
Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
65 |
516
c192468eb8ce
Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents:
506
diff
changeset
|
66 /* VFS replacement functions |
c192468eb8ce
Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents:
506
diff
changeset
|
67 */ |
c192468eb8ce
Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents:
506
diff
changeset
|
68 #ifdef __AUDACIOUS_NEWVFS__ |
657
acaba070cf49
Lots of cosmetic code cleanups; synced the de-gettextification from Audacious-SID, I suppose it makes some sense ...
Matti Hamalainen <ccr@tnsp.org>
parents:
652
diff
changeset
|
69 #define xs_file_t VFSFile |
652 | 70 #define xs_fopen(a,b) aud_vfs_fopen(a,b) |
71 #define xs_fclose(a) aud_vfs_fclose(a) | |
72 #define xs_fgetc(a) aud_vfs_getc(a) | |
73 #define xs_fread(a,b,c,d) aud_vfs_fread(a,b,c,d) | |
74 #define xs_feof(a) aud_vfs_feof(a) | |
516
c192468eb8ce
Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents:
506
diff
changeset
|
75 #define xs_ferror(a) (0) |
652 | 76 #define xs_ftell(a) aud_vfs_ftell(a) |
77 #define xs_fseek(a,b,c) aud_vfs_fseek(a,b,c) | |
516
c192468eb8ce
Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents:
506
diff
changeset
|
78 #else |
657
acaba070cf49
Lots of cosmetic code cleanups; synced the de-gettextification from Audacious-SID, I suppose it makes some sense ...
Matti Hamalainen <ccr@tnsp.org>
parents:
652
diff
changeset
|
79 #define xs_file_t FILE |
acaba070cf49
Lots of cosmetic code cleanups; synced the de-gettextification from Audacious-SID, I suppose it makes some sense ...
Matti Hamalainen <ccr@tnsp.org>
parents:
652
diff
changeset
|
80 #define xs_fopen(a,b) fopen(a,b) |
acaba070cf49
Lots of cosmetic code cleanups; synced the de-gettextification from Audacious-SID, I suppose it makes some sense ...
Matti Hamalainen <ccr@tnsp.org>
parents:
652
diff
changeset
|
81 #define xs_fclose(a) fclose(a) |
acaba070cf49
Lots of cosmetic code cleanups; synced the de-gettextification from Audacious-SID, I suppose it makes some sense ...
Matti Hamalainen <ccr@tnsp.org>
parents:
652
diff
changeset
|
82 #define xs_fgetc(a) fgetc(a) |
acaba070cf49
Lots of cosmetic code cleanups; synced the de-gettextification from Audacious-SID, I suppose it makes some sense ...
Matti Hamalainen <ccr@tnsp.org>
parents:
652
diff
changeset
|
83 #define xs_fread(a,b,c,d) fread(a,b,c,d) |
acaba070cf49
Lots of cosmetic code cleanups; synced the de-gettextification from Audacious-SID, I suppose it makes some sense ...
Matti Hamalainen <ccr@tnsp.org>
parents:
652
diff
changeset
|
84 #define xs_feof(a) feof(a) |
acaba070cf49
Lots of cosmetic code cleanups; synced the de-gettextification from Audacious-SID, I suppose it makes some sense ...
Matti Hamalainen <ccr@tnsp.org>
parents:
652
diff
changeset
|
85 #define xs_ferror(a) ferror(a) |
acaba070cf49
Lots of cosmetic code cleanups; synced the de-gettextification from Audacious-SID, I suppose it makes some sense ...
Matti Hamalainen <ccr@tnsp.org>
parents:
652
diff
changeset
|
86 #define xs_ftell(a) ftell(a) |
acaba070cf49
Lots of cosmetic code cleanups; synced the de-gettextification from Audacious-SID, I suppose it makes some sense ...
Matti Hamalainen <ccr@tnsp.org>
parents:
652
diff
changeset
|
87 #define xs_fseek(a,b,c) fseek(a,b,c) |
516
c192468eb8ce
Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents:
506
diff
changeset
|
88 #endif |
657
acaba070cf49
Lots of cosmetic code cleanups; synced the de-gettextification from Audacious-SID, I suppose it makes some sense ...
Matti Hamalainen <ccr@tnsp.org>
parents:
652
diff
changeset
|
89 guint16 xs_fread_be16(xs_file_t *); |
acaba070cf49
Lots of cosmetic code cleanups; synced the de-gettextification from Audacious-SID, I suppose it makes some sense ...
Matti Hamalainen <ccr@tnsp.org>
parents:
652
diff
changeset
|
90 guint32 xs_fread_be32(xs_file_t *); |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
657
diff
changeset
|
91 gint xs_fload_buffer(const gchar *, guint8 **, size_t *); |
398 | 92 |
516
c192468eb8ce
Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents:
506
diff
changeset
|
93 |
c192468eb8ce
Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents:
506
diff
changeset
|
94 /* Misc functions |
c192468eb8ce
Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents:
506
diff
changeset
|
95 */ |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
657
diff
changeset
|
96 gchar *xs_strncpy(gchar *, const gchar *, size_t); |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
657
diff
changeset
|
97 gint xs_pstrcpy(gchar **, const gchar *); |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
657
diff
changeset
|
98 gint xs_pstrcat(gchar **, const gchar *); |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
657
diff
changeset
|
99 void xs_pnstrcat(gchar *, size_t, const gchar *); |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
657
diff
changeset
|
100 gchar *xs_strrchr(gchar *, const gchar); |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
657
diff
changeset
|
101 void xs_findnext(const gchar *, size_t *); |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
657
diff
changeset
|
102 void xs_findeol(const gchar *, size_t *); |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
657
diff
changeset
|
103 void xs_findnum(const gchar *, size_t *); |
4 | 104 |
105 #ifdef __cplusplus | |
106 } | |
107 #endif | |
526
fa95d942f226
Header cleanup; Moved some types from xmms-sid.h to xs_player.h; Renamed few functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
516
diff
changeset
|
108 #endif /* XS_SUPPORT_H */ |