diff options
author | fluxgen <fluxgen> | 2004-07-15 13:42:50 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2004-07-15 13:42:50 (GMT) |
commit | 4e243d159987c50d45e03d435cd85e8af01fc4a9 (patch) | |
tree | c8e1b73842fae40bf417c395be02ac3066df3537 | |
parent | b672bc50bb2a4d5e905e986b82a846eda42850f5 (diff) | |
download | fluxbox-4e243d159987c50d45e03d435cd85e8af01fc4a9.zip fluxbox-4e243d159987c50d45e03d435cd85e8af01fc4a9.tar.bz2 |
fixed Resource long long, time_t is long long some systems
-rw-r--r-- | src/fluxbox.cc | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 1adc314..377c78a 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: fluxbox.cc,v 1.246 2004/07/14 23:38:53 fluxgen Exp $ | 25 | // $Id: fluxbox.cc,v 1.247 2004/07/15 13:42:50 fluxgen Exp $ |
26 | 26 | ||
27 | #include "fluxbox.hh" | 27 | #include "fluxbox.hh" |
28 | 28 | ||
@@ -208,6 +208,14 @@ setFromString(const char *strval) { | |||
208 | setDefaultValue(); | 208 | setDefaultValue(); |
209 | } | 209 | } |
210 | 210 | ||
211 | template<> | ||
212 | void FbTk::Resource<long long>:: | ||
213 | setFromString(const char *strval) { | ||
214 | if (sscanf(strval, "%ul", &m_value) != 1) | ||
215 | setDefaultValue(); | ||
216 | } | ||
217 | |||
218 | |||
211 | //----------------------------------------------------------------- | 219 | //----------------------------------------------------------------- |
212 | //---- manipulators for int, bool, and some enums with Resource --- | 220 | //---- manipulators for int, bool, and some enums with Resource --- |
213 | //----------------------------------------------------------------- | 221 | //----------------------------------------------------------------- |
@@ -282,6 +290,14 @@ getString() { | |||
282 | } | 290 | } |
283 | 291 | ||
284 | template<> | 292 | template<> |
293 | string FbTk::Resource<long long>:: | ||
294 | getString() { | ||
295 | char tmpstr[128]; | ||
296 | sprintf(tmpstr, "%ul", m_value); | ||
297 | return string(tmpstr); | ||
298 | } | ||
299 | |||
300 | template<> | ||
285 | void FbTk::Resource<Fluxbox::Layer>:: | 301 | void FbTk::Resource<Fluxbox::Layer>:: |
286 | setFromString(const char *strval) { | 302 | setFromString(const char *strval) { |
287 | int tempnum = 0; | 303 | int tempnum = 0; |