diff options
author | Avuton Olrich <avuton@gmail.com> | 2006-07-20 16:02:40 +0000 |
---|---|---|
committer | Avuton Olrich <avuton@gmail.com> | 2006-07-20 16:02:40 +0000 |
commit | 29a25b9933b32800f58dd73d5d1fc21993071c92 (patch) | |
tree | 4f456a6f8e44d42acc289c35534ea3e59c0aa96f /src/inputStream.c | |
parent | 099f0e103f7591eef81183292d704b3a77a99018 (diff) | |
download | mpd-29a25b9933b32800f58dd73d5d1fc21993071c92.tar.gz mpd-29a25b9933b32800f58dd73d5d1fc21993071c92.tar.xz mpd-29a25b9933b32800f58dd73d5d1fc21993071c92.zip |
Add mpd-indent.sh
Indent the entire tree, hopefully we can keep
it indented.
git-svn-id: https://svn.musicpd.org/mpd/trunk@4410 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r-- | src/inputStream.c | 63 |
1 files changed, 37 insertions, 26 deletions
diff --git a/src/inputStream.c b/src/inputStream.c index 51c8f3aa1..beb2aa11c 100644 --- a/src/inputStream.c +++ b/src/inputStream.c @@ -25,48 +25,59 @@ #include <sys/types.h> #include <unistd.h> -void initInputStream(void) { +void initInputStream(void) +{ inputStream_initFile(); inputStream_initHttp(); } -int openInputStream(InputStream * inStream, char * url) { - inStream->offset = 0; - inStream->size = 0; - inStream->error = 0; - inStream->mime = NULL; - inStream->seekable = 0; - inStream->metaName = NULL; - inStream->metaTitle = NULL; +int openInputStream(InputStream * inStream, char *url) +{ + inStream->offset = 0; + inStream->size = 0; + inStream->error = 0; + inStream->mime = NULL; + inStream->seekable = 0; + inStream->metaName = NULL; + inStream->metaTitle = NULL; - if(inputStream_fileOpen(inStream,url) == 0) return 0; - if(inputStream_httpOpen(inStream,url) == 0) return 0; + if (inputStream_fileOpen(inStream, url) == 0) + return 0; + if (inputStream_httpOpen(inStream, url) == 0) + return 0; - return -1; + return -1; } -int seekInputStream(InputStream * inStream, long offset, int whence) { - return inStream->seekFunc(inStream,offset,whence); +int seekInputStream(InputStream * inStream, long offset, int whence) +{ + return inStream->seekFunc(inStream, offset, whence); } -size_t readFromInputStream(InputStream * inStream, void * ptr, size_t size, - size_t nmemb) +size_t readFromInputStream(InputStream * inStream, void *ptr, size_t size, + size_t nmemb) { - return inStream->readFunc(inStream,ptr,size,nmemb); + return inStream->readFunc(inStream, ptr, size, nmemb); } -int closeInputStream(InputStream * inStream) { - if(inStream->mime) free(inStream->mime); - if(inStream->metaName) free(inStream->metaName); - if(inStream->metaTitle) free(inStream->metaTitle); +int closeInputStream(InputStream * inStream) +{ + if (inStream->mime) + free(inStream->mime); + if (inStream->metaName) + free(inStream->metaName); + if (inStream->metaTitle) + free(inStream->metaTitle); - return inStream->closeFunc(inStream); + return inStream->closeFunc(inStream); } -int inputStreamAtEOF(InputStream * inStream) { - return inStream->atEOFFunc(inStream); +int inputStreamAtEOF(InputStream * inStream) +{ + return inStream->atEOFFunc(inStream); } -int bufferInputStream(InputStream * inStream) { - return inStream->bufferFunc(inStream); +int bufferInputStream(InputStream * inStream) +{ + return inStream->bufferFunc(inStream); } |