Gitweb links:
...log
http://git.netsurf-browser.org/libnsgif.git/shortlog/5d3093f8c79e54827864b04ec6b470488d72c960
...commit
http://git.netsurf-browser.org/libnsgif.git/commit/5d3093f8c79e54827864b04ec6b470488d72c960
...tree
http://git.netsurf-browser.org/libnsgif.git/tree/5d3093f8c79e54827864b04ec6b470488d72c960
The branch, master has been updated
via 5d3093f8c79e54827864b04ec6b470488d72c960 (commit)
via 0451fa34f6c88eb7e53bdc3762e37ff1f0c0927a (commit)
via 29d64c885b190043ec3fdde26874ec8cb9992a32 (commit)
from fbe9f636b08d86bc10427283e35d60d2900aa5cc (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/libnsgif.git/commit/?id=5d3093f8c79e54827864b04ec6b470488d72c960
commit 5d3093f8c79e54827864b04ec6b470488d72c960
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
test: nsgif: Add CLI option to print version
diff --git a/test/nsgif.c b/test/nsgif.c
index f873bab..16a4bc9 100644
--- a/test/nsgif.c
+++ b/test/nsgif.c
@@ -21,6 +21,9 @@
#include "cli.h"
#include "cli.c"
+#define STR_VAL(_S) STR(_S)
+#define STR(_S) #_S
+
#define BYTES_PER_PIXEL 4
static struct nsgif_options {
@@ -28,6 +31,7 @@ static struct nsgif_options {
const char *ppm;
uint64_t loops;
bool palette;
+ bool version;
bool info;
bool help;
} nsgif_options;
@@ -71,6 +75,14 @@ static const struct cli_table_entry cli_entries[] = {
.d = "Save palette images."
},
{
+ .s = 'V',
+ .l = "version",
+ .t = CLI_BOOL,
+ .no_pos = true,
+ .v.b = &nsgif_options.version,
+ .d = "Print version number."
+ },
+ {
.p = true,
.l = "FILE",
.t = CLI_STRING,
@@ -372,6 +384,11 @@ int main(int argc, char *argv[])
return EXIT_SUCCESS;
}
+ if (nsgif_options.version) {
+ printf("%s %s\n", STR_VAL(NSGIF_NAME), STR_VAL(NSGIF_VERSION));
+ return EXIT_SUCCESS;
+ }
+
if (nsgif_options.ppm != NULL) {
ppm = fopen(nsgif_options.ppm, "w+");
if (ppm == NULL) {
commitdiff
http://git.netsurf-browser.org/libnsgif.git/commit/?id=0451fa34f6c88eb7e53bdc3762e37ff1f0c0927a
commit 0451fa34f6c88eb7e53bdc3762e37ff1f0c0927a
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Buildsystem: Define component name and version
diff --git a/Makefile b/Makefile
index 082f044..0a33555 100644
--- a/Makefile
+++ b/Makefile
@@ -27,7 +27,8 @@ ifneq ($(BUILD),i586-pc-haiku)
WARNFLAGS := $(WARNFLAGS) -Werror
endif
-CFLAGS := \
+CFLAGS := -DNSGIF_NAME=$(COMPONENT) \
+ -DNSGIF_VERSION=$(COMPONENT_VERSION) \
-I$(CURDIR)/include/ -I$(CURDIR)/src \
$(WARNFLAGS) $(CFLAGS)
ifneq ($(GCCVER),2)
commitdiff
http://git.netsurf-browser.org/libnsgif.git/commit/?id=29d64c885b190043ec3fdde26874ec8cb9992a32
commit 29d64c885b190043ec3fdde26874ec8cb9992a32
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Buildsystem: No need for _{BSD,DEFAULT}_SOURCE
diff --git a/Makefile b/Makefile
index 42aba3a..082f044 100644
--- a/Makefile
+++ b/Makefile
@@ -27,7 +27,7 @@ ifneq ($(BUILD),i586-pc-haiku)
WARNFLAGS := $(WARNFLAGS) -Werror
endif
-CFLAGS := -D_BSD_SOURCE -D_DEFAULT_SOURCE \
+CFLAGS := \
-I$(CURDIR)/include/ -I$(CURDIR)/src \
$(WARNFLAGS) $(CFLAGS)
ifneq ($(GCCVER),2)
-----------------------------------------------------------------------
Summary of changes:
Makefile | 3 ++-
test/nsgif.c | 17 +++++++++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 42aba3a..0a33555 100644
--- a/Makefile
+++ b/Makefile
@@ -27,7 +27,8 @@ ifneq ($(BUILD),i586-pc-haiku)
WARNFLAGS := $(WARNFLAGS) -Werror
endif
-CFLAGS := -D_BSD_SOURCE -D_DEFAULT_SOURCE \
+CFLAGS := -DNSGIF_NAME=$(COMPONENT) \
+ -DNSGIF_VERSION=$(COMPONENT_VERSION) \
-I$(CURDIR)/include/ -I$(CURDIR)/src \
$(WARNFLAGS) $(CFLAGS)
ifneq ($(GCCVER),2)
diff --git a/test/nsgif.c b/test/nsgif.c
index f873bab..16a4bc9 100644
--- a/test/nsgif.c
+++ b/test/nsgif.c
@@ -21,6 +21,9 @@
#include "cli.h"
#include "cli.c"
+#define STR_VAL(_S) STR(_S)
+#define STR(_S) #_S
+
#define BYTES_PER_PIXEL 4
static struct nsgif_options {
@@ -28,6 +31,7 @@ static struct nsgif_options {
const char *ppm;
uint64_t loops;
bool palette;
+ bool version;
bool info;
bool help;
} nsgif_options;
@@ -71,6 +75,14 @@ static const struct cli_table_entry cli_entries[] = {
.d = "Save palette images."
},
{
+ .s = 'V',
+ .l = "version",
+ .t = CLI_BOOL,
+ .no_pos = true,
+ .v.b = &nsgif_options.version,
+ .d = "Print version number."
+ },
+ {
.p = true,
.l = "FILE",
.t = CLI_STRING,
@@ -372,6 +384,11 @@ int main(int argc, char *argv[])
return EXIT_SUCCESS;
}
+ if (nsgif_options.version) {
+ printf("%s %s\n", STR_VAL(NSGIF_NAME), STR_VAL(NSGIF_VERSION));
+ return EXIT_SUCCESS;
+ }
+
if (nsgif_options.ppm != NULL) {
ppm = fopen(nsgif_options.ppm, "w+");
if (ppm == NULL) {
--
NetSurf GIF Decoder
_______________________________________________
netsurf-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]