UbixOS  2.0
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()

◆ memset()

◆ 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 
)

◆ 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   
)

◆ 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.