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_9X_H__ 23 #define __TIFILES_FILES_9X_H__ 24 25 #include "stdints2.h" 26 #include "tifiles.h" 27 28 /* Structures */ 29 30 typedef FileContent Ti9xRegular; 31 typedef BackupContent Ti9xBackup; 32 typedef FlashContent Ti9xFlash; 33 34 /* Functions */ 35 36 // allocating 37 Ti9xRegular* ti9x_content_create_regular(void); 38 Ti9xBackup* ti9x_content_create_backup(void); 39 Ti9xFlash* ti9x_content_create_flash(void); 40 41 // freeing 42 void ti9x_content_free_regular(Ti9xRegular *content); 43 void ti9x_content_free_backup(Ti9xBackup *content); 44 void ti9x_content_free_flash(Ti9xFlash *content); 45 46 // displaying 47 int ti9x_content_display_backup(Ti9xBackup *content); 48 int ti9x_content_display_flash(Ti9xFlash *content); 49 50 // reading 51 int ti9x_file_read_regular(const char *filename, Ti9xRegular *content); 52 int ti9x_file_read_backup(const char *filename, Ti9xBackup *content); 53 int ti9x_file_read_flash(const char *filename, Ti9xFlash *content); 54 55 // writing 56 int ti9x_file_write_regular(const char *filename, Ti9xRegular *content, char **filename2); 57 int ti9x_file_write_backup(const char *filename, Ti9xBackup *content); 58 int ti9x_file_write_flash(const char *filename, Ti9xFlash *content, char **filename2); 59 60 // displaying 61 int ti9x_file_display(const char *filename); 62 63 #endif 64