16 |
|
#include <map> |
17 |
|
#include <cstdlib> |
18 |
|
#include <cstdio> |
19 |
+ |
#include <cctype> |
20 |
|
|
21 |
|
#include <pstream.h> |
22 |
|
#include <sys/utsname.h> |
32 |
|
struct Config |
33 |
|
{ |
34 |
|
string install; |
35 |
+ |
string findsmb; |
36 |
|
string smbclient; |
37 |
|
string mount; |
38 |
+ |
string umount; |
39 |
|
string root; |
40 |
|
multimap<string, string> hosts; |
41 |
|
}; |
50 |
|
string platform(); |
51 |
|
void usage(); |
52 |
|
void version(); |
53 |
< |
void configure(); |
53 |
> |
|
54 |
> |
inline string toupper(const string& lower) |
55 |
> |
{ |
56 |
> |
string upper; |
57 |
> |
|
58 |
> |
for (unsigned index = 0; index < lower.length(); index++) |
59 |
> |
{ |
60 |
> |
upper += toupper(lower[index]); |
61 |
> |
} |
62 |
> |
|
63 |
> |
return upper; |
64 |
> |
} |
65 |
> |
|
66 |
> |
inline string tolower(const string& upper) |
67 |
> |
{ |
68 |
> |
string lower; |
69 |
> |
|
70 |
> |
for (unsigned index = 0; index < upper.length(); index++) |
71 |
> |
{ |
72 |
> |
lower += tolower(upper[index]); |
73 |
> |
} |
74 |
> |
|
75 |
> |
return lower; |
76 |
> |
} |
77 |
> |
|
78 |
> |
inline void strip(char* name) |
79 |
> |
{ |
80 |
> |
for (unsigned index = strlen(name); index > 0; index--) |
81 |
> |
{ |
82 |
> |
if (name[index - 1] == ' ') |
83 |
> |
{ |
84 |
> |
name[index - 1] = '\0'; |
85 |
> |
} |
86 |
> |
else |
87 |
> |
{ |
88 |
> |
break; |
89 |
> |
} |
90 |
> |
} |
91 |
> |
} |
92 |
|
|
93 |
|
#endif // _Spectre_h_ |