Commit f602debb9ac6fe3045fb7c5f863e16e183791648

Authored by Perry Werneck
Committed by GitHub
2 parents 1864e1a7 44a925ac
Exists in develop

Merge pull request #51 from PerryWerneck/macos

Fixing macos action, reverting use of inner functions.
.github/workflows/macos.yml 0 → 100644
@@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
  1 +name: MacOS Test
  2 +on:
  3 + push:
  4 + branches:
  5 + - macos
  6 +jobs:
  7 + build:
  8 + name: Build for macos
  9 + runs-on: macos-latest
  10 + steps:
  11 + - name: Checkout
  12 + uses: actions/checkout@v3
  13 + - name: Install Pre reqs
  14 + run: |
  15 + brew update
  16 + brew install xz automake binutils coreutils curl gettext libtool openssl pkgconfig
  17 + find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
  18 + brew upgrade
  19 + - name: build
  20 + run: ./mac/ci-build.sh
  21 +
  22 +
src/core/properties/signed.c
@@ -108,11 +108,19 @@ LIB3270_EXPORT const char * lib3270_get_ssl_state_as_string(const H3270 * hSessi @@ -108,11 +108,19 @@ LIB3270_EXPORT const char * lib3270_get_ssl_state_as_string(const H3270 * hSessi
108 return _( "Unknown" ); 108 return _( "Unknown" );
109 } 109 }
110 110
111 -const LIB3270_INT_PROPERTY * lib3270_get_int_properties_list(void) { 111 +static int lib3270_get_connection_state_as_int(const H3270 *hSession) {
  112 + return (int) lib3270_get_connection_state(hSession);
  113 +}
  114 +
  115 +static int lib3270_get_ssl_state_as_int(const H3270 * hSession) {
  116 + return (int) lib3270_get_ssl_state(hSession);
  117 +}
112 118
113 - auto int lib3270_get_connection_state_as_int(const H3270 *hSession);  
114 - auto int lib3270_get_ssl_state_as_int(const H3270 * hSession);  
115 - auto int lib3270_get_program_message_as_int(const H3270 *hSession); 119 +static int lib3270_get_program_message_as_int(const H3270 *hSession) {
  120 + return (int) lib3270_get_program_message(hSession);
  121 +}
  122 +
  123 +const LIB3270_INT_PROPERTY * lib3270_get_int_properties_list(void) {
116 124
117 static const LIB3270_INT_PROPERTY properties[] = { 125 static const LIB3270_INT_PROPERTY properties[] = {
118 126
@@ -158,18 +166,6 @@ const LIB3270_INT_PROPERTY * lib3270_get_int_properties_list(void) { @@ -158,18 +166,6 @@ const LIB3270_INT_PROPERTY * lib3270_get_int_properties_list(void) {
158 } 166 }
159 }; 167 };
160 168
161 - int lib3270_get_connection_state_as_int(const H3270 *hSession) {  
162 - return (int) lib3270_get_connection_state(hSession);  
163 - }  
164 -  
165 - int lib3270_get_ssl_state_as_int(const H3270 * hSession) {  
166 - return (int) lib3270_get_ssl_state(hSession);  
167 - }  
168 -  
169 - int lib3270_get_program_message_as_int(const H3270 *hSession) {  
170 - return (int) lib3270_get_program_message(hSession);  
171 - }  
172 -  
173 return properties; 169 return properties;
174 } 170 }
175 171
src/core/properties/string.c
@@ -44,10 +44,16 @@ LIB3270_EXPORT const char * lib3270_get_termname(const H3270 *hSession) { @@ -44,10 +44,16 @@ LIB3270_EXPORT const char * lib3270_get_termname(const H3270 *hSession) {
44 return hSession->termname; 44 return hSession->termname;
45 } 45 }
46 46
47 -LIB3270_EXPORT const LIB3270_STRING_PROPERTY * lib3270_get_string_properties_list(void) { 47 +static const char * get_version(const H3270 GNUC_UNUSED(*hSession)) {
  48 + return lib3270_get_version();
  49 +}
  50 +
  51 +static const char * get_revision(const H3270 GNUC_UNUSED(*hSession)) {
  52 + return lib3270_get_revision();
  53 +}
  54 +
48 55
49 - auto const char * get_version(const H3270 GNUC_UNUSED(*hSession));  
50 - auto const char * get_revision(const H3270 GNUC_UNUSED(*hSession)); 56 +LIB3270_EXPORT const LIB3270_STRING_PROPERTY * lib3270_get_string_properties_list(void) {
51 57
52 static const LIB3270_STRING_PROPERTY properties[] = { 58 static const LIB3270_STRING_PROPERTY properties[] = {
53 59
@@ -192,14 +198,6 @@ LIB3270_EXPORT const LIB3270_STRING_PROPERTY * lib3270_get_string_properties_lis @@ -192,14 +198,6 @@ LIB3270_EXPORT const LIB3270_STRING_PROPERTY * lib3270_get_string_properties_lis
192 198
193 }; 199 };
194 200
195 - const char * get_version(const H3270 GNUC_UNUSED(*hSession)) {  
196 - return lib3270_get_version();  
197 - }  
198 -  
199 - const char * get_revision(const H3270 GNUC_UNUSED(*hSession)) {  
200 - return lib3270_get_revision();  
201 - }  
202 -  
203 return properties; 201 return properties;
204 202
205 } 203 }
src/core/properties/unsigned.c
@@ -64,9 +64,11 @@ LIB3270_EXPORT int lib3270_set_auto_reconnect(H3270 *hSession, unsigned int time @@ -64,9 +64,11 @@ LIB3270_EXPORT int lib3270_set_auto_reconnect(H3270 *hSession, unsigned int time
64 return 0; 64 return 0;
65 } 65 }
66 66
67 -const LIB3270_UINT_PROPERTY * lib3270_get_unsigned_properties_list(void) { 67 +static unsigned int lib3270_get_kybdlock_as_int(const H3270 *hSession) {
  68 + return (unsigned int) lib3270_get_keyboard_lock_state(hSession);
  69 +}
68 70
69 - auto unsigned int lib3270_get_kybdlock_as_int(const H3270 *hSession); 71 +const LIB3270_UINT_PROPERTY * lib3270_get_unsigned_properties_list(void) {
70 72
71 static const LIB3270_UINT_PROPERTY properties[] = { 73 static const LIB3270_UINT_PROPERTY properties[] = {
72 74
@@ -175,10 +177,6 @@ const LIB3270_UINT_PROPERTY * lib3270_get_unsigned_properties_list(void) { @@ -175,10 +177,6 @@ const LIB3270_UINT_PROPERTY * lib3270_get_unsigned_properties_list(void) {
175 } 177 }
176 }; 178 };
177 179
178 - unsigned int lib3270_get_kybdlock_as_int(const H3270 *hSession) {  
179 - return (unsigned int) lib3270_get_keyboard_lock_state(hSession);  
180 - }  
181 -  
182 return properties; 180 return properties;
183 } 181 }
184 182