fixed Resource long long, time_t is long long some systems
fluxgen fluxgen
1 files changed,
17 insertions(+),
1 deletions(-)
jump to
M
src/fluxbox.cc
→
src/fluxbox.cc
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: fluxbox.cc,v 1.246 2004/07/14 23:38:53 fluxgen Exp $ +// $Id: fluxbox.cc,v 1.247 2004/07/15 13:42:50 fluxgen Exp $ #include "fluxbox.hh"@@ -208,6 +208,14 @@ if (sscanf(strval, "%ul", &m_value) != 1)
setDefaultValue(); } +template<> +void FbTk::Resource<long long>:: +setFromString(const char *strval) { + if (sscanf(strval, "%ul", &m_value) != 1) + setDefaultValue(); +} + + //----------------------------------------------------------------- //---- manipulators for int, bool, and some enums with Resource --- //-----------------------------------------------------------------@@ -275,6 +283,14 @@ }
template<> string FbTk::Resource<unsigned int>:: +getString() { + char tmpstr[128]; + sprintf(tmpstr, "%ul", m_value); + return string(tmpstr); +} + +template<> +string FbTk::Resource<long long>:: getString() { char tmpstr[128]; sprintf(tmpstr, "%ul", m_value);