]> glassweightruler.freedombox.rocks Git - Ventoy.git/blob - VtoyTool/BabyISO/biso_joliet.c
support ALT rescue
[Ventoy.git] / VtoyTool / BabyISO / biso_joliet.c
1 /******************************************************************************
2 * biso_joliet.c
3 *
4 * Copyright (c) 2020, longpanda <admin@ventoy.net>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 3 of the
9 * License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * 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, see <http://www.gnu.org/licenses/>.
18 *
19 */
20
21 #include "biso.h"
22 #include "biso_joliet.h"
23
24 UCHAR BISO_JOLIET_GetLevel(IN CONST UCHAR *pucEscape)
25 {
26 UCHAR ucLevel = 0;
27
28 /*
29 * Standard Level Decimal Hex Bytes ASCII
30 * UCS-2 Level 1 2/5, 2/15, 4/0 (25)(2F)(40) '%\@'
31 * UCS-2 Level 2 2/5, 2/15, 4/3 (25)(2F)(43) '%\C'
32 * UCS-2 Level 3 2/5, 2/15, 4/5 (25)(2F)(45) '%\E
33 */
34
35 if ((NULL != pucEscape) && (0x25 == pucEscape[0]) && (0x2F == pucEscape[1]))
36 {
37 if (0x40 == pucEscape[2])
38 {
39 ucLevel = 1;
40 }
41 else if (0x43 == pucEscape[2])
42 {
43 ucLevel = 2;
44 }
45 else if (0x45 == pucEscape[2])
46 {
47 ucLevel = 3;
48 }
49 }
50
51 return ucLevel;
52 }
53