aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2020-06-16 09:33:44 -0700
committerRob Landley <rob@landley.net>2020-06-16 21:13:05 -0500
commit399c73488b0e554ee9bf3bd83ea6900aa516f774 (patch)
tree8cf72be063fa7db7ed10f928efa4683af9e88bb5 /toys
parent718d73c023b765f1434edb5def188847b4cc044a (diff)
downloadtoybox-399c73488b0e554ee9bf3bd83ea6900aa516f774.tar.gz
file: add GIF version information.
This let me compare against the host for #225.
Diffstat (limited to 'toys')
-rw-r--r--toys/posix/file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/posix/file.c b/toys/posix/file.c
index 6fa51102..5ec24919 100644
--- a/toys/posix/file.c
+++ b/toys/posix/file.c
@@ -225,8 +225,8 @@ static void do_regular_file(int fd, char *name)
// https://www.w3.org/Graphics/GIF/spec-gif89a.txt
} else if (len>16 && (strstart(&s, "GIF87a") || strstart(&s, "GIF89a")))
- xprintf("GIF image data, %d x %d\n",
- (int)peek_le(s, 2), (int)peek_le(s+2, 2));
+ xprintf("GIF image data, version %3.3s, %d x %d\n",
+ s-3, (int)peek_le(s, 2), (int)peek_le(s+2, 2));
// TODO: parsing JPEG for width/height is harder than GIF or PNG.
else if (len>32 && !memcmp(toybuf, "\xff\xd8", 2)) xputs("JPEG image data");