| 1 |
/**************************************************************************/ |
| 2 |
/* */ |
| 3 |
/* This file is part of Frama-C. */ |
| 4 |
/* */ |
| 5 |
/* Copyright (C) 2007-2022 */ |
| 6 |
/* CEA (Commissariat à l'énergie atomique et aux énergies */ |
| 7 |
/* alternatives) */ |
| 8 |
/* */ |
| 9 |
/* you can redistribute it and/or modify it under the terms of the GNU */ |
| 10 |
/* Lesser General Public License as published by the Free Software */ |
| 11 |
/* Foundation, version 2.1. */ |
| 12 |
/* */ |
| 13 |
/* It is distributed in the hope that it will be useful, */ |
| 14 |
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ |
| 15 |
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ |
| 16 |
/* GNU Lesser General Public License for more details. */ |
| 17 |
/* */ |
| 18 |
/* See the GNU Lesser General Public License version 2.1 */ |
| 19 |
/* for more details (enclosed in the file licenses/LGPLv2.1). */ |
| 20 |
/* */ |
| 21 |
/**************************************************************************/ |
| 22 |
|
| 23 |
#ifndef __FC_ICONV |
| 24 |
#define __FC_ICONV |
| 25 |
#include "features.h" |
| 26 |
__PUSH_FC_STDLIB |
| 27 |
#include "__fc_define_size_t.h" |
| 28 |
|
| 29 |
__BEGIN_DECLS |
| 30 |
|
| 31 |
typedef void * iconv_t; |
| 32 |
|
| 33 |
extern int __fc_errno; |
| 34 |
/*@ assigns *outbuf[0 .. *outbytesleft-1] \from *inbuf[0 .. *inbytesleft-1]; |
| 35 |
assigns __fc_errno ; */ |
| 36 |
extern size_t iconv(iconv_t cd, char **restrict inbuf, size_t *restrict inbytesleft, |
| 37 |
char **restrict outbuf, size_t *restrict outbytesleft); |
| 38 |
|
| 39 |
/*@ assigns __fc_errno; |
| 40 |
ensures result_zero_or_neg: \result == 0 || \result == -1 ; */ |
| 41 |
extern int iconv_close(iconv_t); |
| 42 |
|
| 43 |
/*@ assigns \result \from tocode[..],fromcode[..]; |
| 44 |
assigns __fc_errno; */ |
| 45 |
extern iconv_t iconv_open(const char *tocode, const char *fromcode); |
| 46 |
|
| 47 |
__END_DECLS |
| 48 |
|
| 49 |
__POP_FC_STDLIB |
| 50 |
#endif |