giflib/getarg.patch
2025-04-02 14:31:09 +03:00

308 lines
10 KiB
Diff

diff -ruN giflib-5.2.2/getarg.c giflib-5.2.2-getarg/getarg.c
--- giflib-5.2.2/getarg.c 2024-02-19 06:01:27.000000000 +0300
+++ giflib-5.2.2-getarg/getarg.c 2025-04-02 14:06:46.761392686 +0300
@@ -112,7 +112,7 @@
#include <stdlib.h>
#include <string.h>
-#include "getarg.h"
+#include "gif_getarg.h"
#define MAX_PARAM 100 /* maximum number of parameters allowed. */
#define CTRL_STR_MAX_LEN 1024
diff -ruN giflib-5.2.2/getarg.h giflib-5.2.2-getarg/getarg.h
--- giflib-5.2.2/getarg.h 2024-02-19 05:20:00.000000000 +0300
+++ giflib-5.2.2-getarg/getarg.h 1970-01-01 03:00:00.000000000 +0300
@@ -1,54 +0,0 @@
-/***************************************************************************
-
-getarg.h - Support routines for the giflib utilities
-
-SPDX-License-Identifier: MIT
-
- **************************************************************************/
-
-#ifndef _GETARG_H
-#define _GETARG_H
-
-#include "gif_lib.h"
-#include <stdbool.h>
-
-#define VERSION_COOKIE " Version %d.%d, "
-
-/***************************************************************************
- Error numbers as returned by GAGetArg routine:
-***************************************************************************/
-#define CMD_ERR_NotAnOpt 1 /* None Option found. */
-#define CMD_ERR_NoSuchOpt 2 /* Undefined Option Found. */
-#define CMD_ERR_WildEmpty 3 /* Empty input for !*? seq. */
-#define CMD_ERR_NumRead 4 /* Failed on reading number. */
-#define CMD_ERR_AllSatis 5 /* Fail to satisfy (must-'!') option. */
-
-bool GAGetArgs(int argc, char **argv, char *CtrlStr, ...);
-void GAPrintErrMsg(int Error);
-void GAPrintHowTo(char *CtrlStr);
-
-/******************************************************************************
- From qprintf.c
-******************************************************************************/
-extern void GifQprintf(char *Format, ...);
-extern void PrintGifError(int ErrorCode);
-
-/******************************************************************************
- Color table quantization
-******************************************************************************/
-int GifQuantizeBuffer(unsigned int Width, unsigned int Height,
- int *ColorMapSize, GifByteType *RedInput,
- GifByteType *GreenInput, GifByteType *BlueInput,
- GifByteType *OutputBuffer, GifColorType *OutputColorMap);
-
-/* These used to live in the library header */
-#define GIF_MESSAGE(Msg) fprintf(stderr, "\n%s: %s\n", PROGRAM_NAME, Msg)
-#define GIF_EXIT(Msg) \
- { \
- GIF_MESSAGE(Msg); \
- exit(-3); \
- }
-
-#endif /* _GETARG_H */
-
-/* end */
diff -ruN giflib-5.2.2/gif2rgb.c giflib-5.2.2-getarg/gif2rgb.c
--- giflib-5.2.2/gif2rgb.c 2025-04-02 13:56:45.432522463 +0300
+++ giflib-5.2.2-getarg/gif2rgb.c 2025-04-02 14:11:36.739658922 +0300
@@ -34,7 +34,7 @@
#include <io.h>
#endif /* _WIN32 */
-#include "getarg.h"
+#include "gif_getarg.h"
#include "gif_lib.h"
#define PROGRAM_NAME "gif2rgb"
diff -ruN giflib-5.2.2/gifbg.c giflib-5.2.2-getarg/gifbg.c
--- giflib-5.2.2/gifbg.c 2024-02-19 06:01:28.000000000 +0300
+++ giflib-5.2.2-getarg/gifbg.c 2025-04-02 14:07:09.489604643 +0300
@@ -12,7 +12,7 @@
#include <stdlib.h>
#include <string.h>
-#include "getarg.h"
+#include "gif_getarg.h"
#include "gif_lib.h"
#define PROGRAM_NAME "gifbg"
diff -ruN giflib-5.2.2/gifbuild.c giflib-5.2.2-getarg/gifbuild.c
--- giflib-5.2.2/gifbuild.c 2024-02-19 06:05:16.000000000 +0300
+++ giflib-5.2.2-getarg/gifbuild.c 2025-04-02 14:07:41.226029058 +0300
@@ -12,7 +12,7 @@
#include <stdlib.h>
#include <string.h>
-#include "getarg.h"
+#include "gif_getarg.h"
#include "gif_lib.h"
#define PROGRAM_NAME "gifbuild"
diff -ruN giflib-5.2.2/gifclrmp.c giflib-5.2.2-getarg/gifclrmp.c
--- giflib-5.2.2/gifclrmp.c 2024-02-19 06:01:27.000000000 +0300
+++ giflib-5.2.2-getarg/gifclrmp.c 2025-04-02 14:08:05.234274976 +0300
@@ -14,7 +14,7 @@
#include <stdlib.h>
#include <string.h>
-#include "getarg.h"
+#include "gif_getarg.h"
#include "gif_lib.h"
#define PROGRAM_NAME "gifclrmp"
diff -ruN giflib-5.2.2/gifcolor.c giflib-5.2.2-getarg/gifcolor.c
--- giflib-5.2.2/gifcolor.c 2024-02-19 06:01:28.000000000 +0300
+++ giflib-5.2.2-getarg/gifcolor.c 2025-04-02 14:08:24.954333260 +0300
@@ -12,7 +12,7 @@
#include <stdlib.h>
#include <string.h>
-#include "getarg.h"
+#include "gif_getarg.h"
#include "gif_lib.h"
#define PROGRAM_NAME "gifcolor"
diff -ruN giflib-5.2.2/gifecho.c giflib-5.2.2-getarg/gifecho.c
--- giflib-5.2.2/gifecho.c 2024-02-19 06:01:27.000000000 +0300
+++ giflib-5.2.2-getarg/gifecho.c 2025-04-02 14:08:42.490448501 +0300
@@ -12,7 +12,7 @@
#include <stdlib.h>
#include <string.h>
-#include "getarg.h"
+#include "gif_getarg.h"
#include "gif_lib.h"
#define PROGRAM_NAME "gifecho"
diff -ruN giflib-5.2.2/giffilter.c giflib-5.2.2-getarg/giffilter.c
--- giflib-5.2.2/giffilter.c 2024-02-19 06:01:28.000000000 +0300
+++ giflib-5.2.2-getarg/giffilter.c 2025-04-02 14:09:03.546624488 +0300
@@ -25,7 +25,7 @@
#include <stdlib.h>
#include <string.h>
-#include "getarg.h"
+#include "gif_getarg.h"
#include "gif_lib.h"
#define PROGRAM_NAME "giffilter"
diff -ruN giflib-5.2.2/giffix.c giflib-5.2.2-getarg/giffix.c
--- giflib-5.2.2/giffix.c 2024-02-19 06:01:27.000000000 +0300
+++ giflib-5.2.2-getarg/giffix.c 2025-04-02 14:09:26.162882098 +0300
@@ -12,7 +12,7 @@
#include <stdlib.h>
#include <string.h>
-#include "getarg.h"
+#include "gif_getarg.h"
#include "gif_lib.h"
#define PROGRAM_NAME "giffix"
diff -ruN giflib-5.2.2/gif_getarg.h giflib-5.2.2-getarg/gif_getarg.h
--- giflib-5.2.2/gif_getarg.h 1970-01-01 03:00:00.000000000 +0300
+++ giflib-5.2.2-getarg/gif_getarg.h 2025-04-02 14:04:40.299508057 +0300
@@ -0,0 +1,54 @@
+/***************************************************************************
+
+getarg.h - Support routines for the giflib utilities
+
+SPDX-License-Identifier: MIT
+
+ **************************************************************************/
+
+#ifndef _GETARG_H
+#define _GETARG_H
+
+#include "gif_lib.h"
+#include <stdbool.h>
+
+#define VERSION_COOKIE " Version %d.%d, "
+
+/***************************************************************************
+ Error numbers as returned by GAGetArg routine:
+***************************************************************************/
+#define CMD_ERR_NotAnOpt 1 /* None Option found. */
+#define CMD_ERR_NoSuchOpt 2 /* Undefined Option Found. */
+#define CMD_ERR_WildEmpty 3 /* Empty input for !*? seq. */
+#define CMD_ERR_NumRead 4 /* Failed on reading number. */
+#define CMD_ERR_AllSatis 5 /* Fail to satisfy (must-'!') option. */
+
+bool GAGetArgs(int argc, char **argv, char *CtrlStr, ...);
+void GAPrintErrMsg(int Error);
+void GAPrintHowTo(char *CtrlStr);
+
+/******************************************************************************
+ From qprintf.c
+******************************************************************************/
+extern void GifQprintf(char *Format, ...);
+extern void PrintGifError(int ErrorCode);
+
+/******************************************************************************
+ Color table quantization
+******************************************************************************/
+int GifQuantizeBuffer(unsigned int Width, unsigned int Height,
+ int *ColorMapSize, GifByteType *RedInput,
+ GifByteType *GreenInput, GifByteType *BlueInput,
+ GifByteType *OutputBuffer, GifColorType *OutputColorMap);
+
+/* These used to live in the library header */
+#define GIF_MESSAGE(Msg) fprintf(stderr, "\n%s: %s\n", PROGRAM_NAME, Msg)
+#define GIF_EXIT(Msg) \
+ { \
+ GIF_MESSAGE(Msg); \
+ exit(-3); \
+ }
+
+#endif /* _GETARG_H */
+
+/* end */
diff -ruN giflib-5.2.2/gifhisto.c giflib-5.2.2-getarg/gifhisto.c
--- giflib-5.2.2/gifhisto.c 2024-02-19 06:01:28.000000000 +0300
+++ giflib-5.2.2-getarg/gifhisto.c 2025-04-02 14:09:45.643183312 +0300
@@ -12,7 +12,7 @@
#include <stdlib.h>
#include <string.h>
-#include "getarg.h"
+#include "gif_getarg.h"
#include "gif_lib.h"
#define PROGRAM_NAME "gifhisto"
diff -ruN giflib-5.2.2/gifinto.c giflib-5.2.2-getarg/gifinto.c
--- giflib-5.2.2/gifinto.c 2024-02-19 06:01:28.000000000 +0300
+++ giflib-5.2.2-getarg/gifinto.c 2025-04-02 14:10:06.403197077 +0300
@@ -19,7 +19,7 @@
#include <unistd.h>
#endif /* _WIN32 */
-#include "getarg.h"
+#include "gif_getarg.h"
#include "gif_lib.h"
#define PROGRAM_NAME "gifinto"
diff -ruN giflib-5.2.2/gifsponge.c giflib-5.2.2-getarg/gifsponge.c
--- giflib-5.2.2/gifsponge.c 2024-02-19 06:01:28.000000000 +0300
+++ giflib-5.2.2-getarg/gifsponge.c 2025-04-02 14:10:23.555170542 +0300
@@ -25,7 +25,7 @@
#include <stdlib.h>
#include <string.h>
-#include "getarg.h"
+#include "gif_getarg.h"
#include "gif_lib.h"
#define PROGRAM_NAME "gifsponge"
diff -ruN giflib-5.2.2/giftext.c giflib-5.2.2-getarg/giftext.c
--- giflib-5.2.2/giftext.c 2024-02-19 06:01:28.000000000 +0300
+++ giflib-5.2.2-getarg/giftext.c 2025-04-02 14:10:40.427363509 +0300
@@ -16,7 +16,7 @@
#include <io.h>
#endif /* _WIN32 */
-#include "getarg.h"
+#include "gif_getarg.h"
#include "gif_lib.h"
#define PROGRAM_NAME "giftext"
diff -ruN giflib-5.2.2/giftool.c giflib-5.2.2-getarg/giftool.c
--- giflib-5.2.2/giftool.c 2024-02-19 06:01:28.000000000 +0300
+++ giflib-5.2.2-getarg/giftool.c 2025-04-02 14:10:59.579511889 +0300
@@ -12,7 +12,7 @@
#include <stdlib.h>
#include <string.h>
-#include "getarg.h"
+#include "gif_getarg.h"
#include "getopt.h"
#include "gif_lib.h"
diff -ruN giflib-5.2.2/gifwedge.c giflib-5.2.2-getarg/gifwedge.c
--- giflib-5.2.2/gifwedge.c 2024-02-19 06:01:27.000000000 +0300
+++ giflib-5.2.2-getarg/gifwedge.c 2025-04-02 14:11:16.163652219 +0300
@@ -12,7 +12,7 @@
#include <stdlib.h>
#include <string.h>
-#include "getarg.h"
+#include "gif_getarg.h"
#include "gif_lib.h"
#define PROGRAM_NAME "gifwedge"
diff -ruN giflib-5.2.2/Makefile giflib-5.2.2-getarg/Makefile
--- giflib-5.2.2/Makefile 2025-04-02 13:56:24.568117543 +0300
+++ giflib-5.2.2-getarg/Makefile 2025-04-02 14:05:51.785348480 +0300
@@ -34,7 +34,7 @@
OBJECTS = $(SOURCES:.c=.o)
USOURCES = qprintf.c getarg.c
-UHEADERS = getarg.h
+UHEADERS = gif_getarg.h
UOBJECTS = $(USOURCES:.c=.o)
UNAME:=$(shell uname)