/* * include/variables.h * * Local variable storage and access * CISC 301 -- Operating Systems, Project 2 * * Copyright (C) 2025 Douglas B. Rumbaugh * * Distributed under the Modified BSD License * */ #ifndef H_HUSH_VARIABLES #define H_HUSH_VARIABLES #include #include #include #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