30 char *res = (
char *)
Kmalloc(300, 8);
37 Kprintf(
"Enter regex expression: ");
44 struct slre_cap caps[1];
46 int matched = slre_match(regexp, res,
Kstrlen(res), caps, 1, 0);
53 int len = caps[0].len;
55 for (
int i = 0; i < len; i++) {
void * Kmalloc(size_t size, size_t align)
Allocate memory.
void Kfree(void *ptr)
Free allocated memory.
void Kgetstr(char *str, int length)
Reads a line of input from the keyboard (blocking).
void Kprintf(const char *fmt,...)
Formatted output to the screen.
void KprintHex(u32 num)
Prints a 32-bit unsigned integer in hexadecimal format prefixed with "0x".
void Kputchar(char c)
Outputs a single character to the screen at the current cursor position.
void Regexc()
Interactive regex command.
size_t Kstrlen(const char *str)
Get string length.