您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetNextValueInLinkedList函数代码示例

51自学网 2021-06-01 21:11:36
  C++
这篇教程C++ GetNextValueInLinkedList函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中GetNextValueInLinkedList函数的典型用法代码示例。如果您正苦于以下问题:C++ GetNextValueInLinkedList函数的具体用法?C++ GetNextValueInLinkedList怎么用?C++ GetNextValueInLinkedList使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了GetNextValueInLinkedList函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: CatchException

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                                                                             %%                                                                             %%                                                                             %%   C a t c h E x c e p t i o n                                               %%                                                                             %%                                                                             %%                                                                             %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  CatchException() returns if no exceptions is found otherwise it reports%  the exception as a warning, error, or fatal depending on the severity.%%  The format of the CatchException method is:%%      CatchException(ExceptionInfo *exception)%%  A description of each parameter follows:%%    o exception: the exception info.%*/MagickExport void CatchException(ExceptionInfo *exception){  register const ExceptionInfo    *p;  assert(exception != (ExceptionInfo *) NULL);  assert(exception->signature == MagickSignature);  if (exception->exceptions  == (void *) NULL)    return;  LockSemaphoreInfo(exception->semaphore);  ResetLinkedListIterator((LinkedListInfo *) exception->exceptions);  p=(const ExceptionInfo *) GetNextValueInLinkedList((LinkedListInfo *)    exception->exceptions);  while (p != (const ExceptionInfo *) NULL)  {    if ((p->severity >= WarningException) && (p->severity < ErrorException))      MagickWarning(p->severity,p->reason,p->description);    if ((p->severity >= ErrorException) && (p->severity < FatalErrorException))      MagickError(p->severity,p->reason,p->description);    if (p->severity >= FatalErrorException)      MagickFatalError(p->severity,p->reason,p->description);    p=(const ExceptionInfo *) GetNextValueInLinkedList((LinkedListInfo *)      exception->exceptions);  }  UnlockSemaphoreInfo(exception->semaphore);  ClearMagickException(exception);}
开发者ID:Distrotech,项目名称:ImageMagick,代码行数:50,


示例2: LoadCoderLists

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                                                                             %%                                                                             %%                                                                             %%  L o a d C o d e r L i s t s                                                %%                                                                             %%                                                                             %%                                                                             %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  LoadCoderLists() loads one or more coder configuration file which%  provides a mapping between coder attributes and a coder name.%%  The format of the LoadCoderLists coder is:%%      MagickBooleanType LoadCoderLists(const char *filename,%        ExceptionInfo *exception)%%  A description of each parameter follows:%%    o filename: The font file name.%%    o exception: Return any errors or warnings in this structure.%%*/static MagickBooleanType LoadCoderLists(const char *filename,  ExceptionInfo *exception){#if defined(UseEmbeddableMagick)  return(LoadCoderList(CoderMap,"built-in",0,exception));#else  const StringInfo    *option;  LinkedListInfo    *options;  MagickStatusType    status;  status=MagickFalse;  options=GetConfigureOptions(filename,exception);  option=(const StringInfo *) GetNextValueInLinkedList(options);  while (option != (const StringInfo *) NULL)  {    status|=LoadCoderList((const char *) option->datum,option->path,0,      exception);    option=(const StringInfo *) GetNextValueInLinkedList(options);  }  options=DestroyConfigureOptions(options);  if ((coder_list == (SplayTreeInfo *) NULL) ||       (GetNumberOfNodesInSplayTree(coder_list) == 0))    status|=LoadCoderList(CoderMap,"built-in",0,exception);  else    (void) SetExceptionInfo(exception,UndefinedException);  return(status != 0 ? MagickTrue : MagickFalse);#endif}
开发者ID:miettal,项目名称:armadillo420_standard,代码行数:60,


示例3: AcquireMimeCache

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                                                                             %%                                                                             %%                                                                             %%  A c q u i r e M i m e C a c h e                                            %%                                                                             %%                                                                             %%                                                                             %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  AcquireMimeCache() caches one or more magic configurations which provides%  a mapping between magic attributes and a magic name.%%  The format of the AcquireMimeCache method is:%%      LinkedListInfo *AcquireMimeCache(const char *filename,%        ExceptionInfo *exception)%%  A description of each parameter follows:%%    o filename: the font file name.%%    o exception: return any errors or warnings in this structure.%*/MagickExport LinkedListInfo *AcquireMimeCache(const char *filename,  ExceptionInfo *exception){  LinkedListInfo    *cache;  MagickStatusType    status;  cache=NewLinkedList(0);  status=MagickTrue;#if !defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)  {    const StringInfo      *option;    LinkedListInfo      *options;    options=GetConfigureOptions(filename,exception);    option=(const StringInfo *) GetNextValueInLinkedList(options);    while (option != (const StringInfo *) NULL)    {      status&=LoadMimeCache(cache,(const char *)        GetStringInfoDatum(option),GetStringInfoPath(option),0,exception);      option=(const StringInfo *) GetNextValueInLinkedList(options);    }    options=DestroyConfigureOptions(options);  }#endif  if (IsLinkedListEmpty(cache) != MagickFalse)    status&=LoadMimeCache(cache,MimeMap,"built-in",0,exception);  return(cache);}
开发者ID:vcgato29,项目名称:ImageMagick,代码行数:60,


示例4: InheritException

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                                                                             %%                                                                             %%                                                                             %%   I n h e r i t E x c e p t i o n                                           %%                                                                             %%                                                                             %%                                                                             %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  InheritException() inherits an exception from a related exception.%%  The format of the InheritException method is:%%      InheritException(ExceptionInfo *exception,const ExceptionInfo *relative)%%  A description of each parameter follows:%%    o exception: the exception info.%%    o relative: the related exception info.%*/MagickExport void InheritException(ExceptionInfo *exception,  const ExceptionInfo *relative){  register const ExceptionInfo    *p;  assert(exception != (ExceptionInfo *) NULL);  assert(exception->signature == MagickSignature);  assert(relative != (ExceptionInfo *) NULL);  assert(relative->signature == MagickSignature);  assert(exception != relative);  if (relative->exceptions == (void *) NULL)    return;  LockSemaphoreInfo(relative->semaphore);  ResetLinkedListIterator((LinkedListInfo *) relative->exceptions);  p=(const ExceptionInfo *) GetNextValueInLinkedList((LinkedListInfo *)    relative->exceptions);  while (p != (const ExceptionInfo *) NULL)  {    (void) ThrowException(exception,p->severity,p->reason,p->description);    p=(const ExceptionInfo *) GetNextValueInLinkedList((LinkedListInfo *)      relative->exceptions);  }  UnlockSemaphoreInfo(relative->semaphore);}
开发者ID:Babelz,项目名称:SaNi,代码行数:49,


示例5: GetConfigureInfo

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                                                                             %%                                                                             %%                                                                             %+   G e t C o n f i g u r e I n f o                                           %%                                                                             %%                                                                             %%                                                                             %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  GetConfigureInfo() searches the configure list for the specified name and if%  found returns attributes for that element.%%  The format of the GetConfigureInfo method is:%%      const ConfigureInfo *GetConfigureInfo(const char *name,%        ExceptionInfo *exception)%%  A description of each parameter follows:%%    o configure_info: GetConfigureInfo() searches the configure list for the%      specified name and if found returns attributes for that element.%%    o name: The configure name.%%    o exception: Return any errors or warnings in this structure.%*/WizardExport const ConfigureInfo *GetConfigureInfo(const char *name,  ExceptionInfo *exception){  register const ConfigureInfo    *p;  assert(exception != (ExceptionInfo *) NULL);  if (IsConfigureCacheInstantiated(exception) == WizardFalse)    return((const ConfigureInfo *) NULL);  /*    Search for named configure.  */  LockSemaphoreInfo(configure_semaphore);  ResetLinkedListIterator(configure_cache);  p=(const ConfigureInfo *) GetNextValueInLinkedList(configure_cache);  if ((name == (const char *) NULL) || (strcasecmp(name,"*") == 0))    {      UnlockSemaphoreInfo(configure_semaphore);      return(p);    }  while (p != (const ConfigureInfo *) NULL)  {    if (strcasecmp(name,p->name) == 0)      break;    p=(const ConfigureInfo *) GetNextValueInLinkedList(configure_cache);  }  if (p == (ConfigureInfo *) NULL)    (void) ThrowWizardException(exception,GetWizardModule(),OptionWarning,      "no such configure list `%s'",name);  else    (void) InsertValueInLinkedList(configure_cache,0,      RemoveElementByValueFromLinkedList(configure_cache,p));  UnlockSemaphoreInfo(configure_semaphore);  return(p);}
开发者ID:ImageMagick,项目名称:WizardsToolkit,代码行数:64,


示例6: GetMagicInfo

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                                                                             %%                                                                             %%                                                                             %+   G e t M a g i c I n f o                                                   %%                                                                             %%                                                                             %%                                                                             %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  GetMagicInfo() searches the magic list for the specified name and if found%  returns attributes for that magic.%%  The format of the GetMagicInfo method is:%%      const MagicInfo *GetMagicInfo(const unsigned char *magic,%        const size_t length,ExceptionInfo *exception)%%  A description of each parameter follows:%%    o magic: A binary string generally representing the first few characters%      of the image file or blob.%%    o length: the length of the binary signature.%%    o exception: return any errors or warnings in this structure.%*/MagickExport const MagicInfo *GetMagicInfo(const unsigned char *magic,  const size_t length,ExceptionInfo *exception){  register const MagicInfo    *p;  assert(exception != (ExceptionInfo *) NULL);  if (IsMagicCacheInstantiated(exception) == MagickFalse)    return((const MagicInfo *) NULL);  /*    Search for magic tag.  */  LockSemaphoreInfo(magic_semaphore);  ResetLinkedListIterator(magic_cache);  p=(const MagicInfo *) GetNextValueInLinkedList(magic_cache);  if (magic == (const unsigned char *) NULL)    {      UnlockSemaphoreInfo(magic_semaphore);      return(p);    }  while (p != (const MagicInfo *) NULL)  {    assert(p->offset >= 0);    if (((size_t) (p->offset+p->length) <= length) &&        (memcmp(magic+p->offset,p->magic,p->length) == 0))      break;    p=(const MagicInfo *) GetNextValueInLinkedList(magic_cache);  }  if (p != (const MagicInfo *) NULL)    (void) InsertValueInLinkedList(magic_cache,0,      RemoveElementByValueFromLinkedList(magic_cache,p));  UnlockSemaphoreInfo(magic_semaphore);  return(p);}
开发者ID:GalliumOS,项目名称:imagemagick,代码行数:63,


示例7: GetConfigureInfo

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                                                                             %%                                                                             %%                                                                             %+   G e t C o n f i g u r e I n f o                                           %%                                                                             %%                                                                             %%                                                                             %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  GetConfigureInfo() searches the configure list for the specified name and if%  found returns attributes for that element.%%  The format of the GetConfigureInfo method is:%%      const ConfigureInfo *GetConfigureInfo(const char *name,%        ExceptionInfo *exception)%%  A description of each parameter follows:%%    o configure_info: GetConfigureInfo() searches the configure list for the%      specified name and if found returns attributes for that element.%%    o name: the configure name.%%    o exception: return any errors or warnings in this structure.%*/MagickExport const ConfigureInfo *GetConfigureInfo(const char *name,  ExceptionInfo *exception){  register const ConfigureInfo    *p;  assert(exception != (ExceptionInfo *) NULL);  if ((configure_list == (LinkedListInfo *) NULL) ||      (instantiate_configure == MagickFalse))    if (InitializeConfigureList(exception) == MagickFalse)      return((const ConfigureInfo *) NULL);  if ((configure_list == (LinkedListInfo *) NULL) ||      (IsLinkedListEmpty(configure_list) != MagickFalse))    return((const ConfigureInfo *) NULL);  if ((name == (const char *) NULL) || (LocaleCompare(name,"*") == 0))    return((const ConfigureInfo *) GetValueFromLinkedList(configure_list,0));  /*    Search for configure tag.  */  LockSemaphoreInfo(configure_semaphore);  ResetLinkedListIterator(configure_list);  p=(const ConfigureInfo *) GetNextValueInLinkedList(configure_list);  while (p != (const ConfigureInfo *) NULL)  {    if (LocaleCompare(name,p->name) == 0)      break;    p=(const ConfigureInfo *) GetNextValueInLinkedList(configure_list);  }  if (p != (ConfigureInfo *) NULL)    (void) InsertValueInLinkedList(configure_list,0,      RemoveElementByValueFromLinkedList(configure_list,p));  UnlockSemaphoreInfo(configure_semaphore);  return(p);}
开发者ID:MaximOrlovsky,项目名称:unix-toolbox.js-imagemagick,代码行数:63,


示例8: LoadMimeList

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                                                                             %%                                                                             %%                                                                             %%  L o a d M i m e L i s t s                                                  %%                                                                             %%                                                                             %%                                                                             %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  LoadMimeList() loads one or more magic configuration file which provides a%  mapping between magic attributes and a magic name.%%  The format of the LoadMimeLists method is:%%      MagickBooleanType LoadMimeLists(const char *filename,%        ExceptionInfo *exception)%%  A description of each parameter follows:%%    o filename: the font file name.%%    o exception: return any errors or warnings in this structure.%*/MagickExport MagickBooleanType LoadMimeLists(const char *filename,  ExceptionInfo *exception){#if defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)  return(LoadMimeList(MimeMap,"built-in",0,exception));#else  const StringInfo    *option;  LinkedListInfo    *options;  MagickStatusType    status;  status=MagickFalse;  options=GetConfigureOptions(filename,exception);  option=(const StringInfo *) GetNextValueInLinkedList(options);  while (option != (const StringInfo *) NULL)  {    status&=LoadMimeList((const char *) GetStringInfoDatum(option),      GetStringInfoPath(option),0,exception);    option=(const StringInfo *) GetNextValueInLinkedList(options);  }  options=DestroyConfigureOptions(options);  if ((mime_list == (LinkedListInfo *) NULL) ||      (IsLinkedListEmpty(mime_list) != MagickFalse))    status&=LoadMimeList(MimeMap,"built-in",0,exception);  else    ClearMagickException(exception);  return(status != 0 ? MagickTrue : MagickFalse);#endif}
开发者ID:0xPr0xy,项目名称:ImageMagick,代码行数:59,


示例9: GetMagicPatternExtent

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                                                                             %%                                                                             %%                                                                             %%   G e t M a g i c P a t t e r n E x t e n t                                 %%                                                                             %%                                                                             %%                                                                             %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  GetMagicPatternExtent() returns the the extent of the buffer that is%  required to check all the MagickInfos. It returns zero if the list is empty.%%  The format of the GetMagicPatternExtent method is:%%      size_t GetMagicPatternExtent(ExceptionInfo *exception)%%  A description of each parameter follows:%%    o exception: return any errors or warnings in this structure.%*/MagickExport size_t GetMagicPatternExtent(ExceptionInfo *exception){  register const MagicInfo    *p;  size_t    magickSize,    max;  static size_t    size=0;  assert(exception != (ExceptionInfo *) NULL);  if ((size != 0) || (IsMagicCacheInstantiated(exception) == MagickFalse))    return(size);  LockSemaphoreInfo(magic_semaphore);  ResetLinkedListIterator(magic_cache);  max=0;  p=(const MagicInfo *) GetNextValueInLinkedList(magic_cache);  while (p != (const MagicInfo *) NULL)  {    magickSize=(size_t) (p->offset+p->length);    if (magickSize > max)      max=magickSize;    p=(const MagicInfo *) GetNextValueInLinkedList(magic_cache);  }  size=max;  UnlockSemaphoreInfo(magic_semaphore);  return(size);}
开发者ID:Hopedream,项目名称:ImageMagick,代码行数:53,


示例10: LoadCoderLists

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                                                                             %%                                                                             %%                                                                             %%  L o a d C o d e r L i s t s                                                %%                                                                             %%                                                                             %%                                                                             %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  LoadCoderLists() loads one or more coder configuration file which%  provides a mapping between coder attributes and a coder name.%%  The format of the LoadCoderLists coder is:%%      MagickBooleanType LoadCoderLists(const char *filename,%        ExceptionInfo *exception)%%  A description of each parameter follows:%%    o filename: the font file name.%%    o exception: return any errors or warnings in this structure.%*/static MagickBooleanType LoadCoderLists(const char *filename,  ExceptionInfo *exception){#if defined(MAGICKCORE_EMBEDDABLE_SUPPORT)  return(LoadCoderList(CoderMap,"built-in",0,exception));#else  const StringInfo    *option;  LinkedListInfo    *options;  MagickStatusType    status;  status=MagickFalse;  options=GetConfigureOptions(filename,exception);  option=(const StringInfo *) GetNextValueInLinkedList(options);  while (option != (const StringInfo *) NULL)  {    status|=LoadCoderList((const char *) GetStringInfoDatum(option),      GetStringInfoPath(option),0,exception);    option=(const StringInfo *) GetNextValueInLinkedList(options);  }  options=DestroyConfigureOptions(options);  if ((coder_list == (SplayTreeInfo *) NULL) ||       (GetNumberOfNodesInSplayTree(coder_list) == 0))    status|=LoadCoderList(CoderMap,"built-in",0,exception);  return(status != 0 ? MagickTrue : MagickFalse);#endif}
开发者ID:0xPr0xy,项目名称:ImageMagick,代码行数:57,


示例11: GetLocaleOptions

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                                                                             %%                                                                             %%                                                                             %%  G e t L o c a l e O p t i o n s                                            %%                                                                             %%                                                                             %%                                                                             %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  GetLocaleOptions() returns any Magick configuration messages associated%  with the specified filename.%%  The format of the GetLocaleOptions method is:%%      LinkedListInfo *GetLocaleOptions(const char *filename,%        ExceptionInfo *exception)%%  A description of each parameter follows:%%    o filename: the locale file tag.%%    o exception: return any errors or warnings in this structure.%*/MagickExport LinkedListInfo *GetLocaleOptions(const char *filename,  ExceptionInfo *exception){  char    path[MaxTextExtent];  const char    *element;  LinkedListInfo    *messages,    *paths;  StringInfo    *xml;  assert(filename != (const char *) NULL);  (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",filename);  assert(exception != (ExceptionInfo *) NULL);  (void) CopyMagickString(path,filename,MaxTextExtent);  /*    Load XML from configuration files to linked-list.  */  messages=NewLinkedList(0);  paths=GetConfigurePaths(filename,exception);  if (paths != (LinkedListInfo *) NULL)    {      ResetLinkedListIterator(paths);      element=(const char *) GetNextValueInLinkedList(paths);      while (element != (const char *) NULL)      {        (void) FormatMagickString(path,MaxTextExtent,"%s%s",element,filename);        (void) LogMagickEvent(LocaleEvent,GetMagickModule(),          "Searching for locale file: /"%s/"",path);        xml=ConfigureFileToStringInfo(path);        if (xml != (StringInfo *) NULL)          (void) AppendValueToLinkedList(messages,xml);        element=(const char *) GetNextValueInLinkedList(paths);      }      paths=DestroyLinkedList(paths,RelinquishMagickMemory);    }#if defined(MAGICKCORE_WINDOWS_SUPPORT)  {    char      *blob;    blob=(char *) NTResourceToBlob(filename);    if (blob != (char *) NULL)      {        xml=StringToStringInfo(blob);        (void) AppendValueToLinkedList(messages,xml);        blob=DestroyString(blob);      }  }#endif  ResetLinkedListIterator(messages);  return(messages);}
开发者ID:0xPr0xy,项目名称:ImageMagick,代码行数:84,


示例12: LoadTypeList

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                                                                             %%                                                                             %%                                                                             %%  L o a d T y p e L i s t s                                                  %%                                                                             %%                                                                             %%                                                                             %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  LoadTypeList() loads one or more type configuration files which provides a%  mapping between type attributes and a type name.%%  The format of the LoadTypeLists method is:%%      MagickBooleanType LoadTypeLists(const char *filename,%        ExceptionInfo *exception)%%  A description of each parameter follows:%%    o filename: the font file name.%%    o exception: return any errors or warnings in this structure.%*/static MagickBooleanType LoadTypeLists(const char *filename,  ExceptionInfo *exception){#if defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)  return(LoadTypeList(TypeMap,"built-in",0,exception));#else  char    *font_path,    path[MaxTextExtent];  const StringInfo    *option;  LinkedListInfo    *options;  MagickStatusType    status;  status=MagickFalse;  *path='/0';  options=GetConfigureOptions(filename,exception);  option=(const StringInfo *) GetNextValueInLinkedList(options);  while (option != (const StringInfo *) NULL)  {    (void) CopyMagickString(path,GetStringInfoPath(option),MaxTextExtent);    status&=LoadTypeList((const char *) GetStringInfoDatum(option),      GetStringInfoPath(option),0,exception);    option=(const StringInfo *) GetNextValueInLinkedList(options);  }  options=DestroyConfigureOptions(options);  font_path=GetEnvironmentValue("MAGICK_FONT_PATH");  if (font_path != (char *) NULL)    {      char        *option;      /*        Search MAGICK_FONT_PATH.      */      (void) FormatLocaleString(path,MaxTextExtent,"%s%s%s",font_path,        DirectorySeparator,filename);      option=FileToString(path,~0UL,exception);      if (option != (void *) NULL)        {          status&=LoadTypeList(option,path,0,exception);          option=DestroyString(option);        }      font_path=DestroyString(font_path);    }  if ((type_list == (SplayTreeInfo *) NULL) ||      (GetNumberOfNodesInSplayTree(type_list) == 0))    status&=LoadTypeList(TypeMap,"built-in",0,exception);  return(status != 0 ? MagickTrue : MagickFalse);#endif}
开发者ID:0xPr0xy,项目名称:ImageMagick,代码行数:82,


示例13: ThrowFatalException

static SplayTreeInfo *AcquireLocaleSplayTree(const char *filename,  const char *locale,ExceptionInfo *exception){  MagickStatusType    status;  SplayTreeInfo    *locale_cache;  locale_cache=NewSplayTree(CompareSplayTreeString,(void *(*)(void *)) NULL,    DestroyLocaleNode);  if (locale_cache == (SplayTreeInfo *) NULL)    ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");  status=MagickTrue;#if !defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)  {    const StringInfo      *option;    LinkedListInfo      *options;    options=GetLocaleOptions(filename,exception);    option=(const StringInfo *) GetNextValueInLinkedList(options);    while (option != (const StringInfo *) NULL)    {      status&=LoadLocaleCache(locale_cache,(const char *)        GetStringInfoDatum(option),GetStringInfoPath(option),locale,0,        exception);      option=(const StringInfo *) GetNextValueInLinkedList(options);    }    options=DestroyLocaleOptions(options);    if (GetNumberOfNodesInSplayTree(locale_cache) == 0)      {        options=GetLocaleOptions("english.xml",exception);        option=(const StringInfo *) GetNextValueInLinkedList(options);        while (option != (const StringInfo *) NULL)        {          status&=LoadLocaleCache(locale_cache,(const char *)            GetStringInfoDatum(option),GetStringInfoPath(option),locale,0,            exception);          option=(const StringInfo *) GetNextValueInLinkedList(options);        }        options=DestroyLocaleOptions(options);      }  }#endif  if (GetNumberOfNodesInSplayTree(locale_cache) == 0)    status&=LoadLocaleCache(locale_cache,LocaleMap,"built-in",locale,0,      exception);  return(locale_cache);}
开发者ID:GalliumOS,项目名称:imagemagick,代码行数:52,


示例14: GetPolicyInfo

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                                                                             %%                                                                             %%                                                                             %+   G e t P o l i c y I n f o                                                 %%                                                                             %%                                                                             %%                                                                             %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  GetPolicyInfo() searches the policy list for the specified name and if found%  returns attributes for that policy.%%  The format of the GetPolicyInfo method is:%%      PolicyInfo *GetPolicyInfo(const char *name,ExceptionInfo *exception)%%  A description of each parameter follows:%%    o name: the policy name.%%    o exception: return any errors or warnings in this structure.%*/static PolicyInfo *GetPolicyInfo(const char *name,ExceptionInfo *exception){  char    policyname[MaxTextExtent];  register PolicyInfo    *p;  register char    *q;  assert(exception != (ExceptionInfo *) NULL);  if ((policy_list == (LinkedListInfo *) NULL) ||      (instantiate_policy == MagickFalse))    if (InitializePolicyList(exception) == MagickFalse)      return((PolicyInfo *) NULL);  if ((policy_list == (LinkedListInfo *) NULL) ||      (IsLinkedListEmpty(policy_list) != MagickFalse))    return((PolicyInfo *) NULL);  if ((name == (const char *) NULL) || (LocaleCompare(name,"*") == 0))    return((PolicyInfo *) GetValueFromLinkedList(policy_list,0));  /*    Strip names of whitespace.  */  (void) CopyMagickString(policyname,name,MaxTextExtent);  for (q=policyname; *q != '/0'; q++)  {    if (isspace((int) ((unsigned char) *q)) == 0)      continue;    (void) CopyMagickString(q,q+1,MaxTextExtent);    q--;  }  /*    Search for policy tag.  */  LockSemaphoreInfo(policy_semaphore);  ResetLinkedListIterator(policy_list);  p=(PolicyInfo *) GetNextValueInLinkedList(policy_list);  while (p != (PolicyInfo *) NULL)  {    if (LocaleCompare(policyname,p->name) == 0)      break;    p=(PolicyInfo *) GetNextValueInLinkedList(policy_list);  }  if (p != (PolicyInfo *) NULL)    (void) InsertValueInLinkedList(policy_list,0,      RemoveElementByValueFromLinkedList(policy_list,p));  UnlockSemaphoreInfo(policy_semaphore);  return(p);}
开发者ID:AlexiaChen,项目名称:ImageMagick_Cmake,代码行数:75,


示例15: IsRightsAuthorized

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                                                                             %%                                                                             %%                                                                             %%   I s R i g h t s A u t h o r i z e d                                       %%                                                                             %%                                                                             %%                                                                             %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  IsRightsAuthorized() returns MagickTrue if the policy authorizes the%  requested rights for the specified domain.%%  The format of the IsRightsAuthorized method is:%%      MagickBooleanType IsRightsAuthorized(const PolicyDomain domain,%        const PolicyRights rights,const char *pattern)%%  A description of each parameter follows:%%    o domain: the policy domain.%%    o rights: the policy rights.%%    o pattern: the coder, delegate, filter, or path pattern.%*/MagickExport MagickBooleanType IsRightsAuthorized(const PolicyDomain domain,  const PolicyRights rights,const char *pattern){  const PolicyInfo    *policy_info;  ExceptionInfo    *exception;  MagickBooleanType    authorized;  register PolicyInfo    *p;  (void) LogMagickEvent(PolicyEvent,GetMagickModule(),    "Domain: %s; rights=%s; pattern=/"%s/" ...",    CommandOptionToMnemonic(MagickPolicyDomainOptions,domain),    CommandOptionToMnemonic(MagickPolicyRightsOptions,rights),pattern);  exception=AcquireExceptionInfo();  policy_info=GetPolicyInfo("*",exception);  exception=DestroyExceptionInfo(exception);  if (policy_info == (PolicyInfo *) NULL)    return(MagickTrue);  authorized=MagickTrue;  LockSemaphoreInfo(policy_semaphore);  ResetLinkedListIterator(policy_list);  p=(PolicyInfo *) GetNextValueInLinkedList(policy_list);  while ((p != (PolicyInfo *) NULL) && (authorized != MagickFalse))  {    if ((p->domain == domain) &&        (GlobExpression(pattern,p->pattern,MagickFalse) != MagickFalse))      {        if (((rights & ReadPolicyRights) != 0) &&            ((p->rights & ReadPolicyRights) == 0))          authorized=MagickFalse;        if (((rights & WritePolicyRights) != 0) &&            ((p->rights & WritePolicyRights) == 0))          authorized=MagickFalse;        if (((rights & ExecutePolicyRights) != 0) &&            ((p->rights & ExecutePolicyRights) == 0))          authorized=MagickFalse;      }    p=(PolicyInfo *) GetNextValueInLinkedList(policy_list);  }  UnlockSemaphoreInfo(policy_semaphore);  return(authorized);}
开发者ID:AlexiaChen,项目名称:ImageMagick_Cmake,代码行数:76,


示例16: SetMagickSecurityPolicy

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                                                                             %%                                                                             %%                                                                             %%  S e t M a g i c k S e c u r i t y P o l i c y                              %%                                                                             %%                                                                             %%                                                                             %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  SetMagickSecurityPolicy() sets the ImageMagick security policy.  It returns%  MagickFalse if the policy is already set or if the policy does not parse.%%  The format of the SetMagickSecurityPolicy method is:%%      MagickBooleanType SetMagickSecurityPolicy(const char *policy,%        ExceptionInfo *exception)%%  A description of each parameter follows:%%    o policy: the security policy in the XML format.%%    o exception: return any errors or warnings in this structure.%*/MagickExport MagickBooleanType SetMagickSecurityPolicy(const char *policy,  ExceptionInfo *exception){  PolicyInfo    *p;  MagickBooleanType    status;  assert(exception != (ExceptionInfo *) NULL);  if (policy == (const char *) NULL)    return(MagickFalse);  if (IsPolicyCacheInstantiated(exception) == MagickFalse)    return(MagickFalse);  LockSemaphoreInfo(policy_semaphore);  ResetLinkedListIterator(policy_cache);  p=(PolicyInfo *) GetNextValueInLinkedList(policy_cache);  if ((p != (PolicyInfo *) NULL) && (p->domain != UndefinedPolicyDomain))    {      UnlockSemaphoreInfo(policy_semaphore);      return(MagickFalse);    }  UnlockSemaphoreInfo(policy_semaphore);  status=LoadPolicyCache(policy_cache,policy,"[user-policy]",0,exception);  if (status == MagickFalse)    return(MagickFalse);  return(ResourceComponentGenesis());}
开发者ID:ImageMagick,项目名称:ImageMagick,代码行数:54,


示例17: LoadLocaleList

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                                                                             %%                                                                             %%                                                                             %%  L o a d L o c a l e L i s t s                                              %%                                                                             %%                                                                             %%                                                                             %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  LoadLocaleList() loads one or more locale configuration file which%  provides a mapping between locale attributes and a locale tag.%%  The format of the LoadLocaleLists method is:%%      MagickBooleanType LoadLocaleLists(const char *filename,%        ExceptionInfo *exception)%%  A description of each parameter follows:%%    o filename: The font file tag.%%    o locale: The actual locale.%%    o exception: Return any errors or warnings in this structure.%%*/static MagickBooleanType LoadLocaleLists(const char *filename,  const char *locale,ExceptionInfo *exception){#if defined(UseEmbeddableMagick)  return(LoadLocaleList(LocaleMap,"built-in",locale,0,exception));#else  const StringInfo    *option;  LinkedListInfo    *options;  MagickStatusType    status;  status=MagickFalse;  options=GetLocaleOptions(filename,exception);  option=(const StringInfo *) GetNextValueInLinkedList(options);  while (option != (const StringInfo *) NULL)  {    status|=LoadLocaleList((const char *) option->datum,option->path,locale,0,      exception);    option=(const StringInfo *) GetNextValueInLinkedList(options);  }  options=DestroyLocaleOptions(options);  if ((locale_list == (SplayTreeInfo *) NULL) ||      (GetNumberOfNodesInSplayTree(locale_list) == 0))    {      options=GetLocaleOptions("english.xml",exception);      option=(const StringInfo *) GetNextValueInLinkedList(options);      while (option != (const StringInfo *) NULL)      {        status|=LoadLocaleList((const char *) option->datum,option->path,locale,          0,exception);        option=(const StringInfo *) GetNextValueInLinkedList(options);      }      options=DestroyLocaleOptions(options);    }  if ((locale_list == (SplayTreeInfo *) NULL) ||      (GetNumberOfNodesInSplayTree(locale_list) == 0))    status|=LoadLocaleList(LocaleMap,"built-in",locale,0,exception);  return(status != 0 ? MagickTrue : MagickFalse);#endif}
开发者ID:miettal,项目名称:armadillo420_standard,代码行数:73,


示例18: SetPolicyValue

static MagickBooleanType SetPolicyValue(const PolicyDomain domain,  const char *name,const char *value){  MagickBooleanType    status;  register PolicyInfo    *p;  status=MagickTrue;  LockSemaphoreInfo(policy_semaphore);  ResetLinkedListIterator(policy_cache);  p=(PolicyInfo *) GetNextValueInLinkedList(policy_cache);  while (p != (PolicyInfo *) NULL)  {    if ((p->domain == domain) && (LocaleCompare(name,p->name) == 0))      break;    p=(PolicyInfo *) GetNextValueInLinkedList(policy_cache);  }  if (p != (PolicyInfo *) NULL)    {      if (p->value != (char *) NULL)        p->value=DestroyString(p->value);    }  else    {      p=(PolicyInfo *) AcquireCriticalMemory(sizeof(*p));      (void) memset(p,0,sizeof(*p));      p->exempt=MagickFalse;      p->signature=MagickCoreSignature;      p->domain=domain;      p->name=ConstantString(name);      status=AppendValueToLinkedList(policy_cache,p);    }  p->value=ConstantString(value);  UnlockSemaphoreInfo(policy_semaphore);  if (status == MagickFalse)    p=(PolicyInfo *) RelinquishMagickMemory(p);  return(status);}
开发者ID:ImageMagick,项目名称:ImageMagick,代码行数:40,


示例19: HasError

int HasError(ExceptionInfo *exception) {  register const ExceptionInfo *p;  int result = 0;  assert(exception != (ExceptionInfo *) NULL);  assert(exception->signature == MagickSignature);  if (exception->exceptions  == (void *) NULL)    return 0;  if (exception->semaphore == (void *) NULL)    return 0;  LockSemaphoreInfo(exception->semaphore);  ResetLinkedListIterator((LinkedListInfo *) exception->exceptions);  p=(const ExceptionInfo *) GetNextValueInLinkedList((LinkedListInfo *)    exception->exceptions);  while (p != (const ExceptionInfo *) NULL) {    if (p->severity >= ErrorException)      result = 1;    p=(const ExceptionInfo *) GetNextValueInLinkedList((LinkedListInfo *)      exception->exceptions);  }  UnlockSemaphoreInfo(exception->semaphore);	return result;}
开发者ID:uoregon-libraries,项目名称:rais-image-server,代码行数:24,


示例20: AcquireMimeCache

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                                                                             %%                                                                             %%                                                                             %%  A c q u i r e M i m e C a c h e                                            %%                                                                             %%                                                                             %%                                                                             %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  AcquireMimeCache() caches one or more magic configurations which provides%  a mapping between magic attributes and a magic name.%%  The format of the AcquireMimeCache method is:%%      LinkedListInfo *AcquireMimeCache(const char *filename,%        ExceptionInfo *exception)%%  A description of each parameter follows:%%    o filename: the font file name.%%    o exception: return any errors or warnings in this structure.%*/static LinkedListInfo *AcquireMimeCache(const char *filename,  ExceptionInfo *exception){  LinkedListInfo    *mime_cache;  MagickStatusType    status;  mime_cache=NewLinkedList(0);  if (mime_cache == (LinkedListInfo *) NULL)    ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");  status=MagickTrue;#if !defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)  {    const StringInfo      *option;    LinkedListInfo      *options;    options=GetConfigureOptions(filename,exception);    option=(const StringInfo *) GetNextValueInLinkedList(options);    while (option != (const StringInfo *) NULL)    {      status&=LoadMimeCache(mime_cache,(const char *)        GetStringInfoDatum(option),GetStringInfoPath(option),0,exception);      option=(const StringInfo *) GetNextValueInLinkedList(options);    }    options=DestroyConfigureOptions(options);  }#endif  if (IsLinkedListEmpty(mime_cache) != MagickFalse)    status&=LoadMimeCache(mime_cache,MimeMap,"built-in",0,exception);  return(mime_cache);}
开发者ID:GalliumOS,项目名称:imagemagick,代码行数:62,


示例21: GetMimeInfo

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                                                                             %%                                                                             %%                                                                             %+   G e t M i m e I n f o                                                     %%                                                                             %%                                                                             %%                                                                             %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  GetMimeInfo() attempts to classify the content to identify which mime type%  is associated with the content, if any.%%  The format of the GetMimeInfo method is:%%      const MimeInfo *GetMimeInfo(const char *filename,%        const unsigned char *magic,const size_t length,%        ExceptionInfo *exception)%%  A description of each parameter follows:%%    o filename:  If we cannot not classify the string, we attempt to classify%      based on the filename (e.g. *.pdf returns application/pdf).%%    o magic: A binary string generally representing the first few characters%      of the image file or blob.%%    o length: the length of the binary signature.%%    o exception: return any errors or warnings in this structure.%*/MagickExport const MimeInfo *GetMimeInfo(const char *filename,  const unsigned char *magic,const size_t length,ExceptionInfo *exception){  const MimeInfo    *mime_info;  EndianType    endian;  register const MimeInfo    *p;  register const unsigned char    *q;  register ssize_t    i;  ssize_t    value;  unsigned long    lsb_first;  assert(exception != (ExceptionInfo *) NULL);  if (IsMimeCacheInstantiated(exception) == MagickFalse)    return((const MimeInfo *) NULL);  /*    Search for mime tag.  */  mime_info=(const MimeInfo *) NULL;  lsb_first=1;  LockSemaphoreInfo(mime_semaphore);  ResetLinkedListIterator(mime_cache);  p=(const MimeInfo *) GetNextValueInLinkedList(mime_cache);  if ((magic == (const unsigned char *) NULL) || (length == 0))    {      UnlockSemaphoreInfo(mime_semaphore);      return(p);    }  while (p != (const MimeInfo *) NULL)  {    assert(p->offset >= 0);    if (mime_info != (const MimeInfo *) NULL)      if (p->priority > mime_info->priority)        {          p=(const MimeInfo *) GetNextValueInLinkedList(mime_cache);          continue;        }    if ((p->pattern != (char *) NULL) && (filename != (char *) NULL))      {        if (GlobExpression(filename,p->pattern,MagickFalse) != MagickFalse)          mime_info=p;        p=(const MimeInfo *) GetNextValueInLinkedList(mime_cache);        continue;      }    switch (p->data_type)    {      case ByteData:      {        if ((size_t) (p->offset+4) > length)          break;        q=magic+p->offset;        value=(ssize_t) (*q++);        if (p->mask == 0)          {            if (p->value == value)//.........这里部分代码省略.........
开发者ID:vcgato29,项目名称:ImageMagick,代码行数:101,


示例22: GetConfigureOptions

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                                                                             %%                                                                             %%                                                                             %%  G e t C o n f i g u r e O p t i o n s                                      %%                                                                             %%                                                                             %%                                                                             %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  GetConfigureOptions() returns any Magick configuration options associated%  with the specified filename.%%  The format of the GetConfigureOptions method is:%%      LinkedListInfo *GetConfigureOptions(const char *filename,%        ExceptionInfo *exception)%%  A description of each parameter follows:%%    o filename: the configure file name.%%    o exception: return any errors or warnings in this structure.%*/MagickExport LinkedListInfo *GetConfigureOptions(const char *filename,  ExceptionInfo *exception){  char    path[MaxTextExtent];  const char    *element;  LinkedListInfo    *options,    *paths;  StringInfo    *xml;  assert(filename != (const char *) NULL);  (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",filename);  assert(exception != (ExceptionInfo *) NULL);  (void) CopyMagickString(path,filename,MaxTextExtent);  /*    Load XML from configuration files to linked-list.  */  options=NewLinkedList(0);  paths=GetConfigurePaths(filename,exception);  if (paths != (LinkedListInfo *) NULL)    {      ResetLinkedListIterator(paths);      element=(const char *) GetNextValueInLinkedList(paths);      while (element != (const char *) NULL)      {        (void) FormatLocaleString(path,MaxTextExtent,"%s%s",element,filename);        (void) LogMagickEvent(ConfigureEvent,GetMagickModule(),          "Searching for configure file: /"%s/"",path);        xml=ConfigureFileToStringInfo(path);        if (xml != (StringInfo *) NULL)          (void) AppendValueToLinkedList(options,xml);        element=(const char *) GetNextValueInLinkedList(paths);      }      paths=DestroyLinkedList(paths,RelinquishMagickMemory);    }#if defined(MAGICKCORE_WINDOWS_SUPPORT)  if (GetNumberOfElementsInLinkedList(options) == 0)    {      char        *blob;      blob=(char *) NTResourceToBlob(filename);      if (blob != (char *) NULL)        {          xml=AcquireStringInfo(0);          SetStringInfoLength(xml,strlen(blob)+1);          SetStringInfoDatum(xml,(unsigned char *) blob);          SetStringInfoPath(xml,filename);          (void) AppendValueToLinkedList(options,xml);        }    }#endif  if (GetNumberOfElementsInLinkedList(options) == 0)    (void) ThrowMagickException(exception,GetMagickModule(),ConfigureWarning,      "UnableToOpenConfigureFile","`%s'",filename);  ResetLinkedListIterator(options);  return(options);}
开发者ID:MaximOrlovsky,项目名称:unix-toolbox.js-imagemagick,代码行数:90,


示例23: LoadConfigureList

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                                                                             %%                                                                             %%                                                                             %%  L o a d C o n f i g u r e L i s t s                                        %%                                                                             %%                                                                             %%                                                                             %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  LoadConfigureList() loads one or more configure configuration files which%  provides a mapping between configure attributes and a configure name.%%  The format of the LoadConfigureLists method is:%%      MagickBooleanType LoadConfigureLists(const char *filename,%        ExceptionInfo *exception)%%  A description of each parameter follows:%%    o filename: the font file name.%%    o exception: return any errors or warnings in this structure.%*/static MagickBooleanType LoadConfigureLists(const char *filename,  ExceptionInfo *exception){  const StringInfo    *option;  LinkedListInfo    *options;  MagickStatusType    status;  register ssize_t    i;  /*    Load built-in configure map.  */  status=MagickFalse;  if (configure_list == (LinkedListInfo *) NULL)    {      configure_list=NewLinkedList(0);      if (configure_list == (LinkedListInfo *) NULL)        {          ThrowFileException(exception,ResourceLimitError,            "MemoryAllocationFailed",filename);          return(MagickFalse);        }    }  for (i=0; i < (ssize_t) (sizeof(ConfigureMap)/sizeof(*ConfigureMap)); i++)  {    ConfigureInfo      *configure_info;    register const ConfigureMapInfo      *p;    p=ConfigureMap+i;    configure_info=(ConfigureInfo *) AcquireMagickMemory(      sizeof(*configure_info));    if (configure_info == (ConfigureInfo *) NULL)      {        (void) ThrowMagickException(exception,GetMagickModule(),          ResourceLimitError,"MemoryAllocationFailed","`%s'",          configure_info->name);        continue;      }    (void) ResetMagickMemory(configure_info,0,sizeof(*configure_info));    configure_info->path=(char *) "[built-in]";    configure_info->name=(char *) p->name;    configure_info->value=(char *) p->value;    configure_info->exempt=MagickTrue;    configure_info->signature=MagickSignature;    status=AppendValueToLinkedList(configure_list,configure_info);    if (status == MagickFalse)      (void) ThrowMagickException(exception,GetMagickModule(),        ResourceLimitError,"MemoryAllocationFailed","`%s'",        configure_info->name);  }  /*    Load external configure map.  */  options=GetConfigureOptions(filename,exception);  option=(const StringInfo *) GetNextValueInLinkedList(options);  while (option != (const StringInfo *) NULL)  {    status|=LoadConfigureList((const char *) GetStringInfoDatum(option),      GetStringInfoPath(option),0,exception);    option=(const StringInfo *) GetNextValueInLinkedList(options);  }  options=DestroyConfigureOptions(options);  return(status != 0 ? MagickTrue : MagickFalse);}
开发者ID:MaximOrlovsky,项目名称:unix-toolbox.js-imagemagick,代码行数:99,


示例24: ThrowFatalException

static SplayTreeInfo *AcquireCoderCache(const char *filename,  ExceptionInfo *exception){  const StringInfo    *option;  LinkedListInfo    *options;  MagickStatusType    status;  register ssize_t    i;  SplayTreeInfo    *coder_cache;  /*    Load external coder map.  */  coder_cache=NewSplayTree(CompareSplayTreeString,RelinquishMagickMemory,    DestroyCoderNode);  if (coder_cache == (SplayTreeInfo *) NULL)    ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");  status=MagickTrue;  options=GetConfigureOptions(filename,exception);  option=(const StringInfo *) GetNextValueInLinkedList(options);  while (option != (const StringInfo *) NULL)  {    status&=LoadCoderCache(coder_cache,(const char *)      GetStringInfoDatum(option),GetStringInfoPath(option),0,exception);    option=(const StringInfo *) GetNextValueInLinkedList(options);  }  options=DestroyConfigureOptions(options);  /*    Load built-in coder map.  */  for (i=0; i < (ssize_t) (sizeof(CoderMap)/sizeof(*CoderMap)); i++)  {    CoderInfo      *coder_info;    register const CoderMapInfo      *p;    p=CoderMap+i;    coder_info=(CoderInfo *) AcquireMagickMemory(sizeof(*coder_info));    if (coder_info == (CoderInfo *) NULL)      {        (void) ThrowMagickException(exception,GetMagickModule(),          ResourceLimitError,"MemoryAllocationFailed","`%s'",p->name);        continue;      }    (void) ResetMagickMemory(coder_info,0,sizeof(*coder_info));    coder_info->path=(char *) "[built-in]";    coder_info->magick=(char *) p->magick;    coder_info->name=(char *) p->name;    coder_info->exempt=MagickTrue;    coder_info->signature=MagickCoreSignature;    status&=AddValueToSplayTree(coder_cache,ConstantString(coder_info->magick),      coder_info);    if (status == MagickFalse)      (void) ThrowMagickException(exception,GetMagickModule(),        ResourceLimitError,"MemoryAllocationFailed","`%s'",coder_info->name);  }  return(coder_cache);}
开发者ID:hj3938,项目名称:ImageMagick,代码行数:68,


示例25: AcquireMagicCache

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                                                                             %%                                                                             %%                                                                             %%  A c q u i r e M a g i c C a c h e                                          %%                                                                             %%                                                                             %%                                                                             %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  AcquireMagicCache() caches one or more magic configurations which provides a%  mapping between magic attributes and a magic name.%%  The format of the AcquireMagicCache method is:%%      LinkedListInfo *AcquireMagicCache(const char *filename,%        ExceptionInfo *exception)%%  A description of each parameter follows:%%    o filename: the font file name.%%    o exception: return any errors or warnings in this structure.%*/static LinkedListInfo *AcquireMagicCache(const char *filename,  ExceptionInfo *exception){  char    path[MaxTextExtent];  const StringInfo    *option;  LinkedListInfo    *magic_cache,    *options;  MagickStatusType    status;  register ssize_t    i;  magic_cache=NewLinkedList(0);  if (magic_cache == (LinkedListInfo *) NULL)    ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");  /*    Load external magic map.  */  status=MagickTrue;  *path='/0';  options=GetConfigureOptions(filename,exception);  option=(const StringInfo *) GetNextValueInLinkedList(options);  while (option != (const StringInfo *) NULL)  {    (void) CopyMagickString(path,GetStringInfoPath(option),MaxTextExtent);    status&=LoadMagicCache(magic_cache,(const char *)      GetStringInfoDatum(option),GetStringInfoPath(option),0,exception);    option=(const StringInfo *) GetNextValueInLinkedList(options);  }  /*    Load built-in magic map.  */  for (i=0; i < (ssize_t) (sizeof(MagicMap)/sizeof(*MagicMap)); i++)  {    MagicInfo      *magic_info;    register const MagicMapInfo      *p;    p=MagicMap+i;    magic_info=(MagicInfo *) AcquireMagickMemory(sizeof(*magic_info));    if (magic_info == (MagicInfo *) NULL)      {        (void) ThrowMagickException(exception,GetMagickModule(),          ResourceLimitError,"MemoryAllocationFailed","`%s'",p->name);        continue;      }    (void) ResetMagickMemory(magic_info,0,sizeof(*magic_info));    magic_info->path=(char *) "[built-in]";    magic_info->name=(char *) p->name;    magic_info->offset=p->offset;    magic_info->target=(char *) p->magic;    magic_info->magic=(unsigned char *) p->magic;    magic_info->length=p->length;    magic_info->exempt=MagickTrue;    magic_info->signature=MagickSignature;    status&=AppendValueToLinkedList(magic_cache,magic_info);    if (status == MagickFalse)      (void) ThrowMagickException(exception,GetMagickModule(),        ResourceLimitError,"MemoryAllocationFailed","`%s'",magic_info->name);  }  options=DestroyConfigureOptions(options);  return(magic_cache);}
开发者ID:GalliumOS,项目名称:imagemagick,代码行数:98,


示例26: ThrowFatalException

static SplayTreeInfo *AcquireTypeCache(const char *filename,  ExceptionInfo *exception){  MagickStatusType    status;  SplayTreeInfo    *type_cache;  type_cache=NewSplayTree(CompareSplayTreeString,(void *(*)(void *)) NULL,    DestroyTypeNode);  if (type_cache == (SplayTreeInfo *) NULL)    ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");  status=MagickTrue;#if !defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)  {    char      *font_path,      path[MaxTextExtent];    const StringInfo      *option;    LinkedListInfo      *options;    *path='/0';    options=GetConfigureOptions(filename,exception);    option=(const StringInfo *) GetNextValueInLinkedList(options);    while (option != (const StringInfo *) NULL)    {      (void) CopyMagickString(path,GetStringInfoPath(option),MaxTextExtent);      status&=LoadTypeCache(type_cache,(const char *)        GetStringInfoDatum(option),GetStringInfoPath(option),0,exception);      option=(const StringInfo *) GetNextValueInLinkedList(options);    }    options=DestroyConfigureOptions(options);    font_path=GetEnvironmentValue("MAGICK_FONT_PATH");    if (font_path != (char *) NULL)      {        char          *option;        /*          Search MAGICK_FONT_PATH.        */        (void) FormatLocaleString(path,MaxTextExtent,"%s%s%s",font_path,          DirectorySeparator,filename);        option=FileToString(path,~0UL,exception);        if (option != (void *) NULL)          {            status&=LoadTypeCache(type_cache,option,path,0,exception);            option=DestroyString(option);          }        font_path=DestroyString(font_path);      }  }#endif  if (GetNumberOfNodesInSplayTree(type_cache) == 0)    status&=LoadTypeCache(type_cache,TypeMap,"built-in",0,exception);  return(type_cache);}
开发者ID:INT2208-ST,项目名称:MyFriend,代码行数:62,


示例27: LoadPolicyList

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                                                                             %%                                                                             %%                                                                             %%  L o a d P o l i c y L i s t s                                              %%                                                                             %%                                                                             %%                                                                             %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  LoadPolicyList() loads one or more policy configuration file which provides a%  mapping between policy attributes and a policy name.%%  The format of the LoadPolicyLists method is:%%      MagickBooleanType LoadPolicyLists(const char *filename,%        ExceptionInfo *exception)%%  A description of each parameter follows:%%    o filename: the font file name.%%    o exception: return any errors or warnings in this structure.%*/static MagickBooleanType LoadPolicyLists(const char *filename,  ExceptionInfo *exception){  const StringInfo    *option;  LinkedListInfo    *options;  MagickStatusType    status;  register ssize_t    i;  /*    Load external policy map.  */  if (policy_list == (LinkedListInfo *) NULL)    {      policy_list=NewLinkedList(0);      if (policy_list == (LinkedListInfo *) NULL)        {          ThrowFileException(exception,ResourceLimitError,            "MemoryAllocationFailed",filename);          return(MagickFalse);        }    }  status=MagickTrue;  options=GetConfigureOptions(filename,exception);  option=(const StringInfo *) GetNextValueInLinkedList(options);  while (option != (const StringInfo *) NULL)  {    status&=LoadPolicyList((const char *) GetStringInfoDatum(option),      GetStringInfoPath(option),0,exception);    option=(const StringInfo *) GetNextValueInLinkedList(options);  }  options=DestroyConfigureOptions(options);  /*    Load built-in policy map.  */  for (i=0; i < (ssize_t) (sizeof(PolicyMap)/sizeof(*PolicyMap)); i++)  {    PolicyInfo      *policy_info;    register const PolicyMapInfo      *p;    p=PolicyMap+i;    policy_info=(PolicyInfo *) AcquireMagickMemory(sizeof(*policy_info));    if (policy_info == (PolicyInfo *) NULL)      {        (void) ThrowMagickException(exception,GetMagickModule(),          ResourceLimitError,"MemoryAllocationFailed","`%s'",policy_info->name);        continue;      }    (void) ResetMagickMemory(policy_info,0,sizeof(*policy_info));    policy_info->path=(char *) "[built-in]";    policy_info->domain=p->domain;    policy_info->rights=p->rights;    policy_info->name=(char *) p->name;    policy_info->pattern=(char *) p->pattern;    policy_info->value=(char *) p->value;    policy_info->exempt=MagickTrue;    policy_info->signature=MagickSignature;    status&=AppendValueToLinkedList(policy_list,policy_info);    if (status == MagickFalse)      (void) ThrowMagickException(exception,GetMagickModule(),        ResourceLimitError,"MemoryAllocationFailed","`%s'",policy_info->name);  }  return(status != 0 ? MagickTrue : MagickFalse);}
开发者ID:AlexiaChen,项目名称:ImageMagick_Cmake,代码行数:99,



注:本文中的GetNextValueInLinkedList函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ GetNextView函数代码示例
C++ GetNextSibling函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。