lxsh/include/minimize.hpp
zawz c971b4e424 Major rework
~ Altered internal structure
~ Changed processing method to recursive function
~ Changed %include/%resolve
+ Output mode now reads multiple arguments
+ Toggleable include/resolve
+ Added variable and function processing (list/minimize)
- Remove some options for %include/%resolve
~ Many minor behaviour changes
2020-11-06 16:35:36 +01:00

26 lines
651 B
C++

#ifndef MINIMIZE_HPP
#define MINIMIZE_HPP
#include "struc.hpp"
#include <regex>
#include <string>
extern std::regex re_var_exclude;
extern std::regex re_fct_exclude;
#define RESERVED_VARIABLES "HOME", "PATH", "SHELL", "PWD"
std::regex var_exclude_regex(std::string const& in);
std::regex fct_exclude_regex(std::string const& in);
void list_vars(_obj* in, std::regex exclude);
void list_fcts(_obj* in, std::regex exclude);
void list_cmds(_obj* in, std::regex exclude);
void minimize_var(_obj* in, std::regex exclude);
void minimize_fct(_obj* in, std::regex exclude);
void delete_unused_fct(_obj* in, std::regex exclude);
#endif //MINIMIZE_HPP