Commit 66b24c3f5f3676c3c833b944b327930e33d5a884
1 parent
e2de5e2b
Exists in
master
and in
3 other branches
Implementando metodos rexx
Showing
1 changed file
with
6 additions
and
9 deletions
Show diff stats
toggles.c
| ... | ... | @@ -105,25 +105,22 @@ static void toggle_notify(H3270 *session, struct lib3270_toggle *t, LIB3270_TOGG |
| 105 | 105 | session->update_toggle(session,ix,t->value,TT_INTERACTIVE,toggle_names[ix]); |
| 106 | 106 | |
| 107 | 107 | } |
| 108 | - | |
| 109 | -LIB3270_EXPORT void lib3270_set_toggle(H3270 *session, LIB3270_TOGGLE ix, int value) | |
| 108 | + LIB3270_EXPORT int lib3270_set_toggle(H3270 *session, LIB3270_TOGGLE ix, int value) | |
| 110 | 109 | { |
| 111 | - char v = value ? True : False; | |
| 112 | - struct lib3270_toggle * t; | |
| 110 | + char v = value ? True : False; struct lib3270_toggle * t; | |
| 113 | 111 | |
| 114 | 112 | CHECK_SESSION_HANDLE(session); |
| 115 | 113 | |
| 116 | 114 | if(ix < 0 || ix >= LIB3270_TOGGLE_COUNT) |
| 117 | - return; | |
| 115 | + return -EINVAL; | |
| 118 | 116 | |
| 119 | 117 | t = &session->toggle[ix]; |
| 120 | 118 | |
| 121 | 119 | if(v == t->value) |
| 122 | - return; | |
| 123 | - | |
| 124 | - t->value = v; | |
| 120 | + return 0; | |
| 121 | + t->value = v; | |
| 125 | 122 | |
| 126 | - toggle_notify(session,t,ix); | |
| 123 | + toggle_notify(session,t,ix); return 1; | |
| 127 | 124 | } |
| 128 | 125 | |
| 129 | 126 | LIB3270_EXPORT int lib3270_toggle(H3270 *session, LIB3270_TOGGLE ix) | ... | ... |