summaryrefslogtreecommitdiff
path: root/support/dktools/dk4rec26.c
blob: bceb62dff328846223195eb8fc75b931393836bc (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/*
Copyright (C) 2017-2020, Dirk Krause
SPDX-License-Identifier: BSD-3-Clause
*/

/*
	WARNING: This file was generated by the dkct program (see
	http://dktools.sourceforge.net/ for details).
	Changes you make here will be lost if dkct is run again!
	You should modify the original source and run dkct on it.
	Original source: dk4rec26.ctr
*/

/**	@file dk4rec26.c The dk4rec26 module.
*/


#line 96 "dk4rec26.ctr"

#include "dk4conf.h"


#include "dk4rec26.h"



unsigned long
dk4recode_char_to_ul(unsigned long back)
{
  back &= 0x000000FFUL;
  return back;
}



unsigned long
dk4recode_c16_to_ul(unsigned long back)
{
  back &= 0x0000FFFFUL;
  return back;
}



unsigned long
dk4recode_c32_to_ul(unsigned long back)
{
  back &= 0xFFFFFFFFUL;
  return back;
}



unsigned long
dk4recode_dk_to_ul(unsigned long back)
{
#if	DK4_CHAR_SIZE > 1
#if	DK4_CHAR_SIZE > 2
  back &= 0xFFFFFFFFUL;
#else
  back &= 0x0000FFFFUL;
#endif
#else
  back &= 0x000000FFUL;
#endif
  return back;
}



unsigned long
dk4recode_wc_to_ul(unsigned long back)
{
#if DK4_SIZEOF_WCHAR_T > 1
#if DK4_SIZEOF_WCHAR_T > 2
  back &= 0xFFFFFFFFUL;
#else
  back &= 0x0000FFFFUL;
#endif
#else
  back &= 0x000000FFUL;
#endif
  return back;
}



#if 0

unsigned long
dk4recode_wx_to_ul(unsigned long back)
{
#if	DK4_SIZEOF_WXCHAR > 1
#if	DK4_SIZEOF_WXCHAR > 2
  back &= 0xFFFFFFFFUL;
#else
  back &= 0x0000FFFFUL;
#endif
#else
  back &= 0x000000FFUL;
#endif
  return back;
}

#endif