LF OS
Hobby operating system for amd64 with high ambitions
|
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "variables.h"
Go to the source code of this file.
Functions | |
void | shell_variable_add (shell_variable *var) |
static int | shell_variable_find (char *name) |
char * | shell_variable_get (char *name) |
int | assign_variable (char *user_input) |
Variables | |
shell_variable ** | shell_variable_array = 0 |
int | svar_arr_offset = 0 |
int assign_variable | ( | char * | user_input | ) |
Definition at line 70 of file variables.c.
References free(), malloc(), memcpy(), memset(), name, shell_variable::name, SHELL_MAX_VARIABLE_ITEM_LENGTH, SHELL_MAX_VARIABLE_NAME_LENGTH, shell_variable_add(), shell_variable_array, shell_variable_find(), strlen(), and shell_variable::value.
void shell_variable_add | ( | shell_variable * | var | ) |
Definition at line 19 of file variables.c.
References malloc(), realloc(), shell_variable_array, size, and svar_arr_offset.
|
static |
Definition at line 38 of file variables.c.
References name, shell_variable_array, strcmp(), and svar_arr_offset.
char * shell_variable_get | ( | char * | name | ) |
Definition at line 54 of file variables.c.
References malloc(), memset(), name, shell_variable_array, and shell_variable_find().
shell_variable** shell_variable_array = 0 |
Definition at line 14 of file variables.c.
int svar_arr_offset = 0 |
Definition at line 15 of file variables.c.