diff options
author | Daniel Stenberg <daniel@haxx.se> | 2002-05-05 11:59:50 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2002-05-05 11:59:50 +0000 |
commit | 5a833679dc9ea94776108665628ee2ef71a02358 (patch) | |
tree | d5cdd0f81a71b15d134d747e6d013d81508845cb /firmware | |
parent | b48a4fa80a3bde68e2cd5bb9113ebd78f0e115ab (diff) | |
download | rockbox-5a833679dc9ea94776108665628ee2ef71a02358.tar.gz rockbox-5a833679dc9ea94776108665628ee2ef71a02358.zip |
removed read_file_into_buffer()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@444 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/disk.c | 34 | ||||
-rw-r--r-- | firmware/disk.h | 2 |
2 files changed, 0 insertions, 36 deletions
diff --git a/firmware/disk.c b/firmware/disk.c index c32a39be41..acd765bab8 100644 --- a/firmware/disk.c +++ b/firmware/disk.c | |||
@@ -23,40 +23,6 @@ | |||
23 | #include "debug.h" | 23 | #include "debug.h" |
24 | #include "panic.h" | 24 | #include "panic.h" |
25 | 25 | ||
26 | void read_file_into_buffer( char **buf, const char *filename ) | ||
27 | { | ||
28 | int i; | ||
29 | FILE *fp; | ||
30 | int count = 0; | ||
31 | |||
32 | /*DEBUG( "read_file_into_buffer( %s, %s )\n", *buf, filename ); */ | ||
33 | |||
34 | fp = fopen( filename, "r" ); | ||
35 | |||
36 | if( fp == NULL ) | ||
37 | { | ||
38 | panicf( "failed to open file: %s\n", filename ); | ||
39 | } | ||
40 | |||
41 | while( ( i = getc( fp ) ) != EOF ) | ||
42 | { | ||
43 | /*printf( "%d-'%c'\n", count, i ); */ | ||
44 | count++; | ||
45 | *buf = (char *)realloc( *buf, count * sizeof( char ) ); | ||
46 | /*printf( "%d='%s'\n", *buf, *buf ); */ | ||
47 | (*(buf))[count - 1] = (char)i; | ||
48 | /*printf( "%d='%s'\n", *buf, *buf );*/ | ||
49 | } | ||
50 | |||
51 | /* add null terminator */ | ||
52 | |||
53 | *buf = (char *)realloc( *buf, count * sizeof( char ) ); | ||
54 | (*(buf))[ count ] = '\0'; | ||
55 | |||
56 | /* count -2 because of 0 start and \0 terminator | ||
57 | printf( "read %d bytes: '%s'\n", count - 2, *buf ); */ | ||
58 | } | ||
59 | |||
60 | /* | 26 | /* |
61 | * stub versions of pre-fat sector storage functions | 27 | * stub versions of pre-fat sector storage functions |
62 | */ | 28 | */ |
diff --git a/firmware/disk.h b/firmware/disk.h index 09f8562362..0e54ee88b1 100644 --- a/firmware/disk.h +++ b/firmware/disk.h | |||
@@ -20,8 +20,6 @@ | |||
20 | #ifndef __DISK_H__ | 20 | #ifndef __DISK_H__ |
21 | #define __DISK_H__ | 21 | #define __DISK_H__ |
22 | 22 | ||
23 | void read_file_into_buffer( char **buf, const char *filename ); | ||
24 | |||
25 | int persist_volume_setting( void ); | 23 | int persist_volume_setting( void ); |
26 | int persist_balance_setting( void ); | 24 | int persist_balance_setting( void ); |
27 | int persist_bass_setting( void ); | 25 | int persist_bass_setting( void ); |