1 |
|
|
/*************************************************************************** |
2 |
|
|
* Copyright (c) 2024 Microsoft Corporation |
3 |
|
|
* |
4 |
|
|
* This program and the accompanying materials are made available under the |
5 |
|
|
* terms of the MIT License which is available at |
6 |
|
|
* https://opensource.org/licenses/MIT. |
7 |
|
|
* |
8 |
|
|
* SPDX-License-Identifier: MIT |
9 |
|
|
**************************************************************************/ |
10 |
|
|
|
11 |
|
|
|
12 |
|
|
/**************************************************************************/ |
13 |
|
|
/**************************************************************************/ |
14 |
|
|
/** */ |
15 |
|
|
/** GUIX Component */ |
16 |
|
|
/** */ |
17 |
|
|
/** System Management (System) */ |
18 |
|
|
/** */ |
19 |
|
|
/**************************************************************************/ |
20 |
|
|
|
21 |
|
|
#define GX_SOURCE_CODE |
22 |
|
|
|
23 |
|
|
|
24 |
|
|
/* Include necessary system files. */ |
25 |
|
|
|
26 |
|
|
#include "gx_api.h" |
27 |
|
|
#include "gx_system.h" |
28 |
|
|
#include "gx_display.h" |
29 |
|
|
|
30 |
|
|
/* Bring in externs for caller checking code. */ |
31 |
|
|
GX_CALLER_CHECKING_EXTERNS |
32 |
|
|
/**************************************************************************/ |
33 |
|
|
/* */ |
34 |
|
|
/* FUNCTION RELEASE */ |
35 |
|
|
/* */ |
36 |
|
|
/* _gxe_display_language_table_get PORTABLE C */ |
37 |
|
|
/* 6.1 */ |
38 |
|
|
/* AUTHOR */ |
39 |
|
|
/* */ |
40 |
|
|
/* Kenneth Maxwell, Microsoft Corporation */ |
41 |
|
|
/* */ |
42 |
|
|
/* DESCRIPTION */ |
43 |
|
|
/* */ |
44 |
|
|
/* This function checks for errors in display language table get call. */ |
45 |
|
|
/* */ |
46 |
|
|
/* INPUT */ |
47 |
|
|
/* */ |
48 |
|
|
/* display Pointer to display instance. */ |
49 |
|
|
/* language_table Pointer to string table */ |
50 |
|
|
/* language_count Number of languages in table */ |
51 |
|
|
/* string_count Number of strings in each */ |
52 |
|
|
/* language */ |
53 |
|
|
/* */ |
54 |
|
|
/* OUTPUT */ |
55 |
|
|
/* */ |
56 |
|
|
/* status Completion status */ |
57 |
|
|
/* */ |
58 |
|
|
/* CALLS */ |
59 |
|
|
/* */ |
60 |
|
|
/* _gx_display_language_table_get Actual display language table */ |
61 |
|
|
/* get call */ |
62 |
|
|
/* */ |
63 |
|
|
/* CALLED BY */ |
64 |
|
|
/* */ |
65 |
|
|
/* Application Code */ |
66 |
|
|
/* */ |
67 |
|
|
/* RELEASE HISTORY */ |
68 |
|
|
/* */ |
69 |
|
|
/* DATE NAME DESCRIPTION */ |
70 |
|
|
/* */ |
71 |
|
|
/* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ |
72 |
|
|
/* 09-30-2020 Kenneth Maxwell Modified comment(s), */ |
73 |
|
|
/* resulting in version 6.1 */ |
74 |
|
|
/* */ |
75 |
|
|
/**************************************************************************/ |
76 |
|
|
#if defined(GX_ENABLE_DEPRECATED_STRING_API) |
77 |
|
10 |
UINT _gxe_display_language_table_get(GX_DISPLAY *display, |
78 |
|
|
GX_CHAR ****language_table, GX_UBYTE *language_count, UINT *string_count) |
79 |
|
|
{ |
80 |
|
|
UINT status; |
81 |
|
|
|
82 |
|
|
/* Check for invalid caller. */ |
83 |
✓✓✓✓ ✓✓ |
10 |
GX_INIT_AND_THREADS_CALLER_CHECKING |
84 |
|
|
|
85 |
|
|
/* Check for invalid pointer. */ |
86 |
✓✓ |
8 |
if (display == GX_NULL) |
87 |
|
|
{ |
88 |
|
4 |
return GX_PTR_ERROR; |
89 |
|
|
} |
90 |
|
|
|
91 |
|
|
/* Call actual system language table get routine. */ |
92 |
|
4 |
status = _gx_display_language_table_get(display, language_table, |
93 |
|
|
language_count, string_count); |
94 |
|
4 |
return(status); |
95 |
|
|
} |
96 |
|
|
#endif |
97 |
|
|
|
98 |
|
|
/**************************************************************************/ |
99 |
|
|
/* */ |
100 |
|
|
/* FUNCTION RELEASE */ |
101 |
|
|
/* */ |
102 |
|
|
/* _gxe_display_language_table_get_ext PORTABLE C */ |
103 |
|
|
/* 6.1 */ |
104 |
|
|
/* AUTHOR */ |
105 |
|
|
/* */ |
106 |
|
|
/* Kenneth Maxwell, Microsoft Corporation */ |
107 |
|
|
/* */ |
108 |
|
|
/* DESCRIPTION */ |
109 |
|
|
/* */ |
110 |
|
|
/* This function checks for errors in display language table get call. */ |
111 |
|
|
/* */ |
112 |
|
|
/* INPUT */ |
113 |
|
|
/* */ |
114 |
|
|
/* display Pointer to display instance. */ |
115 |
|
|
/* table Pointer to string table */ |
116 |
|
|
/* language_count Number of languages in table */ |
117 |
|
|
/* string_count Number of strings in each */ |
118 |
|
|
/* language */ |
119 |
|
|
/* */ |
120 |
|
|
/* OUTPUT */ |
121 |
|
|
/* */ |
122 |
|
|
/* status Completion status */ |
123 |
|
|
/* */ |
124 |
|
|
/* CALLS */ |
125 |
|
|
/* */ |
126 |
|
|
/* _gx_display_language_table_get_ext Actual display language table */ |
127 |
|
|
/* get ext call */ |
128 |
|
|
/* */ |
129 |
|
|
/* CALLED BY */ |
130 |
|
|
/* */ |
131 |
|
|
/* Application Code */ |
132 |
|
|
/* */ |
133 |
|
|
/* RELEASE HISTORY */ |
134 |
|
|
/* */ |
135 |
|
|
/* DATE NAME DESCRIPTION */ |
136 |
|
|
/* */ |
137 |
|
|
/* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ |
138 |
|
|
/* 09-30-2020 Kenneth Maxwell Modified comment(s), */ |
139 |
|
|
/* resulting in version 6.1 */ |
140 |
|
|
/* */ |
141 |
|
|
/**************************************************************************/ |
142 |
|
5 |
UINT _gxe_display_language_table_get_ext(GX_DISPLAY *display, GX_STRING ***table, GX_UBYTE *language_count, UINT *string_count) |
143 |
|
|
{ |
144 |
|
|
UINT status; |
145 |
|
|
|
146 |
|
|
/* Check for invalid caller. */ |
147 |
✓✓✓✓ ✓✓ |
5 |
GX_INIT_AND_THREADS_CALLER_CHECKING |
148 |
|
|
|
149 |
|
|
/* Check for invalid pointer. */ |
150 |
✓✓ |
3 |
if (display == GX_NULL) |
151 |
|
|
{ |
152 |
|
1 |
return GX_PTR_ERROR; |
153 |
|
|
} |
154 |
|
|
|
155 |
|
|
/* Call actual system language table get routine. */ |
156 |
|
2 |
status = _gx_display_language_table_get_ext(display, table, language_count, string_count); |
157 |
|
|
|
158 |
|
2 |
return(status); |
159 |
|
|
} |
160 |
|
|
|