Mercurial > hg > xmms-sid
annotate src/xs_support.h @ 537:3982cba928f2
Forgot to define xs_fseek()
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 21 Feb 2007 01:19:04 +0000 |
parents | d609d0ece252 |
children | a751d2b85a7d |
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 #include <audacious/util.h> | |
19 #else | |
20 #include <xmms/plugin.h> | |
535 | 21 #include <xmms/util.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 |
516
c192468eb8ce
Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents:
506
diff
changeset
|
43 /* VFS replacement functions |
c192468eb8ce
Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents:
506
diff
changeset
|
44 */ |
c192468eb8ce
Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents:
506
diff
changeset
|
45 #ifdef __AUDACIOUS_NEWVFS__ |
532 | 46 #include <audacious/vfs.h> |
516
c192468eb8ce
Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents:
506
diff
changeset
|
47 #define t_xs_file VFSFile |
c192468eb8ce
Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents:
506
diff
changeset
|
48 #define xs_fopen(a,b) vfs_fopen(a,b) |
c192468eb8ce
Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents:
506
diff
changeset
|
49 #define xs_fclose(a) vfs_fclose(a) |
c192468eb8ce
Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents:
506
diff
changeset
|
50 #define xs_fgetc(a) vfs_getc(a) |
c192468eb8ce
Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents:
506
diff
changeset
|
51 #define xs_fread(a,b,c,d) vfs_fread(a,b,c,d) |
c192468eb8ce
Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents:
506
diff
changeset
|
52 #define xs_feof(a) vfs_feof(a) |
c192468eb8ce
Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents:
506
diff
changeset
|
53 #define xs_ferror(a) (0) |
c192468eb8ce
Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents:
506
diff
changeset
|
54 #define xs_ftell(a) vfs_ftell(a) |
537
3982cba928f2
Forgot to define xs_fseek()
Matti Hamalainen <ccr@tnsp.org>
parents:
535
diff
changeset
|
55 #define xs_fseek(a,b,c) vfs_fseek(a,b,c) |
516
c192468eb8ce
Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents:
506
diff
changeset
|
56 #else |
452
aec9f4beb401
New file reading functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
398
diff
changeset
|
57 #define t_xs_file FILE |
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
|
58 t_xs_file *xs_fopen(const gchar *, const gchar *); |
452
aec9f4beb401
New file reading functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
398
diff
changeset
|
59 gint xs_fclose(t_xs_file *); |
aec9f4beb401
New file reading functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
398
diff
changeset
|
60 gint xs_fgetc(t_xs_file *); |
aec9f4beb401
New file reading functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
398
diff
changeset
|
61 size_t xs_fread(void *, size_t, size_t, t_xs_file *); |
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
|
62 gint xs_feof(t_xs_file *); |
00a32ab5887d
Moved some things from xmms-sid.h to xs_support.h; File handling functions
Matti Hamalainen <ccr@tnsp.org>
parents:
452
diff
changeset
|
63 gint xs_ferror(t_xs_file *); |
516
c192468eb8ce
Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents:
506
diff
changeset
|
64 glong xs_ftell(t_xs_file *); |
537
3982cba928f2
Forgot to define xs_fseek()
Matti Hamalainen <ccr@tnsp.org>
parents:
535
diff
changeset
|
65 gint xs_fseek(t_xs_file *, glong, gint); |
516
c192468eb8ce
Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents:
506
diff
changeset
|
66 #endif |
c192468eb8ce
Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents:
506
diff
changeset
|
67 guint16 xs_fread_be16(t_xs_file *); |
c192468eb8ce
Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents:
506
diff
changeset
|
68 guint32 xs_fread_be32(t_xs_file *); |
527
fe8b41abd923
Now everything necessary should be using the VFS functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
526
diff
changeset
|
69 gint xs_fload_buffer(gchar *, guint8 **, size_t *); |
398 | 70 |
516
c192468eb8ce
Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents:
506
diff
changeset
|
71 |
c192468eb8ce
Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents:
506
diff
changeset
|
72 /* Misc functions |
c192468eb8ce
Audacious VFS support functions finished.
Matti Hamalainen <ccr@tnsp.org>
parents:
506
diff
changeset
|
73 */ |
218 | 74 gchar *xs_strncpy(gchar *, gchar *, size_t); |
206
8b896d461fdb
Trivial fixes and added strncpy replacement.
Matti Hamalainen <ccr@tnsp.org>
parents:
109
diff
changeset
|
75 gint xs_pstrcpy(gchar **, const gchar *); |
8b896d461fdb
Trivial fixes and added strncpy replacement.
Matti Hamalainen <ccr@tnsp.org>
parents:
109
diff
changeset
|
76 gint xs_pstrcat(gchar **, const gchar *); |
239
7833df935239
Added xs_pnstrcat() to ease forming of limited size strings.
Matti Hamalainen <ccr@tnsp.org>
parents:
226
diff
changeset
|
77 void xs_pnstrcat(gchar *, size_t, gchar *); |
56
6a3ce7260ae1
Changed some standard functions to glib ones
Matti Hamalainen <ccr@tnsp.org>
parents:
49
diff
changeset
|
78 gchar *xs_strrchr(gchar *, gchar); |
506 | 79 void xs_findnext(gchar *, size_t *); |
80 void xs_findeol(gchar *, size_t *); | |
81 void xs_findnum(gchar *, size_t *); | |
4 | 82 |
214 | 83 #ifdef HAVE_MEMSET |
84 #define xs_memset memset | |
85 #else | |
86 void *xs_memset(void *, int, size_t); | |
87 #endif | |
88 | |
4 | 89 #ifdef __cplusplus |
90 } | |
91 #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
|
92 #endif /* XS_SUPPORT_H */ |