Changeset 411e9ca in mainline for uspace/srv/fs/fat/fat_dentry.h


Ignore:
Timestamp:
2011-07-07T19:57:47Z (13 years ago)
Author:
Oleg Romanenko <romanenko.oleg@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3e018e45
Parents:
fc97128
Message:
  1. Following the ECMA-107 rules for short file names. Function

fat_valid_name and fat_valid_short_name

  1. Rewrite fat_lfn_set_part, fat_lfn_set_entry, str_to_ascii functions

to use uint16_t for UTF16 instead of wchar_t, basing on new function
for conversion from utf8 to utf16.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/fat/fat_dentry.h

    rfc97128 r411e9ca  
    3737#include <stdint.h>
    3838#include <bool.h>
     39
     40#define IS_D_CHAR(ch) (isalnum(ch) || ch == '_')
     41#define FAT_STOP_CHARS L"*?/\\\n\t|'"
    3942
    4043#define FAT_NAME_LEN            8
     
    142145extern size_t fat_lfn_get_part(const uint16_t *, size_t, uint16_t *, size_t *);
    143146extern size_t fat_lfn_get_entry(const fat_dentry_t *, uint16_t *, size_t *);
    144 extern size_t fat_lfn_set_part(const wchar_t *, size_t *, size_t, uint16_t *, size_t);
    145 extern size_t fat_lfn_set_entry(const wchar_t *, size_t *, size_t, fat_dentry_t *);
     147extern size_t fat_lfn_set_part(const uint16_t *, size_t *, size_t, uint16_t *, size_t);
     148extern size_t fat_lfn_set_entry(const uint16_t *, size_t *, size_t, fat_dentry_t *);
    146149
    147 extern void wstr_to_ascii(char *dst, const wchar_t *src, size_t count, uint8_t pad);
     150extern void str_to_ascii(char *dst, const char *src, size_t count, uint8_t pad);
     151extern size_t utf16_length(const uint16_t *wstr);
    148152
    149 extern bool fat_sfn_valid_char(wchar_t);
    150 extern bool fat_sfn_valid(const wchar_t *);
    151 extern bool fat_lfn_valid(const wchar_t *wstr);
    152 extern bool fat_dentry_is_sfn(const wchar_t *);
     153extern bool fat_valid_name(const char *name);
     154extern bool fat_valid_short_name(const char *name);
    153155
    154156
Note: See TracChangeset for help on using the changeset viewer.