more x86_64 work. started to put the mmu bits together in the (former) stage2 loader.
[newos.git] / apps / shell / shell_vars.h
blob10f4479332022e82e876ef3992e794bec716bf69
1 #ifndef _shell_var_h_
2 #define _shell_vars_h_
4 //#include <types.h>
6 struct _shell_value{
7 bool isnumber;
8 union{
9 char *val_text;
10 long int val_number;
11 } value;
14 typedef struct _shell_value shell_value;
16 char *shell_strdup(const char *some_str);
17 shell_value *get_value_by_name(const char *name);
19 int shell_var_set_number(const char *var_name,long int number);
20 int shell_var_set_text(const char *var_name,const char *text);
22 int set_shell_var_with_value(const char *var_name,shell_value *value);
24 void init_vars(void);
27 void shell_value_free(shell_value *value);
28 int shell_value_do_operation(shell_value *out,const shell_value *other,int oper_type);
29 int shell_value_neg(shell_value *out);
30 char *shell_value_to_char(shell_value *value);
31 shell_value *shell_value_init_number(long int value);
32 shell_value *shell_value_init_text(const char *value);
33 int shell_value_to_number(shell_value *value,long int *number);
34 int shell_value_set_text(shell_value *value,const char *new_value);
35 int shell_value_set_number(shell_value *value,long int new_value);
36 int shell_value_get_number(shell_value *value,long int *number);
37 int shell_value_get_text(shell_value * value,char **text);
38 shell_value *shell_value_clone(shell_value *var);
41 bool string_to_long_int(const char *str,long int *out);
44 #endif