diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2021-03-30 10:59:39 +0200 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2021-04-01 00:04:14 +0200 |
commit | 5ff1d6955496b3cf9a35042c9ac35db43bc336b1 (patch) | |
tree | 6d470f7eb448f59f53e8df1010aec9dad8ce1f72 /psi/zalg.c | |
parent | Import Ghostscript 9.53.1 (diff) | |
download | ghostscript-gpl-patches-5ff1d6955496b3cf9a35042c9ac35db43bc336b1.tar.gz ghostscript-gpl-patches-5ff1d6955496b3cf9a35042c9ac35db43bc336b1.tar.bz2 ghostscript-gpl-patches-5ff1d6955496b3cf9a35042c9ac35db43bc336b1.zip |
Import Ghostscript 9.54ghostscript-9.54
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'psi/zalg.c')
-rw-r--r-- | psi/zalg.c | 80 |
1 files changed, 38 insertions, 42 deletions
@@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2020 Artifex Software, Inc. +/* Copyright (C) 2001-2021 Artifex Software, Inc. All Rights Reserved. This software is provided AS-IS with no warranty, either express or @@ -124,58 +124,54 @@ zsort_continue(i_ctx_t *i_ctx_p) status = esp - 8; Rn = arry.value.refs - 1; /* the -1 compensates for using 1-based indices */ switch (H) { - case 2: -H2: if (l > 1) { - l--; - ref_assign(&R, &Rn[l]); - } else { - ref_assign(&R, &Rn[r]); - ref_assign_old(&arry, &Rn[r], &Rn[1], ".sort(H2-a)"); - r--; - if (r <= 1) { - ref_assign_old(&arry, &Rn[1], &R, ".sort(H2-b)"); - esp -= 9; - pop(1); - return o_pop_estack; - } + case 6: + /*H6_cont:*/if (!r_has_type(&op[0], t_boolean)) { + esp -= 9; + return_error(gs_error_typecheck); } -/* H3: */ j = l; -H4: i = j; - j <<= 1; - if (j >= r) - if (j == r) - goto H6; - else - goto H8; - else { -/* H5: */ H = 5; - push(1); - ref_assign(&op[-1], &Rn[j]); - ref_assign(&op[0], &Rn[j + 1]); - break; + if (op[0].value.boolval) { +/* H7: */ ref_assign_old(&arry, &Rn[i], &Rn[j], ".sort(H7)"); + goto H4; } + do { +/* H8: */ ref_assign_old(&arry, &Rn[i], &R, ".sort(H8)"); + /* fallthrough */ + case 2: +/* H2: */ if (l > 1) { + l--; + ref_assign(&R, &Rn[l]); + } else { + ref_assign(&R, &Rn[r]); + ref_assign_old(&arry, &Rn[r], &Rn[1], ".sort(H2-a)"); + r--; + if (r <= 1) { + ref_assign_old(&arry, &Rn[1], &R, ".sort(H2-b)"); + esp -= 9; + pop(1); + return o_pop_estack; + } + } +/* H3: */ j = l; +H4: i = j; + j <<= 1; + } while (j > r); + if (j == r) + goto H6; +/* H5: */ H = 5; + push(1); + ref_assign(&op[-1], &Rn[j]); + ref_assign(&op[0], &Rn[j + 1]); + break; case 5: /*H5_cont:*/if (!r_has_type(&op[0], t_boolean)) return_error(gs_error_typecheck); if (op[0].value.boolval) j++; -H6: H = 6; +H6: H = 6; push(1); ref_assign(&op[-1], &R); ref_assign(&op[0], &Rn[j]); break; - case 6: - /*H6_cont:*/if (!r_has_type(&op[0], t_boolean)) { - esp -= 9; - return_error(gs_error_typecheck); - } - if (op[0].value.boolval) { -/* H7: */ ref_assign_old(&arry, &Rn[i], &Rn[j], ".sort(H7)"); - goto H4; - } else { -H8: ref_assign_old(&arry, &Rn[i], &R, ".sort(H8)"); - goto H2; - } default: pop(1); esp -= 9; |