1 /* Hey EMACS -*- linux-c -*- */ 2 /* $Id$ */ 3 4 /* libtifiles - file format library, a part of the TiLP project 5 * Copyright (C) 1999-2005 Romain Lievin 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 */ 21 22 #ifndef __TIFILES_FILES_8X_H__ 23 #define __TIFILES_FILES_8X_H__ 24 25 #include "stdints2.h" 26 #include "tifiles.h" 27 28 /* Structures */ 29 30 typedef FileContent Ti8xRegular; 31 typedef BackupContent Ti8xBackup; 32 typedef FlashContent Ti8xFlash; 33 typedef FlashPage Ti8xFlashPage; 34 35 /* Functions */ 36 37 // allocating 38 Ti8xRegular* ti8x_content_create_regular(void); 39 Ti8xBackup* ti8x_content_create_backup(void); 40 Ti8xFlash* ti8x_content_create_flash(void); 41 42 // freeing 43 void ti8x_content_free_regular(Ti8xRegular *content); 44 void ti8x_content_free_backup(Ti8xBackup *content); 45 void ti8x_content_free_flash(Ti8xFlash *content); 46 47 // displaying 48 int ti8x_content_display_backup(Ti8xBackup *content); 49 int ti8x_content_display_flash(Ti8xFlash *content); 50 51 // reading 52 int ti8x_file_read_regular(const char *filename, Ti8xRegular *content); 53 int ti8x_file_read_backup(const char *filename, Ti8xBackup *content); 54 int ti8x_file_read_flash(const char *filename, Ti8xFlash *content); 55 56 // writing 57 int ti8x_file_write_regular(const char *filename, Ti8xRegular *content, char **filename2); 58 int ti8x_file_write_backup(const char *filename, Ti8xBackup *content); 59 int ti8x_file_write_flash(const char *filename, Ti8xFlash *content, char **filename2); 60 61 // displaying 62 int ti8x_file_display(const char *filename); 63 64 #endif 65