diff options
author | lordjaxom <lordjaxom> | 2004-12-08 18:48:39 +0000 |
---|---|---|
committer | lordjaxom <lordjaxom> | 2004-12-08 18:48:39 +0000 |
commit | 5382d18d05d358bb1c313c642395e835aa44a6a0 (patch) | |
tree | 2b5ef58620b3640c5b21e8eafe92ee4b266b1d30 /xml/type.c | |
parent | eb2f2c9600e8f69788232582191b141002bcd522 (diff) | |
download | vdr-plugin-text2skin-5382d18d05d358bb1c313c642395e835aa44a6a0.tar.gz vdr-plugin-text2skin-5382d18d05d358bb1c313c642395e835aa44a6a0.tar.bz2 |
1.0-pre1v1.0-pre1
Diffstat (limited to 'xml/type.c')
-rw-r--r-- | xml/type.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/xml/type.c b/xml/type.c new file mode 100644 index 0000000..d311b30 --- /dev/null +++ b/xml/type.c @@ -0,0 +1,20 @@ +/* + * $Id: type.c,v 1.2 2004/12/08 17:13:26 lordjaxom Exp $ + */ + +#include "xml/type.h" +#include "xml/function.h" +#include <stdio.h> + +const std::string &cxType::String(void) { + static char buffer[50]; + if (mType == number) { + snprintf(buffer, sizeof(buffer), "%d", mNumber); + mString = buffer; + mType = string; + } else if (mType == boolean) { + mString = mNumber ? cxFunction::True : cxFunction::False; + mType = string; + } + return mString; +} |