1#ifndef FILE_NAME_H 2#define FILE_NAME_H 3 4/* Copyright 2009 Alain Knaff. 5 * This file is part of mtools. 6 * 7 * Mtools 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 3 of the License, or 10 * (at your option) any later version. 11 * 12 * Mtools 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 Mtools. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 21#include <sysincludes.h> 22#include "mtools.h" 23 24/** 25 * raw dos-name coming straight from the directory entry 26 * MYFILE TXT 27 */ 28struct dos_name_t { 29 char base[8]; 30 char ext[3]; 31 char sentinel; 32}; 33 34int dos_to_wchar(doscp_t *fromDos, char *dos, wchar_t *wchar, size_t len); 35void wchar_to_dos(doscp_t *toDos, wchar_t *wchar, char *dos, size_t len, int *mangled); 36 37doscp_t *cp_open(int codepage); 38void cp_close(doscp_t *cp); 39 40int wchar_to_native(const wchar_t *wchar, char *native, size_t len); 41int native_to_wchar(const char *native, wchar_t *wchar, size_t len, 42 const char *end, int *mangled); 43 44#endif 45