packages/netpbm

This commit is contained in:
termux-actions[bot]
2022-03-20 02:27:28 +00:00
parent e1f3c2b256
commit cf59608a32
2 changed files with 0 additions and 38 deletions

View File

@@ -227,19 +227,6 @@ index d8e0657..12c7468 100644
data = pbm_allocarray(nOutCols, nOutRows);
diff --git a/converter/pbm/mgrtopbm.c b/converter/pbm/mgrtopbm.c
index 9f7004a..60e8477 100644
--- a/converter/pbm/mgrtopbm.c
+++ b/converter/pbm/mgrtopbm.c
@@ -65,6 +65,8 @@ readMgrHeader(FILE * const ifP,
if (head.h_high < ' ' || head.l_high < ' ')
pm_error("Invalid width field in MGR header");
+ overflow_add(*colsP, pad);
+
*colsP = (((int)head.h_wide - ' ') << 6) + ((int)head.l_wide - ' ');
*rowsP = (((int)head.h_high - ' ') << 6) + ((int) head.l_high - ' ');
*padrightP = ( ( *colsP + pad - 1 ) / pad ) * pad - *colsP;
diff --git a/converter/pbm/pbmto4425.c b/converter/pbm/pbmto4425.c
index 1d97ac6..c4c8cbb 100644
--- a/converter/pbm/pbmto4425.c

View File

@@ -1,25 +0,0 @@
diff -u -r ../advanced/converter/other/cameratopam/util.c ./converter/other/cameratopam/util.c
--- ../advanced/converter/other/cameratopam/util.c 2014-12-29 02:10:41.516106336 -0500
+++ ./converter/other/cameratopam/util.c 2014-12-29 02:35:33.156107368 -0500
@@ -43,6 +43,21 @@
return a << 24 | b << 16 | c << 8 | d;
}
+static void
+swab (const void *bfrom, void *bto, ssize_t n)
+{
+ const char *from = (const char *) bfrom;
+ char *to = (char *) bto;
+
+ n &= ~((ssize_t) 1);
+ while (n > 1)
+ {
+ const char b0 = from[--n], b1 = from[--n];
+ to[n] = b0;
+ to[n + 1] = b1;
+ }
+}
+
/*
Faster than calling get2() multiple times.
*/