diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-02-01 21:43:47 +0100 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-02-01 21:48:33 +0100 |
commit | e029e033d52a850c135e286dea907a2b8468637b (patch) | |
tree | f5491de1b3cde237ab039d6b243547f1312620d4 /test/monniaux/jpeg-6b/rdjpgcom.c | |
parent | 1dffd83e6b621c6ad8d820431339c5dd58e651d1 (diff) | |
download | compcert-kvx-e029e033d52a850c135e286dea907a2b8468637b.tar.gz compcert-kvx-e029e033d52a850c135e286dea907a2b8468637b.zip |
ugly hack to access _impure_thread_data (stdin, stdout, stderr...)
it works!
Diffstat (limited to 'test/monniaux/jpeg-6b/rdjpgcom.c')
-rw-r--r-- | test/monniaux/jpeg-6b/rdjpgcom.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/test/monniaux/jpeg-6b/rdjpgcom.c b/test/monniaux/jpeg-6b/rdjpgcom.c index c8b94bb8..c6cb47ce 100644 --- a/test/monniaux/jpeg-6b/rdjpgcom.c +++ b/test/monniaux/jpeg-6b/rdjpgcom.c @@ -278,6 +278,22 @@ process_SOFn (int marker) image_width = read_2_bytes();
num_components = read_1_byte();
+#ifdef NO_SWITCH
+ if (marker==M_SOF0) process = "Baseline";
+ else if (marker==M_SOF1) process = "Extended sequential";
+ else if (marker==M_SOF2) process = "Progressive";
+ else if (marker==M_SOF3) process = "Lossless";
+ else if (marker==M_SOF5) process = "Differential sequential";
+ else if (marker==M_SOF6) process = "Differential progressive";
+ else if (marker==M_SOF7) process = "Differential lossless";
+ else if (marker==M_SOF9) process = "Extended sequential, arithmetic coding";
+ else if (marker==M_SOF10) process = "Progressive, arithmetic coding";
+ else if (marker==M_SOF11) process = "Lossless, arithmetic coding";
+ else if (marker==M_SOF13) process = "Differential sequential, arithmetic coding";
+ else if (marker==M_SOF14) process = "Differential progressive, arithmetic coding";
+ else if (marker==M_SOF15) process = "Differential lossless, arithmetic coding";
+ else process = "Unknown";
+#else
switch (marker) {
case M_SOF0: process = "Baseline"; break;
case M_SOF1: process = "Extended sequential"; break;
@@ -294,7 +310,8 @@ process_SOFn (int marker) case M_SOF15: process = "Differential lossless, arithmetic coding"; break;
default: process = "Unknown"; break;
}
-
+#endif
+
printf("JPEG image is %uw * %uh, %d color components, %d bits per sample\n",
image_width, image_height, num_components, data_precision);
printf("JPEG process: %s\n", process);
|