diff options
Diffstat (limited to '')
-rw-r--r-- | src/functionplugger.cpp | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/src/functionplugger.cpp b/src/functionplugger.cpp index 1f2bcf5..3999021 100644 --- a/src/functionplugger.cpp +++ b/src/functionplugger.cpp | |||
@@ -25,46 +25,46 @@ extern Bu::PluginInfo pluginFunctionUnique; | |||
25 | 25 | ||
26 | FunctionPlugger::FunctionPlugger() | 26 | FunctionPlugger::FunctionPlugger() |
27 | { | 27 | { |
28 | registerBuiltinPlugin( &pluginFunctionDirName ); | 28 | registerBuiltinPlugin( &pluginFunctionDirName ); |
29 | registerBuiltinPlugin( &pluginFunctionDirs ); | 29 | registerBuiltinPlugin( &pluginFunctionDirs ); |
30 | registerBuiltinPlugin( &pluginFunctionExecute ); | 30 | registerBuiltinPlugin( &pluginFunctionExecute ); |
31 | registerBuiltinPlugin( &pluginFunctionExists ); | 31 | registerBuiltinPlugin( &pluginFunctionExists ); |
32 | registerBuiltinPlugin( &pluginFunctionFileName ); | 32 | registerBuiltinPlugin( &pluginFunctionFileName ); |
33 | registerBuiltinPlugin( &pluginFunctionFiles ); | 33 | registerBuiltinPlugin( &pluginFunctionFiles ); |
34 | registerBuiltinPlugin( &pluginFunctionGetMakeDeps ); | 34 | registerBuiltinPlugin( &pluginFunctionGetMakeDeps ); |
35 | registerBuiltinPlugin( &pluginFunctionMatches ); | 35 | registerBuiltinPlugin( &pluginFunctionMatches ); |
36 | registerBuiltinPlugin( &pluginFunctionReplace ); | 36 | registerBuiltinPlugin( &pluginFunctionReplace ); |
37 | registerBuiltinPlugin( &pluginFunctionTargets ); | 37 | registerBuiltinPlugin( &pluginFunctionTargets ); |
38 | registerBuiltinPlugin( &pluginFunctionToString ); | 38 | registerBuiltinPlugin( &pluginFunctionToString ); |
39 | registerBuiltinPlugin( &pluginFunctionUnlink ); | 39 | registerBuiltinPlugin( &pluginFunctionUnlink ); |
40 | registerBuiltinPlugin( &pluginFunctionRegEx ); | 40 | registerBuiltinPlugin( &pluginFunctionRegEx ); |
41 | registerBuiltinPlugin( &pluginFunctionRange ); | 41 | registerBuiltinPlugin( &pluginFunctionRange ); |
42 | registerBuiltinPlugin( &pluginFunctionOpen ); | 42 | registerBuiltinPlugin( &pluginFunctionOpen ); |
43 | registerBuiltinPlugin( &pluginFunctionClose ); | 43 | registerBuiltinPlugin( &pluginFunctionClose ); |
44 | registerBuiltinPlugin( &pluginFunctionRead ); | 44 | registerBuiltinPlugin( &pluginFunctionRead ); |
45 | registerBuiltinPlugin( &pluginFunctionWrite ); | 45 | registerBuiltinPlugin( &pluginFunctionWrite ); |
46 | registerBuiltinPlugin( &pluginFunctionUnique ); | 46 | registerBuiltinPlugin( &pluginFunctionUnique ); |
47 | 47 | ||
48 | DIR *dir = opendir("/usr/lib/build"); | 48 | DIR *dir = opendir("/usr/lib/build"); |
49 | if( !dir ) | 49 | if( !dir ) |
50 | return; | 50 | return; |
51 | struct dirent *de; | 51 | struct dirent *de; |
52 | while( (de = readdir( dir )) ) | 52 | while( (de = readdir( dir )) ) |
53 | { | 53 | { |
54 | if( strncmp("pluginFunction", de->d_name, 15 ) ) | 54 | if( strncmp("pluginFunction", de->d_name, 15 ) ) |
55 | continue; | 55 | continue; |
56 | 56 | ||
57 | Bu::String sFile("/usr/lib/build/"); | 57 | Bu::String sFile("/usr/lib/build/"); |
58 | sFile += de->d_name; | 58 | sFile += de->d_name; |
59 | char *s = de->d_name; | 59 | char *s = de->d_name; |
60 | for(; *s && *s != '.'; s++ ) { } | 60 | for(; *s && *s != '.'; s++ ) { } |
61 | registerExternalPlugin( | 61 | registerExternalPlugin( |
62 | sFile, | 62 | sFile, |
63 | Bu::String( de->d_name, (ptrdiff_t)s-(ptrdiff_t)de->d_name ) | 63 | Bu::String( de->d_name, (ptrdiff_t)s-(ptrdiff_t)de->d_name ) |
64 | ); | 64 | ); |
65 | } | 65 | } |
66 | 66 | ||
67 | closedir( dir ); | 67 | closedir( dir ); |
68 | } | 68 | } |
69 | 69 | ||
70 | FunctionPlugger::~FunctionPlugger() | 70 | FunctionPlugger::~FunctionPlugger() |