1#define __STDC_WANT_LIB_EXT1__ 1
16 printf(
"\033[999C\033[6n");
69 if (
count == capacity)
216 for (;
i < argc;
i++)
218 if (argv[
i][0] !=
'-')
223 for (
int j = 1; argv[
i][
j] !=
'\0';
j++)
225 if (argv[
i][
j] ==
'a')
229 else if (argv[
i][
j] ==
'f')
250 for (;
i < argc;
i++)
#define MAX_NAME
Maximum length of names.
#define errno
Error number variable.
size_t getdents(fd_t fd, dirent_t *buffer, uint64_t count)
System call for reading directory entires.
fd_t open(const char *path)
System call for opening files.
uint64_t close(fd_t fd)
System call for closing files.
size_t read(fd_t fd, void *buffer, size_t count)
System call for reading from files.
#define STDIN_FILENO
Standard input file descriptor.
@ DIRENT_MOUNTED
The directory entry is a mountpoint.
@ INODE_DIR
Is a directory.
@ INODE_SYMLINK
Is a symbolic link.
#define NULL
Pointer error value.
#define ERR
Integer error value.
__UINT64_TYPE__ fd_t
A file descriptor.
EFI_PHYSICAL_ADDRESS buffer
static uint64_t terminal_columns_get(void)
static int dirent_cmp(const void *a, const void *b)
static uint64_t print_dir(const char *path)
_PUBLIC int sscanf(const char *_RESTRICT s, const char *_RESTRICT format,...)
_PUBLIC int putchar(int c)
_PUBLIC int fflush(FILE *stream)
_PUBLIC int printf(const char *_RESTRICT format,...)
_PUBLIC int fprintf(FILE *_RESTRICT stream, const char *_RESTRICT format,...)
_PUBLIC void * realloc(void *ptr, size_t size)
_PUBLIC void qsort(void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *))
_PUBLIC void * malloc(size_t size)
_PUBLIC void free(void *ptr)
_PUBLIC char * strerror(int errnum)
_PUBLIC char * strstr(const char *s1, const char *s2)
_PUBLIC size_t strlen(const char *s)
_PUBLIC int strcmp(const char *s1, const char *s2)