Commit d403240e6af6b623d1ef048318378f35f52e4cf5
1 parent
b65bdf86
Exists in
master
and in
5 other branches
Fixing RHEL7 build.
Showing
14 changed files
with
124 additions
and
113 deletions
Show diff stats
pw3270.cbp
| ... | ... | @@ -207,7 +207,6 @@ |
| 207 | 207 | <Unit filename="src/pw3270/fonts.c"> |
| 208 | 208 | <Option compilerVar="CC" /> |
| 209 | 209 | </Unit> |
| 210 | - <Unit filename="src/pw3270/globals.h" /> | |
| 211 | 210 | <Unit filename="src/pw3270/hostdialog.c"> |
| 212 | 211 | <Option compilerVar="CC" /> |
| 213 | 212 | </Unit> |
| ... | ... | @@ -222,6 +221,7 @@ |
| 222 | 221 | <Unit filename="src/pw3270/print.c"> |
| 223 | 222 | <Option compilerVar="CC" /> |
| 224 | 223 | </Unit> |
| 224 | + <Unit filename="src/pw3270/private.h" /> | |
| 225 | 225 | <Unit filename="src/pw3270/resources.rc"> |
| 226 | 226 | <Option compilerVar="WINDRES" /> |
| 227 | 227 | </Unit> |
| ... | ... | @@ -278,14 +278,10 @@ |
| 278 | 278 | <Unit filename="src/pw3270/uiparser/toolitem.c"> |
| 279 | 279 | <Option compilerVar="CC" /> |
| 280 | 280 | </Unit> |
| 281 | - <Unit filename="src/pw3270/v3270/accessible.h" /> | |
| 282 | 281 | <Unit filename="src/pw3270/v3270/genmarshal" /> |
| 283 | - <Unit filename="src/pw3270/v3270/hostselect.h" /> | |
| 284 | - <Unit filename="src/pw3270/v3270/private.h" /> | |
| 285 | 282 | <Unit filename="src/pw3270/v3270/sources.mak" /> |
| 286 | 283 | <Unit filename="src/pw3270/v3270ft/Makefile.in" /> |
| 287 | 284 | <Unit filename="src/pw3270/v3270ft/genmarshal" /> |
| 288 | - <Unit filename="src/pw3270/v3270ft/private.h" /> | |
| 289 | 285 | <Unit filename="src/pw3270/window.c"> |
| 290 | 286 | <Option compilerVar="CC" /> |
| 291 | 287 | </Unit> | ... | ... |
src/pw3270/actions.c
src/pw3270/colors.c
src/pw3270/common/config.c
| ... | ... | @@ -33,14 +33,7 @@ |
| 33 | 33 | #include <windows.h> |
| 34 | 34 | #endif // _WIN32 |
| 35 | 35 | |
| 36 | - #include <config.h> | |
| 37 | - | |
| 38 | - #define ENABLE_NLS | |
| 39 | - #define GETTEXT_PACKAGE PACKAGE_NAME | |
| 40 | - | |
| 41 | - #include <libintl.h> | |
| 42 | - #include <glib/gi18n.h> | |
| 43 | - #include <gtk/gtk.h> | |
| 36 | + #include "../pw3270/private.h" | |
| 44 | 37 | |
| 45 | 38 | #include "common.h" |
| 46 | 39 | #include <stdarg.h> | ... | ... |
src/pw3270/dialog.c
src/pw3270/fonts.c
src/pw3270/globals.h
| ... | ... | @@ -1,89 +0,0 @@ |
| 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. | |
| 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 globals.h 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 | - * | |
| 28 | - */ | |
| 29 | - | |
| 30 | - #include <config.h> | |
| 31 | - #define ENABLE_NLS | |
| 32 | - #define GETTEXT_PACKAGE PACKAGE_NAME | |
| 33 | - | |
| 34 | - #include <libintl.h> | |
| 35 | - #include <glib/gi18n.h> | |
| 36 | - #include <gtk/gtk.h> | |
| 37 | - | |
| 38 | - #include <pw3270.h> | |
| 39 | - #include <v3270.h> | |
| 40 | - | |
| 41 | - // Special actions | |
| 42 | - enum | |
| 43 | - { | |
| 44 | - ACTION_PASTENEXT, | |
| 45 | - ACTION_RESELECT, | |
| 46 | - ACTION_FULLSCREEN, | |
| 47 | - ACTION_UNFULLSCREEN, | |
| 48 | - | |
| 49 | - ACTION_COUNT | |
| 50 | - }; | |
| 51 | - | |
| 52 | - | |
| 53 | -/*--[ Statics ]--------------------------------------------------------------------------------------*/ | |
| 54 | - | |
| 55 | - G_GNUC_INTERNAL const gchar * tracefile; | |
| 56 | - | |
| 57 | -/*--[ Global prototipes ]----------------------------------------------------------------------------*/ | |
| 58 | - | |
| 59 | - #include "common/common.h" | |
| 60 | - | |
| 61 | - G_GNUC_INTERNAL GtkWidget * create_main_window(const gchar *uri); | |
| 62 | - G_GNUC_INTERNAL void setup_font_list(GtkWidget *widget, GtkWidget *obj); | |
| 63 | - G_GNUC_INTERNAL void load_color_schemes(GtkWidget *widget, gchar *active); | |
| 64 | - G_GNUC_INTERNAL GtkWidget * color_scheme_new(const GdkRGBA *current); | |
| 65 | -// G_GNUC_INTERNAL LIB3270_OPTION pw3270_options_by_hosttype(const gchar *systype); | |
| 66 | - G_GNUC_INTERNAL void run_security_dialog(GtkWidget *widget); | |
| 67 | - | |
| 68 | - // actions | |
| 69 | - G_GNUC_INTERNAL void paste_file_action(GtkAction *action, GtkWidget *widget); | |
| 70 | - G_GNUC_INTERNAL void hostname_action(GtkAction *action, GtkWidget *widget); | |
| 71 | - G_GNUC_INTERNAL void save_all_action(GtkAction *action, GtkWidget *widget); | |
| 72 | - G_GNUC_INTERNAL void save_selected_action(GtkAction *action, GtkWidget *widget); | |
| 73 | - G_GNUC_INTERNAL void save_copy_action(GtkAction *action, GtkWidget *widget); | |
| 74 | - G_GNUC_INTERNAL void print_all_action(GtkAction *action, GtkWidget *widget); | |
| 75 | - G_GNUC_INTERNAL void print_selected_action(GtkAction *action, GtkWidget *widget); | |
| 76 | - G_GNUC_INTERNAL void print_copy_action(GtkAction *action, GtkWidget *widget); | |
| 77 | - G_GNUC_INTERNAL void editcolors_action(GtkAction *action, GtkWidget *widget); | |
| 78 | - G_GNUC_INTERNAL void about_dialog_action(GtkAction *action, GtkWidget *widget); | |
| 79 | - G_GNUC_INTERNAL void transfer_action(GtkAction *action, GtkWidget *widget); | |
| 80 | - G_GNUC_INTERNAL void download_action(GtkAction *action, GtkWidget *widget); | |
| 81 | - G_GNUC_INTERNAL void upload_action(GtkAction *action, GtkWidget *widget); | |
| 82 | - G_GNUC_INTERNAL void print_settings_action(GtkAction *action, GtkWidget *widget); | |
| 83 | - G_GNUC_INTERNAL gboolean handle_keypress(GtkWidget *terminal, guint keyval, GdkModifierType state, GtkWidget *window); | |
| 84 | - | |
| 85 | - | |
| 86 | - | |
| 87 | - | |
| 88 | - | |
| 89 | - |
src/pw3270/hostdialog.c
src/pw3270/main.c
| ... | ... | @@ -29,7 +29,7 @@ |
| 29 | 29 | * |
| 30 | 30 | */ |
| 31 | 31 | |
| 32 | -#include <config.h> | |
| 32 | +#include "private.h" | |
| 33 | 33 | |
| 34 | 34 | #ifdef _WIN32 |
| 35 | 35 | #include <windows.h> |
| ... | ... | @@ -37,7 +37,6 @@ |
| 37 | 37 | |
| 38 | 38 | #include <glib.h> |
| 39 | 39 | #include <glib/gstdio.h> |
| 40 | -#include "globals.h" | |
| 41 | 40 | |
| 42 | 41 | #ifdef HAVE_GTKMAC |
| 43 | 42 | #include <gtkosxapplication.h> | ... | ... |
src/pw3270/plugin.c
src/pw3270/print.c
| ... | ... | @@ -0,0 +1,102 @@ |
| 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. | |
| 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 globals.h 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 | + * | |
| 28 | + */ | |
| 29 | + | |
| 30 | + #include <config.h> | |
| 31 | + | |
| 32 | +#ifndef PRIVATE_H_INCLUDED | |
| 33 | + | |
| 34 | + #define ENABLE_NLS | |
| 35 | + #define GETTEXT_PACKAGE PACKAGE_NAME | |
| 36 | + | |
| 37 | + #include <libintl.h> | |
| 38 | + #include <glib/gi18n.h> | |
| 39 | + #include <gtk/gtk.h> | |
| 40 | + | |
| 41 | + #include <pw3270.h> | |
| 42 | + #include <v3270.h> | |
| 43 | + | |
| 44 | + #if ! GLIB_CHECK_VERSION(2,44,0) | |
| 45 | + | |
| 46 | + G_GNUC_INTERNAL void pw3270_autoptr_cleanup_generic_gfree(void *p); | |
| 47 | + | |
| 48 | + #define g_autofree __attribute__((cleanup(pw3270_autoptr_cleanup_generic_gfree))) | |
| 49 | + | |
| 50 | + #endif // ! GLIB(2,44,0) | |
| 51 | + | |
| 52 | + | |
| 53 | + // Special actions | |
| 54 | + enum | |
| 55 | + { | |
| 56 | + ACTION_PASTENEXT, | |
| 57 | + ACTION_RESELECT, | |
| 58 | + ACTION_FULLSCREEN, | |
| 59 | + ACTION_UNFULLSCREEN, | |
| 60 | + | |
| 61 | + ACTION_COUNT | |
| 62 | + }; | |
| 63 | + | |
| 64 | + | |
| 65 | +/*--[ Statics ]--------------------------------------------------------------------------------------*/ | |
| 66 | + | |
| 67 | + G_GNUC_INTERNAL const gchar * tracefile; | |
| 68 | + | |
| 69 | +/*--[ Global prototipes ]----------------------------------------------------------------------------*/ | |
| 70 | + | |
| 71 | + #include "common/common.h" | |
| 72 | + | |
| 73 | + G_GNUC_INTERNAL GtkWidget * create_main_window(const gchar *uri); | |
| 74 | + G_GNUC_INTERNAL void setup_font_list(GtkWidget *widget, GtkWidget *obj); | |
| 75 | + G_GNUC_INTERNAL void load_color_schemes(GtkWidget *widget, gchar *active); | |
| 76 | + G_GNUC_INTERNAL GtkWidget * color_scheme_new(const GdkRGBA *current); | |
| 77 | + G_GNUC_INTERNAL void run_security_dialog(GtkWidget *widget); | |
| 78 | + | |
| 79 | + // actions | |
| 80 | + G_GNUC_INTERNAL void paste_file_action(GtkAction *action, GtkWidget *widget); | |
| 81 | + G_GNUC_INTERNAL void hostname_action(GtkAction *action, GtkWidget *widget); | |
| 82 | + G_GNUC_INTERNAL void save_all_action(GtkAction *action, GtkWidget *widget); | |
| 83 | + G_GNUC_INTERNAL void save_selected_action(GtkAction *action, GtkWidget *widget); | |
| 84 | + G_GNUC_INTERNAL void save_copy_action(GtkAction *action, GtkWidget *widget); | |
| 85 | + G_GNUC_INTERNAL void print_all_action(GtkAction *action, GtkWidget *widget); | |
| 86 | + G_GNUC_INTERNAL void print_selected_action(GtkAction *action, GtkWidget *widget); | |
| 87 | + G_GNUC_INTERNAL void print_copy_action(GtkAction *action, GtkWidget *widget); | |
| 88 | + G_GNUC_INTERNAL void editcolors_action(GtkAction *action, GtkWidget *widget); | |
| 89 | + G_GNUC_INTERNAL void about_dialog_action(GtkAction *action, GtkWidget *widget); | |
| 90 | + G_GNUC_INTERNAL void transfer_action(GtkAction *action, GtkWidget *widget); | |
| 91 | + G_GNUC_INTERNAL void download_action(GtkAction *action, GtkWidget *widget); | |
| 92 | + G_GNUC_INTERNAL void upload_action(GtkAction *action, GtkWidget *widget); | |
| 93 | + G_GNUC_INTERNAL void print_settings_action(GtkAction *action, GtkWidget *widget); | |
| 94 | + G_GNUC_INTERNAL gboolean handle_keypress(GtkWidget *terminal, guint keyval, GdkModifierType state, GtkWidget *window); | |
| 95 | + | |
| 96 | + | |
| 97 | +#endif // PRIVATE_H_INCLUDED | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | ... | ... |
src/pw3270/tools.c
| ... | ... | @@ -27,7 +27,7 @@ |
| 27 | 27 | * |
| 28 | 28 | */ |
| 29 | 29 | |
| 30 | - #include "globals.h" | |
| 30 | + #include "private.h" | |
| 31 | 31 | #include <lib3270/charset.h> |
| 32 | 32 | |
| 33 | 33 | #ifdef _WIN32 |
| ... | ... | @@ -336,3 +336,13 @@ LIB3270_EXPORT void pw3270_set_action_state(GtkAction *action, gboolean on) |
| 336 | 336 | |
| 337 | 337 | } |
| 338 | 338 | |
| 339 | + #if ! GLIB_CHECK_VERSION(2,44,0) | |
| 340 | + | |
| 341 | + // Reference: https://github.com/ImageMagick/glib/blob/master/glib/glib-autocleanups.h | |
| 342 | + void pw3270_autoptr_cleanup_generic_gfree(void *p) | |
| 343 | + { | |
| 344 | + void **pp = (void**)p; | |
| 345 | + g_free (*pp); | |
| 346 | + } | |
| 347 | + | |
| 348 | + #endif // ! GLIB(2,44,0) | ... | ... |