magic.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. Copyright 1999 ImageMagick Studio LLC, a non-profit organization
  3. dedicated to making software imaging solutions freely available.
  4. You may not use this file except in compliance with the License. You may
  5. obtain a copy of the License at
  6. https://imagemagick.org/script/license.php
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. MagickCore magic methods.
  13. */
  14. #ifndef MAGICKCORE_MAGIC_H
  15. #define MAGICKCORE_MAGIC_H
  16. #if defined(__cplusplus) || defined(c_plusplus)
  17. extern "C" {
  18. #endif
  19. typedef struct _MagicInfo
  20. {
  21. char
  22. *path,
  23. *name,
  24. *target;
  25. unsigned char
  26. *magic;
  27. size_t
  28. length;
  29. MagickOffsetType
  30. offset;
  31. MagickBooleanType
  32. exempt,
  33. stealth;
  34. struct _MagicInfo
  35. *previous,
  36. *next; /* deprecated, use GetMagicInfoList() */
  37. size_t
  38. signature;
  39. } MagicInfo;
  40. extern MagickExport char
  41. **GetMagicList(const char *,size_t *,ExceptionInfo *);
  42. extern MagickExport const char
  43. *GetMagicName(const MagicInfo *);
  44. extern MagickExport MagickBooleanType
  45. ListMagicInfo(FILE *,ExceptionInfo *),
  46. MagicComponentGenesis(void);
  47. extern MagickExport const MagicInfo
  48. *GetMagicInfo(const unsigned char *,const size_t,ExceptionInfo *),
  49. **GetMagicInfoList(const char *,size_t *,ExceptionInfo *);
  50. extern MagickExport void
  51. MagicComponentTerminus(void);
  52. #if defined(__cplusplus) || defined(c_plusplus)
  53. }
  54. #endif
  55. #endif