summaryrefslogtreecommitdiff
path: root/ustring.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2004-05-23 13:20:27 +0000
committerSimon Tatham <anakin@pobox.com>2004-05-23 13:20:27 +0000
commit2c2cc2260f9302ed2a32d5cd6116d7e7a2f097cf (patch)
tree6407423dfa55afc94afd52b6e29e9690a6a88a48 /ustring.c
parent6e759041825952be19dd50af7db88a80d84feceb (diff)
downloadhalibut-2c2cc2260f9302ed2a32d5cd6116d7e7a2f097cf.zip
halibut-2c2cc2260f9302ed2a32d5cd6116d7e7a2f097cf.tar.gz
halibut-2c2cc2260f9302ed2a32d5cd6116d7e7a2f097cf.tar.bz2
halibut-2c2cc2260f9302ed2a32d5cd6116d7e7a2f097cf.tar.xz
Character-set-isation and configurability in the WinHelp backend.
Newly configurable things are: bullet and quote characters as usual, the ": " that goes between a section number and its title, the "." coming after numbered-list item numbers, and the text "Title page" that appears at the top of the .cnt file. [originally from svn r4248]
Diffstat (limited to 'ustring.c')
-rw-r--r--ustring.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ustring.c b/ustring.c
index 0e3bfee..aa27dd4 100644
--- a/ustring.c
+++ b/ustring.c
@@ -246,6 +246,15 @@ wchar_t *ustrcpy(wchar_t *dest, wchar_t const *source) {
return ret;
}
+wchar_t *ustrncpy(wchar_t *dest, wchar_t const *source, int n) {
+ wchar_t *ret = dest;
+ do {
+ *dest++ = *source;
+ if (*source) source++;
+ } while (n-- > 0);
+ return ret;
+}
+
int ustrcmp(wchar_t *lhs, wchar_t *rhs) {
if (!lhs && !rhs) return 0;
if (!lhs) return -1;