Commit 8cc818667c6627109f038de0ea78fa8a9574adf1

Authored by perry.werneck@gmail.com
1 parent 135681d7

Movendo tabela de options para a biblioteca

Showing 3 changed files with 85 additions and 13 deletions   Show diff stats
options.c 0 → 100644
... ... @@ -0,0 +1,83 @@
  1 +/*
  2 + * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
  3 + * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
  4 + * aplicativos mainframe. Registro no INPI sob o nome G3270. Registro no INPI sob o nome G3270.
  5 + *
  6 + * Copyright (C) <2008> <Banco do Brasil S.A.>
  7 + *
  8 + * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
  9 + * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
  10 + * Free Software Foundation.
  11 + *
  12 + * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
  13 + * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
  14 + * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
  15 + * obter mais detalhes.
  16 + *
  17 + * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
  18 + * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin
  19 + * St, Fifth Floor, Boston, MA 02110-1301 USA
  20 + *
  21 + * Este programa está nomeado como options.c e possui - linhas de código.
  22 + *
  23 + * Contatos:
  24 + *
  25 + * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
  26 + * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)
  27 + * licinio@bb.com.br (Licínio Luis Branco)
  28 + * kraucer@bb.com.br (Kraucer Fernandes Mazuco)
  29 + *
  30 + */
  31 +
  32 +#include "globals.h"
  33 +
  34 +/*---[ Globals ]--------------------------------------------------------------------------------------------------------------*/
  35 +
  36 +
  37 +/*---[ Statics ]--------------------------------------------------------------------------------------------------------------*/
  38 +
  39 + static const const LIB3270_OPTION_ENTRY options[LIB3270_OPTION_COUNT+1] =
  40 + {
  41 + {
  42 + LIB3270_OPTION_COLOR8,
  43 + "color8",
  44 + N_( "_8 colors" ),
  45 + N_( "If active, pw3270 will respond to a Query(Color) with a list of 8 supported colors." )
  46 + },
  47 +
  48 + {
  49 + LIB3270_OPTION_AS400,
  50 + "as400",
  51 + N_( "Host is AS_400" ),
  52 + NULL
  53 + },
  54 +
  55 + {
  56 + 0,
  57 + NULL,
  58 + NULL,
  59 + NULL
  60 + }
  61 +
  62 + };
  63 +
  64 +
  65 +
  66 +/*---[ Implement ]------------------------------------------------------------------------------------------------------------*/
  67 +
  68 +LIB3270_EXPORT LIB3270_OPTION lib3270_get_options(H3270 *hSession)
  69 +{
  70 + CHECK_SESSION_HANDLE(hSession);
  71 + return hSession->options;
  72 +}
  73 +
  74 +LIB3270_EXPORT void lib3270_set_options(H3270 *hSession, LIB3270_OPTION opt)
  75 +{
  76 + CHECK_SESSION_HANDLE(hSession);
  77 + hSession->options = opt;
  78 +}
  79 +
  80 +LIB3270_EXPORT const LIB3270_OPTION_ENTRY * lib3270_get_option_list(void)
  81 +{
  82 + return options;
  83 +}
... ...
session.c
... ... @@ -454,14 +454,3 @@ LIB3270_EXPORT void * lib3270_get_widget(H3270 *h)
454 454 return h->widget;
455 455 }
456 456  
457   -LIB3270_EXPORT LIB3270_OPTION lib3270_get_options(H3270 *hSession)
458   -{
459   - CHECK_SESSION_HANDLE(hSession);
460   - return hSession->options;
461   -}
462   -
463   -LIB3270_EXPORT void lib3270_set_options(H3270 *hSession, LIB3270_OPTION opt)
464   -{
465   - CHECK_SESSION_HANDLE(hSession);
466   - hSession->options = opt;
467   -}
... ...
sources.mak
... ... @@ -28,12 +28,12 @@
28 28 TERMINAL_SOURCES = bounds.c ctlr.c util.c toggles.c screen.c selection.c kybd.c telnet.c \
29 29 host.c sf.c ansi.c resolver.c tables.c utf8.c charset.c \
30 30 version.c session.c state.c html.c trace_ds.c see.c \
31   - paste.c
  31 + paste.c
32 32  
33 33 # Network I/O Sources
34 34 NETWORK_SOURCES = iocalls.c proxy.c
35 35  
36 36 # Full library sources
37 37 SOURCES = $(TERMINAL_SOURCES) $(NETWORK_SOURCES) ft.c ft_cut.c ft_dft.c glue.c resources.c \
38   - rpq.c macros.c fallbacks.c log.c
  38 + rpq.c macros.c fallbacks.c log.c options.c
39 39  
... ...