monotone

monotone Mtn Source Tree

Root/charset.hh

1#ifndef __CHARSET_HH__
2#define __CHARSET_HH__
3
4// Copyright (C) 2002 Graydon Hoare <graydon@pobox.com>
5//
6// This program is made available under the GNU GPL version 2.0 or
7// greater. See the accompanying file COPYING for details.
8//
9// This program is distributed WITHOUT ANY WARRANTY; without even the
10// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11// PURPOSE.
12
13#include "vocab.hh"
14
15// Charset conversions.
16
17void charset_convert(std::string const & src_charset,
18 std::string const & dst_charset,
19 std::string const & src,
20 std::string & dst);
21void system_to_utf8(external const & system, utf8 & utf);
22void utf8_to_system(utf8 const & utf, external & system);
23void utf8_to_system(utf8 const & utf, std::string & system);
24void ace_to_utf8(ace const & ac, utf8 & utf);
25void utf8_to_ace(utf8 const & utf, ace & a);
26bool utf8_validate(utf8 const & utf);
27
28// Returns length in characters (not bytes).
29size_t display_width(utf8 const & utf);
30
31// Specific internal / external conversions for various vocab terms.
32void internalize_cert_name(utf8 const & utf, cert_name & c);
33void internalize_cert_name(external const & ext, cert_name & c);
34void externalize_cert_name(cert_name const & c, utf8 & utf);
35void externalize_cert_name(cert_name const & c, external & ext);
36void internalize_rsa_keypair_id(utf8 const & utf, rsa_keypair_id & key);
37void internalize_rsa_keypair_id(external const & ext, rsa_keypair_id & key);
38void externalize_rsa_keypair_id(rsa_keypair_id const & key, utf8 & utf);
39void externalize_rsa_keypair_id(rsa_keypair_id const & key, external & ext);
40void internalize_var_domain(utf8 const & utf, var_domain & d);
41void internalize_var_domain(external const & ext, var_domain & d);
42void externalize_var_domain(var_domain const & d, utf8 & utf);
43void externalize_var_domain(var_domain const & d, external & ext);
44
45// Local Variables:
46// mode: C++
47// fill-column: 76
48// c-file-style: "gnu"
49// indent-tabs-mode: nil
50// End:
51// vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s:
52
53#endif

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status