summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Coalson <jcoalson@users.sourceforce.net>2004-07-27 00:23:35 +0000
committerJosh Coalson <jcoalson@users.sourceforce.net>2004-07-27 00:23:35 +0000
commit9c47dff34c676878d0e5b77a7f3b3726d8e8db29 (patch)
treea95b05c1da1f8eaa080906e525fb360ff8ff88ef
parent26b69845eb10920ee2cbbca0ff2043c38e777362 (diff)
downloadflac-9c47dff34c676878d0e5b77a7f3b3726d8e8db29.tar.gz
hide some stray libOggFLAC references in #ifdef FLAC__HAS_OGG
-rw-r--r--src/flac/decode.c7
-rw-r--r--src/flac/encode.c16
2 files changed, 19 insertions, 4 deletions
diff --git a/src/flac/decode.c b/src/flac/decode.c
index f3ae2e1e..42468663 100644
--- a/src/flac/decode.c
+++ b/src/flac/decode.c
@@ -1165,7 +1165,12 @@ void print_error_with_state(const DecoderSession *d, const char *message)
d->inbasefilename, FLAC__VERSION_STRING
);
}
- else if (0 == strcmp(state_string, FLAC__FileDecoderStateString[FLAC__FILE_DECODER_ERROR_OPENING_FILE]) || 0 == strcmp(state_string, OggFLAC__FileDecoderStateString[OggFLAC__FILE_DECODER_ERROR_OPENING_FILE])) {
+ else if (
+ 0 == strcmp(state_string, FLAC__FileDecoderStateString[FLAC__FILE_DECODER_ERROR_OPENING_FILE])
+#ifdef FLAC__HAS_OGG
+ || 0 == strcmp(state_string, OggFLAC__FileDecoderStateString[OggFLAC__FILE_DECODER_ERROR_OPENING_FILE])
+#endif
+ ) {
flac__utils_printf(stderr, 1,
"\n"
"An error occurred opening the input file; it is likely that it does not exist\n"
diff --git a/src/flac/encode.c b/src/flac/encode.c
index 2ee04229..e1c5d861 100644
--- a/src/flac/encode.c
+++ b/src/flac/encode.c
@@ -1986,7 +1986,7 @@ void print_error_with_state(const EncoderSession *e, const char *message)
flac__utils_printf(stderr, 1, "%*s state = %s\n", ilen, "", state_string);
/* print out some more info for some errors: */
- if (0 == strcmp(state_string, FLAC__StreamEncoderStateString[FLAC__STREAM_ENCODER_NOT_STREAMABLE])) {
+ if(0 == strcmp(state_string, FLAC__StreamEncoderStateString[FLAC__STREAM_ENCODER_NOT_STREAMABLE])) {
flac__utils_printf(stderr, 1,
"\n"
"The encoding parameters specified do not conform to the FLAC Subset and may not\n"
@@ -1994,13 +1994,23 @@ void print_error_with_state(const EncoderSession *e, const char *message)
"options to encode with these parameters.\n"
);
}
- else if (0 == strcmp(state_string, FLAC__FileEncoderStateString[FLAC__FILE_ENCODER_FATAL_ERROR_WHILE_WRITING]) || 0 == strcmp(state_string, OggFLAC__FileEncoderStateString[OggFLAC__FILE_ENCODER_FATAL_ERROR_WHILE_WRITING])) {
+ else if(
+ 0 == strcmp(state_string, FLAC__FileEncoderStateString[FLAC__FILE_ENCODER_FATAL_ERROR_WHILE_WRITING])
+#ifdef FLAC__HAS_OGG
+ || 0 == strcmp(state_string, OggFLAC__FileEncoderStateString[OggFLAC__FILE_ENCODER_FATAL_ERROR_WHILE_WRITING])
+#endif
+ ) {
flac__utils_printf(stderr, 1,
"\n"
"An error occurred while writing; the most common cause is that the disk is full.\n"
);
}
- else if (0 == strcmp(state_string, FLAC__FileEncoderStateString[FLAC__FILE_ENCODER_ERROR_OPENING_FILE]) || 0 == strcmp(state_string, OggFLAC__FileEncoderStateString[OggFLAC__FILE_ENCODER_ERROR_OPENING_FILE])) {
+ else if(
+ 0 == strcmp(state_string, FLAC__FileEncoderStateString[FLAC__FILE_ENCODER_ERROR_OPENING_FILE])
+#ifdef FLAC__HAS_OGG
+ || 0 == strcmp(state_string, OggFLAC__FileEncoderStateString[OggFLAC__FILE_ENCODER_ERROR_OPENING_FILE])
+#endif
+ ) {
flac__utils_printf(stderr, 1,
"\n"
"An error occurred opening the output file; it is likely that the output\n"