]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Don't use ENAVAIL.
authorAndre Noll <maan@systemlinux.org>
Mon, 18 Jan 2010 09:52:32 +0000 (10:52 +0100)
committerAndre Noll <maan@systemlinux.org>
Mon, 18 Jan 2010 09:52:32 +0000 (10:52 +0100)
NetBSD doesn't know it, and the error text does not fit well. So replace
it by a paraslash error message.

aacdec_filter.c
error.h
mp3dec_filter.c
oggdec_filter.c
wmadec_filter.c
write.c

index 9809552ccf1694f4a2f97d2fd955b08bd22b9e07..d48b18e03d729c5617455aa39eb5de91f0ea27ef 100644 (file)
@@ -62,13 +62,13 @@ static int aacdec_execute(struct btr_node *btrn, const char *cmd, char **result)
 
        if (!strcmp(cmd, "samplerate")) {
                if (padd->samplerate == 0)
-                       return -ERRNO_TO_PARA_ERROR(ENAVAIL);
+                       return -E_BTR_NAVAIL;
                *result = make_message("%u", padd->samplerate);
                return 1;
        }
        if (!strcmp(cmd, "channels")) {
                if (padd->channels == 0)
-                       return -ERRNO_TO_PARA_ERROR(ENAVAIL);
+                       return -E_BTR_NAVAIL;
                *result = make_message("%u", padd->channels);
                return 1;
        }
diff --git a/error.h b/error.h
index 5a5d015d4b2996c991909bee853d6cd3d8a0fd57..ecea044ba991f566b542dce7363925855c0b73ad 100644 (file)
--- a/error.h
+++ b/error.h
@@ -40,6 +40,7 @@ extern const char **para_errlist[];
 #define BUFFER_TREE_ERRORS \
        PARA_ERROR(BTR_EOF, "buffer tree: end of file"), \
        PARA_ERROR(BTR_NO_CHILD, "btr node has no children"), \
+       PARA_ERROR(BTR_NAVAIL, "btr node: value currently unavailable"), \
 
 #define STDOUT_ERRORS \
        PARA_ERROR(STDOUT_EOF, "stdout: end of file"), \
index 696367d6c0855e789c3b0ee47529316fbedf925d..a025eed55465bf8766a838eec11d553b1617d81b 100644 (file)
@@ -232,13 +232,13 @@ static int mp3dec_execute(struct btr_node *btrn, const char *cmd, char **result)
 
        if (!strcmp(cmd, "samplerate")) {
                if (pmd->samplerate == 0)
-                       return -ERRNO_TO_PARA_ERROR(ENAVAIL);
+                       return -E_BTR_NAVAIL;
                *result = make_message("%u", pmd->samplerate);
                return 1;
        }
        if (!strcmp(cmd, "channels")) {
                if (pmd->channels == 0)
-                       return -ERRNO_TO_PARA_ERROR(ENAVAIL);
+                       return -E_BTR_NAVAIL;
                *result = make_message("%u", pmd->channels);
                return 1;
        }
index bac28cfdee77d5a9d48d343fc7f208111f437991..f14d97c13dec8c2c3fe6660aadb5d7b6d3d2c328 100644 (file)
@@ -125,13 +125,13 @@ static int oggdec_execute(struct btr_node *btrn, const char *cmd, char **result)
 
        if (!strcmp(cmd, "samplerate")) {
                if (pod->samplerate == 0)
-                       return -ERRNO_TO_PARA_ERROR(ENAVAIL);
+                       return -E_BTR_NAVAIL;
                *result = make_message("%u", pod->samplerate);
                return 1;
        }
        if (!strcmp(cmd, "channels")) {
                if (pod->channels == 0)
-                       return -ERRNO_TO_PARA_ERROR(ENAVAIL);
+                       return -E_BTR_NAVAIL;
                *result = make_message("%u", pod->channels);
                return 1;
        }
index 1233996284f231d9855e7c14954fb77d317816f9..d78c72bd54724cd58a446dd859deba156672b541 100644 (file)
@@ -1210,13 +1210,13 @@ static int wmadec_execute(struct btr_node *btrn, const char *cmd, char **result)
 
        if (!strcmp(cmd, "samplerate")) {
                if (pwd->ahi.sample_rate == 0)
-                       return -ERRNO_TO_PARA_ERROR(ENAVAIL);
+                       return -E_BTR_NAVAIL;
                *result = make_message("%u", pwd->ahi.sample_rate);
                return 1;
        }
        if (!strcmp(cmd, "channels")) {
                if (pwd->ahi.channels == 0)
-                       return -ERRNO_TO_PARA_ERROR(ENAVAIL);
+                       return -E_BTR_NAVAIL;
                *result = make_message("%u", pwd->ahi.channels);
                return 1;
        }
diff --git a/write.c b/write.c
index d88633592127aa3ac7f037b6351854d95b3e7129..bf178c47ef1c7ffb0dcfcf80fd465516da6a72b9 100644 (file)
--- a/write.c
+++ b/write.c
@@ -74,13 +74,13 @@ static int check_wav_exec(struct btr_node *btrn, const char *cmd, char **result)
 
        if (!strcmp(cmd, "samplerate")) {
                if (cwt->state != CWS_HAVE_HEADER)
-                       return -ERRNO_TO_PARA_ERROR(ENAVAIL);
+                       return -E_BTR_NAVAIL;
                *result = make_message("%d", cwt->samplerate);
                return 1;
        }
        if (!strcmp(cmd, "channels")) {
                if (cwt->state != CWS_HAVE_HEADER)
-                       return -ERRNO_TO_PARA_ERROR(ENAVAIL);
+                       return -E_BTR_NAVAIL;
                *result = make_message("%d", cwt->channels);
                return 1;
        }