void env_universal_common_destroy() { env_var_table_t::iterator iter; for (iter = env_universal_var.begin(); iter != env_universal_var.end(); ++iter) { var_uni_entry_t* value = iter->second; delete value; } }
void enqueue_all(connection_t *c) { env_var_table_t::const_iterator iter; for (iter = env_universal_var.begin(); iter != env_universal_var.end(); ++iter) { const wcstring &key = iter->first; const var_uni_entry_t *val = iter->second; message_t *msg = create_message(val->exportv?SET_EXPORT:SET, key.c_str(), val->val.c_str()); msg->count=1; c->unsent->push(msg); } try_send_all(c); }
/** Put exported or unexported variables in a string list */ void env_universal_common_get_names(wcstring_list_t &lst, int show_exported, int show_unexported) { env_var_table_t::const_iterator iter; for (iter = env_universal_var.begin(); iter != env_universal_var.end(); ++iter) { const wcstring& key = iter->first; const var_uni_entry_t *e = iter->second; if ((e->exportv && show_exported) || (!e->exportv && show_unexported)) { lst.push_back(key); } } }