Репозитории ALT
S: | 10.85.04-alt2 |
5.1: | 10.35.32-alt1.M51.1 |
4.1: | 10.35.32-alt1.M41.1 |
4.0: | 10.35.32-alt1.M40.1 |
3.0: | 10.26.4-alt1 |
Группа :: Графика
Пакет: netpbm
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: netpbm-10.35-alt-cameratopam-memmem.patch
Скачать
Скачать
--- netpbm-10.34/converter/other/cameratopam/identify.c- 2007-08-19 22:42:14 +0400
+++ netpbm-10.34/converter/other/cameratopam/identify.c 2007-08-19 22:42:48 +0400
@@ -5,6 +5,7 @@
#include "global_variables.h"
#include "util.h"
+#include "nstring.h"
#include "foveon.h"
#include "canon.h"
#include "dng.h"
@@ -23,17 +24,6 @@
static loadRawFn load_raw;
-/* This does the same as the function of the same name in the GNU C library */
-static const char *memmem_internal (const char *haystack, size_t haystacklen,
- const char *needle, size_t needlelen)
-{
- const char *c;
- for (c = haystack; c <= haystack + haystacklen - needlelen; c++)
- if (!memcmp (c, needle, needlelen))
- return c;
- return NULL;
-}
-
/*
Thanks to Adobe for providing these excellent CAM -> XYZ matrices!
*/
@@ -315,7 +305,7 @@ identify(FILE * const ifp,
fread (head, 1, 32, ifp);
fseek (ifp, 0, SEEK_END);
fsize = ftell(ifp);
- if ((c = (char*)memmem_internal(head, 32, "MMMMRawT", 8))) {
+ if ((c = (char*)memmemN(head, 32, "MMMMRawT", 8))) {
strcpy (make, "Phase One");
data_offset = c - head;
fseek (ifp, data_offset + 8, SEEK_SET);