linuxinstall/src/sandbox.c

29 lines
554 B
C
Raw Normal View History

#include "sandbox.h"
#include "utils.h"
2024-02-15 19:42:22 +01:00
#include <stdarg.h>
#include <stdio.h>
2024-02-15 19:42:22 +01:00
#include <stdlib.h>
int main(int argc, char* argv[]) {
2024-02-15 19:42:22 +01:00
return 0;
2024-02-16 16:53:02 +01:00
}
Command* find_command(const char* name) {
Command* match = NULL;
// Find all matching commands (starting with the given name)
size_t length = strlen(name);
for (size_t i = 0; i < sizeof(COMMANDS) / sizeof(COMMANDS[0]); i++)
if (strncmp(name, COMMANDS[i].name, length) == 0) {
// Check for multiple matches
if (match != NULL)
return NULL;
match = &COMMANDS[i];
}
return match;
}