Commit 5ae32c35 authored by Nalin Dahyabhai's avatar Nalin Dahyabhai

add VteConv as a thin wrapper around GIConv. use VteConv. remove. remove.

* src/vteconv.c, src/vteconv.h: add VteConv as a thin wrapper around GIConv.
* src/iso2022.c: use VteConv.
* src/matcher.c(_vte_matcher_find_valid_encoding): remove.
* src/matcher.c(_vte_matcher_wide_encoding): remove.
* src/trie.c: use VteConv.
* src/utf8echo.c: use VteConv.
* src/vte.c: use VteConv (#112446).
parent 83e4f0ef
2003-05-07 nalin
* src/vteconv.c, src/vteconv.h: add VteConv as a thin wrapper around
GIConv.
* src/iso2022.c: use VteConv.
* src/matcher.c(_vte_matcher_find_valid_encoding): remove.
* src/matcher.c(_vte_matcher_wide_encoding): remove.
* src/trie.c: use VteConv.
* src/utf8echo.c: use VteConv.
* src/vte.c: use VteConv (#112446).
2003-05-06 nalin
* src/vte.c: add "Since: 0.11" to documentation for functions which
aren't available in the 0.10 series.
......
......@@ -3,7 +3,7 @@ pkginclude_HEADERS = pty.h reaper.h vte.h vteaccess.h
lib_LTLIBRARIES = libvte.la
pkglib_PROGRAMS = interpret utf8echo nativeecho utf8mode iso8859mode slowcat vterdb
pkglib_SCRIPTS = decset osc window
noinst_PROGRAMS = buffer dumpkeys iso2022 pty reaper reflect-text-view reflect-vte $(REFLECT_ZVT) ring mev ssfe table termcap trie xticker
noinst_PROGRAMS = buffer dumpkeys iso2022 pty reaper reflect-text-view reflect-vte $(REFLECT_ZVT) ring mev ssfe table termcap trie xticker vteconv
EXTRA_DIST = \
$(pkglib_SCRIPTS) \
genkeysyms.py \
......@@ -55,10 +55,12 @@ libvte_la_SOURCES = \
trie.h \
vte.c \
vte.h \
vtebg.c \
vtebg.h \
vteaccess.c \
vteaccess.h \
vtebg.c \
vtebg.h \
vteconv.c \
vteconv.h \
vtedraw.c \
vtedraw.h \
vtefc.c \
......@@ -127,10 +129,12 @@ interpret_SOURCES = \
matcher.h \
table.c \
table.h \
trie.c \
trie.h \
termcap.c \
termcap.h \
trie.c \
trie.h \
vteconv.c \
vteconv.h \
interpret.c
interpret_LDADD = @LDFLAGS@ @GOBJECT_LIBS@
......@@ -147,11 +151,15 @@ iso2022_SOURCES = \
table.c \
table.h \
trie.c \
trie.h
trie.h \
vteconv.c \
vteconv.h
iso2022_LDADD = @LDFLAGS@ @LIBS@ @GOBJECT_LIBS@
utf8echo_CFLAGS = @CFLAGS@ @GOBJECT_CFLAGS@ -DUTF8ECHO_MAIN
utf8echo_SOURCES = \
buffer.c \
buffer.h \
debug.c \
debug.h \
matcher.c \
......@@ -160,7 +168,9 @@ utf8echo_SOURCES = \
table.h \
trie.c \
trie.h \
utf8echo.c
utf8echo.c \
vteconv.c \
vteconv.h
utf8echo_LDADD = @LDFLAGS@ @LIBS@ @GOBJECT_LIBS@
nativeecho_CFLAGS = @CFLAGS@ @GLIB_CFLAGS@ -DNATIVEECHO_MAIN
......@@ -182,6 +192,8 @@ slowcat_LDADD = @LDFLAGS@ @LIBS@ @GLIB_LIBS@
table_CFLAGS = @CFLAGS@ @GOBJECT_CFLAGS@ -DTABLE_MAIN
table_SOURCES = \
buffer.c \
buffer.h \
debug.c \
debug.h \
matcher.c \
......@@ -189,11 +201,15 @@ table_SOURCES = \
table.c \
table.h \
trie.c \
trie.h
trie.h \
vteconv.c \
vteconv.h
table_LDADD = @LDFLAGS@ @LIBS@ @GOBJECT_LIBS@
trie_CFLAGS = @CFLAGS@ @GOBJECT_CFLAGS@ -DTRIE_MAIN
trie_SOURCES = \
buffer.c \
buffer.h \
debug.c \
debug.h \
matcher.c \
......@@ -203,7 +219,9 @@ trie_SOURCES = \
termcap.c \
termcap.h \
trie.c \
trie.h
trie.h \
vteconv.c \
vteconv.h
trie_LDADD = @LDFLAGS@ @LIBS@ @GOBJECT_LIBS@
termcap_CFLAGS = @CFLAGS@ @GLIB_CFLAGS@ -DTERMCAP_MAIN
......@@ -236,6 +254,16 @@ vterdb_CFLAGS = @CFLAGS@ @GTK_CFLAGS@ -DVTERDB_MAIN
vterdb_SOURCES = vterdb.c
vterdb_LDADD = @LDFLAGS@ @LIBS@ @GTK_LIBS@
vteconv_CFLAGS = @CFLAGS@ @GLIB_CFLAGS@ -DVTECONV_MAIN
vteconv_SOURCES = \
buffer.c \
buffer.h \
debug.c \
debug.h \
vteconv.c \
vteconv.h
vteconv_LDADD = @LDFLAGS@ @GLIB_LIBS@
buffer_CFLAGS = @CFLAGS@ @GLIB_CFLAGS@ -DBUFFER_MAIN
buffer_SOURCES = buffer.c
buffer_LDADD = @LDFLAGS@ @GLIB_LIBS@
......
......@@ -30,6 +30,7 @@
#include "buffer.h"
#include "iso2022.h"
#include "matcher.h"
#include "vteconv.h"
#ifdef HAVE_LOCALE_H
#include <locale.h>
......@@ -75,7 +76,7 @@ struct _vte_iso2022_state {
int current, override;
gunichar g[4];
const gchar *codeset, *native_codeset, *utf8_codeset, *target_codeset;
GIConv conv;
VteConv conv;
_vte_iso2022_codeset_changed_cb_fn codeset_changed;
gpointer codeset_changed_data;
struct _vte_buffer *buffer;
......@@ -707,19 +708,19 @@ _vte_iso2022_state_new(const char *native_codeset,
}
state->utf8_codeset = "UTF-8";
state->codeset = state->native_codeset;
state->target_codeset = _vte_matcher_wide_encoding();
state->target_codeset = VTE_CONV_GUNICHAR_TYPE;
#ifdef VTE_DEBUG
if (_vte_debug_on(VTE_DEBUG_SUBSTITUTION)) {
fprintf(stderr, "Native codeset \"%s\", currently %s\n",
state->native_codeset, state->codeset);
}
#endif
state->conv = g_iconv_open(state->target_codeset,
state->codeset);
state->conv = _vte_conv_open(state->target_codeset,
state->codeset);
state->codeset_changed = fn;
state->codeset_changed_data = data;
state->buffer = _vte_buffer_new();
g_assert(state->conv != (GIConv) -1);
g_assert(state->conv != (VteConv) -1);
return state;
}
......@@ -727,7 +728,7 @@ void
_vte_iso2022_state_set_codeset(struct _vte_iso2022_state *state,
const char *codeset)
{
GIConv conv;
VteConv conv;
g_return_if_fail(state != NULL);
g_return_if_fail(codeset != NULL);
......@@ -738,14 +739,14 @@ _vte_iso2022_state_set_codeset(struct _vte_iso2022_state *state,
fprintf(stderr, "%s\n", codeset);
}
#endif
conv = g_iconv_open(state->target_codeset, codeset);
if (conv == (GIConv) -1) {
conv = _vte_conv_open(state->target_codeset, codeset);
if (conv == (VteConv) -1) {
g_warning(_("Unable to convert characters from %s to %s."),
codeset, state->target_codeset);
return;
}
if (state->conv != (GIConv) -1) {
g_iconv_close(state->conv);
if (state->conv != (VteConv) -1) {
_vte_conv_close(state->conv);
}
state->codeset = g_quark_to_string(g_quark_from_string(codeset));
state->conv = conv;
......@@ -760,10 +761,10 @@ _vte_iso2022_state_get_codeset(struct _vte_iso2022_state *state)
void
_vte_iso2022_state_free(struct _vte_iso2022_state *state)
{
if (state->conv != ((GIConv) -1)) {
g_iconv_close(state->conv);
if (state->conv != ((VteConv) -1)) {
_vte_conv_close(state->conv);
}
state->conv = (GIConv) -1;
state->conv = (VteConv) -1;
state->native_codeset = state->utf8_codeset = state->codeset = NULL;
state->target_codeset = NULL;
state->g[3] = 'B';
......@@ -1081,9 +1082,9 @@ process_cdata(struct _vte_iso2022_state *state, guchar *cdata, gsize length,
outbuf = (gunichar*)buf;
outbytes = sizeof(gunichar) * length * 2;
do {
converted = g_iconv(state->conv,
&inbuf, &inbytes,
(gchar**) &outbuf, &outbytes);
converted = _vte_conv(state->conv,
&inbuf, &inbytes,
(gchar**) &outbuf, &outbytes);
switch (converted) {
case ((size_t)-1):
switch (errno) {
......
......@@ -127,110 +127,3 @@ _vte_matcher_print(struct _vte_matcher *matcher)
break;
}
}
/* Determine a giconv target name which produces output which is bit-for-bit
* identical to either ASCII (wide==FALSE) or gunichar (wide==TRUE). */
static char *
_vte_matcher_find_valid_encoding(const char **list, gssize length,
gboolean wide)
{
const char SAMPLE[] = "ABCDEF #@{|}[\\]~";
gunichar wbuffer[sizeof(SAMPLE)];
unsigned char nbuffer[sizeof(SAMPLE)];
void *buffer;
char inbuf[BUFSIZ];
char outbuf[BUFSIZ];
char *ibuf, *obuf;
gsize isize, osize;
int i;
gsize outbytes;
GIConv conv;
/* Decide what the iconv output buffer must resemble. */
if (wide) {
buffer = wbuffer;
} else {
buffer = nbuffer;
}
/* Initialize both the narrow and wide output buffers. */
for (i = 0; SAMPLE[i] != '\0'; i++) {
wbuffer[i] = nbuffer[i] = SAMPLE[i];
}
wbuffer[i] = nbuffer[i] = SAMPLE[i];
/* Iterate over the list, attempting to convert from UTF-8 to the
* named encoding, and then comparing it to the desired buffer. */
for (i = 0; i < length; i++) {
conv = g_iconv_open(list[i], "UTF-8");
if (conv == ((GIConv) -1)) {
#ifdef VTE_DEBUG
if (_vte_debug_on(VTE_DEBUG_MISC)) {
fprintf(stderr, "Conversions to `%s' are not "
"supported by giconv.\n", list[i]);
}
#endif
continue;
}
ibuf = (char*) &inbuf;
strcpy(inbuf, SAMPLE);
isize = 3;
obuf = (char*) &outbuf;
osize = sizeof(outbuf);
g_iconv(conv, &ibuf, &isize, &obuf, &osize);
g_iconv_close(conv);
outbytes = sizeof(outbuf) - osize;
if ((isize == 0) && (outbytes > 0)) {
if (memcmp(outbuf, buffer, outbytes) == 0) {
#ifdef VTE_DEBUG
if (_vte_debug_on(VTE_DEBUG_MISC)) {
fprintf(stderr, "Found iconv target "
"`%s'.\n", list[i]);
}
#endif
return g_strdup(list[i]);
}
}
}
return NULL;
}
const char *
_vte_matcher_wide_encoding()
{
const char *wide[] = {
"10646",
"ISO_10646",
"ISO-10646",
"ISO10646",
"ISO-10646-1",
"ISO10646-1",
"ISO-10646/UCS4",
"UCS-4",
"UCS4",
"UCS-4-BE",
"UCS-4BE",
"UCS4-BE",
"UCS-4-INTERNAL",
"UCS-4-LE",
"UCS-4LE",
"UCS4-LE",
"UNICODE",
"UNICODE-BIG",
"UNICODEBIG",
"UNICODE-LITTLE",
"UNICODELITTLE",
"WCHAR_T",
};
static char *ret = NULL;
if (ret == NULL) {
ret = _vte_matcher_find_valid_encoding(wide,
G_N_ELEMENTS(wide),
TRUE);
}
return ret;
}
......@@ -49,9 +49,6 @@ const char *_vte_matcher_match(struct _vte_matcher *matcher,
/* Dump out the contents of a matcher, mainly for debugging. */
void _vte_matcher_print(struct _vte_matcher *matcher);
/* A gunichar-compatible giconv target, if one can be found. */
const char *_vte_matcher_wide_encoding(void);
G_END_DECLS
#endif
......@@ -33,6 +33,7 @@
#include "iso2022.h"
#include "matcher.h"
#include "trie.h"
#include "vteconv.h"
#ifndef HAVE_WINT_T
typedef gunichar wint_t;
......@@ -486,7 +487,7 @@ _vte_trie_add(struct _vte_trie *trie, const char *pattern, size_t length,
const char *result, GQuark quark)
{
char *wpattern, *wpattern_end, *tpattern;
GIConv conv;
VteConv conv;
size_t wlength;
g_return_if_fail(trie != NULL);
......@@ -500,17 +501,17 @@ _vte_trie_add(struct _vte_trie *trie, const char *pattern, size_t length,
wlength = sizeof(gunichar) * (length + 1);
wpattern = wpattern_end = g_malloc0(wlength + 1);
conv = g_iconv_open(_vte_matcher_wide_encoding(), "UTF-8");
g_assert(conv != ((GIConv) -1));
conv = _vte_conv_open(VTE_CONV_GUNICHAR_TYPE, "UTF-8");
g_assert(conv != ((VteConv) -1));
tpattern = (char*)pattern;
g_iconv(conv, &tpattern, &length, &wpattern_end, &wlength);
_vte_conv(conv, &tpattern, &length, &wpattern_end, &wlength);
if (length == 0) {
wlength = (wpattern_end - wpattern) / sizeof(gunichar);
_vte_trie_addx(trie, (gunichar*)wpattern, wlength,
result, quark, 0);
}
g_iconv_close(conv);
_vte_conv_close(conv);
g_free(wpattern);
}
......@@ -839,15 +840,15 @@ static void
convert_mbstowcs(const char *i, size_t ilen,
gunichar *o, size_t *olen, size_t max_olen)
{
GIConv conv;
VteConv conv;
size_t outlen;
conv = g_iconv_open(_vte_matcher_wide_encoding(), "UTF-8");
g_assert(conv != ((GIConv) -1));
conv = _vte_conv_open(VTE_CONV_GUNICHAR_TYPE, "UTF-8");
g_assert(conv != ((VteConv) -1));
memset(o, 0, max_olen);
outlen = max_olen;
g_iconv(conv, (char**)&i, &ilen, (char**)&o, &outlen);
g_iconv_close(conv);
_vte_conv(conv, (char**)&i, &ilen, (char**)&o, &outlen);
_vte_conv_close(conv);
*olen = (max_olen - outlen) / sizeof(gunichar);
}
......@@ -890,7 +891,7 @@ main(int argc, char **argv)
_vte_trie_add(trie, "<esc>]2;%sh", 11, "decset-title",
g_quark_from_string("decset-title"));
printf("Wide encoding is `%s'.\n", _vte_matcher_wide_encoding());
printf("Wide encoding is `%s'.\n", VTE_CONV_GUNICHAR_TYPE);
_vte_trie_print(trie);
printf("\n");
......
......@@ -25,13 +25,14 @@
#include <string.h>
#include <unistd.h>
#include "matcher.h"
#include "vteconv.h"
#define ESC ""
int
main(int argc, char **argv)
{
int i;
GIConv conv;
VteConv conv;
char buf[LINE_MAX];
wchar_t w;
char *inbuf, *outbuf, *p;
......@@ -44,8 +45,8 @@ main(int argc, char **argv)
return 1;
}
conv = g_iconv_open("UTF-8", _vte_matcher_wide_encoding());
if (conv == ((GIConv) -1)) {
conv = _vte_conv_open("UTF-8", VTE_CONV_GUNICHAR_TYPE);
if (conv == ((VteConv) -1)) {
return 1;
}
......@@ -56,12 +57,12 @@ main(int argc, char **argv)
memset(buf, 0, sizeof(buf));
outbuf = buf;
outsize = sizeof(buf);
if (g_iconv(conv, &inbuf, &insize, &outbuf, &outsize) != -1) {
if (_vte_conv(conv, &inbuf, &insize, &outbuf, &outsize) != -1) {
printf("%.*s", outbuf - buf, buf);
}
}
g_iconv_close(conv);
_vte_conv_close(conv);
return 0;
}
......@@ -60,6 +60,7 @@
#include "termcap.h"
#include "vte.h"
#include "vteaccess.h"
#include "vteconv.h"
#include "vtedraw.h"
#include <fontconfig/fontconfig.h>
......@@ -203,7 +204,7 @@ struct _VteTerminalPrivate {
/* Output data queue. */
struct _vte_buffer *outgoing; /* pending input characters */
GIConv outgoing_conv;
VteConv outgoing_conv;
/* IConv buffer. */
struct _vte_buffer *conv_buffer;
......@@ -1971,7 +1972,7 @@ vte_terminal_set_encoding(VteTerminal *terminal, const char *codeset)
{
const char *old_codeset;
GQuark encoding_quark;
GIConv conv;
VteConv conv;
char *obuf1, *obuf2;
gsize bytes_written;
......@@ -1985,14 +1986,14 @@ vte_terminal_set_encoding(VteTerminal *terminal, const char *codeset)
}
/* Open new conversions. */
conv = g_iconv_open(codeset, "UTF-8");
if (conv == ((GIConv) -1)) {
conv = _vte_conv_open(codeset, "UTF-8");
if (conv == ((VteConv) -1)) {
g_warning(_("Unable to convert characters from %s to %s."),
"UTF-8", codeset);
return;
}
if (terminal->pvt->outgoing_conv != (GIConv) -1) {
g_iconv_close(terminal->pvt->outgoing_conv);
if (terminal->pvt->outgoing_conv != (VteConv) -1) {
_vte_conv_close(terminal->pvt->outgoing_conv);
}
terminal->pvt->outgoing_conv = conv;
......@@ -4033,7 +4034,7 @@ vte_sequence_handler_set_title_internal(VteTerminal *terminal,
const char *signal)
{
GValue *value;
GIConv conv;
VteConv conv;
char *inbuf = NULL, *outbuf = NULL, *outbufptr = NULL;
gsize inbuf_len, outbuf_len;
/* Get the string parameter's value. */
......@@ -4051,8 +4052,7 @@ vte_sequence_handler_set_title_internal(VteTerminal *terminal,
if (G_VALUE_HOLDS_POINTER(value)) {
/* Convert the unicode-character string into a
* multibyte string. */
conv = g_iconv_open("UTF-8",
_vte_matcher_wide_encoding());
conv = _vte_conv_open("UTF-8", VTE_CONV_GUNICHAR_TYPE);
inbuf = g_value_get_pointer(value);
inbuf_len = vte_unicode_strlen((gunichar*)inbuf) *
sizeof(gunichar);
......@@ -4060,9 +4060,9 @@ vte_sequence_handler_set_title_internal(VteTerminal *terminal,
_vte_buffer_set_minimum_size(terminal->pvt->conv_buffer,
outbuf_len);
outbuf = outbufptr = terminal->pvt->conv_buffer->bytes;
if (conv != ((GIConv) -1)) {
if (g_iconv(conv, &inbuf, &inbuf_len,
&outbuf, &outbuf_len) == -1) {
if (conv != ((VteConv) -1)) {
if (_vte_conv(conv, &inbuf, &inbuf_len,
&outbuf, &outbuf_len) == -1) {
#ifdef VTE_DEBUG
if (_vte_debug_on(VTE_DEBUG_IO)) {
fprintf(stderr, "Error "
......@@ -4076,7 +4076,7 @@ vte_sequence_handler_set_title_internal(VteTerminal *terminal,
outbufptr = NULL;
}
}
g_iconv_close(conv);
_vte_conv_close(conv);
}
if (outbufptr != NULL) {
char *p;
......@@ -7362,7 +7362,7 @@ vte_terminal_send(VteTerminal *terminal, const char *encoding,
{
gssize icount, ocount;
char *ibuf, *obuf, *obufptr;
GIConv *conv;
VteConv *conv;
g_return_if_fail(VTE_IS_TERMINAL(terminal));
g_assert(strcmp(encoding, "UTF-8") == 0);
......@@ -7372,7 +7372,7 @@ vte_terminal_send(VteTerminal *terminal, const char *encoding,
conv = &terminal->pvt->outgoing_conv;
}
g_assert(conv != NULL);
g_assert(*conv != ((GIConv) -1));
g_assert(*conv != ((VteConv) -1));
icount = length;
ibuf = (char *) data;
......@@ -7380,7 +7380,7 @@ vte_terminal_send(VteTerminal *terminal, const char *encoding,
_vte_buffer_set_minimum_size(terminal->pvt->conv_buffer, ocount);
obuf = obufptr = terminal->pvt->conv_buffer->bytes;
if (g_iconv(*conv, &ibuf, &icount, &obuf, &ocount) == -1) {
if (_vte_conv(*conv, &ibuf, &icount, &obuf, &ocount) == -1) {
g_warning(_("Error (%s) converting data for child, dropping."),
strerror(errno));
} else {
......@@ -10469,7 +10469,7 @@ vte_terminal_init(VteTerminal *terminal, gpointer *klass)
pvt->processing = FALSE;
pvt->processing_tag = VTE_INVALID_SOURCE;
pvt->outgoing = _vte_buffer_new();
pvt->outgoing_conv = (GIConv) -1;
pvt->outgoing_conv = (VteConv) -1;
pvt->conv_buffer = _vte_buffer_new();
vte_terminal_set_encoding(terminal, NULL);
g_assert(terminal->pvt->encoding != NULL);
......@@ -11025,10 +11025,10 @@ vte_terminal_finalize(GObject *object)
TRUE);
/* Free conversion descriptors. */
if (terminal->pvt->outgoing_conv != ((GIConv) -1)) {
g_iconv_close(terminal->pvt->outgoing_conv);
if (terminal->pvt->outgoing_conv != ((VteConv) -1)) {
_vte_conv_close(terminal->pvt->outgoing_conv);
}
terminal->pvt->outgoing_conv = ((GIConv) -1);
terminal->pvt->outgoing_conv = ((VteConv) -1);
/* Stop listening for child-exited signals. */
g_signal_handlers_disconnect_by_func(vte_reaper_get(),
......@@ -13152,11 +13152,6 @@ vte_terminal_class_init(VteTerminalClass *klass, gconstpointer data)
_vte_marshal_VOID__INT,
G_TYPE_NONE, 1, G_TYPE_INT);
/* Try to determine some acceptable encoding names. */
if (_vte_matcher_wide_encoding() == NULL) {
g_error(_("Don't know how to convert to/from gunichar data!"));
}
#ifdef VTE_DEBUG
/* Turn on debugging if we were asked to. */
if (getenv("VTE_DEBUG_FLAGS") != NULL) {
......@@ -13894,7 +13889,7 @@ vte_terminal_set_scrollback_lines(VteTerminal *terminal, glong lines)
void
vte_terminal_set_word_chars(VteTerminal *terminal, const char *spec)
{
GIConv conv;
VteConv conv;
gunichar *wbuf;
char *ibuf, *ibufptr, *obuf, *obufptr;
gsize ilen, olen;
......@@ -13913,10 +13908,10 @@ vte_terminal_set_word_chars(VteTerminal *terminal, const char *spec)
return;
}
/* Convert the spec from UTF-8 to a string of gunichars . */
conv = g_iconv_open(_vte_matcher_wide_encoding(), "UTF-8");
if (conv == ((GIConv) -1)) {
conv = _vte_conv_open(VTE_CONV_GUNICHAR_TYPE, "UTF-8");
if (conv == ((VteConv) -1)) {
/* Aaargh. We're screwed. */
g_warning(_("g_iconv_open() failed setting word characters"));
g_warning(_("_vte_conv_open() failed setting word characters"));
return;
}
ilen = strlen(spec);
......@@ -13926,8 +13921,8 @@ vte_terminal_set_word_chars(VteTerminal *terminal, const char *spec)
obuf = obufptr = terminal->pvt->conv_buffer->bytes;
wbuf = (gunichar*) obuf;
wbuf[ilen] = '\0';
g_iconv(conv, &ibuf, &ilen, &obuf, &olen);
g_iconv_close(conv);
_vte_conv(conv, &ibuf, &ilen, &obuf, &olen);
_vte_conv_close(conv);
for (i = 0; i < ((obuf - obufptr) / sizeof(gunichar)); i++) {
/* The hyphen character. */
if (wbuf[i] == '-') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment