From 4f1e5849d4a48eb674d81164ba4baba4ad51a89f Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 3 Jun 2011 05:51:21 +0000 Subject: Added a range function. It works a lot like the range function in python, if called with one parameter, it will produce a list of the numbers 1 through the number provided inclusive, if two numbers, it will produce a list of all numbers between the first and second parameter, inclusive, and if three parameters are provided it will use the last one as a step. --- src/functionplugger.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/functionplugger.cpp') diff --git a/src/functionplugger.cpp b/src/functionplugger.cpp index 035e5b9..c7b270c 100644 --- a/src/functionplugger.cpp +++ b/src/functionplugger.cpp @@ -16,6 +16,7 @@ extern Bu::PluginInfo pluginFunctionTargets; extern Bu::PluginInfo pluginFunctionToString; extern Bu::PluginInfo pluginFunctionUnlink; extern Bu::PluginInfo pluginFunctionRegEx; +extern Bu::PluginInfo pluginFunctionRange; FunctionPlugger::FunctionPlugger() { @@ -32,6 +33,7 @@ FunctionPlugger::FunctionPlugger() registerBuiltinPlugin( &pluginFunctionToString ); registerBuiltinPlugin( &pluginFunctionUnlink ); registerBuiltinPlugin( &pluginFunctionRegEx ); + registerBuiltinPlugin( &pluginFunctionRange ); DIR *dir = opendir("/usr/lib/build"); if( !dir ) -- cgit v1.2.3