Commit 478370c8 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Ammendments to short name translation table

The table was ambiguously translating () to () and also [] to (). Now, we error names containing ,[] in the same manner as DOSFS.
The substitutions for ^% have also been changed to match DOSFS so copying from one to the other doesn't give two representations if viewed on a PC.
Marked both tables as const to save 512B of RMA.
This change is slightly academic since most of the time the long filename resolution is in use.

Tested against WinXP SP3 with a build with long filename support turned off.

Version 2.45. Tagged as 'LanManFS-2_45'
parent 22f3ec34
/* (2.44)
/* (2.45)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 2.44
#define Module_MajorVersion_CMHG 2.45
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 19 Jan 2014
#define Module_Date_CMHG 31 May 2014
#define Module_MajorVersion "2.44"
#define Module_Version 244
#define Module_MajorVersion "2.45"
#define Module_Version 245
#define Module_MinorVersion ""
#define Module_Date "19 Jan 2014"
#define Module_Date "31 May 2014"
#define Module_ApplicationDate "19-Jan-14"
#define Module_ApplicationDate "31-May-14"
#define Module_ComponentName "LanManFS"
#define Module_ComponentPath "castle/RiscOS/Sources/Networking/Omni/Protocols/LanManFS"
#define Module_FullVersion "2.44"
#define Module_HelpVersion "2.44 (19 Jan 2014)"
#define Module_LibraryVersionInfo "2:44"
#define Module_FullVersion "2.45"
#define Module_HelpVersion "2.45 (31 May 2014)"
#define Module_LibraryVersionInfo "2:45"
......@@ -370,32 +370,38 @@ static char Xlt_DefaultDrv = 'A';
#define CH_DUD '_'
/*
Illegal in DOS names: / < > ? + , ; = [ ] : * \ " | DEL
Illegal in RISCOS names: . $ % # & ^ @ : * \ " | DEL
All control characters and space are bad
All top bit set characters are swapped for _
Illegal in DOS names: SPACE / < > ? + , ; = [ ] : * \ " | DEL
Illegal in RISCOS names: SPACE . $ ^ # & % @ : * \ " | DEL
Additionally:
All control characters are bad
All top bit set characters are swapped for _
*/
static char xlt_RO2DOS[256] =
static const char xlt_RO2DOS[256] =
{
CH_END, CH_ERR, CH_ERR, CH_ERR, CH_ERR, CH_ERR, CH_ERR, CH_ERR, /* 00-07 */
CH_ERR, CH_ERR, CH_END, CH_ERR, CH_ERR, CH_END, CH_ERR, CH_ERR, /* 08-0F */
CH_ERR, CH_ERR, CH_ERR, CH_ERR, CH_ERR, CH_ERR, CH_ERR, CH_ERR, /* 10-17 */
CH_ERR, CH_ERR, CH_ERR, CH_ERR, CH_ERR, CH_ERR, CH_ERR, CH_ERR, /* 17-1F */
/* SPACE ! " # $ % & ' 20-27 */
CH_ERR, '!', CH_ERR, CH_WILD,CH_ERR, CH_ERR, CH_ERR, '\'',
'(', ')', CH_WILD,'&', '^', '-', CH_PATH,CH_SEP,
/* ( ) * + , - . / 28-2F */
'(', ')', CH_WILD,'&', CH_ERR, '-', CH_PATH,CH_SEP,
/* 0 1 2 3 4 5 6 7 30-37 */
'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', CH_ERR, CH_DUD, '$', '@', '%', '#',
/* 8 9 : ; < = > ? 38-3F */
'8', '9', CH_ERR, '%', '$', '@', '^', '#',
/* @ A B C D E F G 40-47 */
CH_ERR, 'A', 'B', 'C', 'D', 'E', 'F', 'G',
'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
'X', 'Y', 'Z', '(', CH_ERR, ')', CH_ERR, '_',
/* X Y Z [ \ ] ^ _ 58-5F */
'X', 'Y', 'Z', CH_ERR, CH_ERR, CH_ERR, CH_ERR, '_',
/* ` a b c d e f g 60-67 */
'`', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
/* x y z { | } ~ DEL 78-7F */
'X', 'Y', 'Z', '{', CH_ERR, '}', '~', CH_ERR,
CH_DUD, CH_DUD, CH_DUD, CH_DUD, CH_DUD, CH_DUD, CH_DUD, CH_DUD,
......@@ -419,26 +425,32 @@ static char xlt_RO2DOS[256] =
CH_DUD, CH_DUD, CH_DUD, CH_DUD, CH_DUD, CH_DUD, CH_DUD, CH_DUD
};
static char xlt_DOS2RO[256] =
static const char xlt_DOS2RO[256] =
{
CH_END, CH_DUD, CH_DUD, CH_DUD, CH_DUD, CH_DUD, CH_DUD, CH_DUD, /* 00-07 */
CH_DUD, CH_DUD, CH_END, CH_DUD, CH_DUD, CH_END, CH_DUD, CH_DUD, /* 08-1F */
CH_DUD, CH_DUD, CH_DUD, CH_DUD, CH_DUD, CH_DUD, CH_DUD, CH_DUD, /* 10-17 */
CH_DUD, CH_DUD, CH_DUD, CH_DUD, CH_DUD, CH_DUD, CH_DUD, CH_DUD, /* 17-1F */
CH_DUD, '!', CH_DUD, '?', '<', '>', '+', '\'',
'(', ')', CH_DUD, '+', ',', '-', CH_SEP, '/',
/* SPACE ! " # $ % & ' 20-27 */
CH_DUD, '!', CH_DUD, '?', '<', ';', '+', '\'',
/* ( ) * + , - . / 28-2F */
'(', ')', CH_DUD, CH_DUD, CH_DUD, '-', CH_SEP, CH_DUD,
/* 0 1 2 3 4 5 6 7 30-37 */
'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', CH_DUD, ';', '<', '=', '>', '?',
/* 8 9 : ; < = > ? 38-3F */
'8', '9', CH_DUD, CH_DUD, CH_DUD, CH_DUD, CH_DUD, CH_DUD,
/* @ A B C D E F G 40-47 */
'=', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
'X', 'Y', 'Z', '[', CH_DUD, ']', ',', '_',
/* X Y Z [ \ ] ^ _ 58-5F */
'X', 'Y', 'Z', CH_DUD, CH_DUD, CH_DUD, '>', '_',
/* ` a b c d e f g 60-67 */
'`', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
/* x y z { | } ~ DEL 78-7F */
'x', 'y', 'z', '{', CH_DUD, '}', '~', CH_DUD,
CH_DUD, CH_DUD, CH_DUD, CH_DUD, CH_DUD, CH_DUD, CH_DUD, CH_DUD,
......@@ -631,7 +643,7 @@ static const char lanmanfs_inverse_lookup_table[257]=
/* These two structures MUST be kept in step in order to allow the
* wildcard resolution code function correctly.
* wildcard resolution code to function correctly.
*/
static const char lanmanfs_contentious_characters[]=
"+=><,\x20";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment