зеркало из https://github.com/mozilla/pjs.git
Define codepoints below 0x20 as illegal characters in filenames. Bug393488, r=bsmedberg, b=beltzner
This commit is contained in:
Родитель
4722710460
Коммит
353391a9ae
|
@ -273,18 +273,27 @@ public:
|
|||
|
||||
|
||||
#if defined(XP_MACOSX)
|
||||
#define FILE_PATH_SEPARATOR "/"
|
||||
#define FILE_ILLEGAL_CHARACTERS ":"
|
||||
#define FILE_PATH_SEPARATOR "/"
|
||||
#define OS_FILE_ILLEGAL_CHARACTERS ":"
|
||||
#elif defined(XP_WIN) || defined(XP_OS2)
|
||||
#define FILE_PATH_SEPARATOR "\\"
|
||||
#define FILE_ILLEGAL_CHARACTERS "/:*?\"<>|"
|
||||
#define FILE_PATH_SEPARATOR "\\"
|
||||
#define OS_FILE_ILLEGAL_CHARACTERS "/:*?\"<>|"
|
||||
#elif defined(XP_UNIX) || defined(XP_BEOS)
|
||||
#define FILE_PATH_SEPARATOR "/"
|
||||
#define FILE_ILLEGAL_CHARACTERS ""
|
||||
#define FILE_PATH_SEPARATOR "/"
|
||||
#define OS_FILE_ILLEGAL_CHARACTERS ""
|
||||
#else
|
||||
#error need_to_define_your_file_path_separator_and_illegal_characters
|
||||
#endif
|
||||
|
||||
// Not all these control characters are illegal in all OSs, but we don't really
|
||||
// want them appearing in filenames
|
||||
#define CONTROL_CHARACTERS "\001\002\003\004\005\006\007" \
|
||||
"\010\011\012\013\014\015\016\017" \
|
||||
"\020\021\022\023\024\025\026\027" \
|
||||
"\030\031\032\033\034\035\036\037"
|
||||
|
||||
#define FILE_ILLEGAL_CHARACTERS CONTROL_CHARACTERS OS_FILE_ILLEGAL_CHARACTERS
|
||||
|
||||
#define NS_IS_SPACE(VAL) \
|
||||
(((((intn)(VAL)) & 0x7f) == ((intn)(VAL))) && isspace((intn)(VAL)) )
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче