Changeset 264 for libmpc/branches/r2d/libmpcdec/mpc_reader.c
- Timestamp:
- 04/15/07 23:37:21 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libmpc/branches/r2d/libmpcdec/mpc_reader.c
r196 r264 88 88 89 89 mpc_status 90 mpc_reader_init_stdio (mpc_reader *p_reader, const char *filename)90 mpc_reader_init_stdio_stream(mpc_reader * p_reader, FILE * p_file) 91 91 { 92 92 mpc_reader tmp_reader; mpc_reader_stdio *p_stdio; int err; … … 99 99 100 100 p_stdio->magic = STDIO_MAGIC; 101 p_stdio->p_file = fopen(filename, "rb"); 102 if(!p_stdio->p_file) goto clean; 101 p_stdio->p_file = p_file; 103 102 p_stdio->is_seekable = MPC_TRUE; 104 103 err = fseek(p_stdio->p_file, 0, SEEK_END); … … 126 125 } 127 126 127 mpc_status 128 mpc_reader_init_stdio(mpc_reader *p_reader, const char *filename) 129 { 130 FILE * stream = fopen(filename, "rb"); 131 if (stream == NULL) return MPC_STATUS_FILE; 132 return mpc_reader_init_stdio_stream(p_reader,stream); 133 } 134 128 135 void 129 136 mpc_reader_exit_stdio(mpc_reader *p_reader)
Note: See TracChangeset
for help on using the changeset viewer.