/** Silly function */ static void builtin_complete_remove2(const wchar_t *cmd, int cmd_type, const wchar_t *short_opt, const wcstring_list_t &gnu_opt, const wcstring_list_t &old_opt) { const wchar_t *s = (wchar_t *)short_opt; if (*s) { for (; *s; s++) { if (old_opt.empty() && gnu_opt.empty()) { complete_remove(cmd, cmd_type, *s, 0, 0); } else { builtin_complete_remove3(cmd, cmd_type, *s, gnu_opt, 0); builtin_complete_remove3(cmd, cmd_type, *s, old_opt, 1); } } } else if (gnu_opt.empty() && old_opt.empty()) { complete_remove(cmd, cmd_type, 0, 0, 0); } else { builtin_complete_remove3(cmd, cmd_type, 0, gnu_opt, 0); builtin_complete_remove3(cmd, cmd_type, 0, old_opt, 1); } }
/** Silly function */ static void builtin_complete_remove2( wchar_t *cmd, int cmd_type, const wchar_t *short_opt, array_list_t *gnu_opt, array_list_t *old_opt ) { const wchar_t *s = (wchar_t *)short_opt; if( *s ) { for( ; *s; s++ ) { if( al_get_count( old_opt) + al_get_count( gnu_opt ) == 0 ) { complete_remove(cmd, cmd_type, *s, 0 ); } else { builtin_complete_remove3( cmd, cmd_type, *s, gnu_opt ); builtin_complete_remove3( cmd, cmd_type, *s, old_opt ); } } } else { builtin_complete_remove3( cmd, cmd_type, 0, gnu_opt ); builtin_complete_remove3( cmd, cmd_type, 0, old_opt ); } }