Changeset 7194a60 in mainline for uspace/srv/fs/fat/fat_dentry.h


Ignore:
Timestamp:
2011-06-27T16:40:55Z (14 years ago)
Author:
Oleg Romanenko <romanenko.oleg@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5dfb1948
Parents:
2e839dda
Message:

Modifications in fat_dentry.h and fat_dentry.c:

  1. Using wchar_t for wide string
  2. Using standart string functions when it possible.
  3. Add function for convesion unicode character to ascii:

wstr_to_ascii

  1. Renaming few functions.
File:
1 edited

Legend:

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

    r2e839dda r7194a60  
    5656#define FAT_LCASE_LOWER_EXT     0x10
    5757
    58 #define FAT_PAD                 ' '
     58#define FAT_PAD                 ' '
     59#define FAT_LFN_PAD     0xffff
     60#define FAT_SFN_CHAR '_'
    5961
    6062#define FAT_DENTRY_UNUSED       0x00
     
    7678#define FAT_LFN_CHKSUM(d) (d->lfn.check_sum)
    7779
    78 #define FAT_LFN_NAME_SIZE   255
     80#define FAT_LFN_NAME_SIZE   260
    7981#define FAT_LFN_MAX_COUNT   20
    8082#define FAT_LFN_PART1_SIZE  5
     
    130132
    131133extern int fat_dentry_namecmp(char *, const char *);
    132 extern bool fat_dentry_name_verify(const char *);
    133134extern void fat_dentry_name_get(const fat_dentry_t *, char *);
    134135extern void fat_dentry_name_set(fat_dentry_t *, const char *);
     
    138139extern size_t fat_lfn_str_nlength(const uint16_t *, size_t);
    139140extern size_t fat_lfn_size(const fat_dentry_t *);
    140 extern size_t fat_lfn_copy_part(const uint16_t *, size_t, uint16_t *, size_t *);
    141 extern size_t fat_lfn_copy_entry(const fat_dentry_t *, uint16_t *, size_t *);
     141extern size_t fat_lfn_get_part(const uint16_t *, size_t, wchar_t *, size_t *);
     142extern size_t fat_lfn_get_entry(const fat_dentry_t *, wchar_t *, size_t *);
     143extern size_t fat_lfn_set_part(const wchar_t *, size_t *, size_t, uint16_t *, size_t);
     144extern size_t fat_lfn_set_entry(const wchar_t *, size_t *, size_t, fat_dentry_t *);
    142145
    143 extern int utf16_to_str(char *, size_t, const uint16_t *);
    144 extern int str_to_utf16(uint16_t *, size_t, const char *);
    145 extern bool fat_lfn_valid_char(uint16_t);
    146 extern bool fat_lfn_valid_str(const uint16_t *);
    147 extern size_t utf16_length(const uint16_t *);
    148 extern bool fat_dentry_is_sfn(const uint16_t *);
     146extern void wstr_to_ascii(char *dst, const wchar_t *src, size_t count, uint8_t pad);
     147
     148extern bool fat_sfn_valid_char(wchar_t);
     149extern bool fat_sfn_valid(const wchar_t *);
     150extern bool fat_lfn_valid(const wchar_t *wstr);
     151extern bool fat_dentry_is_sfn(const wchar_t *);
    149152
    150153
Note: See TracChangeset for help on using the changeset viewer.