[vte] all: Move to C++
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] all: Move to C++
- Date: Wed, 22 Apr 2015 18:56:20 +0000 (UTC)
commit 958859d14ef4d94fc4735c700f550b57739f31ac
Author: Christian Persch <chpe gnome org>
Date: Mon Mar 30 17:54:33 2015 +0200
all: Move to C++
doc/reference/Makefile.am | 3 +-
src/Makefile.am | 130 +++++++++++---------
src/{caps.c => caps.cc} | 0
src/debug.cc | 1 +
src/{iso2022.c => iso2022.cc} | 0
src/{keymap.c => keymap.cc} | 0
src/{matcher.c => matcher.cc} | 0
src/{pty.c => pty.cc} | 0
src/{ring.c => ring.cc} | 0
src/{table.c => table.cc} | 4 +-
src/{vte.c => vte.cc} | 0
src/{vteaccess.c => vteaccess.cc} | 0
src/{vteconv.c => vteconv.cc} | 56 +++++----
src/{vtedraw.c => vtedraw.cc} | 0
src/{vterowdata.c => vterowdata.cc} | 0
src/{vteseq.c => vteseq.cc} | 2 +-
src/vtestream-file.h | 6 +-
src/{vtestream.c => vtestream.cc} | 0
src/{vtetree.c => vtetree.cc} | 0
...tins.c.template => vtetypebuiltins.cc.template} | 0
src/{vteunistr.c => vteunistr.cc} | 0
src/{vteutils.c => vteutils.cc} | 0
22 files changed, 108 insertions(+), 94 deletions(-)
---
diff --git a/doc/reference/Makefile.am b/doc/reference/Makefile.am
index c0d5e3e..42b0e91 100644
--- a/doc/reference/Makefile.am
+++ b/doc/reference/Makefile.am
@@ -67,7 +67,8 @@ HFILE_GLOB = \
$(NULL)
CFILE_GLOB = \
- $(top_srcdir)/src/*.c
+ $(top_srcdir)/src/*.c \
+ $(top_srcdir)/src/*.cc
# Extra header to include when scanning, which are not under DOC_SOURCE_DIR
# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h
diff --git a/src/Makefile.am b/src/Makefile.am
index 9320c35..500ac7f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -30,8 +30,8 @@ EXTRA_libvte_ VTE_API_MAJOR_VERSION@_ VTE_API_MINOR_VERSION@_la_SOURCES = \
box_drawing_generate.sh \
marshal.list \
vteseq-n.gperf \
- vteseq-n.c \
- vtetypebuiltins.c.template \
+ vteseq-n.cc \
+ vtetypebuiltins.cc.template \
vtetypebuiltins.h.template \
$(NULL)
@@ -44,53 +44,53 @@ libvte_ VTE_API_MAJOR_VERSION@_ VTE_API_MINOR_VERSION@_la_SOURCES = \
vte/vtepty.h \
vte/vteterminal.h \
buffer.h \
- caps.c \
+ caps.cc \
caps.h \
- debug.c \
+ debug.cc \
debug.h \
- iso2022.c \
+ iso2022.cc \
iso2022.h \
- keymap.c \
+ keymap.cc \
keymap.h \
- matcher.c \
+ matcher.cc \
matcher.h \
- pty.c \
- ring.c \
+ pty.cc \
+ ring.cc \
ring.h \
- table.c \
+ table.cc \
table.h \
- vte.c \
+ vte.cc \
vte-private.h \
- vteaccess.c \
+ vteaccess.cc \
vteaccess.h \
- vteconv.c \
+ vteconv.cc \
vteconv.h \
- vtedraw.c \
+ vtedraw.cc \
vtedraw.h \
vteint.h \
vtepty-private.h \
- vterowdata.c \
+ vterowdata.cc \
vterowdata.h \
- vteseq.c \
+ vteseq.cc \
vteseq-list.h \
- vtestream.c \
+ vtestream.cc \
vtestream.h \
vtestream-base.h \
vtestream-file.h \
- vtetree.c \
+ vtetree.cc \
vtetree.h \
- vteunistr.c \
+ vteunistr.cc \
vteunistr.h \
- vteutils.c \
+ vteutils.cc \
vteutils.h \
$(NULL)
nodist_libvte_ VTE_API_MAJOR_VERSION@_ VTE_API_MINOR_VERSION@_la_SOURCES = \
box_drawing.h \
- marshal.c \
+ marshal.cc \
marshal.h \
- vteresources.c \
- vtetypebuiltins.c \
+ vteresources.cc \
+ vtetypebuiltins.cc \
vte/vtetypebuiltins.h \
vte/vteversion.h \
$(NULL)
@@ -107,16 +107,12 @@ libvte_ VTE_API_MAJOR_VERSION@_ VTE_API_MINOR_VERSION@_la_CPPFLAGS = \
-I$(builddir)/vte \
$(AM_CPPFLAGS)
-libvte_ VTE_API_MAJOR_VERSION@_ VTE_API_MINOR_VERSION@_la_CFLAGS = \
- $(VTE_CFLAGS) \
- $(AM_CFLAGS)
-
libvte_ VTE_API_MAJOR_VERSION@_ VTE_API_MINOR_VERSION@_la_CXXFLAGS = \
$(VTE_CFLAGS) \
$(AM_CXXFLAGS)
libvte_ VTE_API_MAJOR_VERSION@_ VTE_API_MINOR_VERSION@_la_LDFLAGS = \
- $(VTE_LDFLAGS) \
+ $(VTE_CXXLDFLAGS) \
-version-info $(LT_VERSION_INFO) \
-export-symbols-regex "^vte_.*" \
$(AM_LDFLAGS)
@@ -124,18 +120,27 @@ libvte_ VTE_API_MAJOR_VERSION@_ VTE_API_MINOR_VERSION@_la_LDFLAGS = \
libvte_ VTE_API_MAJOR_VERSION@_ VTE_API_MINOR_VERSION@_la_LIBADD = \
$(VTE_LIBS)
+# Try hard to avoid linking to libstd++ by using the C linker instead of the C++ linker
+if HAVE_GXX
+libvte_ VTE_API_MAJOR_VERSION@_ VTE_API_MINOR_VERSION@_la_LINK = \
+ $(LINK) \
+ $(libvte_ VTE_API_MAJOR_VERSION@_ VTE_API_MINOR_VERSION@_la_CFLAGS) \
+ $(libvte_ VTE_API_MAJOR_VERSION@_ VTE_API_MINOR_VERSION@_la_LDFLAGS) \
+ $(NULL)
+endif # HAVE_GXX
+
# Generated sources
-VTESEQ_BUILTSOURCES = vteseq-list.h vteseq-n.c
-BUILT_SOURCES = box_drawing.h marshal.c marshal.h vtetypebuiltins.c vte/vtetypebuiltins.h vteresources.c
$(VTESEQ_BUILTSOURCES)
+VTESEQ_BUILTSOURCES = vteseq-list.h vteseq-n.cc
+BUILT_SOURCES = box_drawing.h marshal.cc marshal.h vtetypebuiltins.cc vte/vtetypebuiltins.h vteresources.cc
$(VTESEQ_BUILTSOURCES)
MAINTAINERCLEANFILES += $(VTESEQ_BUILTSOURCES)
EXTRA_DIST += $(VTESEQ_BUILTSOURCES) box_drawing.txt box_drawing_generate.sh iso2022.txt
-CLEANFILES += box_drawing.h marshal.c marshal.h vtetypebuiltins.c vte/vtetypebuiltins.h
stamp-vtetypebuiltins.h vteresources.c
+CLEANFILES += box_drawing.h marshal.cc marshal.h vtetypebuiltins.cc vte/vtetypebuiltins.h
stamp-vtetypebuiltins.h vteresources.cc
box_drawing.h: box_drawing.txt box_drawing_generate.sh
$(AM_V_GEN) $(srcdir)/box_drawing_generate.sh < $< > $@
-marshal.c: marshal.list
+marshal.cc: marshal.list
$(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=_vte_marshal --header --body --internal $< > $@
marshal.h: marshal.list
@@ -149,12 +154,12 @@ stamp-vtetypebuiltins.h: vtetypebuiltins.h.template vte/vteenums.h vte/vtedeprec
&& rm -f xgen-vtbh \
&& echo timestamp > $(@F)
-vtetypebuiltins.c: vtetypebuiltins.c.template vte/vteenums.h vte/vtedeprecated.h
+vtetypebuiltins.cc: vtetypebuiltins.cc.template vte/vteenums.h vte/vtedeprecated.h
$(AM_V_GEN) $(GLIB_MKENUMS) --template $< $(filter %.h,$^) > xgen-vtbc \
- && (cmp -s xgen-vtbc vtetypebuiltins.c || cp xgen-vtbc vtetypebuiltins.c ) \
+ && (cmp -s xgen-vtbc vtetypebuiltins.cc || cp xgen-vtbc vtetypebuiltins.cc ) \
&& rm -f xgen-vtbc
-vteseq-n.c: vteseq-n.gperf
+vteseq-n.cc: vteseq-n.gperf
$(AM_V_GEN) $(top_srcdir)/missing --run gperf -m 100 $< > $ tmp && \
mv -f $ tmp $@
@@ -163,8 +168,8 @@ vteseq-list.h: vteseq-n.gperf
cat $^ | grep -v '^#' | grep '\<VTE_SEQUENCE_HANDLER\>'| sed 's/.*, //' | LANG=C sort -u >> $ tmp &&
\
mv -f $ tmp $@
-vteresources.c: vte.gresource.xml Makefile $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies
vte.gresource.xml)
- $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target $@ --sourcedir . --generate --c-name vte $<
+vteresources.cc: vte.gresource.xml Makefile $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies
vte.gresource.xml)
+ $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target $@ --sourcedir . --generate-source --c-name vte $<
# introspection
@@ -184,9 +189,9 @@ Vte_ VTE_API_VERSION_U@_gir_SCANNERFLAGS = --c-include "vte/vte.h"
Vte_ VTE_API_VERSION_U@_gir_FILES = \
$(filter-out vte/vtedeprecated.h,$(header_HEADERS)) \
$(nodist_header_HEADERS) \
- vte.c \
- vtetypebuiltins.c \
- pty.c \
+ vte.cc \
+ vtetypebuiltins.cc \
+ pty.cc \
$(NULL)
INTROSPECTION_GIRS += Vte-$(VTE_API_VERSION).gir
@@ -342,19 +347,19 @@ reflect_vte_LDADD = libvte-$(VTE_API_VERSION).la $(VTE_LIBS)
interpret_SOURCES = \
buffer.h \
- caps.c \
+ caps.cc \
caps.h \
- debug.c \
+ debug.cc \
debug.h \
- iso2022.c \
+ iso2022.cc \
iso2022.h \
- matcher.c \
+ matcher.cc \
matcher.h \
- table.c \
+ table.cc \
table.h \
- vteconv.c \
+ vteconv.cc \
vteconv.h \
- vtetree.c \
+ vtetree.cc \
vtetree.h \
interpret.c
interpret_CPPFLAGS = \
@@ -368,6 +373,11 @@ interpret_CFLAGS = \
$(GOBJECT_CFLAGS) \
$(GTK_CFLAGS) \
$(AM_CFLAGS)
+interpret_CXXFLAGS = \
+ $(GLIB_CFLAGS) \
+ $(GOBJECT_CFLAGS) \
+ $(GTK_CFLAGS) \
+ $(AM_CXXFLAGS)
interpret_LDADD = \
$(GLIB_LIBS) \
$(GOBJECT_LIBS)
@@ -381,15 +391,15 @@ slowcat_LDADD = $(GLIB_LIBS)
table_SOURCES = \
buffer.h \
- caps.c \
+ caps.cc \
caps.h \
- debug.c \
+ debug.cc \
debug.h \
- matcher.c \
+ matcher.cc \
matcher.h \
- table.c \
+ table.cc \
table.h \
- vteconv.c \
+ vteconv.cc \
vteconv.h \
$(NULL)
table_CPPFLAGS = \
@@ -397,9 +407,9 @@ table_CPPFLAGS = \
-I$(srcdir) \
-I$(builddir) \
$(AM_CPPFLAGS)
-table_CFLAGS = \
+table_CXXFLAGS = \
$(GLIB_CFLAGS) \
- $(AM_CFLAGS)
+ $(AM_CXXFLAGS)
table_LDADD = \
$(GLIB_LIBS) \
$(GOBJECT_LIBS)
@@ -407,9 +417,9 @@ table_LDADD = \
vtestream_file_SOURCES = \
vtestream-base.h \
vtestream-file.h \
- vtestream.c \
+ vtestream.cc \
vtestream.h \
- vteutils.c \
+ vteutils.cc \
vteutils.h \
$(NULL)
vtestream_file_CPPFLAGS = \
@@ -417,15 +427,15 @@ vtestream_file_CPPFLAGS = \
-I$(srcdir) \
-I$(builddir) \
$(AM_CPPFLAGS)
-vtestream_file_CFLAGS = \
+vtestream_file_CXXFLAGS = \
$(VTE_CFLAGS) \
- $(AM_CFLAGS)
+ $(AM_CXXFLAGS)
vtestream_file_LDADD = \
$(VTE_LIBS)
-vteconv_SOURCES = buffer.h debug.c debug.h vteconv.c vteconv.h
+vteconv_SOURCES = buffer.h debug.cc debug.h vteconv.cc vteconv.h
vteconv_CPPFLAGS = -DVTECONV_MAIN -I$(srcdir) -I$(builddir) $(AM_CPPFLAGS)
-vteconv_CFLAGS = $(VTE_CFLAGS) $(AM_CFLAGS)
+vteconv_CXXFLAGS = $(VTE_CFLAGS) $(AM_CXXFLAGS)
vteconv_LDADD = $(VTE_LIBS)
dumpkeys_SOURCES = dumpkeys.c
diff --git a/src/caps.c b/src/caps.cc
similarity index 100%
rename from src/caps.c
rename to src/caps.cc
diff --git a/src/debug.cc b/src/debug.cc
new file mode 100644
index 0000000..b9e84b1
--- /dev/null
+++ b/src/debug.cc
@@ -0,0 +1 @@
+#include "debug.c"
diff --git a/src/iso2022.c b/src/iso2022.cc
similarity index 100%
rename from src/iso2022.c
rename to src/iso2022.cc
diff --git a/src/keymap.c b/src/keymap.cc
similarity index 100%
rename from src/keymap.c
rename to src/keymap.cc
diff --git a/src/matcher.c b/src/matcher.cc
similarity index 100%
rename from src/matcher.c
rename to src/matcher.cc
diff --git a/src/pty.c b/src/pty.cc
similarity index 100%
rename from src/pty.c
rename to src/pty.cc
diff --git a/src/ring.c b/src/ring.cc
similarity index 100%
rename from src/ring.c
rename to src/ring.cc
diff --git a/src/table.c b/src/table.cc
similarity index 99%
rename from src/table.c
rename to src/table.cc
index fe4e8a2..3c78f3a 100644
--- a/src/table.c
+++ b/src/table.cc
@@ -780,7 +780,7 @@ make_wide(const char *p)
gunichar *ret;
guint8 check;
int i;
- ret = g_malloc((strlen(p) + 1) * sizeof(gunichar));
+ ret = (gunichar *)g_malloc((strlen(p) + 1) * sizeof(gunichar));
for (i = 0; p[i] != 0; i++) {
check = (guint8) p[i];
g_assert(check < 0x80);
@@ -814,7 +814,7 @@ print_array(GValueArray *array)
(wchar_t*) g_value_get_pointer(value));
}
if (G_VALUE_HOLDS_BOXED(value)) {
- print_array(g_value_get_boxed(value));
+ print_array((GValueArray *)g_value_get_boxed(value));
}
}
printf(")");
diff --git a/src/vte.c b/src/vte.cc
similarity index 100%
rename from src/vte.c
rename to src/vte.cc
diff --git a/src/vteaccess.c b/src/vteaccess.cc
similarity index 100%
rename from src/vteaccess.c
rename to src/vteaccess.cc
diff --git a/src/vteconv.c b/src/vteconv.cc
similarity index 94%
rename from src/vteconv.c
rename to src/vteconv.cc
index 8af2036..d0f2fe6 100644
--- a/src/vteconv.c
+++ b/src/vteconv.cc
@@ -406,10 +406,10 @@ _vte_conv_uc(VteConv converter,
#ifdef VTECONV_MAIN
static gsize
-ucs4_strlen(gunichar *p,
+ucs4_strlen(const gunichar *p,
gsize max_len)
{
- gunichar *q = p + max_len;
+ const gunichar *q = p + max_len;
gsize length = 0;
while (p < q && *p++ != 0)
length++;
@@ -427,10 +427,10 @@ clear(gunichar wide[5], gchar narrow[5])
}
static int
-mixed_strcmp(gunichar *wide, gchar *narrow)
+mixed_strcmp(const gunichar *wide, const guchar *narrow)
{
while (*wide && *narrow) {
- if (*wide != *narrow) {
+ if (*wide != (gunichar)*narrow) {
return -1;
}
wide++;
@@ -489,8 +489,10 @@ test_utf8_validate (void)
static void
test_utf8_get_char_validated (void)
{
- static const char mbyte_test[] = { 0xe2, 0x94, 0x80 };
- static const char mbyte_test_break[] = { 0xe2, 0xe2, 0xe2 };
+ static const guchar mbyte_test_u[] = { 0xe2, 0x94, 0x80 };
+ static const guchar mbyte_test_break_u[] = { 0xe2, 0xe2, 0xe2 };
+ const char *mbyte_test = (const char *)mbyte_test_u;
+ const char *mbyte_test_break = (const char *)mbyte_test_break_u;
g_assert_cmpuint(_vte_conv_utf8_get_char_validated("", 0), ==, (gunichar)-2);
g_assert_cmpuint(_vte_conv_utf8_get_char_validated("\0", 1), ==, 0);
@@ -516,7 +518,7 @@ typedef struct {
} TestData;
static void
-test_narrow_narrow (TestData *tests,
+test_narrow_narrow (const TestData *tests,
gsize n_tests)
{
VteConv conv;
@@ -528,7 +530,7 @@ test_narrow_narrow (TestData *tests,
for (i = 0; i < n_tests; i++) {
memset(buf, 0, sizeof(buf));
- inbuf = tests[i].narrow;
+ inbuf = (const guchar *)tests[i].narrow;
inbytes = tests[i].narrowlen >= 0 ? tests[i].narrowlen : strlen(tests[i].narrow);
outbuf = buf;
outbytes = sizeof(buf);
@@ -536,13 +538,13 @@ test_narrow_narrow (TestData *tests,
ret = _vte_conv(conv, &inbuf, &inbytes, &outbuf, &outbytes);
g_assert_cmpuint(ret, ==, 0);
g_assert_cmpuint(inbytes, ==, 0);
- g_assert_cmpstr(tests[i].narrow, ==, buf);
+ g_assert_cmpstr(tests[i].narrow, ==, (char *)buf);
_vte_conv_close(conv);
}
}
static void
-test_narrow_to_wide (TestData *tests,
+test_narrow_to_wide (const TestData *tests,
gsize n_tests)
{
gunichar widebuf[5];
@@ -554,21 +556,21 @@ test_narrow_to_wide (TestData *tests,
for (i = 0; i < n_tests; i++) {
memset(widebuf, 0, sizeof(widebuf));
- inbuf = tests[i].narrow;
+ inbuf = (const guchar *)tests[i].narrow;
inbytes = tests[i].narrowlen >= 0 ? tests[i].narrowlen : strlen(tests[i].narrow);
- outbuf = (gchar*) widebuf;
+ outbuf = (guchar*) widebuf;
outbytes = sizeof(widebuf);
conv = _vte_conv_open(VTE_CONV_GUNICHAR_TYPE, tests[i].source);
ret = _vte_conv(conv, &inbuf, &inbytes, &outbuf, &outbytes);
g_assert_cmpuint(ret, ==, 0);
g_assert_cmpuint(inbytes, ==, 0);
- g_assert_cmpint(mixed_strcmp(widebuf, tests[i].narrow), ==, 0);
+ g_assert_cmpint(mixed_strcmp(widebuf, inbuf), ==, 0);
_vte_conv_close(conv);
}
}
static void
-test_wide_to_narrow (TestData *tests,
+test_wide_to_narrow (const TestData *tests,
gsize n_tests)
{
char buf[10];
@@ -580,16 +582,16 @@ test_wide_to_narrow (TestData *tests,
for (i = 0; i < n_tests; i++) {
memset(buf, 0, sizeof(buf));
- inbuf = (char*)tests[i].wide;
+ inbuf = (const guchar *)tests[i].wide;
inbytes = tests[i].widelen >= 0 ? tests[i].widelen
: ucs4_strlen(tests[i].wide, sizeof(tests[i].wide)) * sizeof(gunichar);
- outbuf = buf;
+ outbuf = (guchar *)buf;
outbytes = sizeof(buf);
conv = _vte_conv_open(tests[i].target, VTE_CONV_GUNICHAR_TYPE);
ret = _vte_conv(conv, &inbuf, &inbytes, &outbuf, &outbytes);
g_assert_cmpuint(ret, ==, 0);
g_assert_cmpuint(inbytes, ==, 0);
- g_assert_cmpint(mixed_strcmp(tests[i].wide, buf), ==, 0);
+ g_assert_cmpint(mixed_strcmp(tests[i].wide, outbuf), ==, 0);
_vte_conv_close(conv);
}
}
@@ -649,9 +651,9 @@ test_zero_byte_passthrough (void)
/* Test zero-byte pass-through. */
clear(wide_test, narrow_test);
memset(wide_test, 0, sizeof(wide_test));
- inbuf = (gchar*) wide_test;
+ inbuf = (guchar *)wide_test;
inbytes = 3 * sizeof(gunichar);
- outbuf = narrow_test;
+ outbuf = (guchar *)narrow_test;
outbytes = sizeof(narrow_test);
conv = _vte_conv_open("UTF-8", VTE_CONV_GUNICHAR_TYPE);
i = _vte_conv(conv, &inbuf, &inbytes, &outbuf, &outbytes);
@@ -667,9 +669,9 @@ test_zero_byte_passthrough (void)
clear(wide_test, narrow_test);
memset(wide_test, 'A', sizeof(wide_test));
memset(narrow_test, 0, sizeof(narrow_test));
- inbuf = narrow_test;
+ inbuf = (guchar *)narrow_test;
inbytes = 3;
- outbuf = (char*)wide_test;
+ outbuf = (guchar *)wide_test;
outbytes = sizeof(wide_test);
conv = _vte_conv_open(VTE_CONV_GUNICHAR_TYPE, "UTF-8");
i = _vte_conv(conv, &inbuf, &inbytes, &outbuf, &outbytes);
@@ -685,9 +687,9 @@ test_zero_byte_passthrough (void)
clear(wide_test, narrow_test);
memset(wide_test, 'A', sizeof(wide_test));
memset(narrow_test, 0, sizeof(narrow_test));
- inbuf = narrow_test;
+ inbuf = (guchar *)narrow_test;
inbytes = 3;
- outbuf = (char*)wide_test;
+ outbuf = (guchar *)wide_test;
outbytes = sizeof(wide_test);
conv = _vte_conv_open(VTE_CONV_GUNICHAR_TYPE, "ISO-8859-1");
i = _vte_conv(conv, &inbuf, &inbytes, &outbuf, &outbytes);
@@ -703,13 +705,13 @@ test_zero_byte_passthrough (void)
static void
test_utf8_to_utf8_error (void)
{
+ static const guchar mbyte_test[] = { 0xe2, 0x94, 0x80 };
+ static const guchar mbyte_test_break[] = { 0xe2, 0xe2, 0xe2 };
gchar buf[10];
VteConv conv;
const guchar *inbuf;
guchar *outbuf;
gsize inbytes, outbytes;
- static const char mbyte_test[] = { 0xe2, 0x94, 0x80 };
- static const char mbyte_test_break[] = { 0xe2, 0xe2, 0xe2 };
gsize i;
/* Test UTF-8 to UTF-8 error reporting, valid multibyte. */
@@ -717,7 +719,7 @@ test_utf8_to_utf8_error (void)
int ret;
inbuf = mbyte_test;
inbytes = i + 1;
- outbuf = buf;
+ outbuf = (guchar *)buf;
outbytes = sizeof(buf);
conv = _vte_conv_open("UTF-8", "UTF-8");
ret = _vte_conv(conv, &inbuf, &inbytes, &outbuf, &outbytes);
@@ -745,7 +747,7 @@ test_utf8_to_utf8_error (void)
int ret;
inbuf = mbyte_test_break;
inbytes = i + 1;
- outbuf = buf;
+ outbuf = (guchar *)buf;
outbytes = sizeof(buf);
conv = _vte_conv_open("UTF-8", "UTF-8");
ret = _vte_conv(conv, &inbuf, &inbytes, &outbuf, &outbytes);
diff --git a/src/vtedraw.c b/src/vtedraw.cc
similarity index 100%
rename from src/vtedraw.c
rename to src/vtedraw.cc
diff --git a/src/vterowdata.c b/src/vterowdata.cc
similarity index 100%
rename from src/vterowdata.c
rename to src/vterowdata.cc
diff --git a/src/vteseq.c b/src/vteseq.cc
similarity index 99%
rename from src/vteseq.c
rename to src/vteseq.cc
index 80c4e65..baf7592 100644
--- a/src/vteseq.c
+++ b/src/vteseq.cc
@@ -3249,7 +3249,7 @@ vte_sequence_handler_reset_highlight_foreground_color (VteTerminal *terminal, GV
static const struct vteseq_n_struct *
vteseq_n_lookup (register const char *str, register unsigned int len);
-#include"vteseq-n.c"
+#include"vteseq-n.cc"
#undef VTE_SEQUENCE_HANDLER
diff --git a/src/vtestream-file.h b/src/vtestream-file.h
index 27e5f66..d8997d9 100644
--- a/src/vtestream-file.h
+++ b/src/vtestream-file.h
@@ -1291,7 +1291,7 @@ static void
test_fakes (void)
{
char buf[100], buf2[100];
- VteBoa *boa = g_object_new (VTE_TYPE_BOA, NULL);
+ VteBoa *boa = (VteBoa *)g_object_new (VTE_TYPE_BOA, NULL);
/* Encrypt */
strcpy(buf, "abcdXYZ1234!!!");
@@ -1353,7 +1353,7 @@ test_fakes (void)
static void
test_snake (void)
{
- VteSnake *snake = g_object_new (VTE_TYPE_SNAKE, NULL);
+ VteSnake *snake = (VteSnake *)g_object_new (VTE_TYPE_SNAKE, NULL);
/* Test overwriting data */
snake_write (snake, 0, "Armadillo");
@@ -1446,7 +1446,7 @@ test_snake (void)
static void
test_boa (void)
{
- VteBoa *boa = g_object_new (VTE_TYPE_BOA, NULL);
+ VteBoa *boa = (VteBoa *)g_object_new (VTE_TYPE_BOA, NULL);
VteSnake *snake = (VteSnake *) &boa->parent;
/* State 1 */
diff --git a/src/vtestream.c b/src/vtestream.cc
similarity index 100%
rename from src/vtestream.c
rename to src/vtestream.cc
diff --git a/src/vtetree.c b/src/vtetree.cc
similarity index 100%
rename from src/vtetree.c
rename to src/vtetree.cc
diff --git a/src/vtetypebuiltins.c.template b/src/vtetypebuiltins.cc.template
similarity index 100%
rename from src/vtetypebuiltins.c.template
rename to src/vtetypebuiltins.cc.template
diff --git a/src/vteunistr.c b/src/vteunistr.cc
similarity index 100%
rename from src/vteunistr.c
rename to src/vteunistr.cc
diff --git a/src/vteutils.c b/src/vteutils.cc
similarity index 100%
rename from src/vteutils.c
rename to src/vteutils.cc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]