Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
23552f89
Commit
23552f89
authored
Oct 26, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input_file: don't export internal methods
The methods are only used in inputStream_fileOpen(), and should not be exported.
parent
21b8590b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
19 deletions
+25
-19
input_file.c
src/input_file.c
+25
-7
input_file.h
src/input_file.h
+0
-12
No files found.
src/input_file.c
View file @
23552f89
...
...
@@ -25,6 +25,21 @@ void inputStream_initFile(void)
{
}
static
int
inputStream_fileSeek
(
struct
input_stream
*
is
,
long
offset
,
int
whence
);
static
size_t
inputStream_fileRead
(
struct
input_stream
*
is
,
void
*
ptr
,
size_t
size
);
static
int
inputStream_fileClose
(
struct
input_stream
*
is
);
static
int
inputStream_fileAtEOF
(
struct
input_stream
*
is
);
static
int
inputStream_fileBuffer
(
struct
input_stream
*
is
);
int
inputStream_fileOpen
(
struct
input_stream
*
inStream
,
char
*
filename
)
{
FILE
*
fp
;
...
...
@@ -57,8 +72,8 @@ int inputStream_fileOpen(struct input_stream *inStream, char *filename)
return
0
;
}
int
inputStream_fileSeek
(
struct
input_stream
*
inStream
,
long
offset
,
int
whence
)
static
int
inputStream_fileSeek
(
struct
input_stream
*
inStream
,
long
offset
,
int
whence
)
{
if
(
fseek
((
FILE
*
)
inStream
->
data
,
offset
,
whence
)
==
0
)
{
inStream
->
offset
=
ftell
((
FILE
*
)
inStream
->
data
);
...
...
@@ -70,8 +85,8 @@ int inputStream_fileSeek(struct input_stream *inStream, long offset,
return
0
;
}
s
ize_t
inputStream_fileRead
(
struct
input_stream
*
inStream
,
void
*
ptr
,
size_t
size
)
s
tatic
size_t
inputStream_fileRead
(
struct
input_stream
*
inStream
,
void
*
ptr
,
size_t
size
)
{
size_t
readSize
;
...
...
@@ -87,7 +102,8 @@ size_t inputStream_fileRead(struct input_stream *inStream,
return
readSize
;
}
int
inputStream_fileClose
(
struct
input_stream
*
inStream
)
static
int
inputStream_fileClose
(
struct
input_stream
*
inStream
)
{
if
(
fclose
((
FILE
*
)
inStream
->
data
)
<
0
)
{
inStream
->
error
=
errno
;
...
...
@@ -97,7 +113,8 @@ int inputStream_fileClose(struct input_stream *inStream)
return
0
;
}
int
inputStream_fileAtEOF
(
struct
input_stream
*
inStream
)
static
int
inputStream_fileAtEOF
(
struct
input_stream
*
inStream
)
{
if
(
feof
((
FILE
*
)
inStream
->
data
))
return
1
;
...
...
@@ -109,7 +126,8 @@ int inputStream_fileAtEOF(struct input_stream *inStream)
return
0
;
}
int
inputStream_fileBuffer
(
mpd_unused
struct
input_stream
*
inStream
)
static
int
inputStream_fileBuffer
(
mpd_unused
struct
input_stream
*
inStream
)
{
return
0
;
}
src/input_file.h
View file @
23552f89
...
...
@@ -25,16 +25,4 @@ void inputStream_initFile(void);
int
inputStream_fileOpen
(
struct
input_stream
*
inStream
,
char
*
filename
);
int
inputStream_fileSeek
(
struct
input_stream
*
inStream
,
long
offset
,
int
whence
);
size_t
inputStream_fileRead
(
struct
input_stream
*
inStream
,
void
*
ptr
,
size_t
size
);
int
inputStream_fileClose
(
struct
input_stream
*
inStream
);
int
inputStream_fileAtEOF
(
struct
input_stream
*
inStream
);
int
inputStream_fileBuffer
(
struct
input_stream
*
inStream
);
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment