error.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* Hey EMACS -*- linux-c -*- */
  2. /* $Id: error.h 3056 2006-11-06 17:12:50Z roms $ */
  3. /* libtifiles - file format library, a part of the TiLP project
  4. * Copyright (C) 1999-2005 Romain Lievin
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  19. */
  20. #ifndef __TIFILES_ERRCODES__
  21. #define __TIFILES_ERRCODES__
  22. /* Error codes must begin at 512 up to 767 */
  23. typedef enum {
  24. ERR_NO_ERROR = 0, // No error (returns 0)
  25. ERR_MALLOC=512, // Error with malloc
  26. ERR_FILE_OPEN, // Unable to open file
  27. ERR_FILE_CLOSE, // Unable to close file
  28. ERR_GROUP_SIZE, // Group size exceeded (>64KB)
  29. ERR_BAD_CALC, // The function does not exist for this calc
  30. ERR_INVALID_FILE, // Is not a TI file
  31. ERR_BAD_FILE, // Same as above
  32. ERR_FILE_CHECKSUM, // Checksum file error
  33. ERR_FILE_ZIP, // (Un)Zip internal error
  34. ERR_UNSUPPORTED, // Function not supported
  35. ERR_FILE_IO // Stream error
  36. } FileError;
  37. #endif