这篇教程C++ FormatLocaleFile函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中FormatLocaleFile函数的典型用法代码示例。如果您正苦于以下问题:C++ FormatLocaleFile函数的具体用法?C++ FormatLocaleFile怎么用?C++ FormatLocaleFile使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了FormatLocaleFile函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: ListConfigureInfo/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% %% L i s t C o n f i g u r e I n f o %% %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ListConfigureInfo() lists the configure info to a file.%% The format of the ListConfigureInfo method is:%% MagickBooleanType ListConfigureInfo(FILE *file,ExceptionInfo *exception)%% A description of each parameter follows.%% o file: An pointer to a FILE.%% o exception: return any errors or warnings in this structure.%*/MagickExport MagickBooleanType ListConfigureInfo(FILE *file, ExceptionInfo *exception){ const char *name, *path, *value; const ConfigureInfo **configure_info; register ssize_t i; size_t number_options; ssize_t j; if (file == (const FILE *) NULL) file=stdout; configure_info=GetConfigureInfoList("*",&number_options,exception); if (configure_info == (const ConfigureInfo **) NULL) return(MagickFalse); path=(const char *) NULL; for (i=0; i < (ssize_t) number_options; i++) { if (configure_info[i]->stealth != MagickFalse) continue; if ((path == (const char *) NULL) || (LocaleCompare(path,configure_info[i]->path) != 0)) { if (configure_info[i]->path != (char *) NULL) (void) FormatLocaleFile(file,"/nPath: %s/n/n", configure_info[i]->path); (void) FormatLocaleFile(file,"Name Value/n"); (void) FormatLocaleFile(file, "-------------------------------------------------" "------------------------------/n"); } path=configure_info[i]->path; name="unknown"; if (configure_info[i]->name != (char *) NULL) name=configure_info[i]->name; (void) FormatLocaleFile(file,"%s",name); for (j=(ssize_t) strlen(name); j <= 13; j++) (void) FormatLocaleFile(file," "); (void) FormatLocaleFile(file," "); value="unknown"; if (configure_info[i]->value != (char *) NULL) value=configure_info[i]->value; (void) FormatLocaleFile(file,"%s",value); (void) FormatLocaleFile(file,"/n"); } (void) fflush(file); configure_info=(const ConfigureInfo **) RelinquishMagickMemory((void *) configure_info); return(MagickTrue);}
开发者ID:CamiloBenavides,项目名称:SnoutPoint-Web,代码行数:84,
示例2: DefaultFatalErrorHandler/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% %+ D e f a u l t F a t a l E r r o r H a n d l e r %% %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DefaultFatalErrorHandler() displays an error reason and then terminates the% program.%% The format of the DefaultFatalErrorHandler method is:%% void MagickFatalError(const ExceptionType severity,const char *reason,% const char *description)%% A description of each parameter follows:%% o severity: Specifies the numeric error category.%% o reason: Specifies the reason to display before terminating the% program.%% o description: Specifies any description to the reason.%*/static void DefaultFatalErrorHandler( const ExceptionType magick_unused(severity), const char *reason,const char *description){ if (reason == (char *) NULL) return; (void) FormatLocaleFile(stderr,"%s: %s",GetClientName(),reason); if (description != (char *) NULL) (void) FormatLocaleFile(stderr," (%s)",description); (void) FormatLocaleFile(stderr,"./n"); (void) fflush(stderr); MagickCoreTerminus(); exit(1);}
开发者ID:Ladeira,项目名称:ImageMagick,代码行数:43,
示例3: LockSemaphoreInfo/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% %% L o c k S e m a p h o r e I n f o %% %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LockSemaphoreInfo() locks a semaphore.%% The format of the LockSemaphoreInfo method is:%% void LockSemaphoreInfo(SemaphoreInfo *semaphore_info)%% A description of each parameter follows:%% o semaphore_info: Specifies a pointer to an SemaphoreInfo structure.%*/MagickExport void LockSemaphoreInfo(SemaphoreInfo *semaphore_info){ assert(semaphore_info != (SemaphoreInfo *) NULL); assert(semaphore_info->signature == MagickSignature);#if defined(MAGICKCORE_THREAD_SUPPORT) { int status; status=pthread_mutex_lock(&semaphore_info->mutex); if (status != 0) { errno=status; ThrowFatalException(ResourceLimitFatalError,"UnableToLockSemaphore"); } }#elif defined(MAGICKCORE_HAVE_WINTHREADS) EnterCriticalSection(&semaphore_info->mutex);#endif#if defined(MAGICKCORE_DEBUG) if ((semaphore_info->reference_count > 0) && (IsMagickThreadEqual(semaphore_info->id) != MagickFalse)) { (void) FormatLocaleFile(stderr,"Warning: unexpected recursive lock!/n"); (void) fflush(stderr); }#endif semaphore_info->id=GetMagickThreadId(); semaphore_info->reference_count++;}
开发者ID:ChaseReid,项目名称:ImageMagick,代码行数:52,
示例4: OutputArtifactsstatic void OutputArtifacts(Image *image){ const char *artifact, *value; (void) FormatLocaleFile(stdout," Image Artifacts:/n"); ResetImageArtifactIterator(image); while ((artifact=GetNextImageArtifact(image)) != (const char *) NULL ) { (void) FormatLocaleFile(stdout," %s: ",artifact); value=GetImageArtifact(image,artifact); if (value != (const char *) NULL) (void) FormatLocaleFile(stdout,"%s/n",value); } ResetImageArtifactIterator(image);}
开发者ID:Ladeira,项目名称:ImageMagick,代码行数:16,
示例5: OutputOptions/* Temporary Debugging Information FUTURE: these should be able to be printed out using 'percent escapes' Actually 'Properities' can already be output with "%[*]"*/static void OutputOptions(ImageInfo *image_info){ const char *option, *value; (void) FormatLocaleFile(stdout," Global Options:/n"); ResetImageOptionIterator(image_info); while ((option=GetNextImageOption(image_info)) != (const char *) NULL ) { (void) FormatLocaleFile(stdout," %s: ",option); value=GetImageOption(image_info,option); if (value != (const char *) NULL) (void) FormatLocaleFile(stdout,"%s/n",value); } ResetImageOptionIterator(image_info);}
开发者ID:Ladeira,项目名称:ImageMagick,代码行数:21,
示例6: UnlockSemaphoreInfo/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% %% U n l o c k S e m a p h o r e I n f o %% %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% UnlockSemaphoreInfo() unlocks a semaphore.%% The format of the UnlockSemaphoreInfo method is:%% void UnlockSemaphoreInfo(SemaphoreInfo *semaphore_info)%% A description of each parameter follows:%% o semaphore_info: Specifies a pointer to an SemaphoreInfo structure.%*/MagickExport void UnlockSemaphoreInfo(SemaphoreInfo *semaphore_info){ assert(semaphore_info != (SemaphoreInfo *) NULL); assert(semaphore_info->signature == MagickSignature);#if defined(MAGICKCORE_DEBUG) assert(IsMagickThreadEqual(semaphore_info->id) != MagickFalse); if (semaphore_info->reference_count == 0) { (void) FormatLocaleFile(stderr, "Warning: semaphore lock already unlocked!/n"); (void) fflush(stderr); return; } semaphore_info->reference_count--;#endif#if defined(MAGICKCORE_THREAD_SUPPORT) { int status; status=pthread_mutex_unlock(&semaphore_info->mutex); if (status != 0) { errno=status; ThrowFatalException(ResourceLimitFatalError,"UnableToUnlockSemaphore"); } }#elif defined(MAGICKCORE_HAVE_WINTHREADS) LeaveCriticalSection(&semaphore_info->mutex);#endif}
开发者ID:ChaseReid,项目名称:ImageMagick,代码行数:53,
示例7: PrintChannelFeaturesstatic ssize_t PrintChannelFeatures(FILE *file,const PixelChannel channel, const char *name,const ChannelFeatures *channel_features){#define PrintFeature(feature) / GetMagickPrecision(),(feature)[0], / GetMagickPrecision(),(feature)[1], / GetMagickPrecision(),(feature)[2], / GetMagickPrecision(),(feature)[3], / GetMagickPrecision(),((feature)[0]+(feature)[1]+(feature)[2]+(feature)[3])/4.0 /#define FeaturesFormat " %s:/n" / " Angular Second Moment:/n" / " %.*g, %.*g, %.*g, %.*g, %.*g/n" / " Contrast:/n" / " %.*g, %.*g, %.*g, %.*g, %.*g/n" / " Correlation:/n" / " %.*g, %.*g, %.*g, %.*g, %.*g/n" / " Sum of Squares: Variance:/n" / " %.*g, %.*g, %.*g, %.*g, %.*g/n" / " Inverse Difference Moment:/n" / " %.*g, %.*g, %.*g, %.*g, %.*g/n" / " Sum Average:/n" / " %.*g, %.*g, %.*g, %.*g, %.*g/n" / " Sum Variance:/n" / " %.*g, %.*g, %.*g, %.*g, %.*g/n" / " Sum Entropy:/n" / " %.*g, %.*g, %.*g, %.*g, %.*g/n" / " Entropy:/n" / " %.*g, %.*g, %.*g, %.*g, %.*g/n" / " Difference Variance:/n" / " %.*g, %.*g, %.*g, %.*g, %.*g/n" / " Difference Entropy:/n" / " %.*g, %.*g, %.*g, %.*g, %.*g/n" / " Information Measure of Correlation 1:/n" / " %.*g, %.*g, %.*g, %.*g, %.*g/n" / " Information Measure of Correlation 2:/n" / " %.*g, %.*g, %.*g, %.*g, %.*g/n" / " Maximum Correlation Coefficient:/n" / " %.*g, %.*g, %.*g, %.*g, %.*g/n" ssize_t n; n=FormatLocaleFile(file,FeaturesFormat,name, PrintFeature(channel_features[channel].angular_second_moment), PrintFeature(channel_features[channel].contrast), PrintFeature(channel_features[channel].correlation), PrintFeature(channel_features[channel].variance_sum_of_squares), PrintFeature(channel_features[channel].inverse_difference_moment), PrintFeature(channel_features[channel].sum_average), PrintFeature(channel_features[channel].sum_variance), PrintFeature(channel_features[channel].sum_entropy), PrintFeature(channel_features[channel].entropy), PrintFeature(channel_features[channel].difference_variance), PrintFeature(channel_features[channel].difference_entropy), PrintFeature(channel_features[channel].measure_of_correlation_1), PrintFeature(channel_features[channel].measure_of_correlation_2), PrintFeature(channel_features[channel].maximum_correlation_coefficient)); return(n);}
开发者ID:Ladeira,项目名称:ImageMagick,代码行数:60,
示例8: OutputPropertiesstatic void OutputProperties(Image *image,ExceptionInfo *exception){ const char *property, *value; (void) FormatLocaleFile(stdout," Image Properity:/n"); ResetImagePropertyIterator(image); while ((property=GetNextImageProperty(image)) != (const char *) NULL ) { (void) FormatLocaleFile(stdout," %s: ",property); value=GetImageProperty(image,property,exception); if (value != (const char *) NULL) (void) FormatLocaleFile(stdout,"%s/n",value); } ResetImagePropertyIterator(image);}
开发者ID:Ladeira,项目名称:ImageMagick,代码行数:16,
示例9: MagickUsagestatic void MagickUsage(MagickBooleanType verbose){ const char *name; size_t len; name=GetClientName(); len=strlen(name); if (len>=7 && LocaleCompare("convert",name+len-7) == 0) { /* convert usage */ (void) FormatLocaleFile(stdout, "Usage: %s [ {option} | {image} ... ] {output_image}/n",name); (void) FormatLocaleFile(stdout, " %s -help | -version | -usage | -list {option}/n/n",name); return; } else if (len>=6 && LocaleCompare("script",name+len-6) == 0) { /* magick-script usage */ (void) FormatLocaleFile(stdout, "Usage: %s {filename} [ {script_args} ... ]/n",name); } else { /* magick usage */ (void) FormatLocaleFile(stdout, "Usage: %s [ {option} | {image} ... ] {output_image}/n",name); (void) FormatLocaleFile(stdout, " %s [ {option} | {image} ... ] -script {filename} [ {script_args} ...]/n", name); } (void) FormatLocaleFile(stdout, " %s -help | -version | -usage | -list {option}/n/n",name); if (verbose == MagickFalse) return; (void) FormatLocaleFile(stdout,"%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s/n", "All options are performed in a strict 'as you see them' order/n", "You must read-in images before you can operate on them./n", "/n", "Magick Script files can use any of the following forms.../n", " #!/path/to/magick -script/n", "or/n", " #!/bin/sh/n", " :; exec magick -script /"$0/" /"[email C++ FormatLocaleString函数代码示例 C++ FormatFullVersion函数代码示例
|