aboutsummaryrefslogtreecommitdiffstats
path: root/include/variables.h
blob: 75116901f4282ac8497876f7994eaa642c6673ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 *
 */
#ifndef H_HUSH_VARIABLES
#define H_HUSH_VARIABLES

#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>

#include "strmap.h"
#include "hashfuncs.h"

static inline bool is_variable(const char *token) {
  return (token) ? token[0] == '$' : false;
}

bool init_variable_store(void);

bool add_variable(const char *key, const char *val);

const char *get_variable(const char *key);

bool promote_variable_to_env(const char *key);

void destroy_variable_store();


#endif