aboutsummaryrefslogtreecommitdiffhomepage
path: root/expand.h
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-05-22 08:16:04 +1000
committerGravatar axel <axel@liljencrantz.se>2006-05-22 08:16:04 +1000
commitb746a803a947c1d130aa1f76125ee7d91dced9d5 (patch)
tree52cd2ae4212c4103b73f3c4d7e9b7e1e0402b717 /expand.h
parent07e14ed7a85a200c4f8df3d0a47a933e8ff2fe68 (diff)
Add validator check to make sure the second argument to 'for' is 'in'
darcs-hash:20060521221604-ac50b-5bc4ce217a08304f68b97b20e908ea1279fe26e9.gz
Diffstat (limited to 'expand.h')
-rw-r--r--expand.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/expand.h b/expand.h
index b1df1c23..b6ebfc65 100644
--- a/expand.h
+++ b/expand.h
@@ -188,4 +188,15 @@ wchar_t *expand_tilde(wchar_t *in);
*/
void expand_variable_array( const wchar_t *val, array_list_t *out );
+/**
+ Test if the specified argument is clean, i.e. it does not contain
+ any tokens which need to be expanded or otherwise altered. Clean
+ strings can be passed through expand_string and expand_one without
+ changing them. About two thirds of all strings are clean, so
+ skipping expansion on them actually does save a small amount of
+ time, since it avoids multiple memory allocations during the
+ expansion process.
+*/
+int expand_is_clean( const wchar_t *in );
+
#endif