tape-kernel 1.0
a modular modern independent kernel
Loading...
Searching...
No Matches
utils.h
Go to the documentation of this file.
1#ifndef UTILS_H
2#define UTILS_H
3
4#include "types.h"
5#define MAX_ARGS 12 //set max args
6
7int abs(int x);
8int strlen(const char* s);
9int strcmp(const char* a, const char* b);
10void strcpy(char* dest, const char* src);
11void strcat(char* dest, const char* src);
12
13void itoa(int num, char *str);
14int atoi(const char *str);
15
16void srand(uint32_t seed);
17uint32_t rand(void);
18
19int pargs(char *line, char *args[]);
20
21#endif
unsigned int uint32_t
Definition types.h:30
int strcmp(const char *a, const char *b)
Definition utils.c:15
int abs(int x)
Definition utils.c:5
void strcpy(char *dest, const char *src)
Definition utils.c:21
void itoa(int num, char *str)
itoa converts an integer to a decimal string
Definition utils.c:49
int strlen(const char *s)
Definition utils.c:9
int pargs(char *line, char *args[])
pargs parses a command line into an argument array
Definition utils.c:189
void strcat(char *dest, const char *src)
Definition utils.c:26
uint32_t rand(void)
rand returns a pseudo-random 32 bit integer
Definition utils.c:162
int atoi(const char *str)
atoi converts a decimal string to an integer
Definition utils.c:118
void srand(uint32_t seed)
srand seeds the random number generator
Definition utils.c:144