diff --git a/Makefile.in b/Makefile.in index cef0bd7..0e32efa 100644 --- a/Makefile.in +++ b/Makefile.in @@ -299,6 +299,10 @@ install-sdk: @$(INSTALL_DATA) lib3270.pc $(DESTDIR)/$(libdir)/pkgconfig @$(INSTALL_DATA) pw3270.pc $(DESTDIR)/$(libdir)/pkgconfig + @$(MKDIR) $(DESTDIR)$(datarootdir)/$(PACKAGE_NAME)/sample + @$(INSTALL_DATA) src/sample/Makefile $(DESTDIR)$(datarootdir)/$(PACKAGE_NAME)/sample + @$(INSTALL_DATA) src/sample/*.c $(DESTDIR)$(datarootdir)/$(PACKAGE_NAME)/sample + clean: @rm -fr .obj @rm -fr .bin diff --git a/configure.ac b/configure.ac index 218fdc6..335c33e 100644 --- a/configure.ac +++ b/configure.ac @@ -418,6 +418,7 @@ AC_CONFIG_FILES([ src/plugins/rx3270/Makefile man/Makefile makegtkruntime.sh + src/sample/Makefile ]) dnl Output the generated config.status script. diff --git a/po/pt_BR.po b/po/pt_BR.po index 4e81089..bc6729c 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: pw3270 5.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-01-30 10:26-0200\n" +"POT-Creation-Date: 2013-02-15 16:38-0200\n" "PO-Revision-Date: 2013-01-14 09:49-0200\n" "Last-Translator: Perry Werneck \n" "Language-Team: Português <>\n" @@ -130,12 +130,12 @@ msgid "<%s> requires a %s attribute" msgstr "<%s> precisa do atributo %s" #: uiparser/accelerator.c:41 uiparser/menubar.c:42 uiparser/toolbar.c:58 -#: uiparser/popup.c:45 uiparser/scroll.c:43 uiparser/keypad.c:252 +#: uiparser/popup.c:45 uiparser/scroll.c:43 uiparser/keypad.c:152 #, c-format msgid "<%s> should be on toplevel" msgstr "<%s> deve estar no primeiro nível" -#: v3270/widget.c:295 +#: v3270/widget.c:296 msgid "" "Identity not verified\n" "Disconnected from host" @@ -143,7 +143,7 @@ msgstr "" "Identidade não foi confirmada\n" "Desconectado do servidor" -#: v3270/widget.c:300 v3270/security.c:370 +#: v3270/widget.c:301 v3270/security.c:370 msgid "" "Identity not verified\n" "The connection is insecure" @@ -151,7 +151,7 @@ msgstr "" "Identidade não foi confirmada\n" "A conexão não é segura" -#: v3270/widget.c:305 +#: v3270/widget.c:306 msgid "" "Identity verified\n" "The connection is secure" @@ -159,7 +159,7 @@ msgstr "" "Identidade verificada\n" "A conexão é segura" -#: v3270/widget.c:320 +#: v3270/widget.c:321 #, c-format msgid "SSL state is undefinedUnexpected SSL status %ld" msgstr "Estado do SSL é indefinidoEstado SSL inesperado %ld" @@ -315,7 +315,7 @@ msgstr "Tema de c_ores:" msgid "C_urrent" msgstr "At_ual" -#: uiparser/parsefile.c:225 uiparser/keypad.c:146 +#: uiparser/parsefile.c:225 #, c-format msgid "Can't accept unnamed %s" msgstr "Não posso aceitar elemento %s sem nome" @@ -628,7 +628,7 @@ msgstr "Apagar até o final do campo" msgid "Erase to end of line" msgstr "Apagar até o final da linha" -#: print.c:234 v3270/widget.c:251 util.c:994 +#: print.c:234 v3270/widget.c:252 util.c:994 msgid "Error" msgstr "Erro" @@ -813,7 +813,7 @@ msgstr "IBM AS/400" msgid "IBM S/390" msgstr "IBM S/390" -#: v3270/widget.c:313 +#: v3270/widget.c:314 msgid "Identity not verified" msgstr "Identity not verified" @@ -1984,7 +1984,7 @@ msgstr "Erro SSL %ld inesperado" msgid "Unexpected action attribute in <%s>" msgstr "Atributo inesperado \"action\" em <%s>" -#: uiparser/keypad.c:190 +#: uiparser/keypad.c:67 #, c-format msgid "Unexpected element <%s>" msgstr "Elemento <%s> inesperado" @@ -2017,7 +2017,7 @@ msgstr "Valor de cor inválido ou inesperado: \"%s\"" msgid "Unexpected or unknown security status" msgstr "Unexpected or unknown security status" -#: v3270/widget.c:875 +#: v3270/widget.c:876 msgid "" "Unexpected signature in H3270 object, possible version mismatch in lib3270" msgstr "" @@ -2294,7 +2294,7 @@ msgstr "um attributo \"label\"" msgid "a type or group attribute" msgstr "um atributo \"type\" ou \"group\"" -#: uiparser/script.c:75 uiparser/keypad.c:258 +#: uiparser/script.c:75 uiparser/keypad.c:158 #, c-format msgid "action attribute is invalid for <%s>" msgstr "Atributo inesperado \"action\" em <%s>" diff --git a/pw3270.nsi.in b/pw3270.nsi.in index fada031..568f53a 100644 --- a/pw3270.nsi.in +++ b/pw3270.nsi.in @@ -160,6 +160,9 @@ Section /o "Software Development Kit" SecSDK file "/oname=$INSTDIR\sdk\include\lib3270\config.h" "src\include\lib3270\config.h" file "/oname=$INSTDIR\sdk\include\lib3270\rules.mak" "src\include\rules.mak" + file "/oname=$INSTDIR\sdk\sample\Makefile" "src\sample\Makefile" + file "/oname=$INSTDIR\sdk\sample\connect.c" "src\sample\connect.c" + SectionEnd # create a section to define what the uninstaller does. diff --git a/pw3270.spec.in b/pw3270.spec.in index 97b5c2d..8363e45 100644 --- a/pw3270.spec.in +++ b/pw3270.spec.in @@ -170,10 +170,12 @@ rm -rf $RPM_BUILD_ROOT %{_includedir}/lib3270/*.h %{_includedir}/lib3270.h %{_includedir}/pw3270.h -%{_datadir}/pw3270/ui/99debug.xml +%{_datadir}/@PACKAGE_NAME@/ui/99debug.xml %{_libdir}/pkgconfig/*.pc %{_libdir}/lib3270.so %{_libdir}/libpw3270.so +%dir %{_datadir}/@PACKAGE_NAME@/sample +%{_datadir}/@PACKAGE_NAME@/sample/* #---[ Scripts ]------------------------------------------------------------------------------------------------------- diff --git a/src/pw3270/common/config.c b/src/pw3270/common/config.c index c1b0cb1..6d13d3f 100644 --- a/src/pw3270/common/config.c +++ b/src/pw3270/common/config.c @@ -572,8 +572,6 @@ gchar * filename_from_va(const gchar *first_element, va_list args) #if defined( HAVE_WIN_REGISTRY ) -#error aqui - if(!result) { // No predefined datadir, search registry @@ -590,31 +588,31 @@ gchar * filename_from_va(const gchar *first_element, va_list args) rc = RegOpenKeyEx(HKEY_LOCAL_MACHINE,path,0,KEY_QUERY_VALUE|KEY_WOW64_64KEY,&hKey); SetLastError(rc); - + if(rc == ERROR_SUCCESS) { char data[4096]; unsigned long datalen = sizeof(data); // data field length(in), data returned length(out) unsigned long datatype; // #defined in winnt.h (predefined types 0-11) - + rc = RegQueryValueExA(hKey,NULL,NULL,&datatype,(LPBYTE) data,&datalen); - if(rc == ERROR_SUCCESS) - { + if(rc == ERROR_SUCCESS) + { result = g_string_new(g_strchomp(data)); - } - else - { + } + else + { gchar *msg = g_win32_error_message(rc); - g_message("Error \"%s\" when getting application datadir from registry",msg); - g_free(msg); + g_message("Error \"%s\" when getting application datadir from registry",msg); + g_free(msg); } RegCloseKey(hKey); - } - else - { + } + else + { gchar *msg = g_win32_error_message(rc); - g_message("Error \"%s\" when opening datadir key from registry",msg); - g_free(msg); + g_message("Error \"%s\" when opening datadir key from registry",msg); + g_free(msg); } g_free(path); diff --git a/src/sample/Makefile.in b/src/sample/Makefile.in new file mode 100644 index 0000000..c886c08 --- /dev/null +++ b/src/sample/Makefile.in @@ -0,0 +1,45 @@ +# +# "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 +# (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a +# aplicativos mainframe. Registro no INPI sob o nome G3270. +# +# Copyright (C) <2008> +# +# Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob +# os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela +# Free Software Foundation. +# +# Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER +# GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO +# A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para +# obter mais detalhes. +# +# Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este +# programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple +# Place, Suite 330, Boston, MA, 02111-1307, USA +# +# Contatos: +# +# perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) +# erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça) +# licinio@bb.com.br (Licínio Luis Branco) +# kraucer@bb.com.br (Kraucer Fernandes Mazuco) +# +# + +LIB3270_CFLAGS=`pkg-config --cflags lib3270` +LIB3270_LIBS=`pkg-config --libs lib3270` + +EXEEXT=@EXEEXT@ +MKDIR=@MKDIR_P@ +CC=@CC@ +LD=@CC@ + +#---[ Targets ]---------------------------------------------------------------- + +all: connect$(EXEEXT) + +connect$(EXEEXT): connect.c + $(CC) $(CFLAGS) $(LIB3270_CFLAGS) -o $@ $^ $(LIB3270_LIBS) + + diff --git a/src/sample/connect.c b/src/sample/connect.c new file mode 100644 index 0000000..982e6c7 --- /dev/null +++ b/src/sample/connect.c @@ -0,0 +1,51 @@ +/* + * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 + * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a + * aplicativos mainframe. Registro no INPI sob o nome G3270. + * + * Copyright (C) <2008> + * + * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob + * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela + * Free Software Foundation. + * + * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER + * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO + * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para + * obter mais detalhes. + * + * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este + * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin + * St, Fifth Floor, Boston, MA 02110-1301 USA + * + * Este programa está nomeado como main.c e possui - linhas de código. + * + * Contatos: + * + * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) + * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) + * licinio@bb.com.br (Licínio Luis Branco) + * kraucer@bb.com.br (Kraucer Fernandes Mazuco) + * + */ + + #include + #include + #include + +/*--[ Implement ]------------------------------------------------------------------------------------*/ + + int main(int numpar, char *param[]) + { + H3270 *hSession; + + if(numpar != 1) + { + fprintf(stderr,"Inform host URI as argument\n"); + exit(-1); + } + + + return 0; + } + -- libgit2 0.21.2