summaryrefslogtreecommitdiff
path: root/ustring.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2004-05-23 13:55:59 +0000
committerSimon Tatham <anakin@pobox.com>2004-05-23 13:55:59 +0000
commit64b8c4d982634f6f342b4a7cf8323960d2cbc1a2 (patch)
tree553720e6eb1a06bf70c16b8144f5cd50dc2e2e46 /ustring.c
parent2c2cc2260f9302ed2a32d5cd6116d7e7a2f097cf (diff)
downloadhalibut-64b8c4d982634f6f342b4a7cf8323960d2cbc1a2.zip
halibut-64b8c4d982634f6f342b4a7cf8323960d2cbc1a2.tar.gz
halibut-64b8c4d982634f6f342b4a7cf8323960d2cbc1a2.tar.bz2
halibut-64b8c4d982634f6f342b4a7cf8323960d2cbc1a2.tar.xz
All measurements in the paper backend are now configurable, as are
bullet and quote characters. [originally from svn r4249]
Diffstat (limited to 'ustring.c')
-rw-r--r--ustring.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/ustring.c b/ustring.c
index aa27dd4..8b0c865 100644
--- a/ustring.c
+++ b/ustring.c
@@ -309,7 +309,7 @@ wchar_t *ustrlow(wchar_t *s) {
return s;
}
-int utoi(wchar_t *s) {
+int utoi(wchar_t const *s) {
int sign = +1;
int n;
@@ -328,7 +328,15 @@ int utoi(wchar_t *s) {
return n;
}
-int utob(wchar_t *s) {
+double utof(wchar_t const *s)
+{
+ char *cs = utoa_dup(s, CS_ASCII);
+ double ret = atof(cs);
+ sfree(cs);
+ return ret;
+}
+
+int utob(wchar_t const *s) {
if (!ustricmp(s, L"yes") || !ustricmp(s, L"y") ||
!ustricmp(s, L"true") || !ustricmp(s, L"t"))
return TRUE;