From e530c9fa676e87ab1b2e7e463bab694bf3816716 Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 4 Dec 2002 19:44:57 +0000 Subject: [PATCH] Add some comments explaining what each of these functions is used for. git-svn-id: svn://svn.tartarus.org/sgt/putty@2280 cda61777-01e9-0310-a592-d414129be87e --- mac/macucs.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/mac/macucs.c b/mac/macucs.c index dfb3f63f..05d10c10 100644 --- a/mac/macucs.c +++ b/mac/macucs.c @@ -1,4 +1,4 @@ -/* $Id: macucs.c,v 1.1 2002/11/19 02:13:46 ben Exp $ */ +/* $Id: macucs.c,v 1.2 2002/12/04 19:44:57 ben Exp $ */ #include #include @@ -21,11 +21,22 @@ * nice, too. */ +/* + * Determine whether a byte is the first byte of a double-byte + * character in a system character set. Only MI use is by clipme() + * when copying direct-to-font text to the clipboard. + */ int is_dbcs_leadbyte(int codepage, char byte) { return 0; /* we don't do DBCS */ } +/* + * Convert from Unicode to a system character set. MI uses are: + * (1) by lpage_send(), whose only MI use is to convert the answerback + * string to Unicode, and + * (2) by clipme() when copying direct-to-font text to the clipboard. + */ int mb_to_wc(int codepage, int flags, char *mbstr, int mblen, wchar_t *wcstr, int wclen) { @@ -37,6 +48,10 @@ int mb_to_wc(int codepage, int flags, char *mbstr, int mblen, return ret; /* FIXME: check error codes! */ } +/* + * Convert from a system character set to Unicode. Used by luni_send + * to convert Unicode into the line character set. + */ int wc_to_mb(int codepage, int flags, wchar_t *wcstr, int wclen, char *mbstr, int mblen, char *defchr, int *defused) { -- 2.11.0