summaryrefslogtreecommitdiff
path: root/src/utilities/fqterm_convert.h
blob: 9205699bbd398c7cb8134116c90b128fad76a764 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: GPL-2.0-or-later

#ifndef FQTERM_CONVERT_H
#define FQTERM_CONVERT_H

namespace FQTerm {

class FQTermConvert {
 public:
  FQTermConvert();
  ~FQTermConvert();

  char *G2B(const char *string, int length);
  char *B2G(const char *string, int length);

 private:
  void g2b(unsigned char c1, unsigned char c2, char *s);
  void b2g(unsigned char c1, unsigned char c2, char *s);

  static unsigned char GtoB[];
  static unsigned char BtoG[];
};

}  // namespace FQTerm

#endif  // FQTERM_CONVERT_H