use a char32_t character in the base Stream class

Add an operator<<(char32_t) to the Stream class, char32_t will be used
as a main character instead of a wchar_t (this is needed on systems
where sizeof(wchar_t) is equal to 2).

while here:
- add to utf8:
  size_t wide_to_int(const Stream & stream, size_t stream_index, int & res, bool & correct)
  template<typename StreamType, typename OutputFunction> bool wide_to_output_function(StreamType & buffer, OutputFunction output_function, int mode = 1)
  template<typename OutputFunction> bool wide_to_output_function_by_index(const Stream & stream, OutputFunction output_function, int mode)
- add to convert/misc:
  bool try_esc_to_tex(char32_t c, pt::Stream & out)
  bool try_esc_to_html(char32_t c, pt::Stream & out)
This commit is contained in:
2024-05-31 23:11:11 +02:00
parent 2689c9fece
commit c0838de3a4
10 changed files with 365 additions and 46 deletions

View File

@@ -1,8 +1,7 @@
# DO NOT DELETE
./convert/inttostr.o: ./convert/inttostr.h
./convert/misc.o: ./convert/misc.h ./convert/text.h textstream/stream.h
./convert/misc.o: textstream/types.h ./convert/inttostr.h utf8/utf8.h
./convert/misc.o: ./convert/misc.h textstream/stream.h ./convert/inttostr.h
./convert/text.o: ./convert/text.h ./convert/text_private.h
./convert/double.o: ./convert/double.h textstream/textstream.h
./convert/double.o: textstream/stream.h space/space.h convert/inttostr.h
@@ -29,15 +28,14 @@
./space/space.o: textstream/stream.h space/space.h date/date.h
./space/space.o: membuffer/membuffer.h textstream/types.h
./space/space.o: textstream/stream_private.h convert/strtoint.h
./space/space.o: ./convert/text.h ./convert/misc.h textstream/types.h
./space/space.o: ./convert/double.h
./space/space.o: ./convert/text.h ./convert/misc.h ./convert/double.h
./space/spaceparser.o: ./space/spaceparser.h ./space/space.h
./space/spaceparser.o: convert/inttostr.h utf8/utf8.h textstream/stream.h
./space/spaceparser.o: convert/baseparser.h textstream/textstream.h
./space/spaceparser.o: textstream/stream.h space/space.h date/date.h
./space/spaceparser.o: membuffer/membuffer.h textstream/types.h
./space/spaceparser.o: textstream/stream_private.h convert/strtoint.h
./space/spaceparser.o: ./convert/text.h ./convert/misc.h textstream/types.h
./space/spaceparser.o: ./convert/text.h ./convert/misc.h
./space/keyvalueparser.o: ./space/keyvalueparser.h ./space/space.h
./space/keyvalueparser.o: convert/inttostr.h utf8/utf8.h textstream/stream.h
./space/keyvalueparser.o: convert/baseparser.h textstream/textstream.h
@@ -45,7 +43,6 @@
./space/keyvalueparser.o: membuffer/membuffer.h textstream/types.h
./space/keyvalueparser.o: textstream/stream_private.h convert/strtoint.h
./space/keyvalueparser.o: ./convert/text.h ./convert/misc.h
./space/keyvalueparser.o: textstream/types.h
./textstream/stream_private.o: textstream/stream_private.h
./utf8/utf8.o: ./utf8/utf8.h textstream/stream.h
./csv/csvparser.o: ./csv/csvparser.h space/space.h convert/inttostr.h