annotate src/xs_support.h @ 660:b0743dc9165d

Change tabs to 4 spaces, everywhere.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 02 Apr 2008 22:10:05 +0300
parents acaba070cf49
children 27fac414349d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4 #ifdef __cplusplus
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5 extern "C" {
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6 #endif
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
14
532
bc548249464a Audacious glue.
Matti Hamalainen <ccr@tnsp.org>
parents: 527
diff changeset
15 #ifdef AUDACIOUS_PLUGIN
bc548249464a Audacious glue.
Matti Hamalainen <ccr@tnsp.org>
parents: 527
diff changeset
16 #include <audacious/plugin.h>
bc548249464a Audacious glue.
Matti Hamalainen <ccr@tnsp.org>
parents: 527
diff changeset
17 #include <audacious/output.h>
611
a751d2b85a7d Merge in Tuple changes from Audacious-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 537
diff changeset
18 #include <audacious/util.h>
532
bc548249464a Audacious glue.
Matti Hamalainen <ccr@tnsp.org>
parents: 527
diff changeset
19 #else
bc548249464a Audacious glue.
Matti Hamalainen <ccr@tnsp.org>
parents: 527
diff changeset
20 #include <xmms/plugin.h>
535
d609d0ece252 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 532
diff changeset
21 #include <xmms/util.h>
611
a751d2b85a7d Merge in Tuple changes from Audacious-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 537
diff changeset
22 #include <xmms/titlestring.h>
532
bc548249464a Audacious glue.
Matti Hamalainen <ccr@tnsp.org>
parents: 527
diff changeset
23 #endif
bc548249464a Audacious glue.
Matti Hamalainen <ccr@tnsp.org>
parents: 527
diff changeset
24
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
25 #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
26 #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
27 #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
28 #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
29 #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
30
218
57231fe14369 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 214
diff changeset
31 #ifdef HAVE_STRING_H
57231fe14369 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 214
diff changeset
32 #include <string.h>
57231fe14369 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 214
diff changeset
33 #else
57231fe14369 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 214
diff changeset
34 #ifdef HAVE_STRINGS_H
57231fe14369 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 214
diff changeset
35 #include <strings.h>
57231fe14369 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 214
diff changeset
36 #endif
57231fe14369 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 214
diff changeset
37 #endif
57231fe14369 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 214
diff changeset
38
57231fe14369 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 214
diff changeset
39 #ifdef HAVE_MEMORY_H
57231fe14369 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 214
diff changeset
40 #include <memory.h>
57231fe14369 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 214
diff changeset
41 #endif
57231fe14369 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 214
diff changeset
42
452
aec9f4beb401 New file reading functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 398
diff changeset
43
619
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
44 /* Standard gettext macros
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
45 */
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
46 #ifdef ENABLE_NLS
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
47 # include <libintl.h>
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
48 # undef _
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
49 # define _(String) dgettext (PACKAGE, String)
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
50 # ifdef gettext_noop
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
51 # define N_(String) gettext_noop (String)
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
52 # else
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
53 # define N_(String) (String)
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
54 # endif
611
a751d2b85a7d Merge in Tuple changes from Audacious-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 537
diff changeset
55 #else
619
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
56 # define _LIBINTL_H
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
57 # define textdomain(String) (String)
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
58 # define gettext(String) (String)
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
59 # define dgettext(Domain,Message) (Message)
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
60 # define dcgettext(Domain,Message,Type) (Message)
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
61 # define bindtextdomain(Domain,Directory) (Domain)
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
62 # define _(String) (String)
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
63 # define N_(String) (String)
611
a751d2b85a7d Merge in Tuple changes from Audacious-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 537
diff changeset
64 #endif
a751d2b85a7d Merge in Tuple changes from Audacious-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 537
diff changeset
65
619
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
66
516
c192468eb8ce Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents: 506
diff changeset
67 /* VFS replacement functions
c192468eb8ce Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents: 506
diff changeset
68 */
c192468eb8ce Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents: 506
diff changeset
69 #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
70 #define xs_file_t VFSFile
652
7a2d62a249a4 Synchronize with Aud-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 634
diff changeset
71 #define xs_fopen(a,b) aud_vfs_fopen(a,b)
7a2d62a249a4 Synchronize with Aud-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 634
diff changeset
72 #define xs_fclose(a) aud_vfs_fclose(a)
7a2d62a249a4 Synchronize with Aud-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 634
diff changeset
73 #define xs_fgetc(a) aud_vfs_getc(a)
7a2d62a249a4 Synchronize with Aud-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 634
diff changeset
74 #define xs_fread(a,b,c,d) aud_vfs_fread(a,b,c,d)
7a2d62a249a4 Synchronize with Aud-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 634
diff changeset
75 #define xs_feof(a) aud_vfs_feof(a)
516
c192468eb8ce Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents: 506
diff changeset
76 #define xs_ferror(a) (0)
652
7a2d62a249a4 Synchronize with Aud-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 634
diff changeset
77 #define xs_ftell(a) aud_vfs_ftell(a)
7a2d62a249a4 Synchronize with Aud-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 634
diff changeset
78 #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
79 #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
80 #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
81 #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
82 #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
83 #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
84 #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
85 #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
86 #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
87 #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
88 #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
89 #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
90 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
91 guint32 xs_fread_be32(xs_file_t *);
660
b0743dc9165d Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 657
diff changeset
92 gint xs_fload_buffer(const gchar *, guint8 **, size_t *);
398
933b9ea5923e Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 392
diff changeset
93
516
c192468eb8ce Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents: 506
diff changeset
94
c192468eb8ce Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents: 506
diff changeset
95 /* Misc functions
c192468eb8ce Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents: 506
diff changeset
96 */
660
b0743dc9165d Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 657
diff changeset
97 gchar *xs_strncpy(gchar *, const gchar *, size_t);
b0743dc9165d Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 657
diff changeset
98 gint xs_pstrcpy(gchar **, const gchar *);
b0743dc9165d Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 657
diff changeset
99 gint xs_pstrcat(gchar **, const gchar *);
b0743dc9165d Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 657
diff changeset
100 void xs_pnstrcat(gchar *, size_t, const gchar *);
b0743dc9165d Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 657
diff changeset
101 gchar *xs_strrchr(gchar *, const gchar);
b0743dc9165d Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 657
diff changeset
102 void xs_findnext(const gchar *, size_t *);
b0743dc9165d Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 657
diff changeset
103 void xs_findeol(const gchar *, size_t *);
b0743dc9165d Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 657
diff changeset
104 void xs_findnum(const gchar *, size_t *);
4
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
105
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
106 #ifdef __cplusplus
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
107 }
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
108 #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
109 #endif /* XS_SUPPORT_H */