aboutsummaryrefslogtreecommitdiffhomepage
path: root/env_universal.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2011-12-27 18:41:38 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2011-12-27 18:41:38 -0800
commit46fa2dd2f0d104471bbb00b8e119decd91cda71d (patch)
tree77b0fe4f1a4010a576ffea441f12cc0aa40f2c4d /env_universal.cpp
parent451399b3445f2a8f929bfe8893df9b3e931ac2b1 (diff)
Migration of screen away from ad-hoc lists
Diffstat (limited to 'env_universal.cpp')
-rw-r--r--env_universal.cpp30
1 files changed, 19 insertions, 11 deletions
diff --git a/env_universal.cpp b/env_universal.cpp
index d1726aa5..c6fee60e 100644
--- a/env_universal.cpp
+++ b/env_universal.cpp
@@ -208,22 +208,17 @@ static void check_connection()
*/
static void env_universal_remove_all()
{
- array_list_t lst;
- int i;
+ size_t i;
- al_init( &lst );
-
- env_universal_common_get_names( &lst,
+ wcstring_list_t lst;
+ env_universal_common_get_names2( lst,
1,
1 );
-
- for( i=0; i<al_get_count( &lst ); i++ )
+ for( i=0; i<lst.size(); i++ )
{
- wchar_t *key = (wchar_t *)al_get( &lst, i );
- env_universal_common_remove( key );
+ const wcstring &key = lst.at(i);
+ env_universal_common_remove( key.c_str() );
}
-
- al_destroy( &lst );
}
@@ -481,3 +476,16 @@ void env_universal_get_names( array_list_t *l,
show_exported,
show_unexported );
}
+
+
+void env_universal_get_names2( wcstring_list_t &lst,
+ int show_exported,
+ int show_unexported )
+{
+ if( !init )
+ return;
+
+ env_universal_common_get_names2( lst,
+ show_exported,
+ show_unexported );
+}