From 69c185c34e2e0da279925276e3ca1b92dd01ca3d Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Sun, 29 Apr 2007 21:21:25 +0300 Subject: [PATCH] Document the charset of form_state.value for FC_TEXTAREA. --- src/viewer/text/form.h | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/viewer/text/form.h b/src/viewer/text/form.h index bd1d36e1..7d1eff6e 100644 --- a/src/viewer/text/form.h +++ b/src/viewer/text/form.h @@ -37,18 +37,19 @@ struct form_state { int position; enum form_type type; - /* For FC_TEXT, FC_PASSWORD, and FC_FILE, @value is the text - * string that the user can edit. The string is null-terminated; - * its length is not stored separately. The size of the buffer - * is not stored anywhere; extending the string always requires - * calling realloc(). The string is not normally allowed to grow - * past @form_control.maxlength bytes (not counting the null), - * but there may be ways to get longer strings. If CONFIG_UTF8 - * is defined and UTF-8 I/O is enabled for the terminal, then - * @value is in UTF-8; otherwise, @value is in the charset of the - * terminal, and the charset is assumed to be unibyte. (Thus, if - * you choose UTF-8 as the charset but disable UTF-8 I/O, you - * lose.) The charset of the document has no effect here. */ + /* For FC_TEXT, FC_PASSWORD, FC_FILE, and FC_TEXTAREA, @value + * is the text string that the user can edit. The string is + * null-terminated; its length is not stored separately. The + * size of the buffer is not stored anywhere; extending the + * string always requires calling realloc(). The string is + * not normally allowed to grow past @form_control.maxlength + * bytes (not counting the null), but there may be ways to get + * longer strings. If CONFIG_UTF8 is defined and UTF-8 I/O is + * enabled for the terminal, then @value is in UTF-8; + * otherwise, @value is in the charset of the terminal, and + * the charset is assumed to be unibyte. (Thus, if you choose + * UTF-8 as the charset but disable UTF-8 I/O, you lose.) + * The charset of the document has no effect here. */ unsigned char *value; /* For FC_TEXT, FC_PASSWORD, and FC_FILE, @state is the byte * position of the insertion point in @value.