ext_header.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. Copyright (c) 2011, 2012, Simon Howard
  3. Permission to use, copy, modify, and/or distribute this software
  4. for any purpose with or without fee is hereby granted, provided
  5. that the above copyright notice and this permission notice appear
  6. in all copies.
  7. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  8. WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  9. WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  10. AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
  11. CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  12. LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
  13. NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  14. CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. #ifndef LHASA_EXT_HEADER_H
  17. #define LHASA_EXT_HEADER_H
  18. #include <stdlib.h>
  19. #include "lha_file_header.h"
  20. /**
  21. * Decode the specified extended header.
  22. *
  23. * @param header The file header in which to store decoded data.
  24. * @param num Extended header type.
  25. * @param data Pointer to the data to decode.
  26. * @param data_len Size of the data to decode, in bytes.
  27. * @return Non-zero for success, or zero if not decoded.
  28. */
  29. int lha_ext_header_decode(LHAFileHeader *header,
  30. uint8_t num,
  31. uint8_t *data,
  32. size_t data_len);
  33. #endif /* #ifndef LHASA_EXT_HEADER_H */