File tree Expand file tree Collapse file tree 3 files changed +50
-1
lines changed Expand file tree Collapse file tree 3 files changed +50
-1
lines changed Original file line number Diff line number Diff line change 1+ // ===-- Definition of a class for mbstate_t and conversion -----*-- C++ -*-===//
2+ // 
3+ //  Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+ //  See https://llvm.org/LICENSE.txt for license information.
5+ //  SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+ // 
7+ // ===----------------------------------------------------------------------===//
8+ 
9+ #ifndef  LLVM_LIBC_SRC___SUPPORT_CHARACTER_CONVERTER_H
10+ #define  LLVM_LIBC_SRC___SUPPORT_CHARACTER_CONVERTER_H 
111
212#include  " hdr/types/wchar_t.h" 
313#include  " src/__support/wchar/mbstate.h" 
414#include  " src/__support/wchar/utf_ret.h" 
515
16+ namespace  LIBC_NAMESPACE_DECL  {
17+ 
618class  CharacterConverter  {
719private: 
820  mbstate_t  *state;
@@ -18,3 +30,7 @@ class CharacterConverter {
1830  utf_ret<char > pop_utf8 ();
1931  utf_ret<wchar_t > pop_utf32 ();
2032};
33+ 
34+ } //  namespace LIBC_NAMESPACE_DECL
35+ 
36+ #endif  //  LLVM_LIBC_SRC___SUPPORT_CHARACTER_CONVERTER_H
Original file line number Diff line number Diff line change 1+ // ===-- Definition of mbstate_t -------------------------- -----*-- C++ -*-===//
2+ // 
3+ //  Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+ //  See https://llvm.org/LICENSE.txt for license information.
5+ //  SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+ // 
7+ // ===----------------------------------------------------------------------===//
8+ 
9+ #ifndef  LLVM_LIBC_SRC___SUPPORT_MBSTATE_H
10+ #define  LLVM_LIBC_SRC___SUPPORT_MBSTATE_H 
111
212#include  " hdr/types/wchar_t.h" 
313
14+ namespace  LIBC_NAMESPACE_DECL  {
15+ 
416struct  mbstate_t  {
517  wchar_t  partial;
618  unsigned  char  bits_processed;
719  unsigned  char  total_bytes;
8- };
20+ }; 
21+ 
22+ } //  namespace LIBC_NAMESPACE_DECL
23+ 
24+ #endif  //  LLVM_LIBC_SRC___SUPPORT_MBSTATE_H
25+ 
Original file line number Diff line number Diff line change 1+ // ===-- Definition of utf_ret ----------------------------------*-- C++ -*-===//
2+ // 
3+ //  Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+ //  See https://llvm.org/LICENSE.txt for license information.
5+ //  SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+ // 
7+ // ===----------------------------------------------------------------------===//
8+ 
9+ #ifndef  LLVM_LIBC_SRC___SUPPORT_UTF_RET_H
10+ #define  LLVM_LIBC_SRC___SUPPORT_UTF_RET_H 
11+ 
12+ namespace  LIBC_NAMESPACE_DECL  {
113
214template  <typename  T> struct  utf_ret  {
315  T out;
416  int  error;
517};
18+ 
19+ } //  namespace LIBC_NAMESPACE_DECL
20+ 
21+ #endif  //  LLVM_LIBC_SRC___SUPPORT_UTF_RET_H
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments