GNU Octave 11.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
unistr-wrappers.c
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////
2//
3// Copyright (C) 2018-2026 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 (HAVE_CONFIG_H)
27# include "config.h"
28#endif
29
30#include "unistr.h"
31
32#include "unistr-wrappers.h"
33
34const uint8_t *
35octave_u8_check_wrapper (const uint8_t *src, size_t n)
36{
37// Silence invalid warning in gnulib
38#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC
39# pragma GCC diagnostic push
40# pragma GCC diagnostic ignored "-Wcast-qual"
41#endif
42 return u8_check (src, n);
43#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC
44# pragma GCC diagnostic pop
45#endif
46}
47
48int
49octave_u8_strmblen_wrapper (const uint8_t *src)
50{
51 return u8_strmblen (src);
52}
53
54size_t
55octave_u8_mbsnlen_wrapper (const uint8_t *src, size_t n)
56{
57 return u8_mbsnlen (src, n);
58}
59
60int
61octave_u8_strmbtouc_wrapper (uint32_t *puc, const uint8_t *src)
62{
63 return u8_strmbtouc (puc, src);
64}
65
66uint8_t *
67octave_u16_to_u8_wrapper (const uint16_t *src, size_t src_len,
68 uint8_t *result_buf, size_t *lengthp)
69{
70 return u16_to_u8 (src, src_len, result_buf, lengthp);
71}
72
73uint8_t *
74octave_u32_to_u8_wrapper (const uint32_t *src, size_t src_len,
75 uint8_t *result_buf, size_t *lengthp)
76{
77 return u32_to_u8 (src, src_len, result_buf, lengthp);
78}
79
80uint16_t *
81octave_u8_to_u16_wrapper (const uint8_t *src, size_t src_len,
82 uint16_t *result_buf, size_t *lengthp)
83{
84 return u8_to_u16 (src, src_len, result_buf, lengthp);
85}
86
87uint32_t *
88octave_u8_to_u32_wrapper (const uint8_t *src, size_t src_len,
89 uint32_t *result_buf, size_t *lengthp)
90{
91 return u8_to_u32 (src, src_len, result_buf, lengthp);
92}
const uint8_t * octave_u8_check_wrapper(const uint8_t *src, size_t n)
int octave_u8_strmbtouc_wrapper(uint32_t *puc, const uint8_t *src)
int octave_u8_strmblen_wrapper(const uint8_t *src)
uint32_t * octave_u8_to_u32_wrapper(const uint8_t *src, size_t src_len, uint32_t *result_buf, size_t *lengthp)
uint8_t * octave_u32_to_u8_wrapper(const uint32_t *src, size_t src_len, uint8_t *result_buf, size_t *lengthp)
uint16_t * octave_u8_to_u16_wrapper(const uint8_t *src, size_t src_len, uint16_t *result_buf, size_t *lengthp)
uint8_t * octave_u16_to_u8_wrapper(const uint16_t *src, size_t src_len, uint8_t *result_buf, size_t *lengthp)
size_t octave_u8_mbsnlen_wrapper(const uint8_t *src, size_t n)