Commit 7efab0c3e286f9d3c9bbe524f2c61e0a8743513b

Authored by perry.werneck@gmail.com
1 parent ad2110e0

Implementando sinal e callback para impressão do conteúdo da tela

Showing 2 changed files with 10 additions and 1 deletions   Show diff stats
session.c
... ... @@ -138,6 +138,12 @@ static void set_cursor(H3270 *session, LIB3270_CURSOR id)
138 138 {
139 139 }
140 140  
  141 +static int print(H3270 *session)
  142 +{
  143 + lib3270_write_log(session, "print", "%s", "Printing is unavailable");
  144 + return -1;
  145 +}
  146 +
141 147 static void message(H3270 *session, LIB3270_NOTIFY id , const char *title, const char *msg, const char *text)
142 148 {
143 149 #ifdef ANDROID
... ... @@ -203,6 +209,7 @@ static void lib3270_session_init(H3270 *hSession, const char *model)
203 209 hSession->update_status = (void (*)(H3270 *, LIB3270_STATUS)) nop_int;
204 210 hSession->autostart = nop;
205 211 hSession->set_timer = set_timer;
  212 + hSession->print = print;
206 213  
207 214 // Set the defaults.
208 215 hSession->extended = 1;
... ...
util.c
... ... @@ -1020,5 +1020,7 @@ int gettimeofday(struct timeval *tv, void *ignored)
1020 1020  
1021 1021 LIB3270_EXPORT int lib3270_print(H3270 *h)
1022 1022 {
1023   - return -1;
  1023 + CHECK_SESSION_HANDLE(h);
  1024 + trace("%s(%p)",__FUNCTION__,h);
  1025 + return h->print(h);
1024 1026 }
... ...