annotate src/xs_support.h @ 953:b2caef664524

Add new helper functions xs_fread_str() and xs_fread_byte().
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 20 Nov 2012 21:26:25 +0200
parents abbf089b119d
children 3c2efa18c422
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>
946
f8e1de328ac1 Fix various compilation related issues, make includes more POSIX compliant,
Matti Hamalainen <ccr@tnsp.org>
parents: 893
diff changeset
14 #include <ctype.h>
f8e1de328ac1 Fix various compilation related issues, make includes more POSIX compliant,
Matti Hamalainen <ccr@tnsp.org>
parents: 893
diff changeset
15 #ifdef HAVE_STDARG_H
880
000baa9fcd4f Oops, need to include stdarg.h from the header as well.
Matti Hamalainen <ccr@tnsp.org>
parents: 879
diff changeset
16 #include <stdarg.h>
946
f8e1de328ac1 Fix various compilation related issues, make includes more POSIX compliant,
Matti Hamalainen <ccr@tnsp.org>
parents: 893
diff changeset
17 #endif
f8e1de328ac1 Fix various compilation related issues, make includes more POSIX compliant,
Matti Hamalainen <ccr@tnsp.org>
parents: 893
diff changeset
18 #ifdef HAVE_STDLIB_H
f8e1de328ac1 Fix various compilation related issues, make includes more POSIX compliant,
Matti Hamalainen <ccr@tnsp.org>
parents: 893
diff changeset
19 #include <stdlib.h>
f8e1de328ac1 Fix various compilation related issues, make includes more POSIX compliant,
Matti Hamalainen <ccr@tnsp.org>
parents: 893
diff changeset
20 #endif
f8e1de328ac1 Fix various compilation related issues, make includes more POSIX compliant,
Matti Hamalainen <ccr@tnsp.org>
parents: 893
diff changeset
21 #ifdef HAVE_UNISTD_H
f8e1de328ac1 Fix various compilation related issues, make includes more POSIX compliant,
Matti Hamalainen <ccr@tnsp.org>
parents: 893
diff changeset
22 #include <unistd.h>
f8e1de328ac1 Fix various compilation related issues, make includes more POSIX compliant,
Matti Hamalainen <ccr@tnsp.org>
parents: 893
diff changeset
23 #endif
4
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
24
532
bc548249464a Audacious glue.
Matti Hamalainen <ccr@tnsp.org>
parents: 527
diff changeset
25 #ifdef AUDACIOUS_PLUGIN
bc548249464a Audacious glue.
Matti Hamalainen <ccr@tnsp.org>
parents: 527
diff changeset
26 #include <audacious/plugin.h>
bc548249464a Audacious glue.
Matti Hamalainen <ccr@tnsp.org>
parents: 527
diff changeset
27 #include <audacious/output.h>
bc548249464a Audacious glue.
Matti Hamalainen <ccr@tnsp.org>
parents: 527
diff changeset
28 #else
bc548249464a Audacious glue.
Matti Hamalainen <ccr@tnsp.org>
parents: 527
diff changeset
29 #include <xmms/plugin.h>
535
d609d0ece252 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 532
diff changeset
30 #include <xmms/util.h>
611
a751d2b85a7d Merge in Tuple changes from Audacious-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 537
diff changeset
31 #include <xmms/titlestring.h>
532
bc548249464a Audacious glue.
Matti Hamalainen <ccr@tnsp.org>
parents: 527
diff changeset
32 #endif
bc548249464a Audacious glue.
Matti Hamalainen <ccr@tnsp.org>
parents: 527
diff changeset
33
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
34 #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
35 #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
36 #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
37 #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
38 #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
39
218
57231fe14369 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 214
diff changeset
40 #ifdef HAVE_STRING_H
57231fe14369 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 214
diff changeset
41 #include <string.h>
57231fe14369 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 214
diff changeset
42 #else
57231fe14369 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 214
diff changeset
43 #ifdef HAVE_STRINGS_H
57231fe14369 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 214
diff changeset
44 #include <strings.h>
57231fe14369 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 214
diff changeset
45 #endif
57231fe14369 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 214
diff changeset
46 #endif
57231fe14369 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 214
diff changeset
47
57231fe14369 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 214
diff changeset
48 #ifdef HAVE_MEMORY_H
57231fe14369 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 214
diff changeset
49 #include <memory.h>
57231fe14369 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 214
diff changeset
50 #endif
57231fe14369 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 214
diff changeset
51
452
aec9f4beb401 New file reading functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 398
diff changeset
52
619
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
53 /* Standard gettext macros
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
54 */
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
55 #ifdef ENABLE_NLS
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
56 # include <libintl.h>
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
57 # undef _
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
58 # define _(String) dgettext (PACKAGE, String)
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
59 # ifdef gettext_noop
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
60 # define N_(String) gettext_noop (String)
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
61 # else
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
62 # define N_(String) (String)
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
63 # endif
611
a751d2b85a7d Merge in Tuple changes from Audacious-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 537
diff changeset
64 #else
619
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
65 # define _LIBINTL_H
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
66 # define textdomain(String) (String)
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
67 # define gettext(String) (String)
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
68 # define dgettext(Domain,Message) (Message)
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
69 # define dcgettext(Domain,Message,Type) (Message)
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
70 # define bindtextdomain(Domain,Directory) (Domain)
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
71 # define _(String) (String)
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
72 # define N_(String) (String)
611
a751d2b85a7d Merge in Tuple changes from Audacious-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 537
diff changeset
73 #endif
a751d2b85a7d Merge in Tuple changes from Audacious-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 537
diff changeset
74
619
6f9c5bb127e6 Moved NLS macros to xs_support.h
Matti Hamalainen <ccr@tnsp.org>
parents: 611
diff changeset
75
771
469b341734b2 Move MD5 implementation into xs_support, and some related Audacious
Matti Hamalainen <ccr@tnsp.org>
parents: 763
diff changeset
76 /* Typedefs
469b341734b2 Move MD5 implementation into xs_support, and some related Audacious
Matti Hamalainen <ccr@tnsp.org>
parents: 763
diff changeset
77 */
469b341734b2 Move MD5 implementation into xs_support, and some related Audacious
Matti Hamalainen <ccr@tnsp.org>
parents: 763
diff changeset
78 #ifdef AUDACIOUS_PLUGIN
469b341734b2 Move MD5 implementation into xs_support, and some related Audacious
Matti Hamalainen <ccr@tnsp.org>
parents: 763
diff changeset
79 #include <audacious/audutil.h>
469b341734b2 Move MD5 implementation into xs_support, and some related Audacious
Matti Hamalainen <ccr@tnsp.org>
parents: 763
diff changeset
80 #define XS_MD5HASH_LENGTH AUD_MD5HASH_LENGTH
469b341734b2 Move MD5 implementation into xs_support, and some related Audacious
Matti Hamalainen <ccr@tnsp.org>
parents: 763
diff changeset
81 #define XS_MD5HASH_LENGTH_CH AUD_MD5HASH_LENGTH_CH
469b341734b2 Move MD5 implementation into xs_support, and some related Audacious
Matti Hamalainen <ccr@tnsp.org>
parents: 763
diff changeset
82 #define xs_md5hash_t aud_md5hash_t
469b341734b2 Move MD5 implementation into xs_support, and some related Audacious
Matti Hamalainen <ccr@tnsp.org>
parents: 763
diff changeset
83 #define xs_md5state_t aud_md5state_t
469b341734b2 Move MD5 implementation into xs_support, and some related Audacious
Matti Hamalainen <ccr@tnsp.org>
parents: 763
diff changeset
84 #define xs_md5_init aud_md5_init
469b341734b2 Move MD5 implementation into xs_support, and some related Audacious
Matti Hamalainen <ccr@tnsp.org>
parents: 763
diff changeset
85 #define xs_md5_append aud_md5_append
469b341734b2 Move MD5 implementation into xs_support, and some related Audacious
Matti Hamalainen <ccr@tnsp.org>
parents: 763
diff changeset
86 #define xs_md5_finish aud_md5_finish
469b341734b2 Move MD5 implementation into xs_support, and some related Audacious
Matti Hamalainen <ccr@tnsp.org>
parents: 763
diff changeset
87 #else
469b341734b2 Move MD5 implementation into xs_support, and some related Audacious
Matti Hamalainen <ccr@tnsp.org>
parents: 763
diff changeset
88
469b341734b2 Move MD5 implementation into xs_support, and some related Audacious
Matti Hamalainen <ccr@tnsp.org>
parents: 763
diff changeset
89 typedef struct md5_state_s {
469b341734b2 Move MD5 implementation into xs_support, and some related Audacious
Matti Hamalainen <ccr@tnsp.org>
parents: 763
diff changeset
90 guint32 bits[2]; /* message length in bits, lsw first */
469b341734b2 Move MD5 implementation into xs_support, and some related Audacious
Matti Hamalainen <ccr@tnsp.org>
parents: 763
diff changeset
91 guint32 buf[4]; /* digest buffer */
469b341734b2 Move MD5 implementation into xs_support, and some related Audacious
Matti Hamalainen <ccr@tnsp.org>
parents: 763
diff changeset
92 guint8 in[64]; /* accumulate block */
469b341734b2 Move MD5 implementation into xs_support, and some related Audacious
Matti Hamalainen <ccr@tnsp.org>
parents: 763
diff changeset
93 } xs_md5state_t;
469b341734b2 Move MD5 implementation into xs_support, and some related Audacious
Matti Hamalainen <ccr@tnsp.org>
parents: 763
diff changeset
94
469b341734b2 Move MD5 implementation into xs_support, and some related Audacious
Matti Hamalainen <ccr@tnsp.org>
parents: 763
diff changeset
95 #define XS_MD5HASH_LENGTH (16)
469b341734b2 Move MD5 implementation into xs_support, and some related Audacious
Matti Hamalainen <ccr@tnsp.org>
parents: 763
diff changeset
96 #define XS_MD5HASH_LENGTH_CH (XS_MD5HASH_LENGTH * 2)
469b341734b2 Move MD5 implementation into xs_support, and some related Audacious
Matti Hamalainen <ccr@tnsp.org>
parents: 763
diff changeset
97
469b341734b2 Move MD5 implementation into xs_support, and some related Audacious
Matti Hamalainen <ccr@tnsp.org>
parents: 763
diff changeset
98 typedef guint8 xs_md5hash_t[XS_MD5HASH_LENGTH];
469b341734b2 Move MD5 implementation into xs_support, and some related Audacious
Matti Hamalainen <ccr@tnsp.org>
parents: 763
diff changeset
99
469b341734b2 Move MD5 implementation into xs_support, and some related Audacious
Matti Hamalainen <ccr@tnsp.org>
parents: 763
diff changeset
100 #endif /* AUDACIOUS_PLUGIN */
469b341734b2 Move MD5 implementation into xs_support, and some related Audacious
Matti Hamalainen <ccr@tnsp.org>
parents: 763
diff changeset
101
469b341734b2 Move MD5 implementation into xs_support, and some related Audacious
Matti Hamalainen <ccr@tnsp.org>
parents: 763
diff changeset
102
516
c192468eb8ce Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents: 506
diff changeset
103 /* VFS replacement functions
c192468eb8ce Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents: 506
diff changeset
104 */
c192468eb8ce Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents: 506
diff changeset
105 #ifdef __AUDACIOUS_NEWVFS__
751
55eea3fa8868 Rename some structures.
Matti Hamalainen <ccr@tnsp.org>
parents: 748
diff changeset
106 #define XSFile VFSFile
652
7a2d62a249a4 Synchronize with Aud-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 634
diff changeset
107 #define xs_fopen(a,b) aud_vfs_fopen(a,b)
7a2d62a249a4 Synchronize with Aud-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 634
diff changeset
108 #define xs_fclose(a) aud_vfs_fclose(a)
7a2d62a249a4 Synchronize with Aud-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 634
diff changeset
109 #define xs_fgetc(a) aud_vfs_getc(a)
7a2d62a249a4 Synchronize with Aud-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 634
diff changeset
110 #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
111 #define xs_feof(a) aud_vfs_feof(a)
516
c192468eb8ce Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents: 506
diff changeset
112 #define xs_ferror(a) (0)
652
7a2d62a249a4 Synchronize with Aud-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 634
diff changeset
113 #define xs_ftell(a) aud_vfs_ftell(a)
7a2d62a249a4 Synchronize with Aud-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 634
diff changeset
114 #define xs_fseek(a,b,c) aud_vfs_fseek(a,b,c)
866
6b47d9813067 Add xs_fsize() helper function.
Matti Hamalainen <ccr@tnsp.org>
parents: 781
diff changeset
115 #define xs_fsize(a) aud_vfs_fsize(a)
516
c192468eb8ce Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents: 506
diff changeset
116 #else
751
55eea3fa8868 Rename some structures.
Matti Hamalainen <ccr@tnsp.org>
parents: 748
diff changeset
117 #define XSFile FILE
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
118 #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
119 #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
120 #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
121 #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
122 #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
123 #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
124 #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
125 #define xs_fseek(a,b,c) fseek(a,b,c)
878
9d31c1344f26 Add xs_fsize() to the public functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 868
diff changeset
126 off_t xs_fsize(XSFile *f);
516
c192468eb8ce Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents: 506
diff changeset
127 #endif
868
3c3569894b23 Cosmetics.
Matti Hamalainen <ccr@tnsp.org>
parents: 867
diff changeset
128
751
55eea3fa8868 Rename some structures.
Matti Hamalainen <ccr@tnsp.org>
parents: 748
diff changeset
129 guint16 xs_fread_be16(XSFile *);
55eea3fa8868 Rename some structures.
Matti Hamalainen <ccr@tnsp.org>
parents: 748
diff changeset
130 guint32 xs_fread_be32(XSFile *);
953
b2caef664524 Add new helper functions xs_fread_str() and xs_fread_byte().
Matti Hamalainen <ccr@tnsp.org>
parents: 952
diff changeset
131 gboolean xs_fread_str(XSFile *, void *, const size_t);
b2caef664524 Add new helper functions xs_fread_str() and xs_fread_byte().
Matti Hamalainen <ccr@tnsp.org>
parents: 952
diff changeset
132 gboolean xs_fread_byte(XSFile *, guint8 *);
867
051ef70d0123 Improve xs_fload_buffer() and add xs_fload_buffer_path().
Matti Hamalainen <ccr@tnsp.org>
parents: 866
diff changeset
133 gboolean xs_fload_buffer(const gchar *filename,
051ef70d0123 Improve xs_fload_buffer() and add xs_fload_buffer_path().
Matti Hamalainen <ccr@tnsp.org>
parents: 866
diff changeset
134 guint8 **pbuf, size_t *bufSize, const size_t maxSize, gboolean failMaxSize);
051ef70d0123 Improve xs_fload_buffer() and add xs_fload_buffer_path().
Matti Hamalainen <ccr@tnsp.org>
parents: 866
diff changeset
135 gboolean xs_fload_buffer_path(const gchar *ppath, const gchar *pfilename,
051ef70d0123 Improve xs_fload_buffer() and add xs_fload_buffer_path().
Matti Hamalainen <ccr@tnsp.org>
parents: 866
diff changeset
136 guint8 **pbuf, size_t *bufSize, const size_t maxSize, gboolean failMaxSize);
398
933b9ea5923e Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 392
diff changeset
137
893
c835aa129e3b Add two new utility functions for checking whether a given path is a
Matti Hamalainen <ccr@tnsp.org>
parents: 880
diff changeset
138 gboolean xs_is_dir_path(const gchar *path);
952
abbf089b119d Cosmetics.
Matti Hamalainen <ccr@tnsp.org>
parents: 946
diff changeset
139 gchar * xs_get_dir_path(const gchar *path);
893
c835aa129e3b Add two new utility functions for checking whether a given path is a
Matti Hamalainen <ccr@tnsp.org>
parents: 880
diff changeset
140
516
c192468eb8ce Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents: 506
diff changeset
141
879
2a50d36215c3 Move error printing function to xs_support.
Matti Hamalainen <ccr@tnsp.org>
parents: 878
diff changeset
142 /* Error messages and debugging
2a50d36215c3 Move error printing function to xs_support.
Matti Hamalainen <ccr@tnsp.org>
parents: 878
diff changeset
143 */
2a50d36215c3 Move error printing function to xs_support.
Matti Hamalainen <ccr@tnsp.org>
parents: 878
diff changeset
144 void xs_error(const char *, ...);
2a50d36215c3 Move error printing function to xs_support.
Matti Hamalainen <ccr@tnsp.org>
parents: 878
diff changeset
145
2a50d36215c3 Move error printing function to xs_support.
Matti Hamalainen <ccr@tnsp.org>
parents: 878
diff changeset
146
516
c192468eb8ce Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents: 506
diff changeset
147 /* Misc functions
c192468eb8ce Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents: 506
diff changeset
148 */
660
b0743dc9165d Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 657
diff changeset
149 gint xs_pstrcpy(gchar **, const gchar *);
b0743dc9165d Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 657
diff changeset
150 gint xs_pstrcat(gchar **, const gchar *);
b0743dc9165d Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 657
diff changeset
151 void xs_pnstrcat(gchar *, size_t, const gchar *);
b0743dc9165d Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 657
diff changeset
152 void xs_findnext(const gchar *, size_t *);
b0743dc9165d Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 657
diff changeset
153 void xs_findeol(const gchar *, size_t *);
b0743dc9165d Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 657
diff changeset
154 void xs_findnum(const gchar *, size_t *);
4
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
155
714
229fa2d043b9 Moved filter routines to xs_support.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents: 706
diff changeset
156
781
69ab3df105c1 Fix an #ifdef, it was reversed.
Matti Hamalainen <ccr@tnsp.org>
parents: 771
diff changeset
157 #ifndef AUDACIOUS_PLUGIN
771
469b341734b2 Move MD5 implementation into xs_support, and some related Audacious
Matti Hamalainen <ccr@tnsp.org>
parents: 763
diff changeset
158 void xs_md5_init(xs_md5state_t *ctx);
469b341734b2 Move MD5 implementation into xs_support, and some related Audacious
Matti Hamalainen <ccr@tnsp.org>
parents: 763
diff changeset
159 void xs_md5_append(xs_md5state_t *ctx, const guint8 *buf, guint len);
469b341734b2 Move MD5 implementation into xs_support, and some related Audacious
Matti Hamalainen <ccr@tnsp.org>
parents: 763
diff changeset
160 void xs_md5_finish(xs_md5state_t *ctx, xs_md5hash_t digest);
469b341734b2 Move MD5 implementation into xs_support, and some related Audacious
Matti Hamalainen <ccr@tnsp.org>
parents: 763
diff changeset
161 #endif
469b341734b2 Move MD5 implementation into xs_support, and some related Audacious
Matti Hamalainen <ccr@tnsp.org>
parents: 763
diff changeset
162
4
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
163 #ifdef __cplusplus
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
164 }
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
165 #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
166 #endif /* XS_SUPPORT_H */