From 64b8c4d982634f6f342b4a7cf8323960d2cbc1a2 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sun, 23 May 2004 13:55:59 +0000 Subject: All measurements in the paper backend are now configurable, as are bullet and quote characters. [originally from svn r4249] --- ustring.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'ustring.c') 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; -- cgit v1.1