[Extractor-gtk-cvslog] SF.net SVN: extractor-gtk: [48] trunk/extractor/helpers.h
Extract files from unusual archive formats
Brought to you by:
someone-guy
From: <som...@us...> - 2008-02-19 20:08:35
|
Revision: 48 http://extractor-gtk.svn.sourceforge.net/extractor-gtk/?rev=48&view=rev Author: someone-guy Date: 2008-02-19 12:08:31 -0800 (Tue, 19 Feb 2008) Log Message: ----------- Make TAG macro safer and add HUGETAG Modified Paths: -------------- trunk/extractor/helpers.h Modified: trunk/extractor/helpers.h =================================================================== --- trunk/extractor/helpers.h 2007-10-03 21:25:23 UTC (rev 47) +++ trunk/extractor/helpers.h 2008-02-19 20:08:31 UTC (rev 48) @@ -6,7 +6,8 @@ uint32_t peek_le32(FILE *f); uint32_t read_be32(FILE *f); int fcopy(FILE *in, FILE *out, int len); -#define TAG(a, b, c, d) ((uint32_t)(a << 8 | b) << 16 | (c << 8 | d)) +#define TAG(a, b, c, d) ((uint32_t)((a) << 8 | (b)) << 16 | ((c) << 8 | (d))) +#define HUGETAG(a, b, c, d, e, f, g, h) (((uint64_t)(TAG(a, b, c, d)) << 32) | TAG(e, f, g, h)) struct file_s; void default_free_list(struct file_s *list); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |