From: cristy Date: Thu, 7 Nov 2013 14:18:46 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~3148 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3a5987c75c361dde2b38579f05ca961927d842fe;p=imagemagick --- diff --git a/MagickCore/coder.c b/MagickCore/coder.c index 9076f0aa7..2cd3a2527 100644 --- a/MagickCore/coder.c +++ b/MagickCore/coder.c @@ -772,7 +772,7 @@ static MagickBooleanType LoadCoderList(const char *xml,const char *filename, (void) CopyMagickString(path,token,MaxTextExtent); else (void) ConcatenateMagickString(path,token,MaxTextExtent); - xml=FileToString(path,~0,exception); + xml=FileToString(path,~0UL,exception); if (xml != (char *) NULL) { status=LoadCoderList(xml,path,depth+1,exception); diff --git a/MagickCore/color.c b/MagickCore/color.c index b8bb657c3..167b21698 100644 --- a/MagickCore/color.c +++ b/MagickCore/color.c @@ -1923,7 +1923,7 @@ static MagickBooleanType LoadColorList(const char *xml,const char *filename, (void) CopyMagickString(path,token,MaxTextExtent); else (void) ConcatenateMagickString(path,token,MaxTextExtent); - xml=FileToString(path,~0,exception); + xml=FileToString(path,~0UL,exception); if (xml != (char *) NULL) { status=LoadColorList(xml,path,depth+1,exception); diff --git a/MagickCore/configure.c b/MagickCore/configure.c index 790170058..a268403d1 100644 --- a/MagickCore/configure.c +++ b/MagickCore/configure.c @@ -1125,7 +1125,7 @@ static MagickBooleanType LoadConfigureList(const char *xml,const char *filename, (void) CopyMagickString(path,token,MaxTextExtent); else (void) ConcatenateMagickString(path,token,MaxTextExtent); - xml=FileToString(path,~0,exception); + xml=FileToString(path,~0UL,exception); if (xml != (char *) NULL) { status=LoadConfigureList(xml,path,depth+1,exception); diff --git a/MagickCore/delegate.c b/MagickCore/delegate.c index 44da45b26..8f61a2e69 100644 --- a/MagickCore/delegate.c +++ b/MagickCore/delegate.c @@ -1308,7 +1308,7 @@ static MagickBooleanType LoadDelegateList(const char *xml,const char *filename, (void) CopyMagickString(path,token,MaxTextExtent); else (void) ConcatenateMagickString(path,token,MaxTextExtent); - xml=FileToString(path,~0,exception); + xml=FileToString(path,~0UL,exception); if (xml != (char *) NULL) { status=LoadDelegateList(xml,path,depth+1,exception); diff --git a/MagickCore/display.c b/MagickCore/display.c index cc5ca7b21..eecdcba83 100644 --- a/MagickCore/display.c +++ b/MagickCore/display.c @@ -10375,7 +10375,7 @@ static Image *XOpenImage(Display *display,XResourceInfo *resource_info, /* Unknown image format. */ - text=FileToString(filename,~0,exception); + text=FileToString(filename,~0UL,exception); if (text == (char *) NULL) return((Image *) NULL); textlist=StringToList(text); diff --git a/MagickCore/draw.c b/MagickCore/draw.c index 7733c32aa..2b52814af 100644 --- a/MagickCore/draw.c +++ b/MagickCore/draw.c @@ -1755,7 +1755,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info, if (*draw_info->primitive != '@') primitive=AcquireString(draw_info->primitive); else - primitive=FileToString(draw_info->primitive+1,~0,exception); + primitive=FileToString(draw_info->primitive+1,~0UL,exception); if (primitive == (char *) NULL) return(MagickFalse); primitive_extent=(double) strlen(primitive); @@ -5286,6 +5286,7 @@ static size_t TracePath(PrimitiveInfo *primitive_info,const char *path) start.y=0.0; number_coordinates=0; z_count=0; + end=0; primitive_type=primitive_info->primitive; q=primitive_info; for (p=path; *p != '\0'; ) diff --git a/MagickCore/feature.c b/MagickCore/feature.c index 2b339aa75..fe9d991a2 100644 --- a/MagickCore/feature.c +++ b/MagickCore/feature.c @@ -214,11 +214,11 @@ MagickExport ChannelFeatures *GetImageFeatures(const Image *image, } for (i=0; i <= (ssize_t) MaxMap; i++) { - grays[i].red=(~0U); - grays[i].green=(~0U); - grays[i].blue=(~0U); - grays[i].alpha=(~0U); - grays[i].black=(~0U); + grays[i].red=(~0UL); + grays[i].green=(~0UL); + grays[i].blue=(~0UL); + grays[i].alpha=(~0UL); + grays[i].black=(~0UL); } status=MagickTrue; image_view=AcquireVirtualCacheView(image,exception); @@ -270,17 +270,17 @@ MagickExport ChannelFeatures *GetImageFeatures(const Image *image, (void) ResetMagickMemory(&gray,0,sizeof(gray)); for (i=0; i <= (ssize_t) MaxMap; i++) { - if (grays[i].red != ~0U) + if (grays[i].red != ~0UL) grays[gray.red++].red=grays[i].red; - if (grays[i].green != ~0U) + if (grays[i].green != ~0UL) grays[gray.green++].green=grays[i].green; - if (grays[i].blue != ~0U) + if (grays[i].blue != ~0UL) grays[gray.blue++].blue=grays[i].blue; if (image->colorspace == CMYKColorspace) - if (grays[i].black != ~0U) + if (grays[i].black != ~0UL) grays[gray.black++].black=grays[i].black; if (image->alpha_trait == BlendPixelTrait) - if (grays[i].alpha != ~0U) + if (grays[i].alpha != ~0UL) grays[gray.alpha++].alpha=grays[i].alpha; } /* diff --git a/MagickCore/fx.c b/MagickCore/fx.c index e895196ef..e30a8bf07 100644 --- a/MagickCore/fx.c +++ b/MagickCore/fx.c @@ -2996,7 +2996,7 @@ static FxInfo **AcquireFxThreadSet(const Image *image,const char *expression, if (*expression != '@') fx_expression=ConstantString(expression); else - fx_expression=FileToString(expression+1,~0,exception); + fx_expression=FileToString(expression+1,~0UL,exception); for (i=0; i < (ssize_t) number_threads; i++) { MagickBooleanType diff --git a/MagickCore/locale.c b/MagickCore/locale.c index af0284ea0..c7b05085d 100644 --- a/MagickCore/locale.c +++ b/MagickCore/locale.c @@ -1185,7 +1185,7 @@ static MagickBooleanType LoadLocaleList(const char *xml,const char *filename, (void) CopyMagickString(path,token,MaxTextExtent); else (void) ConcatenateMagickString(path,token,MaxTextExtent); - xml=FileToString(path,~0,exception); + xml=FileToString(path,~0UL,exception); if (xml != (char *) NULL) { status=LoadLocaleList(xml,path,locale,depth+1,exception); diff --git a/MagickCore/log.c b/MagickCore/log.c index 27f1d39ed..a60e0e6b2 100644 --- a/MagickCore/log.c +++ b/MagickCore/log.c @@ -1380,7 +1380,7 @@ static MagickBooleanType LoadLogList(const char *xml,const char *filename, (void) CopyMagickString(path,token,MaxTextExtent); else (void) ConcatenateMagickString(path,token,MaxTextExtent); - xml=FileToString(path,~0,exception); + xml=FileToString(path,~0UL,exception); if (xml != (char *) NULL) { status&=LoadLogList(xml,path,depth+1,exception); diff --git a/MagickCore/magic.c b/MagickCore/magic.c index b706bdc6f..a854cd4bb 100644 --- a/MagickCore/magic.c +++ b/MagickCore/magic.c @@ -756,7 +756,7 @@ static MagickBooleanType LoadMagicList(const char *xml,const char *filename, (void) CopyMagickString(path,token,MaxTextExtent); else (void) ConcatenateMagickString(path,token,MaxTextExtent); - xml=FileToString(path,~0,exception); + xml=FileToString(path,~0UL,exception); if (xml != (char *) NULL) { status=LoadMagicList(xml,path,depth+1,exception); diff --git a/MagickCore/mime.c b/MagickCore/mime.c index 0ce4cdc17..6f765d842 100644 --- a/MagickCore/mime.c +++ b/MagickCore/mime.c @@ -799,7 +799,7 @@ static MagickBooleanType LoadMimeList(const char *xml,const char *filename, (void) CopyMagickString(path,attribute,MaxTextExtent); else (void) ConcatenateMagickString(path,attribute,MaxTextExtent); - xml=FileToString(path,~0,exception); + xml=FileToString(path,~0UL,exception); if (xml != (char *) NULL) { status=LoadMimeList(xml,path,depth+1,exception); diff --git a/MagickCore/policy.c b/MagickCore/policy.c index 14ee24b5b..6a196dbe1 100644 --- a/MagickCore/policy.c +++ b/MagickCore/policy.c @@ -735,7 +735,7 @@ static MagickBooleanType LoadPolicyList(const char *xml,const char *filename, (void) CopyMagickString(path,token,MaxTextExtent); else (void) ConcatenateMagickString(path,token,MaxTextExtent); - xml=FileToString(path,~0,exception); + xml=FileToString(path,~0UL,exception); if (xml != (char *) NULL) { status=LoadPolicyList(xml,path,depth+1,exception); diff --git a/MagickCore/property.c b/MagickCore/property.c index 5108c4814..e4cdbb174 100644 --- a/MagickCore/property.c +++ b/MagickCore/property.c @@ -557,7 +557,7 @@ static inline unsigned short ReadPropertyMSBShort(const unsigned char **p, value; if (*length < 2) - return((unsigned short) ~0U); + return((unsigned short) ~0UL); for (i=0; i < 2; i++) { c=(int) (*(*p)++); @@ -3155,7 +3155,7 @@ MagickExport char *InterpretImageProperties(ImageInfo *image_info, OptionError,"UnableToAccessPath","%s",p); return((char *) NULL); } - return(FileToString(p,~0,exception)); + return(FileToString(p,~0UL,exception)); } /* diff --git a/MagickCore/type.c b/MagickCore/type.c index 8a854f326..9a68479aa 100644 --- a/MagickCore/type.c +++ b/MagickCore/type.c @@ -1060,7 +1060,7 @@ static MagickBooleanType LoadTypeList(const char *xml,const char *filename, else (void) ConcatenateMagickString(path,token,MaxTextExtent); sans_exception=AcquireExceptionInfo(); - xml=FileToString(path,~0,sans_exception); + xml=FileToString(path,~0UL,sans_exception); sans_exception=DestroyExceptionInfo(sans_exception); if (xml != (char *) NULL) { @@ -1329,7 +1329,7 @@ static MagickBooleanType LoadTypeLists(const char *filename, */ (void) FormatLocaleString(path,MaxTextExtent,"%s%s%s",font_path, DirectorySeparator,filename); - option=FileToString(path,~0,exception); + option=FileToString(path,~0UL,exception); if (option != (void *) NULL) { status&=LoadTypeList(option,path,0,exception); diff --git a/MagickCore/utility.c b/MagickCore/utility.c index 5cff7ade2..3fdc979d4 100644 --- a/MagickCore/utility.c +++ b/MagickCore/utility.c @@ -834,7 +834,7 @@ MagickExport MagickBooleanType ExpandFilenames(int *number_arguments, Generate file list from file list (e.g. @filelist.txt). */ exception=AcquireExceptionInfo(); - files=FileToString(option+1,~0,exception); + files=FileToString(option+1,~0UL,exception); exception=DestroyExceptionInfo(exception); if (files == (char *) NULL) continue; diff --git a/MagickCore/xwindow.c b/MagickCore/xwindow.c index 248e49757..1d49525b7 100644 --- a/MagickCore/xwindow.c +++ b/MagickCore/xwindow.c @@ -2059,7 +2059,7 @@ MagickPrivate void XDisplayImageInfo(Display *display, */ (void) IdentifyImage(image,file,MagickTrue,exception); (void) fclose(file); - text=FileToString(filename,~0,exception); + text=FileToString(filename,~0UL,exception); (void) RelinquishUniqueFileResource(filename); if (text == (char *) NULL) { diff --git a/MagickWand/magick-image.c b/MagickWand/magick-image.c index 845e6b3ba..7c0077a66 100644 --- a/MagickWand/magick-image.c +++ b/MagickWand/magick-image.c @@ -5946,7 +5946,7 @@ WandExport char *MagickIdentifyImage(MagickWand *wand) } (void) IdentifyImage(wand->images,file,MagickTrue,wand->exception); (void) fclose(file); - description=FileToString(filename,~0,wand->exception); + description=FileToString(filename,~0UL,wand->exception); (void) RelinquishUniqueFileResource(filename); return(description); } diff --git a/MagickWand/mogrify.c b/MagickWand/mogrify.c index 443a423ec..f4f042939 100644 --- a/MagickWand/mogrify.c +++ b/MagickWand/mogrify.c @@ -991,7 +991,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc, Color correct with a color decision list. */ (void) SyncImageSettings(mogrify_info,*image,exception); - color_correction_collection=FileToString(argv[i+1],~0,exception); + color_correction_collection=FileToString(argv[i+1],~0UL,exception); if (color_correction_collection == (char *) NULL) break; (void) ColorDecisionListImage(*image,color_correction_collection, @@ -1255,7 +1255,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc, Decipher pixels. */ (void) SyncImageSettings(mogrify_info,*image,exception); - passkey=FileToStringInfo(argv[i+1],~0,exception); + passkey=FileToStringInfo(argv[i+1],~0UL,exception); if (passkey != (StringInfo *) NULL) { (void) PasskeyDecipherImage(*image,passkey,exception); @@ -1448,7 +1448,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc, Encipher pixels. */ (void) SyncImageSettings(mogrify_info,*image,exception); - passkey=FileToStringInfo(argv[i+1],~0,exception); + passkey=FileToStringInfo(argv[i+1],~0UL,exception); if (passkey != (StringInfo *) NULL) { (void) PasskeyEncipherImage(*image,passkey,exception); diff --git a/MagickWand/operation.c b/MagickWand/operation.c index 847900226..86b18244b 100644 --- a/MagickWand/operation.c +++ b/MagickWand/operation.c @@ -1912,7 +1912,7 @@ static MagickBooleanType CLISimpleOperatorImage(MagickCLI *cli_wand, /* Color correct with a color decision list. */ - color_correction_collection=FileToString(arg1,~0,_exception); + color_correction_collection=FileToString(arg1,~0UL,_exception); if (color_correction_collection == (char *) NULL) break; (void) ColorDecisionListImage(_image,color_correction_collection, @@ -2135,7 +2135,7 @@ static MagickBooleanType CLISimpleOperatorImage(MagickCLI *cli_wand, StringInfo *passkey; - passkey=FileToStringInfo(arg1,~0,_exception); + passkey=FileToStringInfo(arg1,~0UL,_exception); if (passkey == (StringInfo *) NULL) CLIWandExceptArgBreak(OptionError,"InvalidArgument",option,arg1); @@ -2252,7 +2252,7 @@ static MagickBooleanType CLISimpleOperatorImage(MagickCLI *cli_wand, StringInfo *passkey; - passkey=FileToStringInfo(arg1,~0,_exception); + passkey=FileToStringInfo(arg1,~0UL,_exception); if (passkey != (StringInfo *) NULL) { (void) PasskeyEncipherImage(_image,passkey,_exception); diff --git a/coders/cin.c b/coders/cin.c index a842977dc..899bfe5a5 100644 --- a/coders/cin.c +++ b/coders/cin.c @@ -476,7 +476,7 @@ static Image *ReadCINImage(const ImageInfo *image_info,ExceptionInfo *exception) */ cin.image.orientation=(unsigned char) ReadBlobByte(image); offset++; - if (cin.image.orientation != (unsigned char) (~0U)) + if (cin.image.orientation != (unsigned char) (~0UL)) (void) FormatImageProperty(image,"dpx:image.orientation","%d", cin.image.orientation); switch (cin.image.orientation) diff --git a/coders/dpx.c b/coders/dpx.c index 8229773d0..7c40e63ce 100644 --- a/coders/dpx.c +++ b/coders/dpx.c @@ -718,7 +718,7 @@ static Image *ReadDPXImage(const ImageInfo *image_info,ExceptionInfo *exception) offset+=4; dpx.file.ditto_key=ReadBlobLong(image); offset+=4; - if (dpx.file.ditto_key != ~0U) + if (dpx.file.ditto_key != ~0UL) (void) FormatImageProperty(image,"dpx:file.ditto.key","%u", dpx.file.ditto_key); dpx.file.generic_size=ReadBlobLong(image); @@ -764,7 +764,7 @@ static Image *ReadDPXImage(const ImageInfo *image_info,ExceptionInfo *exception) } dpx.file.encrypt_key=ReadBlobLong(image); offset+=4; - if (dpx.file.encrypt_key != ~0U) + if (dpx.file.encrypt_key != ~0UL) (void) FormatImageProperty(image,"dpx:file.encrypt_key","%u", dpx.file.encrypt_key); offset+=ReadBlob(image,sizeof(dpx.file.reserve),(unsigned char *) @@ -849,12 +849,12 @@ static Image *ReadDPXImage(const ImageInfo *image_info,ExceptionInfo *exception) */ dpx.orientation.x_offset=ReadBlobLong(image); offset+=4; - if (dpx.orientation.x_offset != ~0U) + if (dpx.orientation.x_offset != ~0UL) (void) FormatImageProperty(image,"dpx:orientation.x_offset","%u", dpx.orientation.x_offset); dpx.orientation.y_offset=ReadBlobLong(image); offset+=4; - if (dpx.orientation.y_offset != ~0U) + if (dpx.orientation.y_offset != ~0UL) (void) FormatImageProperty(image,"dpx:orientation.y_offset","%u", dpx.orientation.y_offset); dpx.orientation.x_center=ReadBlobFloat(image); @@ -869,12 +869,12 @@ static Image *ReadDPXImage(const ImageInfo *image_info,ExceptionInfo *exception) dpx.orientation.y_center); dpx.orientation.x_size=ReadBlobLong(image); offset+=4; - if (dpx.orientation.x_size != ~0U) + if (dpx.orientation.x_size != ~0UL) (void) FormatImageProperty(image,"dpx:orientation.x_size","%u", dpx.orientation.x_size); dpx.orientation.y_size=ReadBlobLong(image); offset+=4; - if (dpx.orientation.y_size != ~0U) + if (dpx.orientation.y_size != ~0UL) (void) FormatImageProperty(image,"dpx:orientation.y_size","%u", dpx.orientation.y_size); offset+=ReadBlob(image,sizeof(dpx.orientation.filename),(unsigned char *) @@ -902,8 +902,8 @@ static Image *ReadDPXImage(const ImageInfo *image_info,ExceptionInfo *exception) dpx.orientation.border[i]=ReadBlobShort(image); offset+=2; } - if ((dpx.orientation.border[0] != (unsigned short) (~0U)) && - (dpx.orientation.border[1] != (unsigned short) (~0U))) + if ((dpx.orientation.border[0] != (unsigned short) (~0UL)) && + (dpx.orientation.border[1] != (unsigned short) (~0UL))) (void) FormatImageProperty(image,"dpx:orientation.border","%dx%d%+d%+d", dpx.orientation.border[0],dpx.orientation.border[1], dpx.orientation.border[2],dpx.orientation.border[3]); for (i=0; i < 2; i++) @@ -911,8 +911,8 @@ static Image *ReadDPXImage(const ImageInfo *image_info,ExceptionInfo *exception) dpx.orientation.aspect_ratio[i]=ReadBlobLong(image); offset+=4; } - if ((dpx.orientation.aspect_ratio[0] != ~0U) && - (dpx.orientation.aspect_ratio[1] != ~0U)) + if ((dpx.orientation.aspect_ratio[0] != ~0UL) && + (dpx.orientation.aspect_ratio[1] != ~0UL)) (void) FormatImageProperty(image,"dpx:orientation.aspect_ratio", "%ux%u",dpx.orientation.aspect_ratio[0], dpx.orientation.aspect_ratio[1]); @@ -953,17 +953,17 @@ static Image *ReadDPXImage(const ImageInfo *image_info,ExceptionInfo *exception) dpx.film.format); dpx.film.frame_position=ReadBlobLong(image); offset+=4; - if (dpx.film.frame_position != ~0U) + if (dpx.film.frame_position != ~0UL) (void) FormatImageProperty(image,"dpx:film.frame_position","%u", dpx.film.frame_position); dpx.film.sequence_extent=ReadBlobLong(image); offset+=4; - if (dpx.film.sequence_extent != ~0U) + if (dpx.film.sequence_extent != ~0UL) (void) FormatImageProperty(image,"dpx:film.sequence_extent","%u", dpx.film.sequence_extent); dpx.film.held_count=ReadBlobLong(image); offset+=4; - if (dpx.film.held_count != ~0U) + if (dpx.film.held_count != ~0UL) (void) FormatImageProperty(image,"dpx:film.held_count","%u", dpx.film.held_count); dpx.film.frame_rate=ReadBlobFloat(image); @@ -1084,7 +1084,7 @@ static Image *ReadDPXImage(const ImageInfo *image_info,ExceptionInfo *exception) offset+=ReadBlob(image,sizeof(dpx.user.id),(unsigned char *) dpx.user.id); if (*dpx.user.id != '\0') (void) FormatImageProperty(image,"dpx:user.id","%.32s",dpx.user.id); - if ((dpx.file.user_size != ~0U) && + if ((dpx.file.user_size != ~0UL) && ((size_t) dpx.file.user_size > sizeof(dpx.user.id))) { StringInfo @@ -1112,7 +1112,7 @@ static Image *ReadDPXImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Convert DPX raster image to pixel packets. */ - if ((dpx.image.image_element[n].data_offset != (unsigned int) (~0U)) && + if ((dpx.image.image_element[n].data_offset != (unsigned int) (~0UL)) && (dpx.image.image_element[n].data_offset != 0U)) { MagickOffsetType @@ -1574,7 +1574,7 @@ static MagickBooleanType WriteDPXImage(const ImageInfo *image_info,Image *image, (void) strncpy(dpx.file.copyright,value,sizeof(dpx.file.copyright)); offset+=WriteBlob(image,sizeof(dpx.file.copyright),(unsigned char *) dpx.file.copyright); - dpx.file.encrypt_key=(~0U); + dpx.file.encrypt_key=(~0UL); offset+=WriteBlobLong(image,dpx.file.encrypt_key); offset+=WriteBlob(image,sizeof(dpx.file.reserve),(unsigned char *) dpx.file.reserve); diff --git a/coders/jpeg.c b/coders/jpeg.c index 0ad5e8823..5dbe2fe50 100644 --- a/coders/jpeg.c +++ b/coders/jpeg.c @@ -1651,7 +1651,7 @@ static QuantizationTable *GetQuantizationTable(const char *filename, (void) LogMagickEvent(ConfigureEvent,GetMagickModule(), "Loading quantization tables \"%s\" ...",filename); table=(QuantizationTable *) NULL; - xml=FileToString(filename,~0U,exception); + xml=FileToString(filename,~0UL,exception); if (xml == (char *) NULL) return(table); quantization_tables=NewXMLTree(xml,exception); diff --git a/coders/psd.c b/coders/psd.c index 9ae9e3a4a..ce4170995 100644 --- a/coders/psd.c +++ b/coders/psd.c @@ -1228,7 +1228,7 @@ static Image *ReadPSDImage(const ImageInfo *image_info,ExceptionInfo *exception) Allocate layered image. */ layer_info[i].image=CloneImage(image,layer_info[i].page.width, - layer_info[i].page.height == ~0U ? 1 : layer_info[i].page.height, + layer_info[i].page.height == ~0UL ? 1 : layer_info[i].page.height, MagickFalse,exception); if (layer_info[i].image == (Image *) NULL) { diff --git a/coders/webp.c b/coders/webp.c index 25a31e686..dd72bea36 100644 --- a/coders/webp.c +++ b/coders/webp.c @@ -168,7 +168,7 @@ static MagickBooleanType IsWEBPImageLossless(const unsigned char *stream, #define TAG_SIZE 4 #define CHUNK_SIZE_BYTES 4 #define CHUNK_HEADER_SIZE 8 -#define MAX_CHUNK_PAYLOAD (~0U-CHUNK_HEADER_SIZE-1) +#define MAX_CHUNK_PAYLOAD (~0UL-CHUNK_HEADER_SIZE-1) ssize_t offset;