Skip to content

Commit 28a274c

Browse files
committed
Unified source codes' comments.
1 parent c61d24f commit 28a274c

18 files changed

+1452
-1296
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2023 The C++ Plus Project.
1+
# Copyright (C) 2023-2024 The C++ Plus Project.
22
# This file is part of the cppp-reiconv library.
33
#
44
# The cppp-reiconv library is free software; you can redistribute it

lib/all_encodings.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
/**
2+
* @file all_encodings.h
3+
* @brief Definition of `all_encodings[]`.
4+
* @copyright Copyright (C) 2024 The C++ Plus Project.
5+
*/
16
/*
2-
* Copyright (C) 2024 The C++ Plus Project.
37
* This file is part of the cppp-reiconv library.
48
*
59
* The cppp-reiconv library is free software; you can redistribute it
@@ -20,7 +24,7 @@
2024
#ifndef _ALL_ENCODINGS_H_
2125
#define _ALL_ENCODINGS_H_
2226

23-
#include "converters.h"
27+
#include "converters.h" // IWYU pragma: keep. Include all the converters for `encodings.h.snippet`.
2428
#include "encoding.h"
2529

2630
#define DEFENCODING(xxx_names, xxx, xxx_index, xxx_ifuncs1, xxx_ifuncs2, xxx_ofuncs1, xxx_ofuncs2) \

lib/codepage_to_ei.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/**
2+
* @file codepage_to_ei.h
3+
* @brief A mapping of codepages to encoding indexes.
4+
* @copyright Copyright (C) 2024 The C++ Plus Project.
5+
*/
6+
7+
#ifndef _CODEPAGE_TO_EI_H_
8+
#define _CODEPAGE_TO_EI_H_
9+
10+
#include "encoding_indexes.h" // IWYU pragma: keep
11+
12+
#define DEFENCODING(xxx_names, xxx, xxx_index, xxx_ifuncs1, xxx_ifuncs2, xxx_ofuncs1, xxx_ofuncs2)
13+
#define DEFCODEPAGE(codepage, xxx) [codepage] = ei_##xxx + 1,
14+
#define DEFINDEX(alias, name)
15+
16+
static const int codepage_to_eindex[] = {
17+
#include "encodings.h.snippet"
18+
};
19+
20+
#undef DEFINDEX
21+
#undef DEFENCODING
22+
#undef DEFCODEPAGE
23+
24+
#endif /* _CODEPAGE_TO_EI_H_ */

0 commit comments

Comments
 (0)