Mercurial > hg > xmms-sid
annotate src/xs_support.h @ 452:aec9f4beb401
New file reading functions.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 24 Jan 2007 21:57:04 +0000 |
parents | 933b9ea5923e |
children | 00a32ab5887d |
rev | line source |
---|---|
392
b09d74eb71e6
Working on getting STIL and SLDB using completely dynamically allocated
Matti Hamalainen <ccr@tnsp.org>
parents:
269
diff
changeset
|
1 #ifndef _XS_SUPPORT_H |
b09d74eb71e6
Working on getting STIL and SLDB using completely dynamically allocated
Matti Hamalainen <ccr@tnsp.org>
parents:
269
diff
changeset
|
2 #define _XS_SUPPORT_H |
4 | 3 |
4 #ifdef __cplusplus | |
5 extern "C" { | |
6 #endif | |
7 | |
49
3518ca5c8b0f
Support for compile-time big/little-endian optimizations in audio output
Matti Hamalainen <ccr@tnsp.org>
parents:
38
diff
changeset
|
8 #include "xmms-sid.h" |
226
858c09f59011
Moved some functions from xs_length.c here.
Matti Hamalainen <ccr@tnsp.org>
parents:
218
diff
changeset
|
9 #include <stdio.h> |
4 | 10 |
218 | 11 #ifdef HAVE_STRING_H |
12 #include <string.h> | |
13 #else | |
14 #ifdef HAVE_STRINGS_H | |
15 #include <strings.h> | |
16 #endif | |
17 #endif | |
18 | |
19 #ifdef HAVE_MEMORY_H | |
20 #include <memory.h> | |
21 #endif | |
22 | |
398 | 23 #ifndef HAVE_FSEEKO |
24 #define fseeko fseek | |
25 #define ftello ftell | |
26 #endif | |
218 | 27 |
452
aec9f4beb401
New file reading functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
398
diff
changeset
|
28 |
aec9f4beb401
New file reading functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
398
diff
changeset
|
29 #define t_xs_file FILE |
aec9f4beb401
New file reading functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
398
diff
changeset
|
30 |
aec9f4beb401
New file reading functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
398
diff
changeset
|
31 |
aec9f4beb401
New file reading functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
398
diff
changeset
|
32 /* Functions |
4 | 33 */ |
452
aec9f4beb401
New file reading functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
398
diff
changeset
|
34 t_xs_file *xs_fopen(gchar *, const gchar *); |
aec9f4beb401
New file reading functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
398
diff
changeset
|
35 gint xs_fclose(t_xs_file *); |
aec9f4beb401
New file reading functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
398
diff
changeset
|
36 gint xs_fgetc(t_xs_file *); |
aec9f4beb401
New file reading functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
398
diff
changeset
|
37 guint16 xs_fread_be16(t_xs_file *); |
aec9f4beb401
New file reading functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
398
diff
changeset
|
38 guint32 xs_fread_be32(t_xs_file *); |
aec9f4beb401
New file reading functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
398
diff
changeset
|
39 size_t xs_fread(void *, size_t, size_t, t_xs_file *); |
aec9f4beb401
New file reading functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
398
diff
changeset
|
40 gint xs_fgets(gchar *, gint, t_xs_file *); |
aec9f4beb401
New file reading functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
398
diff
changeset
|
41 |
398 | 42 |
218 | 43 gchar *xs_strncpy(gchar *, gchar *, size_t); |
206
8b896d461fdb
Trivial fixes and added strncpy replacement.
Matti Hamalainen <ccr@tnsp.org>
parents:
109
diff
changeset
|
44 gint xs_pstrcpy(gchar **, const gchar *); |
8b896d461fdb
Trivial fixes and added strncpy replacement.
Matti Hamalainen <ccr@tnsp.org>
parents:
109
diff
changeset
|
45 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
|
46 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
|
47 gchar *xs_strrchr(gchar *, gchar); |
109
578b71b62eeb
Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents:
87
diff
changeset
|
48 inline void xs_findnext(gchar *, guint *); |
578b71b62eeb
Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents:
87
diff
changeset
|
49 inline void xs_findeol(gchar *, guint *); |
578b71b62eeb
Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents:
87
diff
changeset
|
50 inline void xs_findnum(gchar *, guint *); |
4 | 51 |
214 | 52 #ifdef HAVE_MEMSET |
53 #define xs_memset memset | |
54 #else | |
55 void *xs_memset(void *, int, size_t); | |
56 #endif | |
57 | |
4 | 58 #ifdef __cplusplus |
59 } | |
60 #endif | |
392
b09d74eb71e6
Working on getting STIL and SLDB using completely dynamically allocated
Matti Hamalainen <ccr@tnsp.org>
parents:
269
diff
changeset
|
61 #endif /* _XS_SUPPORT_H */ |