From: cristy Date: Tue, 26 Feb 2013 00:50:38 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~4176 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=da9d0e49ff54a9210fc5e78aecdce04adbea6ff5;p=imagemagick --- diff --git a/MagickCore/locale.c b/MagickCore/locale.c index 6d50cfbd9..1a7915e69 100644 --- a/MagickCore/locale.c +++ b/MagickCore/locale.c @@ -70,7 +70,8 @@ Typedef declarations. */ #if defined(__CYGWIN__) -typedef struct _locale_t *locale_t; +typedef struct _locale_t + *locale_t; #endif /* diff --git a/MagickCore/threshold.c b/MagickCore/threshold.c index fa74486e4..01271884a 100644 --- a/MagickCore/threshold.c +++ b/MagickCore/threshold.c @@ -110,6 +110,28 @@ struct _ThresholdMap *levels; }; +/* + Static declarations. +*/ +static const char + *MinimalThresholdMap = + "" + "" + " " + " Threshold 1x1 (non-dither)" + " " + " 1" + " " + " " + " " + " Checkerboard 2x1 (dither)" + " " + " 1 2" + " 2 1" + " " + " " + ""; + /* Forward declarations. */ @@ -853,14 +875,21 @@ MagickExport ThresholdMap *GetThresholdMap(const char *map_id, ThresholdMap *map; - map=(ThresholdMap *)NULL; + map=GetThresholdMapFile(MinimalThresholdMap,"built-in",map_id,exception); + if (map != (ThresholdMap *) NULL) + return(map); options=GetConfigureOptions(ThresholdsFilename,exception); - while (((option=(const StringInfo *) GetNextValueInLinkedList(options)) != - (const StringInfo *) NULL) && (map == (ThresholdMap *) NULL)) + option=(const StringInfo *) GetNextValueInLinkedList(options); + while (option != (const StringInfo *) NULL) + { map=GetThresholdMapFile((const char *) GetStringInfoDatum(option), GetStringInfoPath(option),map_id,exception); + if (map != (ThresholdMap *) NULL) + return(map); + option=(const StringInfo *) GetNextValueInLinkedList(options); + } options=DestroyConfigureOptions(options); - return(map); + return((ThresholdMap *) NULL); } /*