UbixOS V2 2.0

Macros | Functions | Variables
string.h File Reference
`#include <sys/types.h>`
`#include <strings.h>`
Include dependency graph for string.h:

Go to the source code of this file.

## Macros
#define | bcd2bin(bcd) (bcd2bin_data[bcd])
#define | bin2bcd(bin) (bin2bcd_data[bin])
#define | hex2ascii(hex) (hex2ascii_data[hex])
#define | tolower(c) ((c) + 0x20 * (((c) >= 'A') && ((c) <= 'Z')))
#define | toupper(c) ((c) - 0x20 * (((c) >= 'a') && ((c) <= 'z')))

## Functions
int | memcmp (const void *dst, const void *src, size_t length)
void * | memcpy (const void *dst, const void *src, size_t length)
void * | memset (void *dst, int c, size_t length)
int | sprintf (char *buf, const char *fmt,...)
int | strcmp (const char *str1, const char *str2)
char * | strcpy (char *, const char *)
int | strlen (const char *string)
int | strncmp (const char *a, const char *b, size_t c)
char * | strncpy (char *__restrict, const char *__restrict, size_t)
char * | strstr (const char *s, char *find)
char * | strtok (char *str, const char *sep)
char * | strtok_r (char *str, const char *sep, char **last)

## Variables
const u_char | bcd2bin_data []
const u_char | bin2bcd_data []
const char | hex2ascii_data []

## Macro Definition Documentation

## ◆ bcd2bin

#define bcd2bin | ( |  | bcd | ) | (bcd2bin_data[bcd])

Definition at line 51 of file string.h.

## ◆ bin2bcd

#define bin2bcd | ( |  | bin | ) | (bin2bcd_data[bin])

Definition at line 52 of file string.h.

## ◆ hex2ascii

#define hex2ascii | ( |  | hex | ) | (hex2ascii_data[hex])

Definition at line 53 of file string.h.

## ◆ tolower

#define tolower | ( |  | c | ) | ((c) + 0x20 * (((c) >= 'A') && ((c) <= 'Z')))

Definition at line 56 of file string.h.

## ◆ toupper

#define toupper | ( |  | c | ) | ((c) - 0x20 * (((c) >= 'a') && ((c) <= 'z')))

Definition at line 55 of file string.h.

## Function Documentation

## ◆ memcmp()

int memcmp | ( | const void * | dst,
|  | const void * | src,
|  | size_t | length
| ) |  |

## ◆ memcpy()

void* memcpy | ( | const void * | dst,
|  | const void * | src,
|  | size_t | length
| ) |  |

Referenced by addDirEntry(), apicMagic(), dup2(), fatfs_get_file_entry(), fatfs_mark_file_deleted(), fatfs_split_path(), fatfs_update_file_length(), fcntl(), fork_copyProcess(), lnc_sendPacket(), schedNewTask(), sys_call_posix(), sys_fork(), sys_getlogin(), sys_read(), sys_setlogin(), sys_sigaction(), sys_sigprocmask(), sys_write(), and tty_change().

## ◆ memset()

void* memset | ( | void * | dst,
|  | int | c,
|  | size_t | length
| ) |  |

Referenced by elf_load_file(), execFile(), fatfs_fat_init(), fatfs_filename_to_lfn(), fatfs_get_file_entry(), fatfs_lfn_cache_init(), fatfs_lfn_create_sfn(), fatfs_lfn_generate_tail(), fatfs_list_directory_next(), fopen(), initLNC(), kmod_load(), ldEnable(), lnc_rxINT(), lnc_thread(), lncAttach(), mem_calloc(), netif_add(), pciProbe(), schedNewTask(), spinLockInit(), sys_pipe2(), sys_thread_new(), sysExec(), ubthread_cond_init(), ubthread_mutex_init(), and vitals_init().

## ◆ sprintf()

int sprintf | ( | char * | buf,
|  | const char * | fmt,
|  |  | ...
| ) |  |

Definition at line 278 of file kprintf.c.

References kvprintf(), NULL, va_end, and va_start.

Here is the call graph for this function:

## ◆ strcmp()

int strcmp | ( | const char * | str1,
|  | const char * | str2
| ) |  |

Referenced by kmod_load(), ldEnable(), systemTask(), vfs_findMount(), writeFileByte(), and writeUbixFS().

## ◆ strcpy()

char* strcpy | ( | char * | ,
|  | const char * |
| ) |  |

Referenced by fopen(), sysExec(), and ubixfs_cacheNew().

## ◆ strlen()

int strlen | ( | const char * | string | ) |

Definition at line 55 of file strlen.c.

References LONGPTR_MASK, and testbyte.

## ◆ strncmp()

int strncmp | ( | const char * | a,
|  | const char * | b,
|  | size_t | c
| ) |  |

## ◆ strncpy()

char* strncpy | ( | char * | __restrict,
|  | const char * | __restrict,
|  | size_t |
| ) |  |

Referenced by fatfs_list_directory_next().

## ◆ strstr()

char* strstr | ( | const char * | s,
|  | char * | find
| ) |  |

Referenced by fopen(), sys_chdir(), sys_fchdir(), and sysMkDir().

## ◆ strtok()

char* strtok | ( | char * | str,
|  | const char * | sep
| ) |  |

Definition at line 76 of file strtok.c.

References strtok_r().

Referenced by fopen(), and sysMkDir().

Here is the call graph for this function:

## ◆ strtok_r()

char* strtok_r | ( | char * | str,
|  | const char * | sep,
|  | char ** | last
| ) |  |

Definition at line 32 of file strtok.c.

References NULL.

Referenced by strtok().

## Variable Documentation

## ◆ bcd2bin_data

const u_char bcd2bin_data[]

Definition at line 31 of file string.c.

## ◆ bin2bcd_data

const u_char bin2bcd_data[]

Definition at line 33 of file string.c.

## ◆ hex2ascii_data

const char hex2ascii_data[]

Definition at line 36 of file string.c.