Changeset 364
- Timestamp:
- 12/01/07 18:46:13 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libmpc/trunk/mpcdec/mpcdec.c
r360 r364 45 45 #endif 46 46 47 #ifdef WIN32 48 # include <fcntl.h> 49 # include <io.h> 50 # define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY) 51 #else 52 # define SET_BINARY_MODE(file) 53 #endif 54 47 55 #define MPCDEC_MAJOR 0 48 56 #define MPCDEC_MINOR 9 … … 140 148 } 141 149 142 if (strcmp(argv[optind], "-") == 0) 150 if (strcmp(argv[optind], "-") == 0) { 151 SET_BINARY_MODE(stdin); 143 152 err = mpc_reader_init_stdio_stream(& reader, stdin); 144 else153 } else 145 154 err = mpc_reader_init_stdio(&reader, argv[optind]); 146 155 if(err < 0) return !MPC_STATUS_OK; … … 165 174 wavo_fc.m_seek = mpc_wav_output_seek; 166 175 wavo_fc.m_write = mpc_wav_output_write; 167 if (strcmp(argv[optind + 1], "-") == 0) 176 if (strcmp(argv[optind + 1], "-") == 0) { 177 SET_BINARY_MODE(stdout); 168 178 wavo_fc.m_user_data = stdout; 169 179 } else 170 180 wavo_fc.m_user_data = fopen(argv[optind + 1], "wb"); 171 181 if(!wavo_fc.m_user_data) return !MPC_STATUS_OK;
Note: See TracChangeset
for help on using the changeset viewer.