diff options
| author | Simon Tatham <anakin@pobox.com> | 2004-05-23 13:55:59 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2004-05-23 13:55:59 +0000 |
| commit | 64b8c4d982634f6f342b4a7cf8323960d2cbc1a2 (patch) | |
| tree | 553720e6eb1a06bf70c16b8144f5cd50dc2e2e46 /ustring.c | |
| parent | 2c2cc2260f9302ed2a32d5cd6116d7e7a2f097cf (diff) | |
| download | halibut-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.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -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; |