diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-02-08 00:45:07 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-02-08 00:45:07 -0800 |
commit | 063fc0c48bd3c9c3bb2233f71c389281a66414a3 (patch) | |
tree | 8507b49dad7e7fbf60393360b9143a221767029d /expand.cpp | |
parent | 191eeab58906e49a8863c60ac0324f722bdfa17c (diff) |
Cleanup al_list from builtin_complete.cpp
Diffstat (limited to 'expand.cpp')
-rw-r--r-- | expand.cpp | 43 |
1 files changed, 0 insertions, 43 deletions
@@ -118,35 +118,6 @@ parameter expansion. */ #define UNCLEAN L"$*?\\\"'({})" -/* An adapter class for calling functions that expect a wchar_t * and array_list_t */ -class wcstring_adapter -{ -private: - std::vector<wcstring> *outputs; -public: - wchar_t *str; - array_list_t lst; - - wcstring_adapter(const wcstring &in, std::vector<wcstring> &outs) - { - outputs = &outs; - str = wcsdup(in.c_str()); - al_init(&lst); - } - - ~wcstring_adapter() - { - int i, max = al_get_count(&lst); - for (i=0; i < max; i++) { - wchar_t *tmp = (wchar_t *)al_get(&lst, i); - outputs->push_back(tmp); - free(tmp); - } - al_destroy(&lst); - //str is free'd by the function we called - } -}; - int expand_is_clean( const wchar_t *in ) { @@ -688,13 +659,6 @@ static int expand_pid( const wcstring &instr, return 1; } -/* -static int expand_pid2( const wcstring &in, int flags, std::vector<completion_t> &outputs ) -{ - wcstring_adapter adapter(in, outputs); - return expand_pid(adapter.str, flags, &adapter.lst); -} -*/ void expand_variable_error( parser_t &parser, const wchar_t *token, int token_pos, int error_pos ) { @@ -1194,13 +1158,6 @@ static int expand_brackets(parser_t &parser, const wchar_t *in, int flags, std:: return 1; } -/* -static int expand_brackets2( parser_t &parser, const wcstring &in, int flags, std::vector<wcstring> &outputs ) -{ - wcstring_adapter adapter(in, outputs); - return expand_brackets(parser, adapter.str, flags, &adapter.lst); -} -*/ /** Perform cmdsubst expansion */ |