GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
uniconv-wrappers.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (C) 2017-2023 The Octave Project Developers
4 //
5 // See the file COPYRIGHT.md in the top-level directory of this
6 // distribution or <https://octave.org/copyright/>.
7 //
8 // This file is part of Octave.
9 //
10 // Octave is free software: you can redistribute it and/or modify it
11 // under the terms of the GNU General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // Octave is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU General Public License for more details.
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with Octave; see the file COPYING. If not, see
22 // <https://www.gnu.org/licenses/>.
23 //
24 ////////////////////////////////////////////////////////////////////////
25 
26 #if ! defined (octave_uniconv_wrappers_h)
27 #define octave_uniconv_wrappers_h 1
28 
29 #if defined (__cplusplus)
30 # include <cstddef>
31 # include <cstdint>
32 #else
33 # include <stddef.h>
34 # include <stdint.h>
35 #endif
36 
37 #if defined __cplusplus
38 extern "C" {
39 #endif
40 
41 // Since we omit arguments we don't care about in Octave, these aren't
42 // named with the _wrapper suffix.
43 
44 extern OCTAVE_API uint8_t *
45 octave_u8_conv_from_encoding (const char *fromcode, const char *src,
46  size_t srclen, size_t *lengthp);
47 
48 extern OCTAVE_API char *
49 octave_u8_conv_to_encoding (const char *tocode, const uint8_t *src,
50  size_t srclen, size_t *lengthp);
51 
52 extern OCTAVE_API char *
53 octave_u8_conv_to_encoding_strict (const char *tocode, const uint8_t *src,
54  size_t srclen, size_t *lengthp);
55 
56 extern OCTAVE_API char *
57 octave_u32_conv_to_encoding_strict (const char *tocode, const uint32_t *src,
58  size_t srclen, size_t *lengthp);
59 
60 extern OCTAVE_API uint8_t *
62  (const char *fromcode, const char *src, size_t srclen,
63  size_t *offsets, size_t *lengthp);
64 
65 extern OCTAVE_API char *
67  (const char *tocode, const uint8_t *src, size_t srclen,
68  size_t *offsets, size_t *lengthp);
69 
70 extern OCTAVE_API char * u8_from_wchar (const wchar_t *wc);
71 
72 extern OCTAVE_API wchar_t * u8_to_wchar (const char *u8_char);
73 
74 #if defined __cplusplus
75 }
76 #endif
77 
78 #endif
#define OCTAVE_API
Definition: main.in.cc:55
OCTAVE_API char * octave_u32_conv_to_encoding_strict(const char *tocode, const uint32_t *src, size_t srclen, size_t *lengthp)
OCTAVE_API char * octave_u8_conv_to_encoding_offsets(const char *tocode, const uint8_t *src, size_t srclen, size_t *offsets, size_t *lengthp)
OCTAVE_API wchar_t * u8_to_wchar(const char *u8_char)
OCTAVE_API char * octave_u8_conv_to_encoding(const char *tocode, const uint8_t *src, size_t srclen, size_t *lengthp)
OCTAVE_API char * u8_from_wchar(const wchar_t *wc)
OCTAVE_API uint8_t * octave_u8_conv_from_encoding(const char *fromcode, const char *src, size_t srclen, size_t *lengthp)
OCTAVE_API char * octave_u8_conv_to_encoding_strict(const char *tocode, const uint8_t *src, size_t srclen, size_t *lengthp)
OCTAVE_API uint8_t * octave_u8_conv_from_encoding_offsets(const char *fromcode, const char *src, size_t srclen, size_t *offsets, size_t *lengthp)