Index
Records
- Fat
- arena
- arena_chunk
- cmdline_opt
- edit_line
- fat32fs_ctx
- filereader
- filewriter
- floating_point_components
- in_gb
- list_node_link
- mallinfo
- malloc_chunk
- malloc_params
- malloc_segment
- malloc_state
- malloc_tree_chunk
- process_data
- scaling_factor
Functions
date_time_to_unix
uint64_t date_time_to_unix(struct date_time * dt)
Defined at timeutil.c#5
malloc_inspect_all
void malloc_inspect_all(void ()(void , void , size_t, void ) handler, void * arg)
malloc_inspect_all(void(handler)(void start, void end, size_t used_bytes, void callback_arg), void* arg); Traverses the heap and calls the given handler for each managed region, skipping all bytes that are (or may be) used for bookkeeping purposes. Traversal does not include include chunks that have been directly memory mapped. Each reported region begins at the start address, and continues up to but not including the end address. The first used_bytes of the region contain allocated data. If used_bytes is zero, the region is unallocated. The handler is invoked with the given callback argument. If locks are defined, they are held during the entire traversal. It is a bad idea to invoke other malloc functions from within the handler.
For example, to count the number of in-use chunks with size greater than 1000, you could write: static int count = 0; void count_chunks(void start, void end, size_t used, void* arg) { if (used >= 1000) ++count; } then: malloc_inspect_all(count_chunks, NULL);
malloc_inspect_all is compiled only if MALLOC_INSPECT_ALL is defined.
setjmp
int setjmp(jmp_buf buf)
Defined at amd64/setjmp.c#3
_clone_tramp1
void _clone_tramp1()
Defined at amd64/clone_tramp1.c#5
amd64_syscall
uintptr_t amd64_syscall(int syscall_num, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6)
Defined at amd64/syscall.c#5
app_main
void app_main()
_clone_tramp
void _clone_tramp()
dlrealloc_in_place
void * dlrealloc_in_place(void * , size_t )
realloc_in_place(void* p, size_t n) Resizes the space allocated for p to size n, only if this can be done without moving p (i.e., only if there is adjacent space available if n is greater than p's current allocated size, or n is less than or equal to p's size). This may be used instead of plain realloc if an alternative allocation strategy is needed upon failure to expand space; for example, reallocation of a buffer that must be memory-aligned or cleared. You can use realloc_in_place to trigger these alternatives only when needed.
Returns p if successful; otherwise null.
fmod
double fmod(double a, double b)
Defined at math.c#3
str_to_uint64
uint64_t str_to_uint64(const char * s)
Defined at strconv.c#3
terminal_print
void terminal_print(const char * string, size_t len)
Defined at terminal.c#5
arena_create_chunk
static struct arena_chunk * arena_create_chunk(size_t capacity)
Defined at arena.c#5
malloc_stats
void malloc_stats()
malloc_stats(); Prints on stderr the amount of space obtained from the system (both via sbrk and mmap), the maximum amount (which may be more than current if malloc_trim and/or munmap got called), and the current number of bytes allocated via malloc (or realloc, etc) but not yet freed. Note that this is the number of bytes allocated, not the number requested. It will be larger than the number requested because of alignment and bookkeeping overhead. Because it includes alignment wastage as being in use, this figure may be greater than zero even when no user-level chunks are allocated.
The reported current and maximum system memory can be inaccurate if a program makes other calls to system memory allocation functions (normally sbrk) outside of malloc.
malloc_stats prints only the most commonly interesting statistics. More information can be obtained by calling mallinfo.
malloc_stats(); Prints on stderr the amount of space obtained from the system (both via sbrk and mmap), the maximum amount (which may be more than current if malloc_trim and/or munmap got called), and the current number of bytes allocated via malloc (or realloc, etc) but not yet freed. Note that this is the number of bytes allocated, not the number requested. It will be larger than the number requested because of alignment and bookkeeping overhead. Because it includes alignment wastage as being in use, this figure may be greater than zero even when no user-level chunks are allocated.
The reported current and maximum system memory can be inaccurate if a program makes other calls to system memory allocation functions (normally sbrk) outside of malloc.
malloc_stats prints only the most commonly interesting statistics. More information can be obtained by calling mallinfo.
malloc_stats is not compiled if NO_MALLOC_STATS is defined.
stall_read_tsc
static uint64_t stall_read_tsc()
Defined at amd64/stall.c#4
path_basename
const char * path_basename(const char * path)
Defined at path.c#5
memset
size_t memset(void * dst, uint8_t b, size_t n)
Defined at string.c#6
in_gb_init
void in_gb_init(in_gb_malloc_func_t mallocfn, void * ctx, struct in_gb * gb, size_t capacity)
Defined at in_gb.c#6
fmodf
float fmodf(float a, float b)
Defined at math.c#8
terminal_dimensions
void terminal_dimensions(size_t * cols, size_t * rows)
Defined at terminal.c#10
filereader_init
int filereader_init(struct filereader * fw, const char * path)
Defined at filereader.c#10
premain_memset
static size_t premain_memset(void * dst, uint8_t b, size_t n)
Defined at __premain.c#11
dbgcons_printf_buffer_lock
static void dbgcons_printf_buffer_lock()
Defined at dbgcons.c#11
stall_get_tsc_freq_hz
static uint64_t stall_get_tsc_freq_hz()
Defined at amd64/stall.c#11
filewriter_init
int filewriter_init(struct filewriter * fw, const char * path, uint32_t flags)
Defined at filewriter.c#11
cmdline_parse_opt
static void cmdline_parse_opt(const char * cmdline, struct cmdline_opt * opt)
Defined at cmdline_parser.c#11
quit
int quit()
Defined at system.c#12
mprintf_buffer_lock
static void mprintf_buffer_lock()
Defined at mprintf.c#13
ceil
double ceil(double x)
Defined at math.c#13
in_wmalloc
static void * in_wmalloc(void * ctx, size_t size)
Defined at in_input.c#15
memcpy
size_t memcpy(void * dst, const void * src, size_t n)
Defined at string.c#15
test
int test(char c)
Defined at system.c#17
arena_destroy_chunk
static void arena_destroy_chunk(struct arena_chunk * chunk)
Defined at arena.c#19
longjmp
void longjmp(jmp_buf buf, int ret)
Defined at amd64/setjmp.c#19
clear_bss
static void clear_bss()
Defined at __premain.c#20
in_gb_fini
void in_gb_fini(in_gb_free_func_t freefn, void * ctx, struct in_gb * gb)
Defined at in_gb.c#20
dbgcons_printf_buffer_unlock
static void dbgcons_printf_buffer_unlock()
Defined at dbgcons.c#21
in_wfree
static void in_wfree(void * ctx, void * mem)
Defined at in_input.c#21
process_spawn
struct process_data * process_spawn(process_func_t func, void * argument_ptr)
Defined at process.c#21
sched
int sched()
Defined at system.c#22
mprintf_buffer_unlock
static void mprintf_buffer_unlock()
Defined at mprintf.c#23
arena_reset
void arena_reset(struct arena * arena)
Defined at arena.c#24
stall_ms
void stall_ms(uint64_t ms)
Defined at amd64/stall.c#24
dbgcons_print
int dbgcons_print(const char * string, size_t len)
Defined at dbgcons.c#26
strncpy
void strncpy(char * dst, const char * src, size_t n)
Defined at string.c#26
SOURCE: https://stackoverflow.com/a/48967408
__premain
void __premain()
Defined at __premain.c#26
in_gb_grow
void in_gb_grow(in_gb_realloc_func_t reallocfn, void * ctx, struct in_gb * gb)
Defined at in_gb.c#26
map
void * map(uintptr_t vaddr, size_t pages, uint32_t flags)
Defined at system.c#27
in_wrealloc
static void * in_wrealloc(void * ctx, void * mem, size_t old, size_t new)
Defined at in_input.c#27
mprintf
void mprintf(const char * fmt)
Defined at mprintf.c#28
fabs
double fabs(double x)
Defined at math.c#29
filereader_fini
int filereader_fini(struct filereader * fw)
Defined at filereader.c#31
debug_printf
void debug_printf(const char * fmt)
Defined at dbgcons.c#31
unmap
int unmap(uintptr_t vaddr, size_t pages)
Defined at system.c#32
strlen
size_t strlen(const char * str)
Defined at string.c#33
floor
double floor(double x)
Defined at math.c#34
arena_destroy
void arena_destroy(struct arena * arena)
Defined at arena.c#34
clone
int clone(uintptr_t vstack_top, void ()(void) entry, void * argument_ptr)*
Defined at system.c#37
filereader_read
int filereader_read(struct filereader * fw, uint8_t * buffer, size_t buffer_size)
Defined at filereader.c#37
in_stream_read_line
void in_stream_read_line(const char * prompt, char * buffer, size_t max)
Defined at in_input.c#38
memcmp
int memcmp(const void * s1, const void * s2, size_t n)
Defined at string.c#41
mutex_create
int mutex_create()
Defined at system.c#42
_init_lock
static int _init_lock(int * lock)
Defined at _malloc_port.c#44
sqrt
double sqrt(double x)
Defined at math.c#45
mutex_delete
int mutex_delete(int mutex_rid)
Defined at system.c#47
in_gb_move
void in_gb_move(struct in_gb * gb, size_t pos)
Defined at in_gb.c#47
filewriter_fini
int filewriter_fini(struct filewriter * fw)
Defined at filewriter.c#48
arena_malloc
void * arena_malloc(struct arena * arena, size_t size)
Defined at arena.c#48
_fini_lock
static int _fini_lock(int * lock)
Defined at _malloc_port.c#50
process_data_free
void process_data_free(struct process_data * pdata)
Defined at process.c#51
mutex_lock
int mutex_lock(int mutex_rid)
Defined at system.c#52
filewriter_write
int filewriter_write(struct filewriter * fw, uint8_t * buffer, size_t buffer_size)
Defined at filewriter.c#54
_acquire_lock
static int _acquire_lock(int * lock)
Defined at _malloc_port.c#55
strtokenize
void strtokenize(const char * str, char delim, void * ctx, strtokenize_cb_func_t cb)
Defined at string.c#55
mutex_unlock
int mutex_unlock(int mutex_rid)
Defined at system.c#57
process_self_init
void process_self_init()
Defined at process.c#57
exp
double exp(double x)
Defined at math.c#58
_release_lock
static int _release_lock(int * lock)
Defined at _malloc_port.c#60
argument_ptr
void * argument_ptr()
Defined at system.c#62
process_get_exec_pid
int process_get_exec_pid()
Defined at process.c#65
in_gb_insert
void in_gb_insert(in_gb_realloc_func_t reallocfn, void * ctx, struct in_gb * gb, char c)
Defined at in_gb.c#65
exec
int exec(const char * path, const char * cmdline)
Defined at system.c#67
process_get_exec_pgid
int process_get_exec_pgid()
Defined at process.c#70
read_file
int read_file(const char * path, size_t off, uint8_t * buffer, size_t size)
Defined at system.c#72
cmdline_parse
int cmdline_parse(const char * cmdline, struct cmdline_opt * opt_array)
Defined at cmdline_parser.c#73
process_get_pid
int process_get_pid()
Defined at process.c#75
_open_dummy
int _open_dummy(const char * path, uint16_t modes)
Defined at _malloc_port.c#75
in_gb_backspace
void in_gb_backspace(struct in_gb * gb)
Defined at in_gb.c#75
log
double log(double x)
Defined at math.c#76
describe
int describe(const char * path, struct desc * desc)
Defined at system.c#77
sbrk
void * sbrk(ptrdiff_t )
str_split_lines
void str_split_lines(const char * str, size_t total_len, void * ctx, strtokenize_cb_func_t cb)
Defined at string.c#77
process_get_pgid
int process_get_pgid()
Defined at process.c#80
in_gb_length
size_t in_gb_length(struct in_gb * gb)
Defined at in_gb.c#81
mmap
void * mmap(void * addr, size_t size, int prot, int flags, int fd, size_t off)
Defined at _malloc_port.c#81
get_procgroup
int get_procgroup(int pid)
Defined at system.c#82
in_gb_string_at
char * in_gb_string_at(in_gb_malloc_func_t mallocfn, void * ctx, struct in_gb * gb, size_t pos)
Defined at in_gb.c#86
get_exec_pid
int get_exec_pid()
Defined at system.c#87
arena_realloc
void * arena_realloc(struct arena * arena, void * memory, size_t prev_size, size_t new_size)
Defined at arena.c#89
read_dir_entry
int read_dir_entry(const char * path, struct dir_entry * entry, size_t entry_num)
Defined at system.c#92
normalize_angle
static double normalize_angle(double x)
Defined at math.c#93
create_file
int create_file(const char * path)
Defined at system.c#97
munmap
int munmap(void * addr, size_t length)
Defined at _malloc_port.c#98
write_file
int write_file(const char * path, size_t off, uint8_t * buffer, size_t size, uint32_t flags)
Defined at system.c#102
sin
double sin(double x)
Defined at math.c#102
wait_for_pid
int wait_for_pid(int pid)
Defined at system.c#108
memchr
void * memchr(const void * s, unsigned char c, size_t n)
Defined at string.c#111
https://svnweb.freebsd.org/base/stable/7/lib/libc/string/memchr.c?view=markup
kill
int kill(int pid)
Defined at system.c#113
cos
double cos(double x)
Defined at math.c#116
create_dir
int create_dir(const char * path)
Defined at system.c#118
remove
int remove(const char * path)
Defined at system.c#123
tan
double tan(double x)
Defined at math.c#123
strcmp
int strcmp(const char * s1, const char * s2)
Defined at string.c#125
https://stackoverflow.com/a/34873406
in_gb_concat
void in_gb_concat(in_gb_realloc_func_t reallocfn, void * ctx, struct in_gb * dest, struct in_gb * src)
Defined at in_gb.c#127
create_volume
int create_volume(const char * name, int fs_type, const char * device_name)
Defined at system.c#128
atan
double atan(double x)
Defined at math.c#131
exec_partial
int exec_partial(const char * path, const char * cmdline)
Defined at system.c#133
strcat
char * strcat(char * dest, const char * src)
Defined at string.c#135
https://stackoverflow.com/a/2490637
fat_translate
static void fat_translate(size_t fs_block, size_t fs_block_count, size_t fs_block_size, size_t device_sector_size, size_t * out_phys_sector, size_t * out_sector_count)
Defined at fat.c#136
exec_partial_fini
int exec_partial_fini(int pid)
Defined at system.c#138
get_self_pid
int get_self_pid()
Defined at system.c#143
stream_write
int stream_write(int pgid, int rid, void * buffer, size_t size)
Defined at system.c#148
strncmp
int strncmp(const char * s1, const char * s2, size_t n)
Defined at string.c#148
fat_read
static _Bool fat_read(struct fat32fs_ctx * ctx, uint8_t * buf, uint32_t sector)
Defined at fat.c#149
stream_read
int stream_read(int rid, void * buffer, size_t size)
Defined at system.c#153
date_time
int date_time(struct date_time * dt)
Defined at system.c#158
atan2
double atan2(double y, double x)
Defined at math.c#159
get_cmdline
const char * get_cmdline()
Defined at system.c#163
strstr
char * strstr(const char * str, const char * substring)
Defined at string.c#163
https://stackoverflow.com/questions/49131175/recreate-the-strstr-function
set_priority
int set_priority(int prio)
Defined at system.c#168
fat_write
static _Bool fat_write(struct fat32fs_ctx * ctx, const uint8_t * buf, uint32_t sector)
Defined at fat.c#169
get_priority
int get_priority()
Defined at system.c#173
asin
double asin(double x)
Defined at math.c#176
ioctl2
int ioctl2(const char * path, int cmd, void * a1, void * a2, void * a3, void * a4)
Defined at system.c#178
acos
double acos(double x)
Defined at math.c#187
to_upper
static char to_upper(char c)
Defined at fat.c#193
pow
double pow(double base, double exp1)
Defined at math.c#194
strchr
char * strchr(const char * s, int c)
Defined at string.c#195
https://github.com/gcc-mirror/gcc/blob/master/libiberty/strchr.c
subpath_len
static int subpath_len(const char * path)
Defined at fat.c#199
strrchr
char * strrchr(const char * s, int c)
Defined at string.c#206
https://github.com/gcc-mirror/gcc/blob/master/libiberty/strrchr.c
last_subpath_len
static int last_subpath_len(const char * path)
Defined at fat.c#208
memmove
void * memmove(void * dest, const void * src, unsigned int n)
Defined at string.c#218
SOURCE: https://aticleworld.com/memmove-function-implementation-in-c/
get_crc
static uint8_t get_crc(const uint8_t * name)
Defined at fat.c#224
decode_timestamp
static void decode_timestamp(uint16_t date, uint16_t time, Timestamp * ts)
Defined at fat.c#233
strncat
char * strncat(char * dest, const char * src, size_t n)
Defined at string.c#239
encode_timestamp
static void encode_timestamp(uint16_t * date, uint16_t * time)
Defined at fat.c#244
sect_to_clust
static uint32_t sect_to_clust(Fat * fat, uint32_t sect)
Defined at fat.c#255
strcpy
char * strcpy(char * strDest, const char * strSrc)
Defined at string.c#255
https://stackoverflow.com/questions/14476627/strcpy-implementation-in-c
clust_to_sect
static uint32_t clust_to_sect(Fat * fat, uint32_t clust)
Defined at fat.c#261
isalnum
int isalnum(int c)
Defined at string.c#263
sync_buf
static int sync_buf(struct fat32fs_ctx * ctx, Fat * fat)
Defined at fat.c#267
isalpha
int isalpha(int c)
Defined at string.c#268
iscntrl
int iscntrl(int c)
Defined at string.c#273
isdigit
int isdigit(int c)
Defined at string.c#278
update_buf
static int update_buf(struct fat32fs_ctx * ctx, Fat * fat, uint32_t sect)
Defined at fat.c#279
isgraph
int isgraph(int c)
Defined at string.c#283
islower
int islower(int c)
Defined at string.c#288
isprint
int isprint(int c)
Defined at string.c#293
sync_fs
static int sync_fs(struct fat32fs_ctx * ctx, Fat * fat)
Defined at fat.c#296
ispunct
int ispunct(int c)
Defined at string.c#298
isspace
int isspace(int c)
Defined at string.c#303
isupper
int isupper(int c)
Defined at string.c#313
isxdigit
int isxdigit(int c)
Defined at string.c#318
isascii
int isascii(int c)
Defined at string.c#323
get_fat
static int get_fat(struct fat32fs_ctx * ctx, Fat * fat, uint32_t clust, uint32_t * out_val, uint8_t * out_flags)
Defined at fat.c#323
isblank
int isblank(int c)
Defined at string.c#328
tolower
int tolower(int chr)
Defined at string.c#333
toupper
int toupper(int chr)
Defined at string.c#338
get_bit_access
static floating_point_with_bit_access get_bit_access(floating_point_t x)
Defined at printf.c#345
This is unnecessary in C99, since compound initializers can be used, but: 1. Some compilers are finicky about this; 2. Some people may want to convert this to C89; 3. If you try to use it as C++, only C++20 supports compound literals
get_sign_bit
static int get_sign_bit(floating_point_t x)
Defined at printf.c#352
put_fat2
static int put_fat2(struct fat32fs_ctx * ctx, Fat * fat, uint32_t fat_sect, uint32_t clust, uint32_t val)
Defined at fat.c#356
get_exp2
static int get_exp2(floating_point_with_bit_access x)
Defined at printf.c#358
put_fat
static int put_fat(struct fat32fs_ctx * ctx, Fat * fat, uint32_t clust, uint32_t val)
Defined at fat.c#375
remove_chain
static int remove_chain(struct fat32fs_ctx * ctx, Fat * fat, uint32_t clust)
Defined at fat.c#388
putchar_via_gadget
static void putchar_via_gadget(output_gadget_t * gadget, char c)
Defined at printf.c#406
Note: This function currently assumes it is not passed a '\0' c, or alternatively, that '\0' can be passed to the function in the output gadget. The former assumption holds within the printf library. It also assumes that the output gadget has been properly initialized.
stretch_chain
static int stretch_chain(struct fat32fs_ctx * ctx, Fat * fat, uint32_t clust, uint32_t * out_clust)
Defined at fat.c#418
append_termination_with_gadget
static void append_termination_with_gadget(output_gadget_t * gadget)
Defined at printf.c#430
Possibly-write the string-terminating '\0' character
putchar_wrapper
static void putchar_wrapper(char c, void * unused)
Defined at printf.c#448
We can't use putchar_ as is, since our output gadget only takes pointers to functions with an extra argument
discarding_gadget
static output_gadget_t discarding_gadget()
Defined at printf.c#454
buffer_gadget
static output_gadget_t buffer_gadget(char * buffer, size_t buffer_size)
Defined at printf.c#465
function_gadget
static output_gadget_t function_gadget(void ()(char, void ) function, void * extra_arg)
Defined at printf.c#479
create_chain
static int create_chain(struct fat32fs_ctx * ctx, Fat * fat, uint32_t * out_clust)
Defined at fat.c#480
clust_clear
static int clust_clear(struct fat32fs_ctx * ctx, Fat * fat, uint32_t clust)
Defined at fat.c#486
extern_putchar_gadget
static output_gadget_t extern_putchar_gadget()
Defined at printf.c#488
strnlen_s_
static printf_size_t strnlen_s_(const char * str, printf_size_t maxsize)
Defined at printf.c#500
internal secure strlen
return The length of the string (excluding the terminating 0) limited by 'maxsize'
note strlen uses size_t, but wes only use this function with printf_size_t variables - hence the signature.
dir_at_clust
static void dir_at_clust(Dir * dir, uint32_t clust)
Defined at fat.c#508
is_digit_
static Bool is_digit(char ch)
Defined at printf.c#512
internal test if char is a digit (0-9)
return true if char is a digit
dir_enter
static void dir_enter(Dir * dir, uint32_t clust)
Defined at fat.c#516
atou_
static printf_size_t atou_(const char ** str)
Defined at printf.c#518
internal ASCII string to printf_size_t conversion
dir_next
static int dir_next(struct fat32fs_ctx * ctx, Dir * dir)
Defined at fat.c#527
out_rev_
static void out_rev_(output_gadget_t * output, const char * buf, printf_size_t len, printf_size_t width, printf_flags_t flags)
Defined at printf.c#528
output the specified string in reverse, taking care of any zero-padding
dir_advance
static int dir_advance(struct fat32fs_ctx * ctx, Dir * dir, int cnt)
Defined at fat.c#558
print_integer_finalization
static void print_integer_finalization(output_gadget_t * output, char * buf, printf_size_t len, _Bool negative, numeric_base_t base, printf_size_t precision, printf_size_t width, printf_flags_t flags)
Defined at printf.c#559
Invoked by print_integer after the actual number has been printed, performing necessary work on the number's prefix (as the number is initially printed in reverse order)
dir_next_stretch
static int dir_next_stretch(struct fat32fs_ctx * ctx, Dir * dir)
Defined at fat.c#569
dir_ptr
static void * dir_ptr(Dir * dir)
Defined at fat.c#585
sfn_is_last
static _Bool sfn_is_last(Sfn * sfn)
Defined at fat.c#591
sfn_is_free
static _Bool sfn_is_free(Sfn * sfn)
Defined at fat.c#597
sfn_is_lfn
static _Bool sfn_is_lfn(Sfn * sfn)
Defined at fat.c#603
sfn_cluster
static uint32_t sfn_cluster(Sfn * sfn)
Defined at fat.c#609
sfn_char
static char sfn_char(char c)
Defined at fat.c#619
------------------------------------------------------------------------------ Only certain characters are allowed in an SFN file name. Invalid characters are converted to underscore. It does not follow Windows' algorithm, using ~N for duplicate names, since it relies on LFN names only.
put_sfn_name
static void put_sfn_name(uint8_t * sfn_name, const char * name, int len)
Defined at fat.c#636
print_integer
static void print_integer(output_gadget_t * output, printf_unsigned_value_t value, _Bool negative, numeric_base_t base, printf_size_t precision, printf_size_t width, printf_flags_t flags)
Defined at printf.c#640
An internal itoa-like function
parse_sfn_name
static void parse_sfn_name(struct fat32fs_ctx * ctx, uint8_t * sfn_name)
Defined at fat.c#657
put_lfn_name_frag
static void put_lfn_name_frag(Lfn * lfn, const char * name, int len)
Defined at fat.c#674
parse_lfn_name
static int parse_lfn_name(struct fat32fs_ctx * ctx, Dir * dir)
Defined at fat.c#694
get_components
static struct floating_point_components get_components(floating_point_t number, printf_size_t precision)
Defined at printf.c#732
Break up a non-negative, finite, floating-point number into two integral parts of its decimal representation: The number up to the decimal point, and the number appearing after that point - whose number of digits corresponds to the precision value. Example: The components of 12.621 are 12 and 621 for precision 3, or 12 and 62 for precision 2.
dir_search
static int dir_search(struct fat32fs_ctx * ctx, Dir * dir, const char * name, int len, Loc * loc)
Defined at fat.c#743
apply_scaling
static floating_point_t apply_scaling(floating_point_t num, struct scaling_factor normalization)
Defined at printf.c#779
unapply_scaling
static floating_point_t unapply_scaling(floating_point_t normalized, struct scaling_factor normalization)
Defined at printf.c#785
dir_at_root
static _Bool dir_at_root(Dir * dir)
Defined at fat.c#797
update_normalization
static struct scaling_factor update_normalization(struct scaling_factor sf, floating_point_t extra_multiplicative_factor)
Defined at printf.c#804
follow_path
static int follow_path(struct fat32fs_ctx * ctx, Dir * dir, const char ** path, Loc * loc)
Defined at fat.c#805
get_normalized_components
static struct floating_point_components get_normalized_components(_Bool negative, printf_size_t precision, floating_point_t non_normalized, struct scaling_factor normalization, int floored_exp10)
Defined at printf.c#828
remove_entries
static int remove_entries(struct fat32fs_ctx * ctx, Dir * dir, Loc * loc)
Defined at fat.c#861
print_broken_up_decimal
static void print_broken_up_decimal(struct floating_point_components number_, output_gadget_t * output, printf_size_t precision, printf_size_t width, printf_flags_t flags, char * buf, printf_size_t len)
Defined at printf.c#891
dir_add
static int dir_add(struct fat32fs_ctx * ctx, Dir * dir, const char * name, int len, uint8_t attr, uint32_t clust)
Defined at fat.c#891
print_decimal_number
static void print_decimal_number(output_gadget_t * output, floating_point_t number, printf_size_t precision, printf_size_t width, printf_flags_t flags, char * buf, printf_size_t len)
Defined at printf.c#980
internal ftoa for fixed decimal floating point
bastardized_floor
static int bastardized_floor(floating_point_t x)
Defined at printf.c#994
A floor function - but one which only works for numbers whose floor value is representable by an int.
check_fat
static _Bool check_fat(uint8_t * buf)
Defined at fat.c#1001
log10_of_positive
static floating_point_t log10_of_positive(floating_point_t positive_number)
Defined at printf.c#1008
Computes the base-10 logarithm of the input number - which must be an actual positive number (not infinity or NaN, nor a sub-normal)
fat_mount
int fat_mount(struct fat32fs_ctx * ctx, Fat * fat)
Defined at fat.c#1041
------------------------------------------------------------------------------ Mounts a file system. The name specifies which path is used to access it. For example: mounting using 'mnt', and accessing using '/mnt/path/file.txt'. Partition 0 referes to either the entire disk (absense of MBR), or to the specified MBR partition.
pow10_of_int
static floating_point_t pow10_of_int(int floored_exp10)
Defined at printf.c#1062
print_exponential_number
static void print_exponential_number(output_gadget_t * output, floating_point_t number, printf_size_t precision, printf_size_t width, printf_flags_t flags, char * buf, printf_size_t len)
Defined at printf.c#1092
fat_umount
int fat_umount(struct fat32fs_ctx * ctx, Fat * fat)
Defined at fat.c#1096
------------------------------------------------------------------------------ Syncronizes unwritten changes and removes the fat from the global list. All file must be closed before calling this.
fat_sync
int fat_sync(struct fat32fs_ctx * ctx, Fat * fat)
Defined at fat.c#1104
------------------------------------------------------------------------------ Synchronizes unwritten changes. Does not synchronize open files.
fat_stat
int fat_stat(struct fat32fs_ctx * ctx, const char * path, DirInfo * info)
Defined at fat.c#1112
------------------------------------------------------------------------------ Get information about a file or directory.
fat_unlink
int fat_unlink(struct fat32fs_ctx * ctx, const char * path)
Defined at fat.c#1142
------------------------------------------------------------------------------ Unlinks (deletes) an existing file or empty directory.
fat_file_open
int fat_file_open(struct fat32fs_ctx * ctx, File * file, const char * path, uint8_t flags)
Defined at fat.c#1209
------------------------------------------------------------------------------ Opens a file. The file structure contain the size and offset that can be read by the user at any point. Any combination of the following flags can be used:
- FAT_WRITE: open for writing - FAT_READ: open for reading - FAT_APPEND: place file cursor at the end of the file - FAT_TRUNC: truncate the file - FAT_CREATE: create file if not existing
fat_file_close
int fat_file_close(struct fat32fs_ctx * ctx, File * file)
Defined at fat.c#1265
------------------------------------------------------------------------------ Closes a file. Updates the directory entry if modified. Writes back the write buffer if dirty.
fat_file_read
int fat_file_read(struct fat32fs_ctx * ctx, File * file, void * buf, int len, int * bytes)
Defined at fat.c#1273
print_floating_point
static void print_floating_point(output_gadget_t * output, floating_point_t value, printf_size_t precision, printf_size_t width, printf_flags_t flags, _Bool prefer_exponential)
Defined at printf.c#1275
fat_file_write
int fat_file_write(struct fat32fs_ctx * ctx, File * file, const void * buf, int len, int * bytes)
Defined at fat.c#1310
------------------------------------------------------------------------------ Write a number of bytes to the file. It allocates more clusters if the write exceeds the allocated space. It return the error code and the number of bytes written.
parse_flags
static printf_flags_t parse_flags(const char ** format)
Defined at printf.c#1341
Advances the format pointer past the flags, and returns the parsed flags due to the characters passed
fat_file_seek
int fat_file_seek(struct fat32fs_ctx * ctx, File * file, int offset, int seek)
Defined at fat.c#1356
------------------------------------------------------------------------------ Seek into the file. This is internally used to update the file buffer and extend the file when needed. For a user, this is used to ether:
- Update the offset of subsequent reads and writes - Preallocate space in the file (just seek the number of bytes to allocate)
Seeking backwards take more time as the cluster chain (often) must be followed from the beginning.
format_string_loop
static void format_string_loop(output_gadget_t * output, const char * format, va_list args)
Defined at printf.c#1372
fat_file_sync
int fat_file_sync(struct fat32fs_ctx * ctx, File * file)
Defined at fat.c#1436
------------------------------------------------------------------------------ Synchronizes a file. Writes back dirty file data. Updates directory timestamp when accessed. Update directory size and timestamp when modified.
fat_dir_create
int fat_dir_create(struct fat32fs_ctx * ctx, Dir * dir, const char * path)
Defined at fat.c#1479
------------------------------------------------------------------------------ Creates and enter a directory. Don't know if there is any point in returning dir.
fat_dir_open
int fat_dir_open(struct fat32fs_ctx * ctx, Dir * dir, const char * path)
Defined at fat.c#1539
fat_dir_read
int fat_dir_read(struct fat32fs_ctx * ctx, Dir * dir, DirInfo * info)
Defined at fat.c#1565
------------------------------------------------------------------------------ Read directory entry pointed to by dir. Use dir_next to advance directory pointer.
fat_dir_next
int fat_dir_next(struct fat32fs_ctx * ctx, Dir * dir)
Defined at fat.c#1622
------------------------------------------------------------------------------ Advances the directory pointer. Returns EOF when the EOF marker is hit. The user should not call this after that point. Call rewind to reset the directory pointer to the beginning.
fat_dir_rewind
int fat_dir_rewind(struct fat32fs_ctx * ctx, Dir * dir)
Defined at fat.c#1632
------------------------------------------------------------------------------ Sets dir to point to the first entry in the directory.
fat_get_error
const char * fat_get_error(int err)
Defined at fat.c#1641
fat_get_timestamp
void fat_get_timestamp(Timestamp * ts)
Defined at fat.c#1658
------------------------------------------------------------------------------ Override this function if it is needed. It is declared weak.
fat_format
int fat_format(struct fat32fs_ctx * ctx, uint32_t sector_count)
Defined at fat.c#1668
vsnprintf_impl
static int vsnprintf_impl(output_gadget_t * output, const char * format, va_list args)
Defined at printf.c#1751
internal vsnprintf - used for implementing _all library functions
vprintf
int vprintf(const char * format, va_list arg)
Defined at printf.c#1769
===========================================================================
vsnprintf
int vsnprintf(char * s, size_t n, const char * format, va_list arg)
Defined at printf.c#1775
vsprintf
int vsprintf(char * s, const char * format, va_list arg)
Defined at printf.c#1781
vfctprintf
int vfctprintf(void ()(char, void ) out, void * extra_arg, const char * format, va_list arg)
Defined at printf.c#1786
printf
int printf(const char * format)
Defined at printf.c#1797
sprintf
int sprintf(char * s, const char * format)
Defined at printf.c#1807
snprintf
int snprintf(char * s, size_t n, const char * format)
Defined at printf.c#1817
fctprintf
int fctprintf(void ()(char, void ) out, void * extra_arg, const char * format)
Defined at printf.c#1827
putchar_
void putchar_(char ch)
Defined at printf.c#1838
segment_holding
static msegmentptr segment_holding(mstate m, char * addr)
Defined at malloc.c#2711
Return segment holding given address
has_segment_link
static int has_segment_link(mstate m, msegmentptr ss)
Defined at malloc.c#2722
Return true if segment contains a segment link
init_mparams
static int init_mparams()
Defined at malloc.c#3112
Initialize mparams
change_mparam
static int change_mparam(int param_number, int value)
Defined at malloc.c#3202
support for mallopt
internal_mallinfo
static struct mallinfo internal_mallinfo(mstate m)
Defined at malloc.c#3497
mmap_alloc
static void * mmap_alloc(mstate m, size_t nb)
Defined at malloc.c#3836
Malloc using mmap
mmap_resize
static mchunkptr mmap_resize(mstate m, mchunkptr oldp, size_t nb, int flags)
Defined at malloc.c#3868
Realloc using mmap
init_top
static void init_top(mstate m, mchunkptr p, size_t psize)
Defined at malloc.c#3906
Initialize top chunk and its size
init_bins
static void init_bins(mstate m)
Defined at malloc.c#3921
Initialize bins for a new mstate that is otherwise zeroed out
prepend_alloc
static void * prepend_alloc(mstate m, char * newbase, char * oldbase, size_t nb)
Defined at malloc.c#3950
Allocate chunk and prepend remainder with chunk in successor base.
add_segment
static void add_segment(mstate m, char * tbase, size_t tsize, flag_t mmapped)
Defined at malloc.c#3992
Add a segment to hold a new noncontiguous region
sys_alloc
static void * sys_alloc(mstate m, size_t nb)
Defined at malloc.c#4047
Get memory from system using MORECORE or MMAP
release_unused_segments
static size_t release_unused_segments(mstate m)
Defined at malloc.c#4258
Unmap and unlink any mmapped segments that don't contain used chunks
sys_trim
static int sys_trim(mstate m, size_t pad)
Defined at malloc.c#4305
dispose_chunk
static void dispose_chunk(mstate m, mchunkptr p, size_t psize)
Defined at malloc.c#4373
Consolidate and bin a chunk. Differs from exported versions of free mainly in that the chunk need not be marked as inuse.
tmalloc_large
static void * tmalloc_large(mstate m, size_t nb)
Defined at malloc.c#4444
allocate a large request from the best fitting chunk in a treebin
tmalloc_small
static void * tmalloc_small(mstate m, size_t nb)
Defined at malloc.c#4515
allocate a small request from the best fitting chunk in a treebin
malloc
void * malloc(size_t )
Defined at malloc.c#4554
malloc(size_t n) Returns a pointer to a newly allocated chunk of at least n bytes, or null if no space is available, in which case errno is set to ENOMEM on ANSI C systems.
If n is zero, malloc returns a minimum-sized chunk. (The minimum size is 16 bytes on most 32bit systems, and 32 bytes on 64bit systems.) Note that size_t is an unsigned type, so calls with arguments that would be negative if signed are interpreted as requests for huge amounts of space, which will often fail. The maximum supported value of n differs across systems, but is in all cases less than the maximum representable value of a size_t.
free
void free(void * )
Defined at malloc.c#4692
free(void* p) Releases the chunk of memory pointed to by p, that had been previously allocated using malloc or a related routine such as realloc. It has no effect if p is null. If p was not malloced or already freed, free(p) will by default cause the current program to abort.
---------------------------- free ---------------------------
calloc
void * calloc(size_t , size_t )
Defined at malloc.c#4801
calloc(size_t n_elements, size_t element_size); Returns a pointer to n_elements * element_size bytes, with all locations set to zero.
try_realloc_chunk
static mchunkptr try_realloc_chunk(mstate m, mchunkptr p, size_t nb, int can_move)
Defined at malloc.c#4821
Try to realloc; only in-place unless can_move true
internal_memalign
static void * internal_memalign(mstate m, size_t alignment, size_t bytes)
Defined at malloc.c#4900
ialloc
static void ** ialloc(mstate m, size_t n_elements, size_t * sizes, int opts, void [] chunks)*
Defined at malloc.c#4981
Common support for independent_X routines, handling all of the combinations that can result. The opts arg has: bit 0 set if all elements are same size (using sizes[0]) bit 1 set if elements should be zeroed
internal_bulk_free
static size_t internal_bulk_free(mstate m, void [] array, size_t nelem)*
Defined at malloc.c#5107
Try to free all pointers in the given array. Note: this could be made faster, by delaying consolidation, at the price of disabling some user integrity checks, We still optimize some consolidations by combining adjacent chunks before freeing, which will occur often if allocated with ialloc or the array is sorted.
realloc
void * realloc(void * , size_t )
Defined at malloc.c#5195
realloc(void* p, size_t n) Returns a pointer to a chunk of size n that contains the same data as does chunk p up to the minimum of (n, p's size) bytes, or null if no space is available.
The returned pointer may or may not be the same as p. The algorithm prefers extending p in most cases when possible, otherwise it employs the equivalent of a malloc-copy-free sequence.
If p is null, realloc is equivalent to malloc.
If space is not available, realloc returns null, errno is set (if on ANSI) and p is NOT freed.
if n is for fewer bytes than already held by p, the newly unused space is lopped off and freed if possible. realloc with a size argument of zero (re)allocates a minimum-sized chunk.
The old unix realloc convention of allowing the last-free'd chunk to be used as an argument to realloc is not supported.
realloc_in_place
void * realloc_in_place(void * , size_t )
Defined at malloc.c#5240
realloc_in_place(void* p, size_t n) Resizes the space allocated for p to size n, only if this can be done without moving p (i.e., only if there is adjacent space available if n is greater than p's current allocated size, or n is less than or equal to p's size). This may be used instead of plain realloc if an alternative allocation strategy is needed upon failure to expand space; for example, reallocation of a buffer that must be memory-aligned or cleared. You can use realloc_in_place to trigger these alternatives only when needed.
Returns p if successful; otherwise null.
memalign
void * memalign(size_t , size_t )
Defined at malloc.c#5271
memalign(size_t alignment, size_t n); Returns a pointer to a newly allocated chunk of n bytes, aligned in accord with the alignment argument.
The alignment argument should be a power of two. If the argument is not a power of two, the nearest greater power is used. 8-byte alignment is guaranteed by normal malloc calls, so don't bother calling memalign with an argument of 8 or less.
Overreliance on memalign is a sure way to fragment space.
posix_memalign
int posix_memalign(void ** , size_t , size_t )
Defined at malloc.c#5278
int posix_memalign(void* pp, size_t alignment, size_t n); Allocates a chunk of n bytes, aligned in accord with the alignment argument. Differs from memalign only in that it (1) assigns the allocated memory to pp rather than returning it, (2) fails and returns EINVAL if the alignment is not a power of two (3) fails and returns ENOMEM if memory cannot be allocated.
valloc
void * valloc(size_t )
Defined at malloc.c#5301
valloc(size_t n); Equivalent to memalign(pagesize, n), where pagesize is the page size of the system. If the pagesize is unknown, 4096 is used.
mallopt
int mallopt(int , int )
Defined at malloc.c#5390
mallopt(int parameter_number, int parameter_value) Sets tunable parameters The format is to provide a (parameter-number, parameter-value) pair. mallopt then sets the corresponding parameter to the argument value if it can (i.e., so long as the value is meaningful), and returns 1 if successful else 0. To workaround the fact that mallopt is specified to use int, not size_t parameters, the value -1 is specially treated as the maximum unsigned size_t value.
SVID/XPG/ANSI defines four standard param numbers for mallopt, normally defined in malloc.h. None of these are use in this malloc, so setting them has no effect. But this malloc also supports other options in mallopt. See below for details. Briefly, supported parameters are as follows (listed defaults are for "typical" configurations).
Symbol param # default allowed param values M_TRIM_THRESHOLD -1 210241024 any (-1 disables) M_GRANULARITY -2 page size any power of 2 >= page size M_MMAP_THRESHOLD -3 256*1024 any (or 0 if no MMAP support)
malloc_footprint
size_t malloc_footprint()
Defined at malloc.c#5354
malloc_footprint(); Returns the number of bytes obtained from the system. The total number of bytes allocated by malloc, realloc etc., is less than this value. Unlike mallinfo, this function returns only a precomputed result, so can be called frequently to monitor memory consumption. Even if locks are otherwise defined, this function does not use them, so results might not be up to date.
malloc_max_footprint
size_t malloc_max_footprint()
Defined at malloc.c#5358
malloc_max_footprint(); Returns the maximum number of bytes obtained from the system. This value will be greater than current footprint if deallocated space has been reclaimed by the system. The peak number of bytes allocated by malloc, realloc etc., is less than this value. Unlike mallinfo, this function returns only a precomputed result, so can be called frequently to monitor memory consumption. Even if locks are otherwise defined, this function does not use them, so results might not be up to date.
malloc_footprint_limit
size_t malloc_footprint_limit()
Defined at malloc.c#5362
malloc_footprint_limit(); Returns the number of bytes that the heap is allowed to obtain from the system, returning the last value returned by malloc_set_footprint_limit, or the maximum size_t value if never set. The returned value reflects a permission. There is no guarantee that this number of bytes can actually be obtained from the system.
malloc_set_footprint_limit
size_t malloc_set_footprint_limit(size_t bytes)
Defined at malloc.c#5367
malloc_set_footprint_limit(); Sets the maximum number of bytes to obtain from the system, causing failure returns from malloc and related functions upon attempts to exceed this value. The argument value may be subject to page rounding to an enforceable limit; this actual value is returned. Using an argument of the maximum possible size_t effectively disables checks. If the argument is less than or equal to the current malloc_footprint, then all future allocations that require additional system memory will fail. However, invocation cannot retroactively deallocate existing used memory.
mallinfo
struct mallinfo mallinfo()
Defined at malloc.c#5379
mallinfo() Returns (by copy) a struct containing various summary statistics:
arena: current total non-mmapped bytes allocated from system ordblks: the number of free chunks smblks: always zero. hblks: current number of mmapped regions hblkhd: total bytes held in mmapped regions usmblks: the maximum total allocated space. This will be greater than current total if trimming has occurred. fsmblks: always zero uordblks: current total allocated space (normal or mmapped) fordblks: total free space keepcost: the maximum number of bytes that could ideally be released back to system via malloc_trim. ("ideally" means that it ignores page restrictions etc.)
Because these fields are ints, but internal bookkeeping may be kept as longs, the reported values may wrap around zero and thus be inaccurate.
independent_calloc
void ** independent_calloc(size_t , size_t , void ** )
Defined at malloc.c#5315
independent_calloc(size_t n_elements, size_t element_size, void* chunks[]);
independent_calloc is similar to calloc, but instead of returning a single cleared space, it returns an array of pointers to n_elements independent elements that can hold contents of size elem_size, each of which starts out cleared, and can be independently freed, realloc'ed etc. The elements are guaranteed to be adjacently allocated (this is not guaranteed to occur with multiple callocs or mallocs), which may also improve cache locality in some applications.
The "chunks" argument is optional (i.e., may be null, which is probably the most typical usage). If it is null, the returned array is itself dynamically allocated and should also be freed when it is no longer needed. Otherwise, the chunks array must be of at least n_elements in length. It is filled in with the pointers to the chunks.
In either case, independent_calloc returns this pointer array, or null if the allocation failed. If n_elements is zero and "chunks" is null, it returns a chunk representing an array with zero elements (which should be freed if not wanted).
Each element must be freed when it is no longer needed. This can be done all at once using bulk_free.
independent_calloc simplifies and speeds up implementations of many kinds of pools. It may also be useful when constructing large data structures that initially have a fixed number of fixed-sized nodes, but the number is not known at compile time, and some of the nodes may later need to be freed. For example:
struct Node { int item; struct Node* next; };
struct Node build_list() { struct Node pool; int n = read_number_of_nodes_needed(); if (n <= 0) return 0; pool = (struct Node)(independent_calloc(n, sizeof(struct Node), 0); if (pool == 0) die(); // organize into a linked list... struct Node first = pool[0]; for (i = 0; i < n-1; ++i) pool[i]->next = pool[i+1]; free(pool); // Can now free the array (or not, if it is needed later) return first; }
independent_comalloc
void ** independent_comalloc(size_t , size_t * , void ** )
Defined at malloc.c#5321
independent_comalloc(size_t n_elements, size_t sizes[], void* chunks[]);
independent_comalloc allocates, all at once, a set of n_elements chunks with sizes indicated in the "sizes" array. It returns an array of pointers to these elements, each of which can be independently freed, realloc'ed etc. The elements are guaranteed to be adjacently allocated (this is not guaranteed to occur with multiple callocs or mallocs), which may also improve cache locality in some applications.
The "chunks" argument is optional (i.e., may be null). If it is null the returned array is itself dynamically allocated and should also be freed when it is no longer needed. Otherwise, the chunks array must be of at least n_elements in length. It is filled in with the pointers to the chunks.
In either case, independent_comalloc returns this pointer array, or null if the allocation failed. If n_elements is zero and chunks is null, it returns a chunk representing an array with zero elements (which should be freed if not wanted).
Each element must be freed when it is no longer needed. This can be done all at once using bulk_free.
independent_comallac differs from independent_calloc in that each element may have a different size, and also that it does not automatically clear elements.
independent_comalloc can be used to speed up allocation in cases where several structs or objects must always be allocated at the same time. For example:
struct Head { ... } struct Foot { ... }
void send_message(char msg) { int msglen = strlen(msg); size_t sizes[3] = { sizeof(struct Head), msglen, sizeof(struct Foot) }; void chunks[3]; if (independent_comalloc(3, sizes, chunks) == 0) die(); struct Head head = (struct Head)(chunks[0]); char body = (char)(chunks[1]); struct Foot foot = (struct Foot)(chunks[2]); // ... }
In general though, independent_comalloc is worth using only for larger values of n_elements. For small values, you probably won't detect enough difference from series of malloc calls to bother.
Overuse of independent_comalloc can increase overall memory usage, since it cannot reuse existing noncontiguous small chunks that might be available for some of the elements.
bulk_free
size_t bulk_free(void ** , size_t n_elements)
Defined at malloc.c#5326
bulk_free(void* array[], size_t n_elements) Frees and clears (sets to null) each non-null pointer in the given array. This is likely to be faster than freeing them one-by-one. If footers are used, pointers that have been allocated in different mspaces are not freed or cleared, and the count of all such pointers is returned. For large arrays of pointers with poor locality, it may be worthwhile to sort this array before calling bulk_free.
pvalloc
void * pvalloc(size_t )
Defined at malloc.c#5308
pvalloc(size_t n); Equivalent to valloc(minimum-page-that-holds(n)), that is, round up n to nearest pagesize.
malloc_trim
int malloc_trim(size_t )
Defined at malloc.c#5344
malloc_trim(size_t pad);
If possible, gives memory back to the system (via negative arguments to sbrk) if there is unused memory at the `high' end of the malloc pool or in unused MMAP segments. You can call this after freeing large blocks of memory to potentially reduce the system-level memory requirements of a program. However, it cannot guarantee to reduce memory. Under some allocation patterns, some large free blocks of memory will be locked between two used chunks, so they cannot be given back to the system.
The `pad' argument to malloc_trim represents the amount of free trailing space to leave untrimmed. If this argument is zero, only the minimum amount of memory to maintain internal data structures will be left. Non-zero arguments can be supplied to maintain enough trailing space to service future expected allocations without having to re-obtain memory from the system.
Malloc_trim returns 1 if it actually released any memory, else 0.
malloc_usable_size
size_t malloc_usable_size(void * )
Defined at malloc.c#5394
malloc_usable_size(void* p);
Returns the number of bytes you can actually use in an allocated chunk, which may be more than you requested (although often not) due to alignment and minimum size constraints. You can use this many bytes without worrying about overwriting other allocated objects. This is not a particularly great programming practice. malloc_usable_size can be more useful in debugging and assertions, for example:
p = malloc(n); assert(malloc_usable_size(p) >= 256);
Enums
| enum |
--
| FAT_ERR_NONE | | FAT_ERR_NOFAT | | FAT_ERR_BROKEN | | FAT_ERR_IO | | FAT_ERR_PARAM | | FAT_ERR_PATH | | FAT_ERR_EOF | | FAT_ERR_DENIED | | FAT_ERR_FULL |
Defined at fat.h#14
| enum |
--
| FAT_ATTR_NONE | | FAT_ATTR_RO | | FAT_ATTR_HIDDEN | | FAT_ATTR_SYS | | FAT_ATTR_LABEL | | FAT_ATTR_DIR | | FAT_ATTR_ARCHIVE | | FAT_ATTR_LFN |
Defined at fat.h#26
| enum |
--
| FAT_BUF_DIRTY | | FAT_INFO_DIRTY |
Defined at fat.c#33
| enum |
--
| FAT_WRITE | | FAT_READ | | FAT_APPEND | | FAT_TRUNC | | FAT_CREATE | | FAT_ACCESSED | | FAT_MODIFIED | | FAT_FILE_DIRTY |
Defined at fat.h#37
| enum |
--
| CLUST_FREE | | CLUST_USED | | CLUST_LAST | | CLUST_BAD |
Defined at fat.c#38
| enum |
--
| FAT_SEEK_START | | FAT_SEEK_CURR | | FAT_SEEK_END |
Defined at fat.h#49