Compare View

switch
from
...
to
 
Commits (112)
.github/workflows/codeql.yml
... ... @@ -3,12 +3,11 @@ name: CodeQL
3 3 on:
4 4 push:
5 5 branches:
6   - [ develop ]
  6 + - develop
  7 + - master
7 8 pull_request:
8 9 branches:
9   - [ master, develop ]
10   - schedule:
11   - - cron: 48 7 * * 1
  10 + - develop
12 11 jobs:
13 12 analyze:
14 13 name: Analyze
... ...
.github/workflows/macos.yml 0 → 100644
... ... @@ -0,0 +1,22 @@
  1 +name: MacOS Test
  2 +on:
  3 + push:
  4 + branches:
  5 + - macos
  6 +jobs:
  7 + build:
  8 + name: Build for macos
  9 + runs-on: macos-latest
  10 + steps:
  11 + - name: Checkout
  12 + uses: actions/checkout@v3
  13 + - name: Install Pre reqs
  14 + run: |
  15 + brew update
  16 + brew install xz automake binutils coreutils curl gettext libtool openssl pkgconfig
  17 + find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
  18 + brew upgrade
  19 + - name: build
  20 + run: ./mac/ci-build.sh
  21 +
  22 +
... ...
.github/workflows/publish.yml 0 → 100644
... ... @@ -0,0 +1,104 @@
  1 +name: Publish
  2 +on:
  3 + push:
  4 + branches:
  5 + - develop
  6 + pull_request:
  7 + branches:
  8 + - master
  9 +jobs:
  10 + msys2-mingw:
  11 + name: Publish for MinGW 64
  12 + runs-on: windows-latest
  13 + defaults:
  14 + run:
  15 + shell: msys2 {0}
  16 + steps:
  17 + - uses: actions/checkout@v3
  18 + - uses: oprypin/find-latest-tag@v1
  19 + id: gettag
  20 + with:
  21 + repository: PerryWerneck/lib3270
  22 + releases-only: true
  23 + - uses: msys2/setup-msys2@v2
  24 + with:
  25 + msystem: mingw64
  26 + update: true
  27 + install: zip dos2unix mingw-w64-x86_64-gcc automake autoconf make git pkgconf mingw-w64-x86_64-gettext gettext-devel mingw-w64-x86_64-openssl libtool
  28 + - name: CI-Build
  29 + run: ./win/mingw-build.sh
  30 + - name: Bundle
  31 + run: ./win/bundle.msys --build
  32 + - uses: ncipollo/release-action@v1
  33 + with:
  34 + tag: ${{ steps.gettag.outputs.tag }}
  35 + artifacts: "*-lib3270-*.pkg.tar.zst,*-lib3270-*.zip"
  36 + allowUpdates: true
  37 + draft: false
  38 + makeLatest: true
  39 + omitBody: true
  40 + omitPrereleaseDuringUpdate: true
  41 + replacesArtifacts: true
  42 + msys2-msvc:
  43 + name: Publish devel for MSVC 64
  44 + runs-on: windows-latest
  45 + defaults:
  46 + run:
  47 + shell: msys2 {0}
  48 + steps:
  49 + - uses: actions/checkout@v3
  50 + - uses: oprypin/find-latest-tag@v1
  51 + id: gettag
  52 + with:
  53 + repository: PerryWerneck/lib3270
  54 + releases-only: true
  55 + - uses: msys2/setup-msys2@v2
  56 + with:
  57 + msystem: mingw64
  58 + update: true
  59 + install: zip dos2unix mingw-w64-x86_64-gcc automake autoconf make git pkgconf mingw-w64-x86_64-gettext gettext-devel mingw-w64-x86_64-openssl libtool
  60 + - name: CI-Build
  61 + run: ./win/msvc-build.sh
  62 + - uses: ncipollo/release-action@v1
  63 + with:
  64 + tag: ${{ steps.gettag.outputs.tag }}
  65 + artifacts: "*-lib3270-*.devel.zip"
  66 + allowUpdates: true
  67 + draft: false
  68 + makeLatest: true
  69 + omitBody: true
  70 + omitPrereleaseDuringUpdate: true
  71 + replacesArtifacts: true
  72 + macos:
  73 + name: Publish for macos
  74 + runs-on: macos-latest
  75 + steps:
  76 + - name: Checkout
  77 + uses: actions/checkout@v3
  78 + - uses: oprypin/find-latest-tag@v1
  79 + id: gettag
  80 + with:
  81 + repository: PerryWerneck/lib3270
  82 + releases-only: true
  83 + - name: Install Pre reqs
  84 + run: |
  85 + brew update
  86 + brew install xz automake binutils coreutils curl gettext libtool openssl pkgconfig
  87 + find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
  88 + rm -f /usr/local/bin/go || true
  89 + rm -f /usr/local/bin/gofmt || true
  90 + brew upgrade
  91 + - name: build
  92 + run: ./mac/ci-build.sh
  93 + - uses: ncipollo/release-action@v1
  94 + with:
  95 + tag: ${{ steps.gettag.outputs.tag }}
  96 + artifacts: "*.tar.xz"
  97 + allowUpdates: true
  98 + draft: false
  99 + makeLatest: true
  100 + omitBody: true
  101 + omitPrereleaseDuringUpdate: true
  102 + replacesArtifacts: true
  103 +
  104 +
... ...
.gitignore
... ... @@ -67,3 +67,4 @@ mstest.*
67 67 ABOUT-NLS
68 68 intl
69 69 po
  70 +*.tar.xz
... ...
CHANGELOG 0 → 100644
... ... @@ -0,0 +1,390 @@
  1 +-------------------------------------------------------------------
  2 +Wed Mar 22 18:14:29 UTC 2023 - perry.werneck@gmail.com
  3 +
  4 +- Update to version 5.4+git20230322:
  5 + * Updating package control files.
  6 + * On windows, if the application os library path ends with '/lib' or '/bin' the relative path for data files is the parent directory.
  7 + * Debugging win32 build.
  8 +
  9 +-------------------------------------------------------------------
  10 +Thu Apr 07 22:24:02 UTC 2022 - perry.werneck@gmail.com
  11 +
  12 +- Update to version 5.4+git20220330:
  13 + * fix-crl-get-engine.patch removed
  14 + * Adding SSL build options to the trace info.
  15 + * Update README.md
  16 + * Test bundle path before using it. If not found use the value from DATADIR.
  17 + * Reverting locale.
  18 + * Fixing install.
  19 + * Fixing use of a separated build dir.
  20 + * Refactoring Makefile to allow a separated build dir.
  21 + * Adding notes about jhbuild.
  22 + * Updating build system.
  23 + * Small updates on Makefile.
  24 + * Fixing autogen.
  25 + * Testing jhbuild.
  26 + * Updating configure.ac
  27 + * Fixing libcurl detection in macos (#25)
  28 + * Adjustments in autogen.sh
  29 + * Allowing build from another folder.
  30 + * Updating README.
  31 + * Restoring detection of MAC datadir.
  32 + * Fixing issues detected on linux test after macos changes (#25)
  33 + * Fixing MAC build (#25)
  34 + * Fixing libtool on mac brew, updating readme (#25)
  35 + * Updating Makefile and configure.ac.
  36 + * Using MAC library extension.
  37 + * Adding all-macos target required for MAC build #25
  38 + * Adding callback for 'select-word' action.
  39 + * Fixing configure.ac
  40 + * configure: set gettext version
  41 + * ASN1_TIME_diff is no longer available on libcrypt.
  42 + * Adding convenience method to get the product name set on ./configure.
  43 + * Updating build info.
  44 + * Reverting latest changes.
  45 + * Adding 'editable' property.
  46 + * Fixing windows registry tools.
  47 + * Fixing translation.
  48 + * Updating translation.
  49 + * Adding method to write string to windows registry.
  50 + * Updating cross-compiler install script.
  51 + * Adjusting ssl messsage.
  52 + * Adding nick for toggles, removing 'gtk-' from icons.
  53 + * Small fixes on log/trace modules.
  54 + * Updating requested revision.
  55 + * Updating msys build info.
  56 + * Adding userdata on default log.
  57 + * Adding userdata on log writer.
  58 + * Fixing trace file.
  59 + * Working on log/trace files.
  60 + * Adding 'tracefile' property (still incomplete).
  61 + * Fixing windows build.
  62 + * Fixing segfault on 'non-session' log write.
  63 + * Adding property to set a session based log file.
  64 + * Updating windows package.
  65 + * Small adjustments in toggle api.
  66 + * Fixing windows build.
  67 + * Fixing toggle table.
  68 + * Fixing 'default host' option.
  69 + * Working on 'hang' when the ssl negotiation fails.
  70 + * Debugging possible SSL problem.
  71 + * Update README.md
  72 + * Fixing popup on connection error.
  73 + * Small adjustmente on host type.
  74 + * Fixing package build.
  75 + * Small adjustments on package and sdk.
  76 + * Use environment compiler flags if set
  77 + * Reformatting sources with astyle.
  78 + * Update README.md
  79 + * Fixing deepcode alert.
  80 + * Fixing LGTM warning.
  81 + * spliting filetransfer set methods.
  82 + * Updating 'popup-an-errno' dialog.
  83 + * Adding utility functions.
  84 + * Refactoring file transfer module.
  85 + * Adjustments on file-transfer object.
  86 + * Adding dummy send/receive methods.
  87 + * Setting 'alt-f1' as default for action 'clear'
  88 + * Update README.md
  89 + * Fixing LGTM warnings.
  90 + * Fixing build.
  91 + * Updating control files.
  92 + * Fixing locale file conflicts.
  93 + * Fixing some autoheader warnings.
  94 + * Updating readme, fixing arch build.
  95 + * Update README.md
  96 + * Removing git checkout as required.
  97 + * Adding license badge.
  98 + * Fixing lgtm.com warning.
  99 + * Fixing CRL download.
  100 + * Bit field saved_rev_wraparound_mode of type int should have explicitly unsigned integral, explicitly signed integral, or enumeration type.
  101 + * Debugging auto-reconnect.
  102 + * Logging invalid callback table.
  103 + * Allowing customized reconnect method.
  104 + * Adding background task counter.
  105 + * Fix escaped url.
  106 + * Fixes from lgtm.com
  107 + * Enabling get peer and name methods required for custom audit plugin.
  108 + * Updating translation.
  109 + * Removing unused code
  110 + * Cleaning up unused code.
  111 + * Updating to version 5.4
  112 + * Updating package control files.
  113 + * Updating service file
  114 +
  115 +-------------------------------------------------------------------
  116 +Wed Nov 18 21:07:38 UTC 2020 - Perry Werneck <perry.werneck@gmail.com>
  117 +
  118 +- Fixing CRL download engine
  119 + * Added fix-crl-get-engine.patch
  120 +
  121 +-------------------------------------------------------------------
  122 +Sat Oct 31 14:50:08 UTC 2020 - perry.werneck@gmail.com
  123 +
  124 +- Update to version 5.3+git20201030:
  125 + * Fixing SSL connect error messages.
  126 + * Updating README.md
  127 + * Adding property methods.
  128 + * Adding method to get translated cursor position.
  129 + * Updating get host and get service methods.
  130 + * Allowing extended actions.
  131 + * On TN3270-E the model name should be "IBM-3279-4-E" and not "IBM-3279-4"
  132 + * Adding new SSL state active when downloading CRL.
  133 + * Moving SSL related method to their own include file.
  134 + * Removing unused code.
  135 + * Adding auto-cleanup macro for windows registry.
  136 + * Creating include dir and files based on operating system.
  137 + * Fixing charset conversion.
  138 + * wait_for_ready should wait for "reconnect" process to complete.
  139 + * Fixing popup dialog when connection fails.
  140 + * Host connect now respects timeout.
  141 + * Fixing keyboard lock status and program messages issues.
  142 + * Adding property to enable/disable the CRL download.
  143 + * Looking for performance issues in lib3270_wait_for_ready.
  144 + * Fixing timers.
  145 + * Refactoring timer engine to avoid an abnormal delay when calling wait_for_ready on windows.
  146 + * Adding userdata pointer on timer handle.
  147 + * Enabling dstrace by testprogram command-line option.
  148 + * Refactoring network subsystem for modularity.
  149 + * Updating popup handler replacement (required for IPC modules).
  150 + * Removing unnecessary callbacks from table.
  151 + * Refactoring and centralizing auto-reconnect feature.
  152 + * Using standard popup as default for ssl error.
  153 + * Adding retry option in the connection failed dialog.
  154 + * Refactoring popup engine.
  155 + * Removing unused D-Bus references. Updating keytable.
  156 + * Setting default keyvalue for PAs.
  157 + * Adding PA Key actions on the keytable.
  158 + * Clear & Kybdreset were missing in v3270's accelerator dialogs.
  159 + * Fixing unexpected hangs on windows version.
  160 +
  161 +-------------------------------------------------------------------
  162 +Thu Jun 04 13:35:16 UTC 2020 - perry.werneck@gmail.com
  163 +
  164 +- Update to version 5.3:
  165 + * Adding openssl info in the version string.
  166 + * Updating package release based in rpm release.
  167 + * Setting version strings from configure.
  168 + * Adding method to get the build timestamp; usefull for version checks.
  169 + * Implementing property to get/set the min/max ssl supported protocol version.
  170 + * Can't connect to an empty host or service name.
  171 + * Build instructions for macOS
  172 + * Replacing "<ctrl>" for "<Primary" in keytable definition.
  173 + * Adding option to disable automatic download of the CRL.
  174 + * Adds support for macosx
  175 + * Change name of wait callback type to avoid collision with mac system type
  176 + * Include test for presence of malloc.h
  177 + * Fix warning with autoconf > 2.68
  178 + * Adding more trace information on "connect" process.
  179 + * Fixing null module on log manager.
  180 + * Updating smart paste summary.
  181 + * Fixing action labels.
  182 + * Moving to lib3270 own translations.
  183 + * Fixing unlock-delay property.
  184 + * Fixing exports.
  185 + * Small adjustments in toggles labels and descriptions.
  186 + * Adding more translation methods.
  187 + * Adding methods to get translated properties.
  188 + * Creating lib3270's own translation files.
  189 + * Fixing action group error.
  190 + * Adding signals for save/print copy actions.
  191 + * Removing print/save actions from the protocol library; it's better to implement then on the gui application.
  192 + * Fixing reconnect action label & description.
  193 + * Adding convenience method for open windows registry.
  194 + * Fixing status of "reconnect" action.
  195 + * Preventing emit of "save-settings" signal on v3270 when the host URL is set to the same value.
  196 + * Fixing action descriptions.
  197 + * Using spec-cleaner on lib3270.spec
  198 + * Cleaning up unused code.
  199 + * Fixing error when the selection format toggle is activated with an active selection.
  200 + * Tracing connection state changes.
  201 + * Adding method to get "paste-next" state.
  202 + * Adding new action group for clipboard content availability.
  203 + * Exporting action group notifier for use by libv3270.
  204 + * Using only alfanumeric chars to translate toggle names.
  205 + * Some actions requires more than one accelerator.
  206 + * Improving trace of the http download engine; adding some proxy support.
  207 + * Adjusting property names.
  208 + * Adding host-type property as an unsigned int value for saving it in the session properties.
  209 + * Adding default values for properties.
  210 + * Allow to override build date with SOURCE_DATE_EPOCH
  211 + * Adding more CG chars in the test pattern.
  212 + * Addin APL chars 0xF1 to 0xF9 on test pattern.
  213 + * Grouping property descriptors.
  214 + * Adding method to get property descriptor by name.
  215 + * Refactoring "lunames" property.
  216 + * Activating auto-connect when the corresponding toggle is set and the session is offline.
  217 + * Adding method to get the toggle descriptor from id.
  218 + * Refactoring LU properties.
  219 + * Adjustments on charset API.
  220 + * Color type should be an unsigned int.
  221 + * Fixing action name issue detected on the main application.
  222 + * Adding option for default property value.
  223 + * Improving the model number property.
  224 + * Fixing windows build.
  225 + * Fixing typeahead problem.
  226 + * Adding method to get the "activatable" state of an action group.
  227 + * Fixing "formatted-screen" actions.
  228 + * Fixing "locked" signal on disconnect.
  229 + * Updating action table.
  230 + * Adding events for cursor state.
  231 + * Fixing issue with "selection" actions.
  232 + * Fixing problem with the select/unselect notifications.
  233 + * Adding action types.
  234 + * Adding listeners for action group state changes (required for the new UI).
  235 + * Cleaning unused methods.
  236 + * Fixing segfault on CRL download.
  237 + * Use of curl is now default on linux.
  238 + * Small message adjustment.
  239 + * Fixing CRL download using curl.
  240 + * Splitting windows HTTP download method.
  241 + * Fixes from comments on OBS Request https://build.opensuse.org/request/show/736258
  242 + * CRL check is now default.
  243 + * Adjustments in the SSL negotiation.
  244 + * Releasing CRL on URL change.
  245 + * Adding callback for URL change.
  246 + * Refactoring CRL download method.
  247 + * Organizing CRL check engine to avoid duplications.
  248 + * Fixing warnings and SSL information dialogs.
  249 + * Refactoring CRL check engine.
  250 + * Adding action groups (required for GAction implementatin).
  251 + * Creating and using standard chained list managers.
  252 + * Changint toogle descriptor type name to a more standard one.
  253 + * Changing toggle id type name.
  254 + * Update README.md
  255 + * Fixing icon names.
  256 + * Fixing non-ssl builds.
  257 + * Adjustments in the action API & property tables.
  258 + * Fixing errno use in "has_selection" attribute.
  259 + * Adding method to get property description & summary.
  260 + * Fixing name conflict with the "autoreconnect" toggle and the "reconnect" action.
  261 + * Refactoring actions as properties (easier for language bindings).
  262 + * Adding method to set field and jump to next.
  263 + * Refactoring action table.
  264 + * Adding id in the toggle id description. Required for dynamic attributes.
  265 + * Fixing thread issue on custom certificate loading.
  266 + * Adding method to build filenames independent of the OS.
  267 + * Fixing oversize.
  268 + * Updating sf.
  269 + * Refactoring output buffer management.
  270 + * Adding max witdh & height as read-only properties.
  271 + * Adjustments on screen size changes.
  272 + * Adjustments in the remap engine.
  273 + * Fixing "wait_for_ready" behavior during the "connecting..." state.
  274 + * Fixing conflict with action "connect" and ipc method "connect".
  275 + * Datadir is now based on product name.
  276 + * Adding methods to build data & config file names based in the product name instead of library name.
  277 + * Refactoring charset translation sources.
  278 + * Refacoring toggle engine.
  279 + * Adding lib3270 revision on sdk.
  280 + * Refactoring the action table.
  281 + * Moving charset method to main library.
  282 + * Refactoring action table for use with keyboard preferences dialog.
  283 + * Adding product name in the lib3270 "pc" file.
  284 + * Fixing event trace description.
  285 + * Updating method declarations.
  286 + * Adding oversize setting Updating API.
  287 + * Adding "wait for string" methods Standardizing API Calls
  288 + * Addint method to wait for screen content.
  289 + * Updating documentation, adjusting return codes.
  290 + * Fixing syslog methods.
  291 + * Splitting property set/get methods.
  292 + * Adding method to disable the "lock on operator error" feature.
  293 + * Disabling unlock delay feature when the ms value is 0.
  294 + * Improving keyboard lock status check.
  295 + * Adding APIs to get keyboard lock state.
  296 + * Decreasing delay in "wait_for_ready" method.
  297 + * Fixing bug in the "wait-for-connect" process.
  298 + * Fixing "connect" delay.
  299 + * Fixing confusing documentation of lib3270_connect.
  300 + * Updating API, adding method to get screen format state.
  301 + * Adding "length" parameters in the "set" api calls.
  302 + * Adding ssl state property.
  303 + * Adjustments in the API.
  304 + * Refactoring build process.
  305 + * Adding build option to disable SSL error notifications.
  306 + * Refactoring toggle api calls.
  307 + * Adding option to get the entire terminal window as selection.
  308 + * Default print and save methods now show a warning popup.
  309 + * Emiting notification when SSL validation fails.
  310 + * Adding callback to let the application (or user) to decide if the connection will continue on SSL error.
  311 + * Adding option to use syslog (when available).
  312 + * Moving event source to global to avoid segfault when writing logs before session creation.
  313 + * Log messages are now sent to windows event log.
  314 + * Language bindings library is now part of the IPC plugin package.
  315 + * Small changes in the paste methods.
  316 + * Adjustments in selection data.
  317 + * Adding documentation and return code on input string method.
  318 + * Adding new method to translate the windows error codes.
  319 + * Fixing CRL download methods in windows.
  320 + * Moving new selection management methods to protocol library.
  321 + * Adding method to erase selected inputs.
  322 + * Updating clipboard tools.
  323 + * Adding method to get a rectangle with the selected region.
  324 + * Improving cut&paste methods.
  325 + * Updating selection mechanism.
  326 + * Static library build is now optional and defaults only for windows.
  327 + * Changing "cut" methods to use the same code for "get".
  328 + * Refactoring clipboard management.
  329 + * Adding library name on pkg-config description file (some language binding need it for dynamic loading).
  330 + * Fixing "keep-selected" flag behavior.
  331 + * Updating package to follow naming guidelines.
  332 +
  333 +-------------------------------------------------------------------
  334 +Mon Oct 7 15:23:25 UTC 2019 - Ismail Dönmez <idonmez@suse.com>
  335 +
  336 +- Cleanup spec file
  337 +- Disable support for <= SLE12-SP2
  338 +
  339 +-------------------------------------------------------------------
  340 +Tue Oct 1 07:01:49 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
  341 +
  342 +- Enable parallel build. Remove pointless %pre scriptlet.
  343 +- Adjust RPM groups. Remove leading empty line in descriptions.
  344 +- Modernize some macro uses.
  345 +
  346 +-------------------------------------------------------------------
  347 +Tue Sep 10 19:35:42 UTC 2019 - Christophe Giboudeaux <christophe@krop.fr>
  348 +
  349 +- Use -ffat-lto-objects when building static libraries.
  350 +
  351 +-------------------------------------------------------------------
  352 +Fri May 31 13:04:31 UTC 2019 - perry.werneck@gmail.com
  353 +
  354 +- Update to version 5.2:
  355 + * Updating read me
  356 + * Fixing windows build.
  357 + * Fixing build on OpenSUSE Factory & Tumbleweed.
  358 + * Removing warnings.
  359 + * Fixing error on select from keyboard.
  360 + * Atualizando documentação.
  361 + * Fixing segfault on key pressed on locked terminal.
  362 + * Updating doxygen comments.
  363 + * Fixing segfault when user press enter on a locked terminal.
  364 + * Updating service file.
  365 +
  366 +-------------------------------------------------------------------
  367 +Tue Mar 26 12:24:21 UTC 2019 - Perry Werneck <perry.werneck@gmail.com>
  368 +
  369 +- Fixing osc source_validator errors.
  370 +
  371 +-------------------------------------------------------------------
  372 +Thu Feb 28 15:02:43 UTC 2019 - Perry Werneck <perry.werneck@gmail.com>
  373 +
  374 + * Project URL changes to github.
  375 + * Fixing deb builds.
  376 + * Updating deb package.
  377 + * Fixing CRL expiration test.
  378 + * Fixing build issues.
  379 + * Small adjustment in CRL validation.
  380 + * Fixing portability issue.
  381 + * Updating locale gen.
  382 + * Fixing CRL expiration problem.
  383 + * Updating pushtag scripts.
  384 +
  385 +-------------------------------------------------------------------
  386 +Wed Feb 27 23:37:46 UTC 2019 - Perry Werneck <perry.werneck@gmail.com>
  387 +
  388 + * Refactoring build process.
  389 + * Spliting protocol library from pw3270 main project
  390 +
... ...
Makefile.in
... ... @@ -51,21 +51,24 @@ INSTALL_PACKAGES=@INSTALL_PACKAGES@
51 51  
52 52 NETWORK_MODULES=default openssl
53 53  
54   -SOURCES= \
  54 +COMMON_SOURCES= \
55 55 $(wildcard $(srcdir)/src/core/*.c) \
56 56 $(wildcard $(srcdir)/src/core/keyboard/*.c) \
57 57 $(wildcard $(srcdir)/src/core/actions/*.c) \
58 58 $(wildcard $(srcdir)/src/core/toggles/*.c) \
59 59 $(wildcard $(srcdir)/src/core/charset/*.c) \
60 60 $(wildcard $(srcdir)/src/core/ft/*.c) \
61   - $(wildcard $(srcdir)/src/core/@OSNAME@/*.rc) \
62   - $(wildcard $(srcdir)/src/core/@OSNAME@/*.c) \
63 61 $(wildcard $(srcdir)/src/core/properties/*.c) \
64 62 $(wildcard $(srcdir)/src/selection/*.c) \
65 63 $(wildcard $(srcdir)/src/network_modules/*.c) \
66 64 $(BUILDDIR)/.tmp/$(LIBNAME)/fallbacks.c \
67 65 $(foreach MODULE, $(NETWORK_MODULES), $(wildcard $(srcdir)/src/network_modules/$(MODULE)/*.c))
68 66  
  67 +SOURCES= \
  68 + $(COMMON_SOURCES) \
  69 + $(wildcard $(srcdir)/src/core/@OSNAME@/*.rc) \
  70 + $(wildcard $(srcdir)/src/core/@OSNAME@/*.c)
  71 +
69 72 TEST_SOURCES= \
70 73 $(wildcard $(srcdir)/src/testprogram/*.c)
71 74  
... ... @@ -311,10 +314,7 @@ install-macos-lib: \
311 314  
312 315 @$(INSTALL_PROGRAM) \
313 316 $(BINRLS)/$(SONAME) \
314   - $(DESTDIR)$(libdir)/$(LIBNAME)@DLLEXT@.@PACKAGE_MAJOR_VERSION@.@PACKAGE_MINOR_VERSION@
315   -
316   - # Install default configs
317   - @mkdir -p $(DESTDIR)$(datarootdir)/pw3270
  317 + $(DESTDIR)$(libdir)/$(SONAME)
318 318  
319 319 install-windows-lib: \
320 320 strip \
... ... @@ -403,9 +403,10 @@ install-macos-dev:
403 403 $(DESTDIR)$(libdir)
404 404  
405 405 @$(LN_S) \
406   - $(LIBNAME)@DLLEXT@.@PACKAGE_MAJOR_VERSION@.@PACKAGE_MINOR_VERSION@ \
  406 + $(SONAME) \
407 407 $(DESTDIR)$(libdir)/$(LIBNAME)@DLLEXT@
408 408  
  409 +
409 410 install-windows-dev: \
410 411 $(BINRLS)/$(SONAME) \
411 412 $(BINRLS)/$(LIBNAME).dll.a
... ... @@ -429,11 +430,9 @@ install-windows-dev: \
429 430 win/lib3270.mak \
430 431 $(DESTDIR)$(datarootdir)/$(PRODUCT_NAME)/def
431 432  
432   - @rm -f $(DESTDIR)$(libdir)/$(LIBNAME)@DLLEXT@
433   - @$(LN_S) \
434   - $(bindir)/$(LIBNAME)@DLLEXT@ \
435   - $(DESTDIR)$(libdir)/$(LIBNAME)@DLLEXT@
436   -
  433 + @$(INSTALL_DATA) \
  434 + $(srcdir)/CHANGELOG \
  435 + $(DESTDIR)$(datarootdir)/$(PRODUCT_NAME)/$(PACKAGE_NAME).changes
437 436  
438 437 #---[ Misc Targets ]---------------------------------------------------------------------
439 438  
... ... @@ -457,8 +456,11 @@ $(BUILDDIR)/.tmp/$(LIBNAME)/fallbacks.c: \
457 456 $@
458 457  
459 458 locale/$(PACKAGE_NAME).pot: \
460   - $(foreach SRC, $(basename $(SOURCES)), $(POTDIR)/$(LIBNAME)/$(SRC).pot)
461   -
  459 + $(foreach SRC, $(basename $(COMMON_SOURCES)), $(POTDIR)/$(LIBNAME)/$(SRC).pot) \
  460 + $(foreach SRC, $(basename $(wildcard $(srcdir)/src/core/linux/*.c)), $(POTDIR)/$(LIBNAME)/$(SRC).pot) \
  461 + $(foreach SRC, $(basename $(wildcard $(srcdir)/src/core/windows/*.c)), $(POTDIR)/$(LIBNAME)/$(SRC).pot) \
  462 + $(foreach SRC, $(basename $(wildcard $(srcdir)/src/core/macos/*.c)), $(POTDIR)/$(LIBNAME)/$(SRC).pot)
  463 +
462 464 @rm -f $@
463 465 @$(MKDIR) $(dir $@)
464 466 @$(MSGCAT) --sort-output $^ > $@
... ...
PKGBUILD.mingw 0 → 100644
... ... @@ -0,0 +1,62 @@
  1 +# Maintainer: Perry Werneck <perry.werneck@gmail.com>
  2 +# References: https://www.msys2.org/wiki/Creating-Packages/
  3 +
  4 +# SPDX-License-Identifier: LGPL-3.0-or-later
  5 +#
  6 +# Copyright (C) 2008 Banco do Brasil S.A.
  7 +#
  8 +# This program is free software: you can redistribute it and/or modify
  9 +# it under the terms of the GNU Lesser General Public License as published
  10 +# by the Free Software Foundation, either version 3 of the License, or
  11 +# (at your option) any later version.
  12 +#
  13 +# This program is distributed in the hope that it will be useful,
  14 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  15 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16 +# GNU General Public License for more details.
  17 +#
  18 +# You should have received a copy of the GNU Lesser General Public License
  19 +# along with this program. If not, see <https://www.gnu.org/licenses/>.
  20 +
  21 +_realname=$(grep AC_INIT "${startdir}/configure.ac" | cut -d[ -f2 | cut -d] -f1)
  22 +
  23 +pkgname=${MINGW_PACKAGE_PREFIX}-${_realname}
  24 +source=()
  25 +
  26 +pkgver=$(grep AC_INIT "${startdir}/configure.ac" | cut -d[ -f3 | cut -d] -f1)
  27 +pkgrel=0
  28 +pkgdesc="TN3270 Access library"
  29 +url="https://github.com/PerryWerneck/${_realname}"
  30 +arch=(i686 x86_64)
  31 +license=(LGPL-3.0-or-later)
  32 +depends=(${MINGW_PACKAGE_PREFIX}-openssl)
  33 +makedepends=(autoconf automake make libtool pkgconf gzip dos2unix ${MINGW_PACKAGE_PREFIX}-gcc ${MINGW_PACKAGE_PREFIX}-gettext ${MINGW_PACKAGE_PREFIX}-openssl)
  34 +checkdepends=()
  35 +
  36 +provides=($pkgname)
  37 +conflicts=($pkgname)
  38 +
  39 +prepare() {
  40 + rm -fr "$srcdir/$pkgname"
  41 + ln -snf "$startdir" "$srcdir/$pkgname"
  42 +}
  43 +
  44 +build() {
  45 + cd $pkgname
  46 + ./autogen.sh \
  47 + --prefix=${MINGW_PREFIX} \
  48 + --build=${MINGW_CHOST} \
  49 + --host=${MINGW_CHOST} \
  50 + --target=${MINGW_CHOST}
  51 +
  52 + make all
  53 +}
  54 +
  55 +package() {
  56 + cd $pkgname
  57 + make DESTDIR="${pkgdir}" install
  58 + install \
  59 + -Dm644 \
  60 + "LICENSE" \
  61 + "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
  62 +}
... ...
README.md
1   -TN3270 Protocol Library for Linux/Windows
2   -=========================================
  1 +## TN3270 Protocol Library for Linux/Windows
3 2  
4 3 Created originally as part of PW3270 application.
5 4  
6   -See more details at https://softwarepublico.gov.br/social/pw3270/
7   -
8 5 [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
9 6 ![CodeQL](https://github.com/PerryWerneck/lib3270/workflows/CodeQL/badge.svg)
10 7 [![build result](https://build.opensuse.org/projects/home:PerryWerneck:pw3270/packages/lib3270/badge.svg?type=percent)](https://build.opensuse.org/package/show/home:PerryWerneck:pw3270/lib3270)
  8 +[![Publish](https://github.com/PerryWerneck/lib3270/actions/workflows/publish.yml/badge.svg)](https://github.com/PerryWerneck/lib3270/actions/workflows/publish.yml)
11 9 ![Downloads](https://img.shields.io/github/downloads/PerryWerneck/lib3270/total.svg)
12 10  
13   -Installation repositories
14   -=========================
  11 +## Installation
  12 +
  13 +### Pre build packages
15 14  
16   - You can find instalation repositories in SuSE Build Service:
  15 +You can download installation package for supported linux distributions in [Open Build Service](https://software.opensuse.org/download.html?project=home%3APerryWerneck%3Apw3270&package=lib3270)
17 16  
18   - * Linux: https://software.opensuse.org/download.html?project=home%3APerryWerneck%3Apw3270&package=lib3270
19   - * Windows cross (32 bits): https://software.opensuse.org/download.html?project=home%3APerryWerneck%3Apw3270&package=mingw32-lib3270
20   - * Windows cross (64 bits): https://software.opensuse.org/download.html?project=home%3APerryWerneck%3Apw3270&package=mingw64-lib3270
  17 +[<img src="https://raw.githubusercontent.com/PerryWerneck/pw3270/develop/branding/obs-badge-en.svg" alt="Download from open build service" height="80px">](https://software.opensuse.org/download.html?project=home%3APerryWerneck%3Apw3270&package=pw3270)
  18 +[<img src="https://raw.githubusercontent.com/PerryWerneck/PerryWerneck/3aa96b8275d4310896c3a0b5b3965ed650fb7c2b/badges/github-msys-macos.svg" alt="Download from githut" height="80px">](https://github.com/PerryWerneck/lib3270/releases)
21 19  
22   -Building for Linux
23   -==================
  20 +## Building for Linux
24 21  
25 22 1. Get lib3270 sources from git
26 23  
... ... @@ -42,7 +39,7 @@ Building for Linux
42 39 * dbus-1-devel
43 40 * xz
44 41  
45   -(This command can make it easy on SuSE: grep -i buildrequires rpm/lib3270.spec | cut -d: -f2 | sudo xargs zypper in )
  42 + (This command can make it easy on SuSE: grep -i buildrequires rpm/lib3270.spec | cut -d: -f2 | sudo xargs zypper in )
46 43  
47 44 3. Configure and build
48 45  
... ... @@ -52,11 +49,9 @@ Building for Linux
52 49 make all
53 50 ```
54 51  
55   -Building for Windows
56   -====================
  52 +## Building for Windows
57 53  
58   -Cross-compiling on SuSE Linux (Native or WSL)
59   ----------------------------------------------
  54 +### Cross-compiling on SuSE Linux (Native or WSL)
60 55  
61 56 1. First add the MinGW Repositories for your SuSE version from:
62 57  
... ... @@ -91,9 +86,32 @@ Cross-compiling on SuSE Linux (Native or WSL)
91 86 make clean
92 87 make all
93 88 ```
  89 +### Windows native with MSYS2 (Using bundle script)
  90 +
  91 +1. Install and update MSYS2
  92 +
  93 + * Download and install [msys2](https://www.msys2.org/)
  94 + * Update msys:
  95 +
  96 + ```shell
  97 + pacman -Syu
  98 + ```
  99 + Afther this close and reopen mingw shell.
94 100  
95   -Windows native with MSYS2
96   --------------------------
  101 +2. Get lib3270 sources from git using the mingw shell
  102 +
  103 + ```shell
  104 + git clone https://github.com/PerryWerneck/lib3270.git ./lib3270
  105 + ```
  106 +
  107 +3. Run bundle script
  108 +
  109 + ```shell
  110 + cd lib3270
  111 + ./win/bundle.msys --pre-reqs --build
  112 + ```
  113 +
  114 +### Windows native with MSYS2 (Manual)
97 115  
98 116 1. Install and update MSYS2
99 117  
... ... @@ -112,8 +130,9 @@ Windows native with MSYS2
112 130 3. Install devel packages using pacman on mingw shell
113 131  
114 132 ```shell
115   - pacman -S --needed mingw-w64-x86_64-gcc automake autoconf make git pkgconf mingw-w64-x86_64-gettext mingw-w64-x86_64-openssl libtool
  133 + pacman -S --needed zip dos2unix mingw-w64-x86_64-gcc automake autoconf make git pkgconf mingw-w64-x86_64-gettext gettext-devel mingw-w64-x86_64-openssl libtool
116 134 ```
  135 +
117 136 Afther this close and reopen mingw shell.
118 137  
119 138 4. Get lib3270 sources from git using the mingw shell
... ... @@ -136,11 +155,9 @@ Windows native with MSYS2
136 155 make install
137 156 ```
138 157  
139   -Building for macOS
140   -==================
  158 +## Building for macOS
141 159  
142   -Using homebrew
143   ---------------
  160 +### Using homebrew
144 161  
145 162 Install
146 163  
... ... @@ -149,19 +166,16 @@ Install
149 166 2. Install dependencies
150 167  
151 168 ```shell
152   - brew install automake binutils coreutils curl gettext libtool openssl pkgconfig
153   - ```
154   -
155   -3. Use [open-keg](https://gist.github.com/andrebreves/5f36e78575e20162ed0a62bd27c4bcea) to make keg-only dependencies available during build process
156   -
157   - ```shell
158   - open-keg curl openldap openssl
  169 + brew update
  170 + brew install xz automake binutils coreutils curl gettext libtool openssl pkgconfig
  171 + brew upgrade
159 172 ```
160 173  
161   -4. Configure, build and install (inside the [open-keg](https://gist.github.com/andrebreves/5f36e78575e20162ed0a62bd27c4bcea) shell opened above)
  174 +4. Configure, build and install
162 175  
163 176 ```shell
164   - ./autogen.sh --prefix="$(brew --cellar)/lib3270/5.4"
  177 + export PKG_CONFIG_PATH="$(brew --prefix curl)/lib/pkgconfig:$(brew --prefix openssl)/lib/pkgconfig"
  178 + ./autogen.sh --prefix="$(brew --cellar)/lib3270/5.4" --with-libiconv-prefix=$(brew --prefix gettext)
165 179 make all && make install
166 180 brew link lib3270
167 181 ```
... ... @@ -173,8 +187,7 @@ Uninstall
173 187 rm -fr "$(brew --cellar)/lib3270"
174 188 ```
175 189  
176   -Using jhbuild
177   ---------------
  190 +### Using jhbuild
178 191  
179 192 1. Install jhbuild
180 193  
... ...
arch/PKGBUILD
... ... @@ -2,13 +2,13 @@
2 2  
3 3 pkgname=lib3270
4 4  
5   -pkgver=5.4
  5 +pkgver=5.4+git20230322
6 6 pkgrel=0
7 7 pkgdesc="TN3270 Access library"
8 8 url="https://github.com/PerryWerneck/lib3270"
9 9 arch=(i686 x86_64)
10 10 license=(GPL)
11   -depends=()
  11 +depends=(openssl)
12 12 makedepends=(autoconf automake make openssl libtool gzip)
13 13 checkdepends=()
14 14  
... ...
configure.ac
... ... @@ -394,19 +394,6 @@ dnl ---------------------------------------------------------------------------
394 394 dnl SSL Security options
395 395 dnl ---------------------------------------------------------------------------
396 396  
397   -AC_ARG_ENABLE([fips],
398   - [AS_HELP_STRING([--disable-fips], [Disable OpenSSL FIPS])],
399   -[
400   - app_cv_fips="$enableval"
401   -],[
402   - AC_CHECK_HEADER(openssl/fips.h, app_cv_fips="yes", AC_MSG_NOTICE(fips.h is not available))
403   -
404   -])
405   -
406   -if test "$app_cv_fips" == "yes"; then
407   - AC_DEFINE(HAVE_FIPS_H, 1, [FIPS Header is available])
408   -fi
409   -
410 397 AC_ARG_ENABLE([self-signed-cert-check],
411 398 [AS_HELP_STRING([--enable-self-signed-cert-check], [Emit Warning when host presents a self signed certificate])],
412 399 [
... ... @@ -522,7 +509,7 @@ case &quot;$host&quot; in
522 509 ;;
523 510  
524 511 *-apple-darwin*)
525   - AC_SUBST(SONAME,lib$app_cv_libname.dylib.$app_vrs_major.$app_vrs_minor)
  512 + AC_SUBST(SONAME,lib$app_cv_libname-$app_vrs_major.$app_vrs_minor.dylib)
526 513 ;;
527 514  
528 515 *)
... ...
debian/changelog
1   -lib3270 (5.4-0) unstable; urgency=low
  1 +lib3270 (5.4+git20230322-0) unstable; urgency=low
2 2  
3 3 * Initial Release
4 4  
... ...
debian/lib3270.dsc
1 1 Format: 1.0
2 2 Source: lib3270
3   -Version: 5.4-0
  3 +Version: 5.4+git20230322-0
4 4 Binary: lib3270
5 5 Maintainer: Perry Werneck <perry.werneck@gmail.com>
6 6 Architecture: any
... ...
lib3270.cbp
... ... @@ -86,6 +86,9 @@
86 86 <Unit filename="src/core/cursor.c">
87 87 <Option compilerVar="CC" />
88 88 </Unit>
  89 + <Unit filename="src/core/field.c">
  90 + <Option compilerVar="CC" />
  91 + </Unit>
89 92 <Unit filename="src/core/ft/ft.c">
90 93 <Option compilerVar="CC" />
91 94 </Unit>
... ...
locale/pt_BR.po
1 1 #
2   -# Perry Werneck <perry.werneck@gmail.com>, 2012, 2013, 2014, 2016, 2017, 2018, 2019, 2020, 2021.
  2 +# Perry Werneck <perry.werneck@gmail.com>, 2012-2023.
3 3 #
4 4 msgid ""
5 5 msgstr ""
6 6 "Project-Id-Version: pw3270 5.0\n"
7 7 "Report-Msgid-Bugs-To: \n"
8   -"POT-Creation-Date: 2023-01-11 08:59-0300\n"
9   -"PO-Revision-Date: 2021-09-01 23:53-0300\n"
  8 +"POT-Creation-Date: 2023-06-16 13:05-0300\n"
  9 +"PO-Revision-Date: 2023-04-21 08:40-0300\n"
10 10 "Last-Translator: Perry Werneck <perry.werneck@gmail.com>\n"
11   -"Language-Team: Português <perry.werneck@gmail.com>\n"
  11 +"Language-Team: Brazilian Portuguese <perry.werneck@gmail.com>\n"
12 12 "Language: pt_BR\n"
13 13 "MIME-Version: 1.0\n"
14 14 "Content-Type: text/plain; charset=UTF-8\n"
... ... @@ -16,15 +16,15 @@ msgstr &quot;&quot;
16 16 "X-Poedit-Language: Portuguese\n"
17 17 "X-Poedit-Country: BRAZIL\n"
18 18 "X-Poedit-SourceCharset: utf-8\n"
19   -"Plural-Forms: nplurals=2; plural=(n > 1);\n"
20   -"X-Generator: Gtranslator 2.91.7\n"
  19 +"Plural-Forms: nplurals=2; plural=(n > 1)\n"
  20 +"X-Generator: Gtranslator 40.0\n"
21 21  
22   -#: src/core/ctlr.c:178
  22 +#: src/core/ctlr.c:173
23 23 #, c-format
24 24 msgid "%dx%d is negative or zero"
25 25 msgstr "%dx%d é negativa ou zero"
26 26  
27   -#: src/core/ctlr.c:190
  27 +#: src/core/ctlr.c:183
28 28 #, c-format
29 29 msgid "%dx%d screen size is bigger than the maximum size"
30 30 msgstr "Tela %dx%d é maior que o tamanho máximo"
... ... @@ -227,7 +227,8 @@ msgstr &quot;Arquivo CMS não encontrado, transferência cancelada&quot;
227 227 msgid "CRL signature failure"
228 228 msgstr "Erro na assinatura CRL"
229 229  
230   -#: src/core/toggles/init.c:83 src/core/windows/connect.c:372
  230 +#: src/core/toggles/init.c:83 src/core/linux/connect.c:334
  231 +#: src/core/windows/connect.c:372 src/core/macos/connect.c:334
231 232 #, c-format
232 233 msgid "Can't %s network keep-alive"
233 234 msgstr "Não foi possível %s opção \"keep-alive\""
... ... @@ -236,7 +237,9 @@ msgstr &quot;Não foi possível %s opção \&quot;keep-alive\&quot;&quot;
236 237 msgid "Can't bind to LDAP server"
237 238 msgstr "Não foi possível conectar ao servidor LDAP"
238 239  
  240 +#: src/core/linux/connect.c:215 src/core/linux/connect.c:269
239 241 #: src/core/windows/connect.c:232 src/core/windows/connect.c:276
  242 +#: src/core/macos/connect.c:215 src/core/macos/connect.c:269
240 243 #, c-format
241 244 msgid "Can't connect to %s:%s"
242 245 msgstr "Não foi possível conectar a %s:%s"
... ... @@ -245,7 +248,8 @@ msgstr &quot;Não foi possível conectar a %s:%s&quot;
245 248 msgid "Can't connect to HTTP server."
246 249 msgstr "Não foi possível conectar ao servidor HTTP"
247 250  
248   -#: src/core/windows/connect.c:197
  251 +#: src/core/linux/connect.c:165 src/core/windows/connect.c:197
  252 +#: src/core/macos/connect.c:165
249 253 msgid "Can't connect to host"
250 254 msgstr "Não foi possível conectar no host"
251 255  
... ... @@ -257,7 +261,8 @@ msgstr &quot;Não foi possível criar requisição HTTP&quot;
257 261 msgid "Can't decode CRL data"
258 262 msgstr "Não foi possível decodificar dados do CRL"
259 263  
260   -#: src/core/windows/ldap.c:204
  264 +#: src/core/linux/ldap.c:167 src/core/windows/ldap.c:204
  265 +#: src/core/macos/ldap.c:167
261 266 msgid "Can't decode certificate revocation list"
262 267 msgstr "Não foi possível decodificar a lista de certificados revogados"
263 268  
... ... @@ -273,7 +278,11 @@ msgstr &quot;Não foi possível obter o tamanho do arquivo&quot;
273 278 msgid "Can't initialize LDAP"
274 279 msgstr "Erro ao inicializar LDAP"
275 280  
276   -#: src/network_modules/openssl/context.c:240
  281 +#: src/core/linux/curl.c:171 src/core/macos/curl.c:171
  282 +msgid "Can't initialize curl operation"
  283 +msgstr "Erro ao inicializar operação CURL"
  284 +
  285 +#: src/network_modules/openssl/context.c:236
277 286 msgid "Can't initialize the TLS/SSL context."
278 287 msgstr "Erro ao inicializar contexto TLS/SSL"
279 288  
... ... @@ -281,17 +290,17 @@ msgstr &quot;Erro ao inicializar contexto TLS/SSL&quot;
281 290 msgid "Can't load"
282 291 msgstr "Não foi possível carregar"
283 292  
284   -#: src/network_modules/openssl/context.c:342
  293 +#: src/network_modules/openssl/context.c:338
285 294 #, c-format
286 295 msgid "Can't load \"%s\": %s"
287 296 msgstr "Não foi possível carregar \"%s\": %s"
288 297  
289   -#: src/network_modules/openssl/context.c:295
290   -#, fuzzy, c-format
  298 +#: src/network_modules/openssl/context.c:291
  299 +#, c-format
291 300 msgid "Can't open \"%s\" (The Windows error code was %ld)"
292   -msgstr "Não foi possível abrir \"%s\" (O código de erro windows foi %ld)\n"
  301 +msgstr "Não foi possível abrir \"%s\" (O código de erro windows foi %ld)"
293 302  
294   -#: src/network_modules/openssl/context.c:308
  303 +#: src/network_modules/openssl/context.c:304
295 304 #, c-format
296 305 msgid "Can't open \"%s\": %s"
297 306 msgstr "Não foi possível abrir %s: %s"
... ... @@ -304,7 +313,7 @@ msgstr &quot;Não foi possível abrir sessão HTTP&quot;
304 313 msgid "Can't print"
305 314 msgstr "Não é possível imprimir"
306 315  
307   -#: src/network_modules/openssl/context.c:326
  316 +#: src/network_modules/openssl/context.c:322
308 317 #, c-format
309 318 msgid "Can't read \"%s\": %s"
310 319 msgstr "Não foi possível ler \"%s\": %s"
... ... @@ -355,15 +364,15 @@ msgstr &quot;&quot;
355 364 "Não foi possível criar uma nova estrutura de controle SSL para a conexão "
356 365 "atual."
357 366  
358   -#: src/network_modules/openssl/context.c:336
  367 +#: src/network_modules/openssl/context.c:332
359 368 msgid "Cant load custom certificate file."
360 369 msgstr "Não foi possível ler arquivo de certificado personalizado"
361 370  
362   -#: src/network_modules/openssl/context.c:290
  371 +#: src/network_modules/openssl/context.c:286
363 372 msgid "Cant open custom certificate directory."
364 373 msgstr "Não foi possível abrir o diretório de certificados personalizados"
365 374  
366   -#: src/network_modules/openssl/context.c:320
  375 +#: src/network_modules/openssl/context.c:316
367 376 msgid "Cant read custom certificate file."
368 377 msgstr "Não foi possível ler certificado personalizado"
369 378  
... ... @@ -431,16 +440,54 @@ msgstr &quot;Conectar&quot;
431 440 msgid "Connect on startup"
432 441 msgstr "Conectar ao iniciar"
433 442  
  443 +#: src/core/properties/signed.c:46
  444 +msgid "Connected in NVT ANSI mode"
  445 +msgstr ""
  446 +
  447 +#: src/core/properties/signed.c:51
  448 +msgid "Connected in TN3270E mode, 3270 mode"
  449 +msgstr ""
  450 +
  451 +#: src/core/properties/signed.c:49
  452 +msgid "Connected in TN3270E mode, NVT mode"
  453 +msgstr ""
  454 +
  455 +#: src/core/properties/signed.c:50
  456 +msgid "Connected in TN3270E mode, SSCP-LU mode"
  457 +msgstr ""
  458 +
  459 +#: src/core/properties/signed.c:48
  460 +#, fuzzy
  461 +msgid "Connected in TN3270E mode, no negotiated"
  462 +msgstr "Não está no modo 3270, transferência cancelada"
  463 +
  464 +#: src/core/properties/signed.c:47
  465 +msgid "Connected in old-style 3270 mode"
  466 +msgstr ""
  467 +
434 468 #: src/core/telnet.c:1764
435 469 msgid "Connected initial"
436 470 msgstr "Connected initial"
437 471  
  472 +#: src/core/properties/signed.c:45
  473 +#, fuzzy
  474 +msgid "Connected, no mode yet"
  475 +msgstr "Connected initial"
  476 +
438 477 #: src/core/telnet.c:1782
439 478 msgid "Connecting"
440 479 msgstr "Conectando"
441 480  
  481 +#: src/core/properties/signed.c:43
  482 +#, fuzzy
  483 +msgid "Connecting to host"
  484 +msgstr "Não foi possível conectar no host"
  485 +
  486 +#: src/network_modules/tools.c:160 src/core/linux/connect.c:230
  487 +#: src/core/linux/connect.c:321 src/core/linux/connect.c:338
442 488 #: src/core/windows/connect.c:358 src/core/windows/connect.c:376
443   -#: src/network_modules/tools.c:160
  489 +#: src/core/macos/connect.c:230 src/core/macos/connect.c:321
  490 +#: src/core/macos/connect.c:338
444 491 msgid "Connection error"
445 492 msgstr "Erro de conexão"
446 493  
... ... @@ -448,11 +495,25 @@ msgstr &quot;Erro de conexão&quot;
448 495 msgid "Connection failed"
449 496 msgstr "Conexão falhou"
450 497  
  498 +#: src/core/properties/signed.c:44
  499 +#, fuzzy
  500 +msgid "Connection pending"
  501 +msgstr "Conexão falhou"
  502 +
451 503 #: src/network_modules/tools.c:122
452 504 msgid "Connection reset by peer"
453 505 msgstr "Conexão foi cancelada pelo servidor"
454 506  
455   -#: src/core/properties/signed.c:55
  507 +#: src/core/properties/signed.c:96
  508 +#, fuzzy
  509 +msgid "Connection secure with CA check"
  510 +msgstr "A conexão é segura ?"
  511 +
  512 +#: src/core/properties/signed.c:97
  513 +msgid "Connection secure, no CA, self-signed or expired CRL"
  514 +msgstr ""
  515 +
  516 +#: src/core/properties/signed.c:121
456 517 msgid "Connection state"
457 518 msgstr "Estado da conexão"
458 519  
... ... @@ -466,15 +527,15 @@ msgstr &quot;Continuar&quot;
466 527 msgid "Cross hair cursor"
467 528 msgstr "Cursor mira"
468 529  
469   -#: src/core/properties/unsigned.c:117
  530 +#: src/core/properties/unsigned.c:113
470 531 msgid "Current screen height in rows"
471 532 msgstr "Altura atual da tela em linhas"
472 533  
473   -#: src/core/properties/unsigned.c:110
  534 +#: src/core/properties/unsigned.c:106
474 535 msgid "Current screen width in columns"
475 536 msgstr "Largura atua da tela em colunas"
476 537  
477   -#: src/core/properties/signed.c:63
  538 +#: src/core/properties/signed.c:130
478 539 msgid "Cursor address"
479 540 msgstr "Endereço do cursor"
480 541  
... ... @@ -516,7 +577,7 @@ msgstr &quot;Tecla \&quot;DUP\&quot;&quot;
516 577 msgid "Data conversion error"
517 578 msgstr "Erro na conversão de dados"
518 579  
519   -#: src/core/properties/string.c:159
  580 +#: src/core/properties/string.c:143
520 581 msgid "Default host URL"
521 582 msgstr "URL parão para acesso ao host"
522 583  
... ... @@ -532,7 +593,7 @@ msgstr &quot;Apagar campo&quot;
532 593 msgid "Delete word"
533 594 msgstr "Apaga palavra"
534 595  
535   -#: src/core/properties/string.c:173
  596 +#: src/core/properties/string.c:157
536 597 msgid "Description of the current security state"
537 598 msgstr "Descrição do estado de segurança atual"
538 599  
... ... @@ -544,12 +605,17 @@ msgstr &quot;Tipo de dispositivo rejeitado&quot;
544 605 msgid "Disconnect from host"
545 606 msgstr "Desconecta do servidor"
546 607  
  608 +#: src/core/properties/signed.c:42
  609 +#, fuzzy
  610 +msgid "Disconnected"
  611 +msgstr "Desconectado"
  612 +
547 613 #: src/core/ft/ft.c:244 src/network_modules/openssl/main.c:100
548 614 #: src/network_modules/openssl/main.c:148
549 615 msgid "Disconnected from host."
550 616 msgstr "Desconectado do servidor."
551 617  
552   -#: src/core/properties/string.c:120
  618 +#: src/core/properties/string.c:114
553 619 msgid "Display charset"
554 620 msgstr "Tabela de caracteres para a tela"
555 621  
... ... @@ -625,12 +691,12 @@ msgstr &quot;Apagar campos&quot;
625 691 msgid "Erro sending data to host"
626 692 msgstr "Erro ao enviar dados para o servidor"
627 693  
628   -#: src/core/ft/ft_dft.c:413 src/core/ft/ft_cut.c:408
  694 +#: src/core/ft/ft_cut.c:408 src/core/ft/ft_dft.c:413
629 695 #, c-format
630 696 msgid "Error \"%s\" reading from local file (rc=%d)"
631 697 msgstr "Erro \"%s\" lendo arquivo local (rc=%d)"
632 698  
633   -#: src/core/ft/ft_dft.c:306 src/core/ft/ft_cut.c:504
  699 +#: src/core/ft/ft_cut.c:504 src/core/ft/ft_dft.c:306
634 700 #, c-format
635 701 msgid "Error \"%s\" writing to local file (rc=%d)"
636 702 msgstr "Erro \"%s\" gravando arquivo local (rc=%d)"
... ... @@ -715,7 +781,7 @@ msgstr &quot;Erro de formato no campo \&quot;notAfter\&quot; do certificado&quot;
715 781 msgid "Format error in certificate's notBefore field"
716 782 msgstr "Erro de formato no campo \"notBefore\" do certificado"
717 783  
718   -#: src/core/properties/boolean.c:177
  784 +#: src/core/properties/boolean.c:175
719 785 msgid "Formatted screen"
720 786 msgstr "Tela formatada"
721 787  
... ... @@ -727,11 +793,11 @@ msgstr &quot;Tela cheia&quot;
727 793 msgid "Half connect"
728 794 msgstr "Half connect"
729 795  
730   -#: src/core/properties/boolean.c:156
  796 +#: src/core/properties/boolean.c:154
731 797 msgid "Has selected area"
732 798 msgstr "Tem área selecionada"
733 799  
734   -#: src/core/properties/string.c:113
  800 +#: src/core/properties/string.c:107
735 801 msgid "Host charset"
736 802 msgstr "Página de código do host"
737 803  
... ... @@ -755,11 +821,11 @@ msgstr &quot;Servidor rejeitou o tipo de dispositivo ou requisição&quot;
755 821 msgid "Host rejected resource(s)"
756 822 msgstr "Servidor rejeitou recurso(s)"
757 823  
758   -#: src/core/properties/string.c:90
  824 +#: src/core/properties/string.c:84
759 825 msgid "Host type name"
760 826 msgstr "Nome do tipo de host"
761 827  
762   -#: src/core/properties/unsigned.c:90
  828 +#: src/core/properties/unsigned.c:86
763 829 msgid "Host type number"
764 830 msgstr "Numero do tipo de host"
765 831  
... ... @@ -771,7 +837,7 @@ msgstr &quot;IBM AS/400&quot;
771 837 msgid "IBM S/390"
772 838 msgstr "IBM S/390"
773 839  
774   -#: src/core/properties/signed.c:77
  840 +#: src/core/properties/signed.c:146
775 841 msgid "ID of the session security state"
776 842 msgstr "Identificação do estado de segurança da sessão"
777 843  
... ... @@ -887,28 +953,28 @@ msgstr &quot;Opção xxxxxxxx inválida sem SPACE: Transferência cancelada&quot;
887 953 msgid "Invalid option xxxxxxxx: file transfer canceled"
888 954 msgstr "Opção xxxxxxxx inválida: Transferência cancelada"
889 955  
890   -#: src/core/ctlr.c:176 src/core/ctlr.c:188 src/core/ctlr.c:201
891   -#: src/core/ctlr.c:213
  956 +#: src/core/ctlr.c:171 src/core/ctlr.c:181 src/core/ctlr.c:192
  957 +#: src/core/ctlr.c:203
892 958 msgid "Invalid oversize"
893 959 msgstr "Valor inválido para 'oversize'"
894 960  
895   -#: src/core/properties/boolean.c:77
  961 +#: src/core/properties/boolean.c:75
896 962 msgid "Is connection secure"
897 963 msgstr "A conexão é segura ?"
898 964  
899   -#: src/core/properties/boolean.c:170
  965 +#: src/core/properties/boolean.c:168
900 966 msgid "Is starting (no first screen)?"
901 967 msgstr "Está iniciando (não recebeu a primeira tela)?"
902 968  
903   -#: src/core/properties/boolean.c:70
  969 +#: src/core/properties/boolean.c:68
904 970 msgid "Is terminal connected"
905 971 msgstr "O terminal está conectado"
906 972  
907   -#: src/core/properties/boolean.c:149
  973 +#: src/core/properties/boolean.c:147
908 974 msgid "Is terminal in the INITIAL_E state?"
909 975 msgstr "O terminal está no estad INITIAL_E?"
910 976  
911   -#: src/core/properties/boolean.c:63
  977 +#: src/core/properties/boolean.c:61
912 978 msgid "Is terminal ready"
913 979 msgstr "O terminal está pronto"
914 980  
... ... @@ -924,7 +990,7 @@ msgstr &quot;Uso da chave não permite assinatura de certificados&quot;
924 990 msgid "Keyboard is locked"
925 991 msgstr "Teclado está bloqueado"
926 992  
927   -#: src/core/properties/unsigned.c:169
  993 +#: src/core/properties/unsigned.c:165
928 994 msgid "Keyboard lock status"
929 995 msgstr "Estado de bloqueio do teclado"
930 996  
... ... @@ -932,11 +998,21 @@ msgstr &quot;Estado de bloqueio do teclado&quot;
932 998 msgid "LDAP Search did not produce any attributes."
933 999 msgstr "Pesquisa LDAP não produziu atributos."
934 1000  
  1001 +#: src/core/linux/ldap.c:147 src/core/macos/ldap.c:147
  1002 +#, fuzzy
  1003 +msgid "LDAP search did not produce any attributes."
  1004 +msgstr "Pesquisa LDAP não produziu atributos."
  1005 +
  1006 +#: src/core/linux/ldap.c:157 src/core/macos/ldap.c:157
  1007 +#, fuzzy
  1008 +msgid "LDAP search did not produce any values."
  1009 +msgstr "Pesquisa LDAP não produziu valores."
  1010 +
935 1011 #: src/core/windows/ldap.c:186
936 1012 msgid "LDAPSearch did not produce any values."
937 1013 msgstr "Pesquisa LDAP não produziu valores."
938 1014  
939   -#: src/core/properties/signed.c:70
  1015 +#: src/core/properties/signed.c:138
940 1016 msgid "Latest program message"
941 1017 msgstr "Última mensagem de programa"
942 1018  
... ... @@ -948,7 +1024,7 @@ msgstr &quot;Esquerda&quot;
948 1024 msgid "Line mode"
949 1025 msgstr "Line mode"
950 1026  
951   -#: src/core/properties/boolean.c:184
  1027 +#: src/core/properties/boolean.c:182
952 1028 msgid "Lock keyboard on operator error"
953 1029 msgstr "Bloqueia teclado em caso de erro do operador"
954 1030  
... ... @@ -956,15 +1032,15 @@ msgstr &quot;Bloqueia teclado em caso de erro do operador&quot;
956 1032 msgid "Margined paste"
957 1033 msgstr "Colar com margem"
958 1034  
959   -#: src/core/properties/unsigned.c:131
  1035 +#: src/core/properties/unsigned.c:127
960 1036 msgid "Maximum screen height in rows"
961 1037 msgstr "Altura máxima da tela em linhas"
962 1038  
963   -#: src/core/properties/unsigned.c:124
  1039 +#: src/core/properties/unsigned.c:120
964 1040 msgid "Maximum screen width in columns"
965 1041 msgstr "Largura maxima da tela em colunas"
966 1042  
967   -#: src/core/properties/string.c:82
  1043 +#: src/core/properties/string.c:76
968 1044 msgid "Model name"
969 1045 msgstr "Nome do modelo"
970 1046  
... ... @@ -1021,8 +1097,15 @@ msgstr &quot;Move para o próximo campo desprotegido&quot;
1021 1097 msgid "Move to the previous unprotected field on screen"
1022 1098 msgstr "Move para o campo desprotegido anterior"
1023 1099  
1024   -#: src/core/telnet.c:304 src/core/windows/event_dispatcher.c:135
1025   -#: src/core/windows/connect.c:223
  1100 +#: src/core/properties/signed.c:98
  1101 +#, fuzzy
  1102 +msgid "Negotiating SSL"
  1103 +msgstr "Negociação SSL"
  1104 +
  1105 +#: src/core/telnet.c:304 src/core/linux/connect.c:200
  1106 +#: src/core/linux/event_dispatcher.c:130 src/core/windows/connect.c:223
  1107 +#: src/core/windows/event_dispatcher.c:135 src/core/macos/connect.c:200
  1108 +#: src/core/macos/event_dispatcher.c:130
1026 1109 msgid "Network error"
1027 1110 msgstr "Erro de rede"
1028 1111  
... ... @@ -1050,10 +1133,16 @@ msgstr &quot;Sem suporte LDAP&quot;
1050 1133 msgid "No TLS/SSL support on this session"
1051 1134 msgstr "Sem suporte TLS/SSL nessa sessão"
1052 1135  
1053   -#: src/core/windows/download.c:62
  1136 +#: src/core/linux/download.c:55 src/core/windows/download.c:62
  1137 +#: src/core/macos/download.c:55
1054 1138 msgid "No handler for URL scheme."
1055 1139 msgstr "Nenhum manipulador para o esquema de URL"
1056 1140  
  1141 +#: src/core/properties/signed.c:95
  1142 +#, fuzzy
  1143 +msgid "No secure connection"
  1144 +msgstr "Conexão _Segura."
  1145 +
1057 1146 #: src/network_modules/openssl/messages.c:292
1058 1147 msgid ""
1059 1148 "No signatures could be verified because the chain contains only one "
... ... @@ -1066,15 +1155,15 @@ msgstr &quot;&quot;
1066 1155 msgid "No transfer in progress"
1067 1156 msgstr "Nenhuma transferência em andamento"
1068 1157  
1069   -#: src/core/properties/boolean.c:198
  1158 +#: src/core/properties/boolean.c:196
1070 1159 msgid "Non zero if the download of CRL is enabled"
1071 1160 msgstr "Diferente de zero se o host se o download do CRL está habilitado"
1072 1161  
1073   -#: src/core/properties/boolean.c:93
  1162 +#: src/core/properties/boolean.c:91
1074 1163 msgid "Non zero if the host is AS400."
1075 1164 msgstr "Diferente de zero se o host é AS400"
1076 1165  
1077   -#: src/core/properties/boolean.c:85
  1166 +#: src/core/properties/boolean.c:83
1078 1167 msgid "Non zero if the host is TSO."
1079 1168 msgstr "Diferente de zero se o host é TSO"
1080 1169  
... ... @@ -1137,7 +1226,7 @@ msgstr &quot;Pendente&quot;
1137 1226 msgid "Personal computer filespec incorrect: file transfer canceled"
1138 1227 msgstr "Especificação de arquivo PC incorreta: Transferência cancelada"
1139 1228  
1140   -#: src/core/properties/string.c:152
  1229 +#: src/core/properties/string.c:136
1141 1230 msgid "Preferred protocol for CRL download"
1142 1231 msgstr "Protocolo preferido para download da CRL"
1143 1232  
... ... @@ -1165,6 +1254,14 @@ msgstr &quot;Program Action 2&quot;
1165 1254 msgid "Program Action 3"
1166 1255 msgstr "Program Action 3"
1167 1256  
  1257 +#: src/core/properties/string.c:128
  1258 +msgid "Protocol library revision"
  1259 +msgstr ""
  1260 +
  1261 +#: src/core/properties/string.c:121
  1262 +msgid "Protocol library version"
  1263 +msgstr ""
  1264 +
1168 1265 #: src/core/rpq.c:229
1169 1266 #, c-format
1170 1267 msgid "RPQ %s term omitted due to insufficient space"
... ... @@ -1297,11 +1394,11 @@ msgstr &quot;&quot;
1297 1394 msgid "SSL negotiation failed"
1298 1395 msgstr "Negociação SSL falhou"
1299 1396  
1300   -#: src/core/properties/unsigned.c:138
  1397 +#: src/core/properties/unsigned.c:134
1301 1398 msgid "Screen buffer length in bytes"
1302 1399 msgstr "Tamanho do buffer de tela em bytes"
1303 1400  
1304   -#: src/core/properties/string.c:181
  1401 +#: src/core/properties/string.c:165
1305 1402 msgid "Screen oversize if larger than the chosen model"
1306 1403 msgstr "\"oversize\" maior que o modelo escolhido"
1307 1404  
... ... @@ -1345,7 +1442,9 @@ msgstr &quot;Seleciona a direita&quot;
1345 1442 msgid "Select word"
1346 1443 msgstr "Seleciona palavra"
1347 1444  
  1445 +#: src/core/linux/event_dispatcher.c:131
1348 1446 #: src/core/windows/event_dispatcher.c:136
  1447 +#: src/core/macos/event_dispatcher.c:131
1349 1448 msgid "Select() failed when processing for events."
1350 1449 msgstr "Select() falhou ao processar eventos."
1351 1450  
... ... @@ -1417,11 +1516,11 @@ msgstr &quot;Erro no socket&quot;
1417 1516 msgid "Sound"
1418 1517 msgstr "Som"
1419 1518  
1420   -#: src/core/properties/boolean.c:128
  1519 +#: src/core/properties/boolean.c:126
1421 1520 msgid "State is 3270, TN3270e or SSCP"
1422 1521 msgstr "Estado do terminal é 3270, TN3270e or SSCP"
1423 1522  
1424   -#: src/core/properties/boolean.c:163
  1523 +#: src/core/properties/boolean.c:161
1425 1524 msgid "Still have text to paste"
1426 1525 msgstr "Ainda existe texto para colar"
1427 1526  
... ... @@ -1465,15 +1564,15 @@ msgstr &quot;TN3270E NVT&quot;
1465 1564 msgid "TN3270E SSCP-LU"
1466 1565 msgstr "TN3270E SSCP-LU"
1467 1566  
1468   -#: src/core/properties/unsigned.c:99
  1567 +#: src/core/properties/unsigned.c:95
1469 1568 msgid "Terminal model"
1470 1569 msgstr "Modelo do terminal"
1471 1570  
1472   -#: src/core/properties/string.c:104
  1571 +#: src/core/properties/string.c:98
1473 1572 msgid "Terminal name"
1474 1573 msgstr "Nome do terminal"
1475 1574  
1476   -#: src/core/properties/string.c:97
  1575 +#: src/core/properties/string.c:91
1477 1576 msgid "Terminal type"
1478 1577 msgstr "Tipo do terminal"
1479 1578  
... ... @@ -1538,7 +1637,14 @@ msgstr &quot;&quot;
1538 1637 msgid "The SSL error message was %s"
1539 1638 msgstr "A mensagem de erro SSL foi \"%s\""
1540 1639  
  1640 +#: src/core/linux/connect.c:191 src/core/macos/connect.c:191
  1641 +#, fuzzy, c-format
  1642 +msgid "The System error was '%s' (rc=%d)"
  1643 +msgstr "O erro do sistema foi \"%s\" (rc=%d)"
  1644 +
  1645 +#: src/core/linux/ldap.c:82 src/core/linux/ldap.c:91
1541 1646 #: src/core/windows/ldap.c:101 src/core/windows/ldap.c:110
  1647 +#: src/core/macos/ldap.c:82 src/core/macos/ldap.c:91
1542 1648 msgid "The URL argument should be in the format ldap://[HOST]/[DN]?attribute"
1543 1649 msgstr "A URL deve ser no formato ldap://[HOST]/[DN]?attribute"
1544 1650  
... ... @@ -1592,7 +1698,7 @@ msgstr &quot;&quot;
1592 1698 "signature value could not be determined rather than it not matching the "
1593 1699 "expected value, this is only meaningful for RSA keys."
1594 1700  
1595   -#: src/core/properties/unsigned.c:81
  1701 +#: src/core/properties/unsigned.c:77
1596 1702 msgid "The color type"
1597 1703 msgstr "O tipo de cor"
1598 1704  
... ... @@ -1644,7 +1750,7 @@ msgstr &quot;&quot;
1644 1750 "name did not match the issuer name of the current certificate. Only "
1645 1751 "displayed when the -issuer_checks option is set."
1646 1752  
1647   -#: src/core/properties/unsigned.c:162
  1753 +#: src/core/properties/unsigned.c:158
1648 1754 msgid "The delay between the host unlocking the keyboard and the actual unlock"
1649 1755 msgstr ""
1650 1756 "Intervalo de tempo entre o desbloqueio de teclado pelo host e o desbloqueio "
... ... @@ -1663,7 +1769,7 @@ msgstr &quot;&quot;
1663 1769 msgid "The file transfer operation has been successfully completed."
1664 1770 msgstr "A transferência de arquivos terminou com sucesso."
1665 1771  
1666   -#: src/core/ctlr.c:215
  1772 +#: src/core/ctlr.c:205
1667 1773 #, c-format
1668 1774 msgid "The height %d is less than model %d rows (%d)"
1669 1775 msgstr "A altura %d é menor que o número de linhas do modelo %d (%d)"
... ... @@ -1690,15 +1796,15 @@ msgstr &quot;&quot;
1690 1796 "The issuer certificate of a looked up certificate could not be found. This "
1691 1797 "normally means the list of trusted certificates is not complete."
1692 1798  
1693   -#: src/core/properties/string.c:189
  1799 +#: src/core/properties/string.c:173
1694 1800 msgid "The log file name"
1695 1801 msgstr "Define o nome do arquivo de log"
1696 1802  
1697   -#: src/core/properties/unsigned.c:100
  1803 +#: src/core/properties/unsigned.c:96
1698 1804 msgid "The model number"
1699 1805 msgstr "Nº do modelo"
1700 1806  
1701   -#: src/core/properties/string.c:62
  1807 +#: src/core/properties/string.c:56
1702 1808 msgid "The name of the LU associated with the session"
1703 1809 msgstr "O nome da LU associada à sessão"
1704 1810  
... ... @@ -1710,19 +1816,19 @@ msgstr &quot;&quot;
1710 1816 "O módulo de rede não definiu uma mensagem para o estado TLS/SSL, isso não "
1711 1817 "deveria acontecer e pode ser um erro de codificação"
1712 1818  
1713   -#: src/core/ctlr.c:214
  1819 +#: src/core/ctlr.c:204
1714 1820 msgid "The oversize height is too small."
1715 1821 msgstr "A altura definida para 'oversize' é muito pequena."
1716 1822  
1717   -#: src/core/ctlr.c:177
  1823 +#: src/core/ctlr.c:172
1718 1824 msgid "The oversize values are invalid."
1719 1825 msgstr "Os valores para 'oversize' não são válidos."
1720 1826  
1721   -#: src/core/ctlr.c:189
  1827 +#: src/core/ctlr.c:182
1722 1828 msgid "The oversize values are too big."
1723 1829 msgstr "Os valores do 'oversize' são muito grandes."
1724 1830  
1725   -#: src/core/ctlr.c:202
  1831 +#: src/core/ctlr.c:193
1726 1832 msgid "The oversize width is too small."
1727 1833 msgstr "A largura do 'oversize' é muito pequena."
1728 1834  
... ... @@ -1760,7 +1866,7 @@ msgstr &quot;&quot;
1760 1866 msgid "The secure connection has been closed cleanly."
1761 1867 msgstr "A conexão segura foi fechada corretamente"
1762 1868  
1763   -#: src/core/properties/string.c:166
  1869 +#: src/core/properties/string.c:150
1764 1870 msgid "The security state"
1765 1871 msgstr "O estado da segurança"
1766 1872  
... ... @@ -1794,8 +1900,10 @@ msgstr &quot;O erro do sistema operacional foi \&quot;%d\&quot; (%s)&quot;
1794 1900 msgid "The system error was \"%s\""
1795 1901 msgstr "O erro do sistema operacional foi \"%s\""
1796 1902  
  1903 +#: src/core/linux/connect.c:222 src/core/linux/connect.c:282
1797 1904 #: src/core/windows/connect.c:298 src/core/windows/connect.c:306
1798 1905 #: src/core/windows/connect.c:314 src/core/windows/connect.c:324
  1906 +#: src/core/macos/connect.c:222 src/core/macos/connect.c:282
1799 1907 #, c-format
1800 1908 msgid "The system error was \"%s\" (rc=%d)"
1801 1909 msgstr "O erro do sistema operacional foi \"%s\" (rc=%d)"
... ... @@ -1806,16 +1914,16 @@ msgstr &quot;O erro do sistema operacional foi \&quot;%s\&quot; (rc=%d)&quot;
1806 1914 msgid "The system error was %s"
1807 1915 msgstr "O erro do sistema operacional foi \"%s\""
1808 1916  
1809   -#: src/core/util.c:266
  1917 +#: src/core/util.c:270
1810 1918 #, c-format
1811 1919 msgid "The system error was '%s' (rc=%d)"
1812 1920 msgstr "O erro do sistema foi \"%s\" (rc=%d)"
1813 1921  
1814   -#: src/core/properties/string.c:197
  1922 +#: src/core/properties/string.c:181
1815 1923 msgid "The trace file name"
1816 1924 msgstr "O nome do arquivo de trace"
1817 1925  
1818   -#: src/core/ctlr.c:203
  1926 +#: src/core/ctlr.c:194
1819 1927 #, c-format
1820 1928 msgid "The width %d is less than model %d columns (%d)"
1821 1929 msgstr "A largura %d é menor que a do modelo %d (%d)"
... ... @@ -1833,7 +1941,7 @@ msgstr &quot;Não existe espaço suficiente no host para os dados.&quot;
1833 1941 msgid "This is a host program error."
1834 1942 msgstr "Este é um erro no programa do host."
1835 1943  
1836   -#: src/core/properties/unsigned.c:146
  1944 +#: src/core/properties/unsigned.c:142
1837 1945 msgid "Time for auto-reconnect"
1838 1946 msgstr "Tempo para reconexão automática"
1839 1947  
... ... @@ -1889,8 +1997,8 @@ msgstr &quot;Mostrar posição do cursor&quot;
1889 1997 msgid "Transfer cancelled by host"
1890 1998 msgstr "Transferência cancelada pelo host"
1891 1999  
1892   -#: src/core/ft/ft_dft.c:213 src/core/ft/ft_dft.c:344 src/core/ft/ft_cut.c:387
1893   -#: src/core/ft/ft_cut.c:475
  2000 +#: src/core/ft/ft_cut.c:387 src/core/ft/ft_cut.c:475 src/core/ft/ft_dft.c:213
  2001 +#: src/core/ft/ft_dft.c:344
1894 2002 msgid "Transfer cancelled by user"
1895 2003 msgstr "Transferência cancelada pelo usuário"
1896 2004  
... ... @@ -1906,11 +2014,12 @@ msgstr &quot;Transferência falhou&quot;
1906 2014 msgid "Transmission error"
1907 2015 msgstr "Erro de transmissão"
1908 2016  
1909   -#: src/core/windows/connect.c:198
  2017 +#: src/core/linux/connect.c:166 src/core/windows/connect.c:198
  2018 +#: src/core/macos/connect.c:166
1910 2019 msgid "Try again"
1911 2020 msgstr "Tentar novamente"
1912 2021  
1913   -#: src/core/properties/string.c:74
  2022 +#: src/core/properties/string.c:68
1914 2023 msgid "URL of the current host"
1915 2024 msgstr "URL do host atual"
1916 2025  
... ... @@ -1935,7 +2044,8 @@ msgstr &quot;Incapaz de decifrar a assinatura do certificado&quot;
1935 2044 msgid "Unable to get certificate CRL."
1936 2045 msgstr "Incapaz de obter o CRL de um certificado."
1937 2046  
1938   -#: src/core/windows/connect.c:224
  2047 +#: src/core/linux/connect.c:201 src/core/windows/connect.c:224
  2048 +#: src/core/macos/connect.c:201
1939 2049 msgid "Unable to get connection state."
1940 2050 msgstr "Não foi possível obter o estado da conexão."
1941 2051  
... ... @@ -1979,6 +2089,10 @@ msgstr &quot;Não foi possível verificar o primeiro certificado&quot;
1979 2089 msgid "Unconnected"
1980 2090 msgstr "Não conectado"
1981 2091  
  2092 +#: src/core/properties/signed.c:100
  2093 +msgid "Undefined"
  2094 +msgstr "Indefinido"
  2095 +
1982 2096 #: src/core/toggles/table.c:225
1983 2097 msgid "Underline"
1984 2098 msgstr "Sublinhados"
... ... @@ -2001,10 +2115,12 @@ msgid &quot;Unexpected type %d in typeahead queue&quot;
2001 2115 msgstr "Tipo inesperado %d na fila de teclado"
2002 2116  
2003 2117 #: src/core/telnet.c:1774 src/core/telnet.c:1794
  2118 +#: src/core/properties/signed.c:59 src/core/properties/signed.c:88
  2119 +#: src/core/properties/signed.c:108
2004 2120 msgid "Unknown"
2005 2121 msgstr "Desconhecido"
2006 2122  
2007   -#: src/core/ctlr.c:626
  2123 +#: src/core/ctlr.c:402
2008 2124 #, c-format
2009 2125 msgid "Unknown 3270 Data Stream command: 0x%X"
2010 2126 msgstr "Unknown 3270 Data Stream command: 0x%X"
... ... @@ -2027,7 +2143,7 @@ msgstr &quot;PF %d desconhecida&quot;
2027 2143 msgid "Unknown frame type from host"
2028 2144 msgstr "Servidor enviou tipo de frame desconhecido"
2029 2145  
2030   -#: src/core/properties/unsigned.c:161
  2146 +#: src/core/properties/unsigned.c:157
2031 2147 msgid "Unlock delay"
2032 2148 msgstr "Atraso no desbloqueio"
2033 2149  
... ... @@ -2055,6 +2171,10 @@ msgstr &quot;Usar teclas +/- para navegar por campos&quot;
2055 2171 msgid "Use the keys +/- from keypad to select editable fields"
2056 2172 msgstr "Use the keys +/- from keypad to select editable fields"
2057 2173  
  2174 +#: src/core/properties/signed.c:99
  2175 +msgid "Verifying SSL (Getting CRL)"
  2176 +msgstr ""
  2177 +
2058 2178 #: src/core/windows/connect.c:111
2059 2179 msgid "WSAStartup failed"
2060 2180 msgstr "WSAStartup falhou"
... ... @@ -2071,7 +2191,7 @@ msgstr &quot;Aguardando resposta do pedido de upload&quot;
2071 2191 msgid "Warning"
2072 2192 msgstr "Alerta"
2073 2193  
2074   -#: src/core/windows/util.c:126 src/core/windows/util.c:169
  2194 +#: src/core/windows/util.c:124 src/core/windows/util.c:167
2075 2195 #, c-format
2076 2196 msgid "Windows error %d"
2077 2197 msgstr "Erro windows foi %d"
... ... @@ -2080,6 +2200,58 @@ msgstr &quot;Erro windows foi %d&quot;
2080 2200 msgid "Wrap around"
2081 2201 msgstr "Wrap around"
2082 2202  
  2203 +#: src/core/properties/signed.c:71 src/core/properties/signed.c:77
  2204 +#: src/core/properties/signed.c:78
  2205 +msgid "X"
  2206 +msgstr "X"
  2207 +
  2208 +#: src/core/properties/signed.c:72
  2209 +msgid "X -f"
  2210 +msgstr "X -f"
  2211 +
  2212 +#: src/core/properties/signed.c:69
  2213 +#, fuzzy
  2214 +msgid "X Connected"
  2215 +msgstr "X Desconectado"
  2216 +
  2217 +#: src/core/properties/signed.c:80
  2218 +#, fuzzy
  2219 +msgid "X Connecting"
  2220 +msgstr "Conectando"
  2221 +
  2222 +#: src/core/properties/signed.c:76
  2223 +msgid "X Inhibit"
  2224 +msgstr "X Inibido"
  2225 +
  2226 +#: src/core/properties/signed.c:70
  2227 +msgid "X Not Connected"
  2228 +msgstr "X Desconectado"
  2229 +
  2230 +#: src/core/properties/signed.c:74
  2231 +msgid "X Numeric"
  2232 +msgstr "X Numérico"
  2233 +
  2234 +#: src/core/properties/signed.c:75
  2235 +msgid "X Overflow"
  2236 +msgstr "X Estouro"
  2237 +
  2238 +#: src/core/properties/signed.c:73
  2239 +msgid "X Protected"
  2240 +msgstr "X Protegido"
  2241 +
  2242 +#: src/core/properties/signed.c:79
  2243 +#, fuzzy
  2244 +msgid "X Resolving"
  2245 +msgstr "Resolvendo"
  2246 +
  2247 +#: src/core/properties/signed.c:67
  2248 +msgid "X System"
  2249 +msgstr "X Sistema"
  2250 +
  2251 +#: src/core/properties/signed.c:68
  2252 +msgid "X Wait"
  2253 +msgstr "X Aguarde"
  2254 +
2083 2255 #: src/core/ft/ftmessages.c:74
2084 2256 msgid ""
2085 2257 "You did not enter the required parameters after a SEND or RECEIVE command."
... ... @@ -2163,15 +2335,19 @@ msgstr &quot;_Desconectar&quot;
2163 2335 msgid "_Reconnect"
2164 2336 msgstr "_Reconectar"
2165 2337  
2166   -#: src/core/windows/connect.c:340
  2338 +#: src/core/linux/connect.c:233 src/core/linux/connect.c:302
  2339 +#: src/core/windows/connect.c:340 src/core/macos/connect.c:233
  2340 +#: src/core/macos/connect.c:302
2167 2341 msgid "_Retry"
2168 2342 msgstr "_Repetir"
2169 2343  
2170   -#: src/core/toggles/init.c:83 src/core/windows/connect.c:372
  2344 +#: src/core/toggles/init.c:83 src/core/linux/connect.c:334
  2345 +#: src/core/windows/connect.c:372 src/core/macos/connect.c:334
2171 2346 msgid "disable"
2172 2347 msgstr "desabilitar"
2173 2348  
2174   -#: src/core/toggles/init.c:83 src/core/windows/connect.c:372
  2349 +#: src/core/toggles/init.c:83 src/core/linux/connect.c:334
  2350 +#: src/core/windows/connect.c:372 src/core/macos/connect.c:334
2175 2351 msgid "enable"
2176 2352 msgstr "habilitar"
2177 2353  
... ... @@ -2181,23 +2357,16 @@ msgstr &quot;erro fcntl() ao obter estado do socket.&quot;
2181 2357  
2182 2358 #: src/network_modules/tools.c:161
2183 2359 msgid "ioctlsocket(FIONBIO) failed."
2184   -msgstr "ioctlsocket(FIONBIO) failed."
2185   -
2186   -#: src/core/properties/string.c:134
2187   -msgid "lib3270 revision"
2188   -msgstr "Revisão da lib3270"
  2360 +msgstr "ioctlsocket(FIONBIO) falhou."
2189 2361  
2190   -#: src/core/properties/string.c:127
2191   -msgid "lib3270 version"
2192   -msgstr "Versão da lib3270"
2193   -
2194   -#: src/core/properties/boolean.c:191
  2362 +#: src/core/properties/boolean.c:189
2195 2363 msgid "numeric lock"
2196 2364 msgstr "numeric lock"
2197 2365  
2198   -#: src/core/windows/connect.c:359
  2366 +#: src/core/linux/connect.c:322 src/core/windows/connect.c:359
  2367 +#: src/core/macos/connect.c:322
2199 2368 msgid "setsockopt(SO_OOBINLINE) has failed"
2200   -msgstr "setsockopt(SO_OOBINLINE) has failed"
  2369 +msgstr "setsockopt(SO_OOBINLINE) falhou"
2201 2370  
2202 2371 #~ msgid " and <b>%s</b> for %s."
2203 2372 #~ msgstr " e <b>%s</b> para %s."
... ... @@ -2488,9 +2657,6 @@ msgstr &quot;setsockopt(SO_OOBINLINE) has failed&quot;
2488 2657 #~ msgid "Can't get screen contents"
2489 2658 #~ msgstr "Não foi possível obter o conteúdo da tela"
2490 2659  
2491   -#~ msgid "Can't initialize curl operation"
2492   -#~ msgstr "Erro ao inicializar operação CURL"
2493   -
2494 2660 #~ msgid "Can't load %s"
2495 2661 #~ msgstr "Não foi possível carregar %s"
2496 2662  
... ... @@ -3518,9 +3684,6 @@ msgstr &quot;setsockopt(SO_OOBINLINE) has failed&quot;
3518 3684 #~ msgid "SSL init failed!"
3519 3685 #~ msgstr "Inicialização SSL falhou"
3520 3686  
3521   -#~ msgid "SSL negotiation"
3522   -#~ msgstr "Negociação SSL"
3523   -
3524 3687 #~ msgid "SSL negotiation has failed"
3525 3688 #~ msgstr "Negociação de segurança falhou"
3526 3689  
... ... @@ -4014,9 +4177,6 @@ msgstr &quot;setsockopt(SO_OOBINLINE) has failed&quot;
4014 4177 #~ msgid "Unable to paste formatted data"
4015 4178 #~ msgstr "Incapaz de colar texto formatado"
4016 4179  
4017   -#~ msgid "Undefined"
4018   -#~ msgstr "Indefinido"
4019   -
4020 4180 #~ msgid "Unexpected SSL error"
4021 4181 #~ msgstr "Erro SSL inesperado"
4022 4182  
... ... @@ -4120,33 +4280,6 @@ msgstr &quot;setsockopt(SO_OOBINLINE) has failed&quot;
4120 4280 #~ msgid "Windows error was \"%s\" (%u)"
4121 4281 #~ msgstr "Erro windows foi \"%s\" (%u)"
4122 4282  
4123   -#~ msgid "X"
4124   -#~ msgstr "X"
4125   -
4126   -#~ msgid "X -f"
4127   -#~ msgstr "X -f"
4128   -
4129   -#~ msgid "X Inhibit"
4130   -#~ msgstr "X Inibido"
4131   -
4132   -#~ msgid "X Not Connected"
4133   -#~ msgstr "X Desconectado"
4134   -
4135   -#~ msgid "X Numeric"
4136   -#~ msgstr "X Numérico"
4137   -
4138   -#~ msgid "X Overflow"
4139   -#~ msgstr "X Estouro"
4140   -
4141   -#~ msgid "X Protected"
4142   -#~ msgstr "X Protegido"
4143   -
4144   -#~ msgid "X System"
4145   -#~ msgstr "X Sistema"
4146   -
4147   -#~ msgid "X Wait"
4148   -#~ msgstr "X Aguarde"
4149   -
4150 4283 #~ msgid "XML file"
4151 4284 #~ msgstr "Arquivo XML"
4152 4285  
... ... @@ -4234,9 +4367,6 @@ msgstr &quot;setsockopt(SO_OOBINLINE) has failed&quot;
4234 4367 #~ msgid "_Save"
4235 4368 #~ msgstr "_Salvar"
4236 4369  
4237   -#~ msgid "_Secure connection."
4238   -#~ msgstr "Conexão _Segura."
4239   -
4240 4370 #~ msgid "_Send"
4241 4371 #~ msgstr "_Enviar"
4242 4372  
... ... @@ -4267,15 +4397,18 @@ msgstr &quot;setsockopt(SO_OOBINLINE) has failed&quot;
4267 4397 #~ msgid "bracket"
4268 4398 #~ msgstr "bracket"
4269 4399  
4270   -#~ msgid "disconnected"
4271   -#~ msgstr "Desconectado"
4272   -
4273 4400 #~ msgid "fcntl(%s)"
4274 4401 #~ msgstr "fcntl(%s)"
4275 4402  
4276 4403 #~ msgid "ioctl(%s)"
4277 4404 #~ msgstr "ioctl(%s)"
4278 4405  
  4406 +#~ msgid "lib3270 revision"
  4407 +#~ msgstr "Revisão da lib3270"
  4408 +
  4409 +#~ msgid "lib3270 version"
  4410 +#~ msgstr "Versão da lib3270"
  4411 +
4279 4412 #~ msgid "setsockopt(%s)"
4280 4413 #~ msgstr "setsockopt(%s)"
4281 4414  
... ...
mac/ci-build.sh 0 → 100755
... ... @@ -0,0 +1,26 @@
  1 +#!/bin/bash
  2 +
  3 +export PKG_CONFIG_PATH="$(brew --prefix curl)/lib/pkgconfig:$(brew --prefix openssl)/lib/pkgconfig"
  4 +
  5 +PROJECT_NAME=$(grep AC_INIT configure.ac | cut -d[ -f2 | cut -d] -f1)
  6 +VERSION=$(grep AC_INIT configure.ac | cut -d[ -f3 | cut -d] -f1)
  7 +
  8 +echo "${PKG_CONFIG_PATH}"
  9 +pkg-config --list-all
  10 +
  11 +./autogen.sh \
  12 + --prefix="/${PROJECT_NAME}/${VERSION}" \
  13 + --with-libiconv-prefix=$(brew --prefix gettext)
  14 +
  15 +if [ "$?" != "0" ]; then
  16 + exit -1
  17 +fi
  18 +
  19 +make all
  20 +if [ "$?" != "0" ]; then
  21 + exit -1
  22 +fi
  23 +
  24 +make DESTDIR=.bin/package install
  25 +tar --create --xz --file=macos-${PROJECT_NAME}.tar.xz --directory=.bin/package --verbose .
  26 +
... ...
rpm/_service
... ... @@ -15,10 +15,10 @@
15 15 <param name="files">*/rpm/lib3270.spec</param>
16 16 </service -->
17 17  
18   - <service name="extract_file">
  18 + <!-- service name="extract_file">
19 19 <param name="archive">*.tar</param>
20 20 <param name="files">*/arch/PKGBUILD</param>
21   - </service>
  21 + </service -->
22 22  
23 23 <service name="extract_file">
24 24 <param name="archive">*.tar</param>
... ... @@ -49,11 +49,11 @@
49 49 <param name="outfilename">debian.shlibs</param>
50 50 </service>
51 51  
52   - <service name="extract_file">
  52 + <!-- service name="extract_file">
53 53 <param name="archive">*.tar</param>
54 54 <param name="files">*/debian/compat</param>
55 55 <param name="outfilename">debian.compat</param>
56   - </service>
  56 + </service -->
57 57  
58 58 <service name="extract_file">
59 59 <param name="archive">*.tar</param>
... ...
rpm/_servicedata 0 → 100644
... ... @@ -0,0 +1,4 @@
  1 +<servicedata>
  2 +<service name="tar_scm">
  3 + <param name="url">https://github.com/PerryWerneck/lib3270.git</param>
  4 + <param name="changesrevision">76361945fad5c3ed96c5b15cf98d99b4b05f2eaf</param></service></servicedata>
0 5 \ No newline at end of file
... ...
rpm/lib3270.spec
... ... @@ -16,9 +16,8 @@
16 16 # Please submit bugfixes or comments via https://bugs.opensuse.org/
17 17 #
18 18  
19   -
20 19 Name: lib3270
21   -Version: 5.4
  20 +Version: 5.4+git20230322
22 21 Release: 0
23 22 Summary: TN3270 Access library
24 23 Group: Development/Libraries/C and C++
... ... @@ -80,6 +79,8 @@ make all %{?_smp_mflags}
80 79  
81 80 %install
82 81 %make_install
  82 +mkdir -p %{buildroot}%{_libdir}/pw3270/%{MAJOR_VERSION}.%{MINOR_VERSION}/plugins
  83 +
83 84 %find_lang %{name}-%{MAJOR_VERSION}.%{MINOR_VERSION} langfiles
84 85  
85 86 %fdupes %{buildroot}/%{_prefix}
... ... @@ -99,6 +100,10 @@ make all %{?_smp_mflags}
99 100 %{_includedir}/%{name}
100 101 %{_libdir}/pkgconfig/*.pc
101 102  
  103 +%{_libdir}/pw3270
  104 +%{_libdir}/pw3270/%{MAJOR_VERSION}.%{MINOR_VERSION}
  105 +%{_libdir}/pw3270/%{MAJOR_VERSION}.%{MINOR_VERSION}/plugins
  106 +
102 107 %post -n %{name}-%{_libvrs} -p /sbin/ldconfig
103 108 %postun -n %{name}-%{_libvrs} -p /sbin/ldconfig
104 109  
... ...
sdk/lib3270-delayed.pc.in
... ... @@ -8,8 +8,9 @@ version_minor=@PACKAGE_MINOR_VERSION@
8 8 sdk_version=@LIB3270_SDK_VERSION@
9 9 library_name=@LIB3270_NAME@
10 10 product_name=@PRODUCT_NAME@
  11 +default_host=@LIB3270_DEFAULT_HOST@
11 12 product_id=@PRODUCT_ID@
12   -plugin_path=${libdir}/@PRODUCT_ID@/@PACKAGE_MAJOR_VERSION@.@PACKAGE_MINOR_VERSION@/plugins
  13 +plugin_path=${libdir}/@PRODUCT_NAME@/@PACKAGE_MAJOR_VERSION@.@PACKAGE_MINOR_VERSION@/plugins
13 14  
14 15 Name: @PACKAGE_NAME@-delayed
15 16 Description: @PACKAGE_DESCRIPTION@
... ...
src/core/actions/table.c
... ... @@ -86,11 +86,11 @@ static int pa1(H3270 *hSession) {
86 86 }
87 87  
88 88 static int pa2(H3270 *hSession) {
89   - return lib3270_pakey(hSession,1);
  89 + return lib3270_pakey(hSession,2);
90 90 }
91 91  
92 92 static int pa3(H3270 *hSession) {
93   - return lib3270_pakey(hSession,1);
  93 + return lib3270_pakey(hSession,3);
94 94 }
95 95  
96 96 /**
... ...
src/core/ctlr.c
... ... @@ -46,7 +46,6 @@
46 46 #include <stdlib.h>
47 47 #include "3270ds.h"
48 48 #include "screen.h"
49   -//#include "resources.h"
50 49  
51 50 #include "ctlrc.h"
52 51 #include "ftc.h"
... ... @@ -65,15 +64,13 @@
65 64 #include "widec.h"
66 65 #include "screenc.h"
67 66  
68   -// Boolean dbcs = False;
69 67  
70   -/* Statics */
  68 +// Statics
71 69 static void update_formatted(H3270 *session);
72 70 static void set_formatted(H3270 *hSession, int state);
73 71 static void ctlr_blanks(H3270 *session);
74 72 static void ctlr_half_connect(H3270 *session, int ignored, void *dunno);
75 73 static void ctlr_connect(H3270 *session, int ignored, void *dunno);
76   -//static void ticking_stop(H3270 *session);
77 74 static void ctlr_add_ic(H3270 *session, int baddr, unsigned char ic);
78 75  
79 76 /**
... ... @@ -92,8 +89,6 @@ static const unsigned char code_table[64] = {
92 89 };
93 90  
94 91 #define IsBlank(c) ((c == EBC_null) || (c == EBC_space))
95   -
96   -
97 92 #define ALL_CHANGED(h) if(lib3270_in_ansi(h)) (h)->cbk.changed(h,0,(h)->view.rows*(h)->view.cols);
98 93 #define REGION_CHANGED(h, f, l) if(lib3270_in_ansi(h)) (h)->cbk.changed(h,f,l)
99 94 #define ONE_CHANGED(h,n) if(lib3270_in_ansi(h)) (h)->cbk.changed(h,n,n+1);
... ... @@ -179,8 +174,6 @@ void ctlr_set_rows_cols(H3270 *session, int mn, int ovc, int ovr) {
179 174 ovc, ovr
180 175 );
181 176  
182   - // popup_an_error(session,"Invalid %s %dx%d:\nNegative or zero",ResOversize, ovc, ovr);
183   -
184 177 } else if (ovc * ovr >= 0x4000) {
185 178 lib3270_popup_dialog(
186 179 session,
... ... @@ -191,8 +184,6 @@ void ctlr_set_rows_cols(H3270 *session, int mn, int ovc, int ovr) {
191 184 ovc, ovr
192 185 );
193 186  
194   -// popup_an_error(session,"Invalid %s %dx%d:\nToo big",ResOversize, ovc, ovr);
195   -
196 187 } else if (ovc < session->max.cols) {
197 188  
198 189 lib3270_popup_dialog(
... ... @@ -204,7 +195,6 @@ void ctlr_set_rows_cols(H3270 *session, int mn, int ovc, int ovr) {
204 195 ovc, session->model_num, session->max.cols
205 196 );
206 197  
207   -// popup_an_error(session,"Invalid %s cols (%d):\nLess than model %d cols (%d)",ResOversize, ovc, session->model_num, session->maxCOLS);
208 198 } else if (ovr < session->max.rows) {
209 199  
210 200 lib3270_popup_dialog(
... ... @@ -216,10 +206,10 @@ void ctlr_set_rows_cols(H3270 *session, int mn, int ovc, int ovr) {
216 206 ovr, session->model_num, session->max.rows
217 207 );
218 208  
219   -// popup_an_error(session,"Invalid %s rows (%d):\nLess than model %d rows (%d)",ResOversize, ovr, session->model_num, session->maxROWS);
220   -
221 209 } else {
  210 +
222 211 update_model_info(session,mn,session->oversize.cols = ovc,session->oversize.rows = ovr);
  212 +
223 213 }
224 214 }
225 215  
... ... @@ -271,8 +261,6 @@ static void ctlr_half_connect(H3270 *hSession, int GNUC_UNUSED(ignored), void GN
271 261 ///
272 262 static void ctlr_connect(H3270 *hSession, int GNUC_UNUSED(ignored), void GNUC_UNUSED(*dunno)) {
273 263 hSession->cbk.set_timer(hSession,0);
274   -// ticking_stop(hSession);
275   -// status_untiming(hSession);
276 264  
277 265 if (hSession->ever_3270)
278 266 hSession->ea_buf[-1].fa = FA_PRINTABLE | FA_MODIFY;
... ... @@ -293,218 +281,6 @@ static void ctlr_connect(H3270 *hSession, int GNUC_UNUSED(ignored), void GNUC_UN
293 281 hSession->crm_nattr = 0;
294 282 }
295 283  
296   -LIB3270_EXPORT int lib3270_is_formatted(const H3270 *hSession) {
297   - if(check_online_session(hSession))
298   - return 0;
299   -
300   - return hSession->formatted ? 1 : 0;
301   -}
302   -
303   -/**
304   - * @brief Get field address.
305   - *
306   - * @return Negative on error(sets errno) or field address.
307   - *
308   - */
309   -LIB3270_EXPORT int lib3270_get_field_start(H3270 *hSession, int baddr) {
310   - int sbaddr;
311   -
312   - if(check_online_session(hSession))
313   - return - errno;
314   -
315   - if (!hSession->formatted)
316   - return - (errno = ENOTSUP);
317   -
318   - if(baddr < 0)
319   - baddr = hSession->cursor_addr;
320   -
321   - sbaddr = baddr;
322   - do {
323   - if(hSession->ea_buf[baddr].fa)
324   - return baddr;
325   - DEC_BA(baddr);
326   - } while (baddr != sbaddr);
327   -
328   - return -1;
329   -
330   -}
331   -
332   -LIB3270_EXPORT int lib3270_get_field_len(H3270 *hSession, int baddr) {
333   - int saddr;
334   - int addr;
335   - int width = 0;
336   -
337   - if(check_online_session(hSession))
338   - return - errno;
339   -
340   - if (!hSession->formatted)
341   - return - (errno = ENOTSUP);
342   -
343   - if(baddr < 0)
344   - baddr = hSession->cursor_addr;
345   -
346   - addr = lib3270_field_addr(hSession,baddr);
347   - if(addr < 0)
348   - return addr;
349   -
350   - saddr = addr;
351   - INC_BA(addr);
352   - do {
353   - if(hSession->ea_buf[addr].fa)
354   - return width;
355   - INC_BA(addr);
356   - width++;
357   - } while (addr != saddr);
358   -
359   - return -(errno = ENODATA);
360   -}
361   -
362   -LIB3270_EXPORT int lib3270_field_addr(const H3270 *hSession, int baddr) {
363   - int sbaddr;
364   -
365   - if(!lib3270_is_connected(hSession))
366   - return -(errno = ENOTCONN);
367   -
368   - if(!hSession->formatted)
369   - return -(errno = ENOTSUP);
370   -
371   - if(baddr < 0)
372   - baddr = lib3270_get_cursor_address(hSession);
373   -
374   - if(baddr > lib3270_get_length(hSession))
375   - return -(errno = EOVERFLOW);
376   -
377   - sbaddr = baddr;
378   - do {
379   - if(hSession->ea_buf[baddr].fa)
380   - return baddr;
381   - DEC_BA(baddr);
382   - } while (baddr != sbaddr);
383   -
384   - return -(errno = ENODATA);
385   -}
386   -
387   -LIB3270_EXPORT LIB3270_FIELD_ATTRIBUTE lib3270_get_field_attribute(H3270 *hSession, int baddr) {
388   - int sbaddr;
389   -
390   - FAIL_IF_NOT_ONLINE(hSession);
391   -
392   - if(!hSession->formatted) {
393   - errno = ENOTCONN;
394   - return LIB3270_FIELD_ATTRIBUTE_INVALID;
395   - }
396   -
397   - if(baddr < 0)
398   - baddr = lib3270_get_cursor_address(hSession);
399   -
400   - sbaddr = baddr;
401   - do {
402   - if(hSession->ea_buf[baddr].fa)
403   - return (LIB3270_FIELD_ATTRIBUTE) hSession->ea_buf[baddr].fa;
404   -
405   - DEC_BA(baddr);
406   - } while (baddr != sbaddr);
407   -
408   - errno = EINVAL;
409   - return LIB3270_FIELD_ATTRIBUTE_INVALID;
410   -
411   -}
412   -
413   -/**
414   - * @brief Get the length of the field at given buffer address.
415   - *
416   - * @param hSession Session handle.
417   - * @param addr Buffer address of the field.
418   - *
419   - * @return field length or negative if invalid or not connected (sets errno).
420   - *
421   - */
422   -int lib3270_field_length(H3270 *hSession, int baddr) {
423   - int saddr;
424   - int addr;
425   - int width = 0;
426   -
427   - addr = lib3270_field_addr(hSession,baddr);
428   - if(addr < 0)
429   - return addr;
430   -
431   - saddr = addr;
432   - INC_BA(addr);
433   - do {
434   - if(hSession->ea_buf[addr].fa)
435   - return width;
436   - INC_BA(addr);
437   - width++;
438   - } while (addr != saddr);
439   -
440   - return -(errno = EINVAL);
441   -
442   -}
443   -
444   -/**
445   - * @brief Find the field attribute for the given buffer address.
446   - *
447   - * @return Field attribute.
448   - *
449   - */
450   -unsigned char get_field_attribute(H3270 *hSession, int baddr) {
451   - baddr = lib3270_field_addr(hSession,baddr);
452   - if(baddr < 0)
453   - return 0;
454   - return hSession->ea_buf[baddr].fa;
455   -}
456   -
457   -/**
458   - * @brief Find the next unprotected field.
459   - *
460   - * @param hSession Session handle.
461   - * @param baddr0 Search start addr (-1 to use current cursor position).
462   - *
463   - * @return address following the unprotected attribute byte, or 0 if no nonzero-width unprotected field can be found, negative if failed.
464   - *
465   - */
466   -LIB3270_EXPORT int lib3270_get_next_unprotected(H3270 *hSession, int baddr0) {
467   - register int baddr, nbaddr;
468   -
469   - FAIL_IF_NOT_ONLINE(hSession);
470   -
471   - if(!hSession->formatted)
472   - return -(errno = ENOTSUP);
473   -
474   - if(baddr0 < 0)
475   - baddr0 = hSession->cursor_addr;
476   -
477   - nbaddr = baddr0;
478   - do {
479   - baddr = nbaddr;
480   - INC_BA(nbaddr);
481   - if(hSession->ea_buf[baddr].fa &&!FA_IS_PROTECTED(hSession->ea_buf[baddr].fa) &&!hSession->ea_buf[nbaddr].fa)
482   - return nbaddr;
483   - } while (nbaddr != baddr0);
484   -
485   - return 0;
486   -}
487   -
488   -LIB3270_EXPORT int lib3270_get_is_protected_at(const H3270 *h, unsigned int row, unsigned int col) {
489   - return lib3270_get_is_protected(h, lib3270_translate_to_address(h,row,col));
490   -}
491   -
492   -LIB3270_EXPORT int lib3270_get_is_protected(const H3270 *hSession, int baddr) {
493   - FAIL_IF_NOT_ONLINE(hSession);
494   -
495   - if(baddr < 0)
496   - baddr = hSession->cursor_addr;
497   -
498   - int faddr = lib3270_field_addr(hSession,baddr);
499   -
500   - return FA_IS_PROTECTED(hSession->ea_buf[faddr].fa) ? 1 : 0;
501   -}
502   -
503   -LIB3270_EXPORT int lib3270_is_protected(H3270 *h, unsigned int baddr) {
504   - return lib3270_get_is_protected(h, baddr);
505   -}
506   -
507   -
508 284 /**
509 285 * @brief Perform an erase command, which may include changing the (virtual) screen size.
510 286 *
... ... @@ -1777,9 +1553,6 @@ enum pds ctlr_write(H3270 *hSession, unsigned char buf[], int buflen, Boolean er
1777 1553  
1778 1554 ps_process(hSession);
1779 1555  
1780   - /* Let a script go. */
1781   -// sms_host_output();
1782   -
1783 1556 /* Tell 'em what happened. */
1784 1557 return rv;
1785 1558 }
... ... @@ -1800,7 +1573,6 @@ void ctlr_write_sscp_lu(H3270 *hSession, unsigned char buf[], int buflen) {
1800 1573 unsigned char *cp = buf;
1801 1574 int s_row;
1802 1575 unsigned char c;
1803   -// int baddr;
1804 1576  
1805 1577 /*
1806 1578 * The 3174 Functionl Description says that anything but NL, NULL, FM,
... ... @@ -1846,7 +1618,6 @@ void ctlr_write_sscp_lu(H3270 *hSession, unsigned char buf[], int buflen) {
1846 1618 break;
1847 1619  
1848 1620 case ORDER_SBA:
1849   -// baddr = DECODE_BADDR(*(cp+1), *(cp+2));
1850 1621 trace_ds(hSession," SetBufferAddress%s [ignored]\n", rcba(hSession,DECODE_BADDR(*(cp+1), *(cp+2))));
1851 1622 cp += 2;
1852 1623 i += 2;
... ...
src/core/field.c 0 → 100644
... ... @@ -0,0 +1,235 @@
  1 +/* SPDX-License-Identifier: LGPL-3.0-or-later */
  2 +
  3 +/*
  4 + * Copyright (C) 2023 Perry Werneck <perry.werneck@gmail.com>
  5 + *
  6 + * This program is free software: you can redistribute it and/or modify
  7 + * it under the terms of the GNU Lesser General Public License as published
  8 + * by the Free Software Foundation, either version 3 of the License, or
  9 + * (at your option) any later version.
  10 + *
  11 + * This program is distributed in the hope that it will be useful,
  12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + * GNU General Public License for more details.
  15 + *
  16 + * You should have received a copy of the GNU Lesser General Public License
  17 + * along with this program. If not, see <https://www.gnu.org/licenses/>.
  18 + */
  19 +
  20 + #include <config.h>
  21 + #include <internals.h>
  22 + #include <lib3270.h>
  23 + #include "3270ds.h"
  24 +
  25 +/**
  26 + * @brief Get field address.
  27 + *
  28 + * @return Negative on error(sets errno) or field address.
  29 + *
  30 + */
  31 + LIB3270_EXPORT int lib3270_get_field_start(H3270 *hSession, int baddr) {
  32 + int sbaddr;
  33 +
  34 + if(check_online_session(hSession))
  35 + return - errno;
  36 +
  37 + if (!hSession->formatted)
  38 + return - (errno = ENOTSUP);
  39 +
  40 + if(baddr < 0)
  41 + baddr = hSession->cursor_addr;
  42 +
  43 + sbaddr = baddr;
  44 + do {
  45 + if(hSession->ea_buf[baddr].fa)
  46 + return baddr;
  47 + DEC_BA(baddr);
  48 + } while (baddr != sbaddr);
  49 +
  50 + return -1;
  51 +
  52 + }
  53 +
  54 + LIB3270_EXPORT int lib3270_is_formatted(const H3270 *hSession) {
  55 + if(check_online_session(hSession))
  56 + return 0;
  57 + return hSession->formatted ? 1 : 0;
  58 + }
  59 +
  60 + LIB3270_EXPORT int lib3270_get_field_len(H3270 *hSession, int baddr) {
  61 + int saddr;
  62 + int addr;
  63 + int width = 0;
  64 +
  65 + if(check_online_session(hSession))
  66 + return - errno;
  67 +
  68 + if (!hSession->formatted)
  69 + return - (errno = ENOTSUP);
  70 +
  71 + if(baddr < 0)
  72 + baddr = hSession->cursor_addr;
  73 +
  74 + addr = lib3270_field_addr(hSession,baddr);
  75 + if(addr < 0)
  76 + return addr;
  77 +
  78 + saddr = addr;
  79 + INC_BA(addr);
  80 + do {
  81 + if(hSession->ea_buf[addr].fa)
  82 + return width;
  83 + INC_BA(addr);
  84 + width++;
  85 + } while (addr != saddr);
  86 +
  87 + return -(errno = ENODATA);
  88 + }
  89 +
  90 + LIB3270_EXPORT int lib3270_field_addr(const H3270 *hSession, int baddr) {
  91 +
  92 + int sbaddr;
  93 +
  94 + if(!lib3270_is_connected(hSession))
  95 + return -(errno = ENOTCONN);
  96 +
  97 + if(!hSession->formatted)
  98 + return -(errno = ENOTSUP);
  99 +
  100 + if(baddr < 0)
  101 + baddr = lib3270_get_cursor_address(hSession);
  102 +
  103 + if( (unsigned int) baddr > lib3270_get_length(hSession))
  104 + return -(errno = EOVERFLOW);
  105 +
  106 + sbaddr = baddr;
  107 + do {
  108 + if(hSession->ea_buf[baddr].fa)
  109 + return baddr;
  110 + DEC_BA(baddr);
  111 + } while (baddr != sbaddr);
  112 +
  113 + return -(errno = ENODATA);
  114 + }
  115 +
  116 + LIB3270_EXPORT LIB3270_FIELD_ATTRIBUTE lib3270_get_field_attribute(H3270 *hSession, int baddr) {
  117 + int sbaddr;
  118 +
  119 + FAIL_IF_NOT_ONLINE(hSession);
  120 +
  121 + if(!hSession->formatted) {
  122 + errno = ENOTCONN;
  123 + return LIB3270_FIELD_ATTRIBUTE_INVALID;
  124 + }
  125 +
  126 + if(baddr < 0)
  127 + baddr = lib3270_get_cursor_address(hSession);
  128 +
  129 + sbaddr = baddr;
  130 + do {
  131 + if(hSession->ea_buf[baddr].fa)
  132 + return (LIB3270_FIELD_ATTRIBUTE) hSession->ea_buf[baddr].fa;
  133 +
  134 + DEC_BA(baddr);
  135 + } while (baddr != sbaddr);
  136 +
  137 + errno = EINVAL;
  138 + return LIB3270_FIELD_ATTRIBUTE_INVALID;
  139 +
  140 + }
  141 +
  142 +/**
  143 + * @brief Get the length of the field at given buffer address.
  144 + *
  145 + * @param hSession Session handle.
  146 + * @param addr Buffer address of the field.
  147 + *
  148 + * @return field length or negative if invalid or not connected (sets errno).
  149 + *
  150 + */
  151 + int lib3270_field_length(H3270 *hSession, int baddr) {
  152 + int saddr;
  153 + int addr;
  154 + int width = 0;
  155 +
  156 + addr = lib3270_field_addr(hSession,baddr);
  157 + if(addr < 0)
  158 + return addr;
  159 +
  160 + saddr = addr;
  161 + INC_BA(addr);
  162 + do {
  163 + if(hSession->ea_buf[addr].fa)
  164 + return width;
  165 + INC_BA(addr);
  166 + width++;
  167 + } while (addr != saddr);
  168 +
  169 + return -(errno = EINVAL);
  170 +
  171 + }
  172 +
  173 +/**
  174 + * @brief Find the field attribute for the given buffer address.
  175 + *
  176 + * @return Field attribute.
  177 + *
  178 + */
  179 + unsigned char get_field_attribute(H3270 *hSession, int baddr) {
  180 + baddr = lib3270_field_addr(hSession,baddr);
  181 + if(baddr < 0)
  182 + return 0;
  183 + return hSession->ea_buf[baddr].fa;
  184 + }
  185 +
  186 +/**
  187 + * @brief Find the next unprotected field.
  188 + *
  189 + * @param hSession Session handle.
  190 + * @param baddr0 Search start addr (-1 to use current cursor position).
  191 + *
  192 + * @return address following the unprotected attribute byte, or 0 if no nonzero-width unprotected field can be found, negative if failed.
  193 + *
  194 + */
  195 + LIB3270_EXPORT int lib3270_get_next_unprotected(H3270 *hSession, int baddr0) {
  196 + register int baddr, nbaddr;
  197 +
  198 + FAIL_IF_NOT_ONLINE(hSession);
  199 +
  200 + if(!hSession->formatted)
  201 + return -(errno = ENOTSUP);
  202 +
  203 + if(baddr0 < 0)
  204 + baddr0 = hSession->cursor_addr;
  205 +
  206 + nbaddr = baddr0;
  207 + do {
  208 + baddr = nbaddr;
  209 + INC_BA(nbaddr);
  210 + if(hSession->ea_buf[baddr].fa &&!FA_IS_PROTECTED(hSession->ea_buf[baddr].fa) &&!hSession->ea_buf[nbaddr].fa)
  211 + return nbaddr;
  212 + } while (nbaddr != baddr0);
  213 +
  214 + return 0;
  215 + }
  216 +
  217 + LIB3270_EXPORT int lib3270_get_is_protected_at(const H3270 *h, unsigned int row, unsigned int col) {
  218 + return lib3270_get_is_protected(h, lib3270_translate_to_address(h,row,col));
  219 + }
  220 +
  221 + LIB3270_EXPORT int lib3270_get_is_protected(const H3270 *hSession, int baddr) {
  222 +
  223 + FAIL_IF_NOT_ONLINE(hSession);
  224 +
  225 + if(baddr < 0)
  226 + baddr = hSession->cursor_addr;
  227 +
  228 + int faddr = lib3270_field_addr(hSession,baddr);
  229 +
  230 + return FA_IS_PROTECTED(hSession->ea_buf[faddr].fa) ? 1 : 0;
  231 + }
  232 +
  233 + LIB3270_EXPORT int lib3270_is_protected(H3270 *h, unsigned int baddr) {
  234 + return lib3270_get_is_protected(h, baddr);
  235 + }
... ...
src/core/ft/ft.c
... ... @@ -474,7 +474,7 @@ LIB3270_EXPORT int lib3270_ft_start(H3270 *hSession) {
474 474 // Erase the line and enter the command.
475 475 flen = kybd_prime(ft->host);
476 476 if (!flen || flen < strlen(buffer) - 1) {
477   - lib3270_write_log(ft->host, "ft", "Unable to send command \"%s\" (flen=%d szBuffer=%ld)",buffer,flen,strlen(buffer));
  477 + lib3270_write_log(ft->host, "ft", "Unable to send command \"%s\" (flen=%d szBuffer=%u)",buffer,flen,(unsigned int) strlen(buffer));
478 478 ft_failed(ft,_( "Unable to send file-transfer request" ));
479 479 return errno = EINVAL;
480 480 }
... ...
src/core/linux/connect.c
... ... @@ -373,46 +373,6 @@ int net_reconnect(H3270 *hSession, int seconds) {
373 373 lib3270_write_log(hSession,"connect", "%s: %s",__FUNCTION__,strerror(ETIMEDOUT));
374 374 return errno = rc;
375 375 }
376   -
377   - /*
378   - time_t end = time(0)+seconds;
379   -
380   - while(time(0) < end)
381   - {
382   - lib3270_main_iterate(hSession,1);
383   -
384   - switch(hSession->connection.state)
385   - {
386   - case LIB3270_PENDING:
387   - case LIB3270_CONNECTED_INITIAL:
388   - case LIB3270_CONNECTED_ANSI:
389   - case LIB3270_CONNECTED_3270:
390   - case LIB3270_CONNECTED_INITIAL_E:
391   - case LIB3270_CONNECTED_NVT:
392   - case LIB3270_CONNECTED_SSCP:
393   - case LIB3270_CONNECTING:
394   - break;
395   -
396   - case LIB3270_NOT_CONNECTED:
397   - return errno = ENOTCONN;
398   -
399   - case LIB3270_CONNECTED_TN3270E:
400   - if(!hSession->starting)
401   - return 0;
402   - break;
403   -
404   - default:
405   - lib3270_write_log(hSession,"connect", "%s: State changed to unexpected state %d",__FUNCTION__,hSession->connection.state);
406   - return errno = EINVAL;
407   - }
408   -
409   - }
410   -
411   - lib3270_disconnect(hSession);
412   - lib3270_write_log(hSession,"connect", "%s: %s",__FUNCTION__,strerror(ETIMEDOUT));
413   -
414   - return errno = ETIMEDOUT;
415   - */
416 376 }
417 377  
418 378 return 0;
... ...
src/core/linux/util.c
  1 +/* SPDX-License-Identifier: LGPL-3.0-or-later */
  2 +
1 3 /*
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
5   - * o nome G3270.
6   - *
7   - * Copyright (C) <2008> <Banco do Brasil S.A.>
8   - *
9   - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
10   - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
11   - * Free Software Foundation.
12   - *
13   - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
14   - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
15   - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
16   - * obter mais detalhes.
  4 + * Copyright (C) 2008 Banco do Brasil S.A.
17 5 *
18   - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
19   - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin
20   - * St, Fifth Floor, Boston, MA 02110-1301 USA
  6 + * This program is free software: you can redistribute it and/or modify
  7 + * it under the terms of the GNU Lesser General Public License as published
  8 + * by the Free Software Foundation, either version 3 of the License, or
  9 + * (at your option) any later version.
21 10 *
22   - * Este programa está nomeado como - e possui - linhas de código.
  11 + * This program is distributed in the hope that it will be useful,
  12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + * GNU General Public License for more details.
23 15 *
  16 + * You should have received a copy of the GNU Lesser General Public License
  17 + * along with this program. If not, see <https://www.gnu.org/licenses/>.
  18 + */
  19 +
  20 +/*
24 21 * Contatos:
25 22 *
26 23 * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
... ...
src/core/macos/util.c
... ... @@ -64,6 +64,30 @@ static char * build_filename(const char *root, const char *str, va_list args) {
64 64 return (char *) lib3270_realloc(filename,strlen(filename)+1);
65 65 }
66 66  
  67 +LIB3270_EXPORT char * lib3270_get_installation_path() {
  68 +
  69 + char lpFilename[PATH_MAX+1];
  70 +
  71 + memset(lpFilename,0,sizeof(lpFilename));
  72 + uint32_t szPath = PATH_MAX;
  73 + _NSGetExecutablePath(lpFilename, &szPath);
  74 + lpFilename[szPath] = 0;
  75 +
  76 + char *ptr = strrchr(lpFilename,'/');
  77 + if(ptr) {
  78 + ptr[0] = 0;
  79 +
  80 + ptr = strrchr(lpFilename,'/');
  81 + if(ptr && !(strcasecmp(ptr,"/bin") && strcasecmp(ptr,"/lib"))) {
  82 + *ptr = 0;
  83 + }
  84 +
  85 + strncat(lpFilename,"/",PATH_MAX);
  86 + }
  87 +
  88 + return strdup(lpFilename);
  89 +}
  90 +
67 91 char * lib3270_build_data_filename(const char *str, ...) {
68 92  
69 93 va_list args;
... ... @@ -102,27 +126,67 @@ char * lib3270_build_data_filename(const char *str, ...) {
102 126  
103 127 }
104 128  
105   - /*
106 129 //
107   - // Try EXE Path
  130 + // Try installation path
108 131 //
109 132 {
110   - uint32_t size = szPath;
111   - _NSGetExecutablePath(path, &size);
112   - path[size] = 0;
  133 + char *ptr;
  134 + lib3270_autoptr(char) instpath = lib3270_get_installation_path();
113 135  
  136 + if( *(instpath+strlen(instpath)-1) == '/') {
  137 + instpath[strlen(instpath)-1] = 0;
  138 + }
114 139  
115   - }
116   - */
  140 + char relative[PATH_MAX+1];
  141 + memset(relative,0,PATH_MAX);
117 142  
118   - //
119   - // Not found, use the system datadir
120   - //
121   - va_start (args, str);
122   - filename = build_filename(LIB3270_STRINGIZE_VALUE_OF(DATADIR), str, args);
123   - va_end (args);
  143 + {
  144 + va_list args;
  145 + va_start (args, str);
  146 +
  147 + while(str) {
  148 +
  149 + if(str[0] == '/') {
  150 + strncat(relative,str,PATH_MAX);
  151 + } else {
  152 + strncat(relative,"/",PATH_MAX);
  153 + strncat(relative,str,PATH_MAX);
  154 + }
  155 +
  156 + str = va_arg(args, const char *);
  157 + }
  158 +
  159 + va_end (args);
  160 + }
  161 +
  162 + char filename[PATH_MAX+1];
  163 + memset(filename,0,PATH_MAX+1);
  164 +
  165 + // Check instdir
  166 + strncpy(filename,instpath,PATH_MAX);
  167 + strncat(filename,"/share",PATH_MAX);
  168 + strncat(filename,relative,PATH_MAX);
  169 +
  170 + if(access(filename,0) == 0) {
  171 + return strdup(filename);
  172 + }
  173 +
  174 + strncpy(filename,instpath,PATH_MAX);
  175 + strncat(filename,"/share/",PATH_MAX);
  176 + strncat(filename,LIB3270_STRINGIZE_VALUE_OF(PRODUCT_NAME),PATH_MAX);
  177 + strncat(filename,relative,PATH_MAX);
  178 +
  179 + if(access(filename,0) == 0) {
  180 + return strdup(filename);
  181 + }
  182 +
  183 + // Default behavior.
  184 + strncpy(filename,instpath,PATH_MAX);
  185 + strncat(filename,relative,PATH_MAX);
  186 +
  187 + return strdup(filename);
  188 + }
124 189  
125   - return filename;
126 190 }
127 191  
128 192 char * lib3270_build_config_filename(const char *str, ...) {
... ...
src/core/properties/boolean.c
  1 +/* SPDX-License-Identifier: LGPL-3.0-or-later */
  2 +
1 3 /*
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.
  4 + * Copyright (C) 2008 Banco do Brasil S.A.
16 5 *
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
  6 + * This program is free software: you can redistribute it and/or modify
  7 + * it under the terms of the GNU Lesser General Public License as published
  8 + * by the Free Software Foundation, either version 3 of the License, or
  9 + * (at your option) any later version.
20 10 *
21   - * Este programa está nomeado como - e possui - linhas de código.
  11 + * This program is distributed in the hope that it will be useful,
  12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + * GNU General Public License for more details.
22 15 *
  16 + * You should have received a copy of the GNU Lesser General Public License
  17 + * along with this program. If not, see <https://www.gnu.org/licenses/>.
  18 + */
  19 +
  20 +/*
23 21 * Contatos:
24 22 *
25 23 * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
... ...
src/core/properties/signed.c
  1 +/* SPDX-License-Identifier: LGPL-3.0-or-later */
  2 +
1 3 /*
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.
  4 + * Copyright (C) 2008 Banco do Brasil S.A.
11 5 *
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.
  6 + * This program is free software: you can redistribute it and/or modify
  7 + * it under the terms of the GNU Lesser General Public License as published
  8 + * by the Free Software Foundation, either version 3 of the License, or
  9 + * (at your option) any later version.
16 10 *
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 - e possui - linhas de código.
  11 + * This program is distributed in the hope that it will be useful,
  12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + * GNU General Public License for more details.
22 15 *
  16 + * You should have received a copy of the GNU Lesser General Public License
  17 + * along with this program. If not, see <https://www.gnu.org/licenses/>.
  18 + */
  19 +
  20 +/*
23 21 * Contatos:
24 22 *
25 23 * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
... ... @@ -27,6 +25,10 @@
27 25 *
28 26 */
29 27  
  28 +/**
  29 + * @brief Signed int properties.
  30 + */
  31 +
30 32 #include <config.h>
31 33 #include <internals.h>
32 34 #include <string.h>
... ... @@ -34,18 +36,90 @@
34 36 #include <lib3270/properties.h>
35 37 #include <lib3270/keyboard.h>
36 38  
37   -static int lib3270_get_connection_state_as_int(const H3270 *hSession) {
38   - return (int) lib3270_get_connection_state(hSession);
  39 +LIB3270_EXPORT const char * lib3270_get_connection_state_as_string(const H3270 *hSession) {
  40 +
  41 + static const char * values[] = {
  42 + N_("Disconnected"),
  43 + N_("Connecting to host"),
  44 + N_("Connection pending"),
  45 + N_("Connected, no mode yet"),
  46 + N_("Connected in NVT ANSI mode"),
  47 + N_("Connected in old-style 3270 mode"),
  48 + N_("Connected in TN3270E mode, no negotiated"),
  49 + N_("Connected in TN3270E mode, NVT mode"),
  50 + N_("Connected in TN3270E mode, SSCP-LU mode"),
  51 + N_("Connected in TN3270E mode, 3270 mode")
  52 + };
  53 +
  54 + size_t value = (size_t) lib3270_get_connection_state(hSession);
  55 + if(value < (sizeof(value)/sizeof(values[0]))) {
  56 + return dgettext(GETTEXT_PACKAGE,values[value]);
  57 + }
  58 +
  59 + return _( "Unknown" );
  60 +
39 61 }
40 62  
41   -static int lib3270_get_program_message_as_int(const H3270 *hSession) {
42   - return (int) lib3270_get_program_message(hSession);
  63 +LIB3270_EXPORT const char * lib3270_get_program_message_as_string(const H3270 *hSession) {
  64 +
  65 + static const char * values[] = {
  66 + "",
  67 + N_( "X System" ),
  68 + N_( "X Wait" ),
  69 + N_( "X Connected" ),
  70 + N_( "X Not Connected" ),
  71 + N_( "X" ),
  72 + N_( "X -f" ),
  73 + N_( "X Protected" ),
  74 + N_( "X Numeric" ),
  75 + N_( "X Overflow" ),
  76 + N_( "X Inhibit" ),
  77 + N_( "X" ),
  78 + N_( "X" ),
  79 + N_( "X Resolving" ),
  80 + N_( "X Connecting" )
  81 + };
  82 +
  83 + size_t value = (size_t) lib3270_get_program_message(hSession);
  84 + if(value < (sizeof(value)/sizeof(values[0]))) {
  85 + return dgettext(GETTEXT_PACKAGE,values[value]);
  86 + }
  87 +
  88 + return _( "Unknown" );
  89 +
  90 +}
  91 +
  92 +LIB3270_EXPORT const char * lib3270_get_ssl_state_as_string(const H3270 * hSession) {
  93 +
  94 + static const char * values[] = {
  95 + N_("No secure connection"),
  96 + N_("Connection secure with CA check"),
  97 + N_("Connection secure, no CA, self-signed or expired CRL"),
  98 + N_("Negotiating SSL"),
  99 + N_("Verifying SSL (Getting CRL)"),
  100 + N_("Undefined")
  101 + };
  102 +
  103 + size_t value = (size_t) lib3270_get_ssl_state(hSession);
  104 + if(value < (sizeof(value)/sizeof(values[0]))) {
  105 + return dgettext(GETTEXT_PACKAGE,values[value]);
  106 + }
  107 +
  108 + return _( "Unknown" );
  109 +}
  110 +
  111 +static int lib3270_get_connection_state_as_int(const H3270 *hSession) {
  112 + return (int) lib3270_get_connection_state(hSession);
43 113 }
44 114  
45 115 static int lib3270_get_ssl_state_as_int(const H3270 * hSession) {
46 116 return (int) lib3270_get_ssl_state(hSession);
47 117 }
48 118  
  119 +static int lib3270_get_program_message_as_int(const H3270 *hSession) {
  120 + return (int) lib3270_get_program_message(hSession);
  121 +}
  122 +
49 123 const LIB3270_INT_PROPERTY * lib3270_get_int_properties_list(void) {
50 124  
51 125 static const LIB3270_INT_PROPERTY properties[] = {
... ... @@ -54,7 +128,8 @@ const LIB3270_INT_PROPERTY * lib3270_get_int_properties_list(void) {
54 128 .name = "cstate", // Property name.
55 129 .description = N_( "Connection state" ), // Property description.
56 130 .get = lib3270_get_connection_state_as_int, // Get value.
57   - .set = NULL // Set value.
  131 + .set = NULL, // Set value.
  132 + .describe = lib3270_get_connection_state_as_string
58 133 },
59 134  
60 135 {
... ... @@ -62,28 +137,32 @@ const LIB3270_INT_PROPERTY * lib3270_get_int_properties_list(void) {
62 137 .group = LIB3270_ACTION_GROUP_ONLINE, // Property group.
63 138 .description = N_( "Cursor address" ), // Property description.
64 139 .get = lib3270_get_cursor_address, // Get value.
65   - .set = lib3270_set_cursor_address // Set value.
  140 + .set = lib3270_set_cursor_address, // Set value.
  141 + .describe = NULL
66 142 },
67 143  
68 144 {
69   - .name = "program_message", // Property name.
70   - .description = N_( "Latest program message" ), // Property description.
71   - .get = lib3270_get_program_message_as_int, // Get value.
72   - .set = NULL // Set value.
  145 + .name = "program_message", // Property name.
  146 + .description = N_( "Latest program message" ), // Property description.
  147 + .get = lib3270_get_program_message_as_int, // Get value.
  148 + .set = NULL, // Set value.
  149 + .describe = lib3270_get_program_message_as_string
73 150 },
74 151  
75 152 {
76 153 .name = "ssl_state", // Property name.
77 154 .description = N_( "ID of the session security state" ), // Property description.
78 155 .get = lib3270_get_ssl_state_as_int, // Get value.
79   - .set = NULL // Set value.
  156 + .set = NULL, // Set value.
  157 + .describe = lib3270_get_ssl_state_as_string
80 158 },
81 159  
82 160 {
83 161 .name = NULL,
84 162 .description = NULL,
85 163 .get = NULL,
86   - .set = NULL
  164 + .set = NULL, // Set value.
  165 + .describe = NULL
87 166 }
88 167 };
89 168  
... ...
src/core/properties/string.c
  1 +/* SPDX-License-Identifier: LGPL-3.0-or-later */
  2 +
1 3 /*
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.
  4 + * Copyright (C) 2008 Banco do Brasil S.A.
11 5 *
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.
  6 + * This program is free software: you can redistribute it and/or modify
  7 + * it under the terms of the GNU Lesser General Public License as published
  8 + * by the Free Software Foundation, either version 3 of the License, or
  9 + * (at your option) any later version.
16 10 *
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 - e possui - linhas de código.
  11 + * This program is distributed in the hope that it will be useful,
  12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + * GNU General Public License for more details.
22 15 *
  16 + * You should have received a copy of the GNU Lesser General Public License
  17 + * along with this program. If not, see <https://www.gnu.org/licenses/>.
  18 + */
  19 +
  20 +/*
23 21 * Contatos:
24 22 *
25 23 * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
... ... @@ -38,6 +36,14 @@
38 36 #include <lib3270/ssl.h>
39 37 #include <lib3270/trace.h>
40 38  
  39 +LIB3270_EXPORT const char * lib3270_get_termtype(const H3270 *hSession) {
  40 + return hSession->termtype;
  41 +}
  42 +
  43 +LIB3270_EXPORT const char * lib3270_get_termname(const H3270 *hSession) {
  44 + return hSession->termname;
  45 +}
  46 +
41 47 static const char * get_version(const H3270 GNUC_UNUSED(*hSession)) {
42 48 return lib3270_get_version();
43 49 }
... ... @@ -46,15 +52,9 @@ static const char * get_revision(const H3270 GNUC_UNUSED(*hSession)) {
46 52 return lib3270_get_revision();
47 53 }
48 54  
49   -static const char * lib3270_get_termtype(const H3270 *hSession) {
50   - return hSession->termtype;
51   -}
52   -
53   -static const char * lib3270_get_termname(const H3270 *hSession) {
54   - return hSession->termname;
55   -}
56 55  
57 56 LIB3270_EXPORT const LIB3270_STRING_PROPERTY * lib3270_get_string_properties_list(void) {
  57 +
58 58 static const LIB3270_STRING_PROPERTY properties[] = {
59 59  
60 60 {
... ... @@ -124,27 +124,17 @@ LIB3270_EXPORT const LIB3270_STRING_PROPERTY * lib3270_get_string_properties_lis
124 124  
125 125 {
126 126 .name = "version", // Property name.
127   - .description = N_( "lib3270 version" ), // Property description.
  127 + .description = N_( "Protocol library version" ), // Property description.
128 128 .get = get_version, // Get value.
129 129 .set = NULL // Set value.
130 130 },
131 131  
132 132 {
133   - .name = "revision", // Property name.
134   - .description = N_( "lib3270 revision" ), // Property description.
135   - .get = get_revision, // Get value.
136   - .set = NULL // Set value.
137   - },
138   -
139   - /*
140   - {
141   - .name = "crl_url", // Property name.
142   - .group = LIB3270_ACTION_GROUP_OFFLINE, // Property group.
143   - .description = N_( "URL for the certificate revocation list" ), // Property description.
144   - .get = lib3270_crl_get_url, // Get value.
145   - .set = lib3270_crl_set_url, // Set value.
  133 + .name = "revision", // Property name.
  134 + .description = N_( "Protocol library revision" ), // Property description.
  135 + .get = get_revision, // Get value.
  136 + .set = NULL // Set value.
146 137 },
147   - */
148 138  
149 139 {
150 140 .name = "crl_preferred_protocol", // Property name.
... ...
src/core/properties/unsigned.c
  1 +/* SPDX-License-Identifier: LGPL-3.0-or-later */
  2 +
1 3 /*
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.
  4 + * Copyright (C) 2008 Banco do Brasil S.A.
16 5 *
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
  6 + * This program is free software: you can redistribute it and/or modify
  7 + * it under the terms of the GNU Lesser General Public License as published
  8 + * by the Free Software Foundation, either version 3 of the License, or
  9 + * (at your option) any later version.
20 10 *
21   - * Este programa está nomeado como - e possui - linhas de código.
  11 + * This program is distributed in the hope that it will be useful,
  12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + * GNU General Public License for more details.
22 15 *
  16 + * You should have received a copy of the GNU Lesser General Public License
  17 + * along with this program. If not, see <https://www.gnu.org/licenses/>.
  18 + */
  19 +
  20 +/*
23 21 * Contatos:
24 22 *
25 23 * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
... ... @@ -34,10 +32,6 @@
34 32 #include <lib3270/properties.h>
35 33 #include <lib3270/keyboard.h>
36 34  
37   -unsigned int lib3270_get_kybdlock_as_int(const H3270 *hSession) {
38   - return (unsigned int) lib3270_get_keyboard_lock_state(hSession);
39   -}
40   -
41 35 const LIB3270_UINT_PROPERTY * lib3270_unsigned_property_get_by_name(const char *name) {
42 36 size_t ix;
43 37 const LIB3270_UINT_PROPERTY * list = lib3270_get_unsigned_properties_list();
... ... @@ -70,6 +64,10 @@ LIB3270_EXPORT int lib3270_set_auto_reconnect(H3270 *hSession, unsigned int time
70 64 return 0;
71 65 }
72 66  
  67 +static unsigned int lib3270_get_kybdlock_as_int(const H3270 *hSession) {
  68 + return (unsigned int) lib3270_get_keyboard_lock_state(hSession);
  69 +}
  70 +
73 71 const LIB3270_UINT_PROPERTY * lib3270_get_unsigned_properties_list(void) {
74 72  
75 73 static const LIB3270_UINT_PROPERTY properties[] = {
... ...
src/core/util.c
... ... @@ -239,6 +239,10 @@ LIB3270_EXPORT const char * lib3270_get_revision(void) {
239 239 return RPQ_REVISION;
240 240 }
241 241  
  242 +LIB3270_EXPORT int lib3270_check_revision(const char GNUC_UNUSED(*revision)) {
  243 + return 0;
  244 +}
  245 +
242 246 LIB3270_EXPORT const char * lib3270_get_product_name(void) {
243 247 return LIB3270_STRINGIZE_VALUE_OF(PRODUCT_NAME);
244 248 }
... ...
src/core/wait.c
... ... @@ -46,6 +46,7 @@ LIB3270_EXPORT int lib3270_wait_for_update(H3270 GNUC_UNUSED(*hSession), int GNU
46 46 }
47 47  
48 48 LIB3270_EXPORT int lib3270_wait_for_ready(H3270 *hSession, int seconds) {
  49 +
49 50 debug("%s",__FUNCTION__);
50 51 debug("Session lock state is %d",lib3270_get_lock_status(hSession));
51 52  
... ... @@ -87,6 +88,7 @@ LIB3270_EXPORT int lib3270_wait_for_ready(H3270 *hSession, int seconds) {
87 88 }
88 89  
89 90 int lib3270_wait_for_string(H3270 *hSession, const char *key, int seconds) {
  91 +
90 92 FAIL_IF_NOT_ONLINE(hSession);
91 93  
92 94 int rc = 0;
... ... @@ -180,6 +182,37 @@ LIB3270_EXPORT int lib3270_wait_for_string_at(H3270 *hSession, unsigned int row,
180 182 return lib3270_wait_for_string_at_address(hSession,baddr,key,seconds);
181 183 }
182 184  
  185 +LIB3270_EXPORT int lib3270_wait_for_connected(H3270 *hSession, int seconds) {
  186 +
  187 + int rc = -1;
  188 + int timeout = 0;
  189 + void * timer = AddTimer(seconds * 1000, hSession, timer_expired, &timeout);
  190 +
  191 + while(rc == -1) {
  192 + if(timeout) {
  193 + // Timeout! The timer was destroyed.
  194 + return errno = ETIMEDOUT;
  195 + }
  196 +
  197 + if(hSession->connection.state == LIB3270_NOT_CONNECTED) {
  198 + rc = ENOTCONN;
  199 + break;
  200 + }
  201 +
  202 + if(!hSession->starting && hSession->connection.state >= (int)LIB3270_CONNECTED_INITIAL) {
  203 + rc = 0;
  204 + break;
  205 + }
  206 +
  207 + lib3270_main_iterate(hSession,1);
  208 +
  209 + }
  210 + RemoveTimer(hSession,timer);
  211 +
  212 + return errno = rc;
  213 +}
  214 +
  215 +
183 216 LIB3270_EXPORT int lib3270_wait_for_cstate(H3270 *hSession, LIB3270_CSTATE cstate, int seconds) {
184 217  
185 218 int rc = -1;
... ...
src/core/windows/util.c
  1 +/* SPDX-License-Identifier: LGPL-3.0-or-later */
  2 +
1 3 /*
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
5   - * o nome G3270.
6   - *
7   - * Copyright (C) <2008> <Banco do Brasil S.A.>
8   - *
9   - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
10   - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
11   - * Free Software Foundation.
12   - *
13   - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
14   - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
15   - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
16   - * obter mais detalhes.
  4 + * Copyright (C) 2008 Banco do Brasil S.A.
17 5 *
18   - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
19   - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin
20   - * St, Fifth Floor, Boston, MA 02110-1301 USA
  6 + * This program is free software: you can redistribute it and/or modify
  7 + * it under the terms of the GNU Lesser General Public License as published
  8 + * by the Free Software Foundation, either version 3 of the License, or
  9 + * (at your option) any later version.
21 10 *
22   - * Este programa está nomeado como - e possui - linhas de código.
  11 + * This program is distributed in the hope that it will be useful,
  12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + * GNU General Public License for more details.
23 15 *
  16 + * You should have received a copy of the GNU Lesser General Public License
  17 + * along with this program. If not, see <https://www.gnu.org/licenses/>.
  18 + */
  19 +
  20 +/*
24 21 * Contatos:
25 22 *
26 23 * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
... ... @@ -36,6 +33,7 @@
36 33 #include <windows.h>
37 34 #include <lmcons.h>
38 35 #include <internals.h>
  36 +#include <io.h>
39 37  
40 38 #include "winversc.h"
41 39 #include <ws2tcpip.h>
... ... @@ -222,15 +220,23 @@ LIB3270_EXPORT const char * lib3270_win32_local_charset(void) {
222 220 #define SECS_TO_100NS 10000000ULL /* 10^7 */
223 221  
224 222 LIB3270_EXPORT char * lib3270_get_installation_path() {
225   - char lpFilename[4096];
  223 + char lpFilename[MAX_PATH+1];
226 224  
227 225 memset(lpFilename,0,sizeof(lpFilename));
228   - DWORD szPath = GetModuleFileName(hModule,lpFilename,sizeof(lpFilename));
  226 + DWORD szPath = GetModuleFileName(hModule,lpFilename,MAX_PATH);
229 227 lpFilename[szPath] = 0;
230 228  
231   - char * ptr = strrchr(lpFilename,'\\');
232   - if(ptr)
233   - ptr[1] = 0;
  229 + char *ptr = strrchr(lpFilename,'\\');
  230 + if(ptr) {
  231 + ptr[0] = 0;
  232 +
  233 + ptr = strrchr(lpFilename,'\\');
  234 + if(ptr && !(strcasecmp(ptr,"\\bin") && strcasecmp(ptr,"\\lib"))) {
  235 + *ptr = 0;
  236 + }
  237 +
  238 + strncat(lpFilename,"\\",MAX_PATH);
  239 + }
234 240  
235 241 return strdup(lpFilename);
236 242 }
... ... @@ -277,17 +283,20 @@ static char * build_filename(const char *str, va_list args) {
277 283  
278 284 memset(filename,0,szFilename);
279 285  
280   -#ifdef DEBUG
281   - filename[0] = '.';
282   - filename[1] = '\\';
283   -#else
284 286 DWORD szPath = GetModuleFileName(hModule,filename,szFilename);
285 287 filename[szPath] = 0;
286   -#endif // DEBUG
287 288  
288 289 ptr = strrchr(filename,'\\');
289   - if(ptr)
290   - ptr[1] = 0;
  290 + if(ptr) {
  291 + ptr[0] = 0;
  292 +
  293 + ptr = strrchr(filename,'\\');
  294 + if(ptr && !(strcasecmp(ptr,"\\bin") && strcasecmp(ptr,"\\lib"))) {
  295 + *ptr = 0;
  296 + }
  297 +
  298 + strncat(filename,"\\",szFilename);
  299 + }
291 300  
292 301 while(str) {
293 302 filename = concat(filename,str,&szFilename);
... ... @@ -298,14 +307,74 @@ static char * build_filename(const char *str, va_list args) {
298 307 }
299 308  
300 309 char * lib3270_build_data_filename(const char *str, ...) {
301   - va_list args;
302   - va_start (args, str);
303 310  
304   - char *filename = build_filename(str, args);
  311 + char *ptr;
  312 + lib3270_autoptr(char) instpath = lib3270_get_installation_path();
305 313  
306   - va_end (args);
  314 + for(ptr = instpath; *ptr; ptr++) {
  315 + if(*ptr == '/') {
  316 + *ptr = '\\';
  317 + }
  318 + }
307 319  
308   - return filename;
  320 + if( *(instpath+strlen(instpath)-1) == '\\') {
  321 + instpath[strlen(instpath)-1] = 0;
  322 + }
  323 +
  324 + char relative[MAX_PATH+1];
  325 + memset(relative,0,MAX_PATH);
  326 +
  327 + {
  328 + va_list args;
  329 + va_start (args, str);
  330 +
  331 + while(str) {
  332 +
  333 + if(str[0] == '\\' || str[0] == '/') {
  334 + strncat(relative,str,MAX_PATH);
  335 + } else {
  336 + strncat(relative,"\\",MAX_PATH);
  337 + strncat(relative,str,MAX_PATH);
  338 + }
  339 +
  340 + str = va_arg(args, const char *);
  341 + }
  342 +
  343 + va_end (args);
  344 + }
  345 +
  346 + for(ptr = relative; *ptr; ptr++) {
  347 + if(*ptr == '/') {
  348 + *ptr = '\\';
  349 + }
  350 + }
  351 +
  352 + char filename[MAX_PATH+1];
  353 + memset(filename,0,MAX_PATH+1);
  354 +
  355 + // Check instdir
  356 + strncpy(filename,instpath,MAX_PATH);
  357 + strncat(filename,"\\share",MAX_PATH);
  358 + strncat(filename,relative,MAX_PATH);
  359 +
  360 + if(access(filename,0) == 0) {
  361 + return strdup(filename);
  362 + }
  363 +
  364 + strncpy(filename,instpath,MAX_PATH);
  365 + strncat(filename,"\\share\\",MAX_PATH);
  366 + strncat(filename,LIB3270_STRINGIZE_VALUE_OF(PRODUCT_NAME),MAX_PATH);
  367 + strncat(filename,relative,MAX_PATH);
  368 +
  369 + if(access(filename,0) == 0) {
  370 + return strdup(filename);
  371 + }
  372 +
  373 + // Default behavior.
  374 + strncpy(filename,instpath,MAX_PATH);
  375 + strncat(filename,relative,MAX_PATH);
  376 +
  377 + return strdup(filename);
309 378 }
310 379  
311 380 char * lib3270_build_config_filename(const char *str, ...) {
... ...
src/include/config.h.in
... ... @@ -70,7 +70,6 @@
70 70 /* Security options */
71 71 #undef HAVE_LDAP
72 72 #undef HAVE_LIBSSL
73   - #undef HAVE_FIPS_H
74 73  
75 74 #undef SSL_ENABLE_SELF_SIGNED_CERT_CHECK
76 75  
... ...
src/include/lib3270.h
... ... @@ -94,6 +94,9 @@
94 94 #define LIB3270_STRINGIZE(x) #x
95 95 #define LIB3270_STRINGIZE_VALUE_OF(x) LIB3270_STRINGIZE(x)
96 96  
  97 +typedef struct _h3270 H3270;
  98 +typedef struct _h3270ft H3270FT;
  99 +
97 100 /**
98 101 * @brief BIND definitions.
99 102 */
... ... @@ -368,7 +371,8 @@ typedef enum _lib3270_action_group {
368 371 const char * label; \
369 372 const char * icon; \
370 373 const char * summary; \
371   - const char * description;
  374 + const char * description; \
  375 + const char * (*describe)(const H3270 *);
372 376  
373 377 typedef struct _lib3270_property {
374 378 LIB3270_PROPERTY_HEAD
... ... @@ -393,9 +397,6 @@ typedef enum _lib3270_state {
393 397 LIB3270_STATE_USER // Always the last one
394 398 } LIB3270_STATE;
395 399  
396   -typedef struct _h3270 H3270;
397   -typedef struct _h3270ft H3270FT;
398   -
399 400 /**
400 401 * Get current screen size.
401 402 *
... ... @@ -1061,6 +1062,20 @@ LIB3270_EXPORT int lib3270_wait_for_ready(H3270 *hSession, int seconds);
1061 1062 LIB3270_EXPORT int lib3270_wait_for_cstate(H3270 *hSession, LIB3270_CSTATE cstate, int seconds);
1062 1063  
1063 1064 /**
  1065 + * @brief Wait "N" seconds for connected state.
  1066 + *
  1067 + * @param seconds Number of seconds to wait.
  1068 + *
  1069 + * @return 0 if ok, errno code if not.
  1070 + *
  1071 + * @retval ETIMEDOUT Timeout waiting.
  1072 + * @retval ENOTCONN Not connected to host.
  1073 + * @retval 0 Session is online and in required state.
  1074 + *
  1075 + */
  1076 +LIB3270_EXPORT int lib3270_wait_for_connected(H3270 *hSession, int seconds);
  1077 +
  1078 +/**
1064 1079 * "beep" to notify user.
1065 1080 *
1066 1081 * If available play a sound signal do alert user.
... ... @@ -1476,6 +1491,17 @@ LIB3270_EXPORT const char * lib3270_get_version(void);
1476 1491 */
1477 1492 LIB3270_EXPORT const char * lib3270_get_revision(void);
1478 1493  
  1494 +/**
  1495 + * @brief Test if the revision is valid.
  1496 + *
  1497 + * @param revision Revision number to check.
  1498 + *
  1499 + * @return 0 if the supplied revision is valid to the current library.
  1500 + *
  1501 + */
  1502 +LIB3270_EXPORT int lib3270_check_revision(const char *revision);
  1503 +
  1504 +
1479 1505 LIB3270_EXPORT char * lib3270_vsprintf(const char *fmt, va_list args);
1480 1506 LIB3270_EXPORT char * lib3270_strdup_printf(const char *fmt, ...);
1481 1507  
... ...
src/include/lib3270/properties.h
  1 +/* SPDX-License-Identifier: LGPL-3.0-or-later */
  2 +
1 3 /*
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.
  4 + * Copyright (C) 2008 Banco do Brasil S.A.
16 5 *
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
  6 + * This program is free software: you can redistribute it and/or modify
  7 + * it under the terms of the GNU Lesser General Public License as published
  8 + * by the Free Software Foundation, either version 3 of the License, or
  9 + * (at your option) any later version.
20 10 *
21   - * Este programa está nomeado como -.h e possui - linhas de código.
  11 + * This program is distributed in the hope that it will be useful,
  12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + * GNU General Public License for more details.
22 15 *
  16 + * You should have received a copy of the GNU Lesser General Public License
  17 + * along with this program. If not, see <https://www.gnu.org/licenses/>.
  18 + */
  19 +
  20 +/*
23 21 * Contatos:
24 22 *
25 23 * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
26   - * erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça)
  24 + * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)
27 25 *
28 26 */
29 27  
... ... @@ -304,6 +302,12 @@ LIB3270_EXPORT int lib3270_set_auto_reconnect(H3270 *hSession, unsigned int time
304 302 */
305 303 LIB3270_EXPORT unsigned int lib3270_get_auto_reconnect(const H3270 *hSession);
306 304  
  305 +LIB3270_EXPORT const char * lib3270_get_connection_state_as_string(const H3270 *hSession);
  306 +LIB3270_EXPORT const char * lib3270_get_program_message_as_string(const H3270 *hSession);
  307 +LIB3270_EXPORT const char * lib3270_get_ssl_state_as_string(const H3270 * hSession);
  308 +LIB3270_EXPORT const char * lib3270_get_termtype(const H3270 *hSession);
  309 +LIB3270_EXPORT const char * lib3270_get_termname(const H3270 *hSession);
  310 +
307 311 #ifdef __cplusplus
308 312 }
309 313 #endif
... ...
src/network_modules/openssl/context.c
... ... @@ -46,10 +46,6 @@
46 46 #include <openssl/err.h>
47 47 #include <openssl/x509_vfy.h>
48 48  
49   -#ifdef HAVE_FIPS_H
50   - #include <openssl/fips.h>
51   -#endif // HAVE_FIPS_H
52   -
53 49 #ifndef SSL_ST_OK
54 50 #define SSL_ST_OK 3
55 51 #endif // !SSL_ST_OK
... ...
src/network_modules/openssl/start.c
  1 +/* SPDX-License-Identifier: LGPL-3.0-or-later */
  2 +
1 3 /*
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 ', 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 openssl.c e possui - linhas de código.
  4 + * Copyright (C) 2008 Banco do Brasil S.A.
22 5 *
23   - * Contatos:
  6 + * This program is free software: you can redistribute it and/or modify
  7 + * it under the terms of the GNU Lesser General Public License as published
  8 + * by the Free Software Foundation, either version 3 of the License, or
  9 + * (at your option) any later version.
24 10 *
25   - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
26   - * erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça)
  11 + * This program is distributed in the hope that it will be useful,
  12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + * GNU General Public License for more details.
27 15 *
  16 + * You should have received a copy of the GNU Lesser General Public License
  17 + * along with this program. If not, see <https://www.gnu.org/licenses/>.
28 18 */
29 19  
30 20 /**
... ... @@ -199,8 +189,17 @@ int x509_store_ctx_error_callback(int ok, X509_STORE_CTX GNUC_UNUSED(*ctx)) {
199 189 int openssl_network_start_tls(H3270 *hSession) {
200 190  
201 191 SSL_CTX * ctx_context = (SSL_CTX *) lib3270_openssl_get_context(hSession);
202   - if(!ctx_context)
  192 + if(!ctx_context) {
  193 +
  194 + if(!hSession->ssl.message) {
  195 + static const LIB3270_SSL_MESSAGE message = {
  196 + .type = LIB3270_NOTIFY_SECURE,
  197 + .summary = N_( "Cant get SSL context for current connection." )
  198 + };
  199 + hSession->ssl.message = &message;
  200 + }
203 201 return -1;
  202 + }
204 203  
205 204 LIB3270_NET_CONTEXT * context = hSession->network.context;
206 205  
... ... @@ -212,7 +211,6 @@ int openssl_network_start_tls(H3270 *hSession) {
212 211 .type = LIB3270_NOTIFY_SECURE,
213 212 .summary = N_( "Cant create a new SSL structure for current connection." )
214 213 };
215   -
216 214 hSession->ssl.message = &message;
217 215 return -1;
218 216 }
... ... @@ -241,6 +239,7 @@ int openssl_network_start_tls(H3270 *hSession) {
241 239 trace_ssl(hSession, "SSL_connect exits with rc=%d\n",rv);
242 240  
243 241 if (rv != 1) {
  242 +
244 243 LIB3270_SSL_MESSAGE message = {
245 244 .type = LIB3270_NOTIFY_ERROR,
246 245 .title = N_( "Connection failed" ),
... ... @@ -313,7 +312,6 @@ int openssl_network_start_tls(H3270 *hSession) {
313 312  
314 313 // CRL download is enabled and verification has failed; look for CRL file.
315 314  
316   -
317 315 trace_ssl(hSession,"CRL Validation has failed, requesting CRL download\n");
318 316 set_ssl_state(hSession,LIB3270_SSL_VERIFYING);
319 317  
... ...
src/testprogram/testprogram.c
... ... @@ -43,10 +43,6 @@
43 43 #include <lib3270/charset.h>
44 44 #include <stdio.h>
45 45  
46   -#ifdef HAVE_FIPS_H
47   - #include <openssl/fips.h>
48   -#endif // HAVE_FIPS_H
49   -
50 46 #ifdef _WIN32
51 47 #include <lib3270/win32.h>
52 48 #endif // _WIN32
... ... @@ -80,11 +76,13 @@ int main(int argc, char *argv[]) {
80 76  
81 77 textdomain("lib3270");
82 78  
  79 + /*
83 80 {
84 81 lib3270_autoptr(char) testfilename = lib3270_build_data_filename("test",NULL);
85 82 printf("\n\nFilename: '%s'\n\n", testfilename);
86   -// return 0;
  83 + return 0;
87 84 }
  85 + */
88 86  
89 87 // #pragma GCC diagnostic push
90 88 // #pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
... ... @@ -160,6 +158,7 @@ int main(int argc, char *argv[]) {
160 158 printf("Datafile: \"%s\"\n",datafile);
161 159 }
162 160  
  161 + /*
163 162 {
164 163 lib3270_autoptr(char) datafile = lib3270_build_config_filename("test","file.conf",NULL);
165 164 printf("Configfile: \"%s\"\n",datafile);
... ... @@ -169,7 +168,9 @@ int main(int argc, char *argv[]) {
169 168 lib3270_autoptr(char) datafile = lib3270_build_filename("Makefile",NULL);
170 169 printf("Custom file: \"%s\"\n",datafile);
171 170 }
  171 + */
172 172  
  173 + exit(0);
173 174  
174 175 //lib3270_set_toggle(h,LIB3270_TOGGLE_DS_TRACE,1);
175 176 lib3270_set_toggle(h,LIB3270_TOGGLE_SSL_TRACE,1);
... ...
win/bundle.common 0 → 100644
... ... @@ -0,0 +1,359 @@
  1 +#!/bin/bash
  2 +#
  3 +# SPDX-License-Identifier: LGPL-3.0-or-later
  4 +#
  5 +# Copyright (C) 2023 Perry Werneck <perry.werneck@gmail.com>
  6 +#
  7 +# This program is free software: you can redistribute it and/or modify
  8 +# it under the terms of the GNU Lesser General Public License as published
  9 +# by the Free Software Foundation, either version 3 of the License, or
  10 +# (at your option) any later version.
  11 +#
  12 +# This program is distributed in the hope that it will be useful,
  13 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  14 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15 +# GNU General Public License for more details.
  16 +#
  17 +# You should have received a copy of the GNU Lesser General Public License
  18 +# along with this program. If not, see <https://www.gnu.org/licenses/>.
  19 +#
  20 +
  21 +# Check command-line arguments
  22 +argument() {
  23 +
  24 + local cmdline
  25 + for cmdline in ${BASH_ARGV[*]}
  26 + do
  27 + if [ "$(echo ${cmdline} | sed "s@^--@@g" | sed "s@^-@@g" | cut -d= -f1)" == "${1}" ]; then
  28 + local value
  29 + value="$(echo ${cmdline} | cut -d= -f2)"
  30 + if [ -z "${value}" ]; then
  31 + echo "1"
  32 + else
  33 + echo "${value}"
  34 + fi
  35 + return 0
  36 + fi
  37 + done
  38 + echo ""
  39 + return 2
  40 +}
  41 +
  42 +argument "help" > /dev/null
  43 +if [ "$?" == "0" ]; then
  44 + echo "Use ${0} options"
  45 + echo ""
  46 + echo " --help Help options (this screen)"
  47 + echo " --zip Build zipfile"
  48 +
  49 + if [ -e "${srcdir}/win/${PACKAGE_NAME}.nsi" ]; then
  50 + echo " --nsi Build nsi installer"
  51 + fi
  52 + echo " --upload Upload bundle to github"
  53 +fi
  54 +
  55 +# Setup default paths
  56 +srcdir="$(dirname $(dirname $(readlink -f "${0}")))"
  57 +cd ${srcdir}
  58 +if [ "$?" != "0" ]; then
  59 + echo "Cant cd to ${srcdir}"
  60 + exit -1
  61 +fi
  62 +
  63 +if [ -z ${MINGW_PREFIX} ]; then
  64 + if [ -d "/usr/x86_64-w64-mingw32/sys-root/mingw" ]; then
  65 + MINGW_PREFIX="/usr/x86_64-w64-mingw32/sys-root/mingw"
  66 + PKG_CONFIG="/usr/bin/x86_64-w64-mingw32-pkg-config"
  67 + else
  68 + echo "Cant determine mingw prefix"
  69 + exit -1
  70 + fi
  71 +fi
  72 +
  73 +if [ -z ${PKG_CONFIG} ]; then
  74 + PKG_CONFIG=${MINGW_PREFX}/bin/pkg-config
  75 +fi
  76 +
  77 +PACKAGE_NAME=$(grep AC_INIT configure.ac | cut -d[ -f2 | cut -d] -f1)
  78 +if [ -z ${PACKAGE_NAME} ]; then
  79 + echo "Cant determine package name"
  80 + exit -1
  81 +fi
  82 +
  83 +PACKAGE_VERSION=$(grep AC_INIT configure.ac | cut -d[ -f3 | cut -d] -f1)
  84 +if [ -z ${PACKAGE_VERSION} ]; then
  85 + echo "Cant determine package name"
  86 + exit -1
  87 +fi
  88 +
  89 +mkdir -p .bin/bundle
  90 +if [ "$?" != "0" ]; then
  91 + echo "Cant mkdir base buildroot"
  92 + exit -1
  93 +fi
  94 +
  95 +buildroot=$(readlink -f .bin/bundle)
  96 +if [ -z ${buildroot} ]; then
  97 + echo "Cant detect buildroot ${buildroot}"
  98 + exit -1
  99 +fi
  100 +
  101 +mkdir -p "${buildroot}"
  102 +if [ "$?" != "0" ]; then
  103 + echo "Cant mkdir ${buildroot}"
  104 + exit -1
  105 +fi
  106 +
  107 +rm -fr "${buildroot}/*"
  108 +if [ "$?" != "0" ]; then
  109 + echo "Cant clean ${buildroot}"
  110 + exit -1
  111 +fi
  112 +
  113 +bindir="${buildroot}${MINGW_PREFIX}/bin"
  114 +sysdir="${buildroot}/windows/system32"
  115 +
  116 +if [ -z "${WIN_ROOT}" ]; then
  117 + WIN_ROOT="/c/Windows"
  118 +fi
  119 +
  120 +export LANG=C
  121 +
  122 +prepare() {
  123 +
  124 + argument "help" > /dev/null
  125 + if [ "$?" == "0" ]; then
  126 + exit 0
  127 + fi
  128 +
  129 + rm -fr "${buildroot}"
  130 + mkdir -p "${buildroot}"
  131 +}
  132 +
  133 +install_bin() {
  134 +
  135 + mkdir -p "${bindir}"
  136 +
  137 + AGAIN=1
  138 + until [ $AGAIN = 0 ]; do
  139 +
  140 + SOURCES=$(mktemp)
  141 + REQUIRES=$(mktemp)
  142 +
  143 + find "${buildroot}" -iname "*.dll" > ${SOURCES}
  144 + find "${buildroot}" -iname "*.exe" >> ${SOURCES}
  145 +
  146 + while read FILENAME
  147 + do
  148 + echo ${FILENAME}
  149 + objdump -p ${FILENAME} | grep "DLL Name:" | cut -d: -f2 | tr "[:upper:]" "[:lower:]" >> ${REQUIRES}
  150 + done < ${SOURCES}
  151 +
  152 + libs_to_exclude="
  153 + advapi32.dll
  154 + cfgmgr32.dll
  155 + comctl32.dll
  156 + comdlg32.dll
  157 + crypt32.dll
  158 + d3d8.dll
  159 + d3d9.dll
  160 + ddraw.dll
  161 + dnsapi.dll
  162 + dsound.dll
  163 + dwmapi.dll
  164 + gdi32.dll
  165 + gdiplus.dll
  166 + glu32.dll
  167 + glut32.dll
  168 + imm32.dll
  169 + iphlpapi.dll
  170 + kernel32.dll
  171 + ksuser.dll
  172 + mpr.dll
  173 + mscms.dll
  174 + mscoree.dll
  175 + msimg32.dll
  176 + msvcr71.dll
  177 + msvcr80.dll
  178 + msvcr90.dll
  179 + msvcrt.dll
  180 + mswsock.dll
  181 + netapi32.dll
  182 + odbc32.dll
  183 + ole32.dll
  184 + oleacc.dll
  185 + oleaut32.dll
  186 + opengl32.dll
  187 + psapi.dll
  188 + rpcrt4.dll
  189 + secur32.dll
  190 + setupapi.dll
  191 + shell32.dll
  192 + shlwapi.dll
  193 + user32.dll
  194 + usp10.dll
  195 + version.dll
  196 + wininet.dll
  197 + winmm.dll
  198 + wldap32.dll
  199 + ws2_32.dll
  200 + wsock32.dll
  201 + winspool.drv
  202 + ntdll.dll
  203 + winhttp.dll
  204 + hid.dll
  205 + bcrypt.dll
  206 + "
  207 +
  208 + # Remove system DLLs from list
  209 + for i in $libs_to_exclude; do
  210 + sed -i -e "/${i}/d" ${REQUIRES}
  211 + done
  212 +
  213 + AGAIN=0
  214 + while read FILENAME
  215 + do
  216 +
  217 + echo ${FILENAME}
  218 +
  219 + if [ ! -e "${bindir}/${FILENAME}" ]; then
  220 +
  221 + if [ -e ${MINGW_PREFIX}/bin/${FILENAME} ]; then
  222 +
  223 + AGAIN=1
  224 + cp -v "${MINGW_PREFIX}/bin/${FILENAME}" "${bindir}/${FILENAME}"
  225 + if [ "$?" != "0" ]; then
  226 + exit -1
  227 + fi
  228 +
  229 + elif [ -e ${MINGW_PREFIX}/lib/${FILENAME} ]; then
  230 +
  231 + AGAIN=1
  232 + cp -v "${MINGW_PREFIX}/lib/${FILENAME}" "${bindir}/${FILENAME}"
  233 + if [ "$?" != "0" ]; then
  234 + exit -1
  235 + fi
  236 +
  237 + elif [ -e "${WIN_ROOT}/System32/${FILENAME}" ]; then
  238 +
  239 + echo "Ignoring ${WIN_ROOT}/System32/${FILENAME}"
  240 +
  241 + else
  242 +
  243 + echo "Can't find ${MINGW_PREFIX}/bin/${FILENAME} or ${WIN_ROOT}/System32/${FILENAME}"
  244 + find "${MINGW_PREFIX}" -iname "${FILENAME}"
  245 + exit -1
  246 +
  247 + fi
  248 +
  249 + fi
  250 +
  251 + done < ${REQUIRES}
  252 +
  253 + rm -f ${SOURCES}
  254 + rm -f ${REQUIRES}
  255 +
  256 + done
  257 +
  258 + # libhllapi should be available in windows path
  259 + if [ -e "${bindir}/libhllapi.dll" ]; then
  260 + mkdir -p "${sysdir}"
  261 + mv "${bindir}/libhllapi.dll" "${sysdir}"
  262 + if [ "$?" != "0" ]; then
  263 + exit -1
  264 + fi
  265 + fi
  266 +
  267 +}
  268 +
  269 +install_locale() {
  270 +
  271 + mkdir -p ${buildroot}${MINGW_PREFIX}/share/locale/pt_BR/LC_MESSAGES
  272 +
  273 + locales="
  274 + gettext-runtime.mo
  275 + gettext-tools.mo
  276 + glib20.mo
  277 + gtk30.mo
  278 + gtk30-properties.mo
  279 + "
  280 +
  281 + FILENAMES=$(mktemp)
  282 + for i in ${locales}
  283 + do
  284 + find "${MINGW_PREFIX}/share/locale" -name ${i} >> ${FILENAMES}
  285 + done
  286 +
  287 + while read FILENAME
  288 + do
  289 + mkdir -p $(dirname "${buildroot}${FILENAME}")
  290 + cp -v "${FILENAME}" "${buildroot}${FILENAME}"
  291 + if [ "$?" != "0" ]; then
  292 + exit -1
  293 + fi
  294 + done < ${FILENAMES}
  295 + rm -f ${FILENAMES}
  296 +}
  297 +
  298 +
  299 +make_zip() {
  300 +
  301 + cd ${buildroot}${MINGW_PREFIX}
  302 + if [ "$?" != "0" ]; then
  303 + exit -1
  304 + fi
  305 +
  306 + rm -f ${srcdir}/${MINGW_PACKAGE_PREFIX}-${PACKAGE_NAME}-${PACKAGE_VERSION}.bundle.zip
  307 +
  308 + zip -9 -r ${srcdir}/${MINGW_PACKAGE_PREFIX}-${PACKAGE_NAME}-${PACKAGE_VERSION}.bundle.zip .
  309 + if [ "$?" != "0" ]; then
  310 + exit -1
  311 + fi
  312 +
  313 + cd ${srcdir}
  314 + if [ "$?" != "0" ]; then
  315 + exit -1
  316 + fi
  317 +
  318 + if [ -z $(which gh 2> /dev/null) ]; then
  319 + return 0
  320 + fi
  321 +
  322 + argument "upload" > /dev/null
  323 + if [ "$?" == "0" ]; then
  324 + gh release upload --clobber "${PACKAGE_VERSION}" ${srcdir}/${MINGW_PACKAGE_PREFIX}-${PACKAGE_NAME}-${PACKAGE_VERSION}.bundle.zip
  325 + fi
  326 +
  327 +}
  328 +
  329 +install_license() {
  330 + mkdir -p "${buildroot}${MINGW_PREFIX}/usr/share/${PACKAGE_NAME}"
  331 + cp "${srcdir}/LICENSE" "${buildroot}${MINGW_PREFIX}/usr/share/${PACKAGE_NAME}"
  332 + if [ "$?" != "0" ]; then
  333 + echo "Cant copy LICENSE"
  334 + exit -1
  335 + fi
  336 +}
  337 +
  338 +install_runtime() {
  339 + install_bin
  340 + install_locale
  341 +}
  342 +
  343 +build_package() {
  344 +
  345 + # Build
  346 + make -C "${srcdir}" all
  347 + if [ "$?" != "0" ]; then
  348 + echo "Build failed"
  349 + exit -1
  350 + fi
  351 +
  352 + make -C "${srcdir}" "DESTDIR=${buildroot}" install
  353 + if [ "$?" != "0" ]; then
  354 + echo "Install failed"
  355 + exit -1
  356 + fi
  357 +
  358 +}
  359 +
... ...
win/bundle.cross 0 → 100755
... ... @@ -0,0 +1,60 @@
  1 +#!/bin/bash
  2 +#
  3 +# SPDX-License-Identifier: LGPL-3.0-or-later
  4 +#
  5 +# Copyright (C) 2023 Perry Werneck <perry.werneck@gmail.com>
  6 +#
  7 +# This program is free software: you can redistribute it and/or modify
  8 +# it under the terms of the GNU Lesser General Public License as published
  9 +# by the Free Software Foundation, either version 3 of the License, or
  10 +# (at your option) any later version.
  11 +#
  12 +# This program is distributed in the hope that it will be useful,
  13 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  14 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15 +# GNU General Public License for more details.
  16 +#
  17 +# You should have received a copy of the GNU Lesser General Public License
  18 +# along with this program. If not, see <https://www.gnu.org/licenses/>.
  19 +#
  20 +
  21 +MINGW_PREFIX="/usr/x86_64-w64-mingw32/sys-root/mingw"
  22 +PKG_CONFIG="/usr/bin/x86_64-w64-mingw32-pkg-config"
  23 +MINGW_PACKAGE_PREFIX="mingw64"
  24 +
  25 +# Load bundle functions
  26 +. "$(dirname $(readlink -f "${0}"))/bundle.common"
  27 +
  28 +argument "help" > /dev/null
  29 +if [ "$?" == "0" ]; then
  30 + echo " --install-requires Install required packages"
  31 + echo " --build Build application from source"
  32 +fi
  33 +
  34 +prepare
  35 +
  36 +argument "build" > /dev/null
  37 +if [ "$?" == "0" ]; then
  38 +
  39 + NOCONFIGURE=1 ./autogen.sh
  40 + if [ "$?" != "0" ]; then
  41 + echo "Configure failed"
  42 + exit -1
  43 + fi
  44 +
  45 + ${MINGW_PACKAGE_PREFIX}-configure
  46 + if [ "$?" != "0" ]; then
  47 + echo "Configure failed"
  48 + exit -1
  49 + fi
  50 +
  51 + build_package
  52 +
  53 +fi
  54 +
  55 +install_bin
  56 +install_license
  57 +make_zip
  58 +
  59 +echo "Bundle build complete"
  60 +
... ...
win/bundle.msys 0 → 100755
... ... @@ -0,0 +1,70 @@
  1 +#!/bin/bash
  2 +#
  3 +# SPDX-License-Identifier: LGPL-3.0-or-later
  4 +#
  5 +# Copyright (C) 2023 Perry Werneck <perry.werneck@gmail.com>
  6 +#
  7 +# This program is free software: you can redistribute it and/or modify
  8 +# it under the terms of the GNU Lesser General Public License as published
  9 +# by the Free Software Foundation, either version 3 of the License, or
  10 +# (at your option) any later version.
  11 +#
  12 +# This program is distributed in the hope that it will be useful,
  13 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  14 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15 +# GNU General Public License for more details.
  16 +#
  17 +# You should have received a copy of the GNU Lesser General Public License
  18 +# along with this program. If not, see <https://www.gnu.org/licenses/>.
  19 +#
  20 +
  21 +# Load bundle functions
  22 +. "$(dirname $(readlink -f "${0}"))/bundle.common"
  23 +
  24 +prepare
  25 +
  26 +argument "pre-reqs" > /dev/null
  27 +if [ "$?" == "0" ]; then
  28 + pacman \
  29 + -S --needed \
  30 + zip \
  31 + autoconf \
  32 + automake \
  33 + make \
  34 + libtool \
  35 + pkgconf \
  36 + gzip \
  37 + dos2unix \
  38 + ${MINGW_PACKAGE_PREFIX}-gcc \
  39 + ${MINGW_PACKAGE_PREFIX}-gettext \
  40 + ${MINGW_PACKAGE_PREFIX}-openssl
  41 +
  42 + if [ "$?" != "0" ]; then
  43 + echo "pacman failed"
  44 + exit -1
  45 + fi
  46 +fi
  47 +
  48 +argument "build" > /dev/null
  49 +if [ "$?" == "0" ]; then
  50 +
  51 + NOCONFIGURE=1 ./autogen.sh
  52 + if [ "$?" != "0" ]; then
  53 + echo "Configure failed"
  54 + exit -1
  55 + fi
  56 +
  57 + ./configure
  58 + if [ "$?" != "0" ]; then
  59 + echo "Configure failed"
  60 + exit -1
  61 + fi
  62 +
  63 +fi
  64 +
  65 +build_package
  66 +install_bin
  67 +install_license
  68 +make_zip
  69 +
  70 +
... ...
win/lib3270.def
1   -EXPORTS
2   - lib3270_action @1
3   - lib3270_action_activate @2
4   - lib3270_action_get_by_name @3
5   - lib3270_action_group_get_activatable @4
6   - lib3270_action_group_notify @5
7   - lib3270_action_is_activatable @6
8   - lib3270_activate_by_name @7
9   - lib3270_add_poll_fd @8
10   - lib3270_allow_reconnect @9
11   - lib3270_asc2ebc @10
12   - lib3270_attn @11
13   - lib3270_autoptr_cleanup_HKEY @12
14   - lib3270_autoptr_cleanup_LIB3270_POPUP @13
15   - lib3270_autoptr_cleanup_char @14
16   - lib3270_backspace @15
17   - lib3270_break @16
18   - lib3270_build_config_filename @17
19   - lib3270_build_data_filename @18
20   - lib3270_build_filename @19
21   - lib3270_calloc @20
22   - lib3270_can_paste_next @21
23   - lib3270_charsettable @22
24   - lib3270_chomp @23
25   - lib3270_chug @24
26   - lib3270_clear @25
27   - lib3270_clear_operator_error @26
28   - lib3270_cmp_string_at @27
29   - lib3270_cmp_string_at_address @28
30   - lib3270_connect_url @29
31   - lib3270_connection_state_get_name @30
32   - lib3270_crl_get_preferred_protocol @31
33   - lib3270_crl_set_preferred_protocol @32
34   - lib3270_cursor_down @33
35   - lib3270_cursor_left @34
36   - lib3270_cursor_right @35
37   - lib3270_cursor_up @36
38   - lib3270_cut_selected @37
39   - lib3270_data_recv @38
40   - lib3270_delete @39
41   - lib3270_deletefield @40
42   - lib3270_deleteword @41
43   - lib3270_disconnect @42
44   - lib3270_drag_selection @43
45   - lib3270_dup @44
46   - lib3270_ebc2asc @45
47   - lib3270_emulate_input @46
48   - lib3270_enter @47
49   - lib3270_erase @48
50   - lib3270_erase_selected @49
51   - lib3270_eraseeof @50
52   - lib3270_eraseeol @51
53   - lib3270_eraseinput @52
54   - lib3270_field_addr @53
55   - lib3270_field_length @54
56   - lib3270_fieldend @55
57   - lib3270_fieldmark @56
58   - lib3270_firstfield @57
59   - lib3270_free @58
60   - lib3270_ft_cancel @59
61   - lib3270_ft_destroy @60
62   - lib3270_ft_get_user_data @61
63   - lib3270_ft_new @62
64   - lib3270_ft_set_blksize @63
65   - lib3270_ft_set_lrecl @64
66   - lib3270_ft_set_options @65
67   - lib3270_ft_set_primspace @66
68   - lib3270_ft_set_secspace @67
69   - lib3270_ft_set_user_data @68
70   - lib3270_ft_start @69
71   - lib3270_get_action @70
72   - lib3270_get_actions @71
73   - lib3270_get_associated_luname @72
74   - lib3270_get_attribute_at_address @73
75   - lib3270_get_auto_reconnect @74
76   - lib3270_get_boolean_properties_list @75
77   - lib3270_get_color_type @76
78   - lib3270_get_connection_state @77
79   - lib3270_get_contents @78
80   - lib3270_get_cursor_address @79
81   - lib3270_get_cursor_position @80
82   - lib3270_get_default_charset @81
83   - lib3270_get_default_host @82
84   - lib3270_get_default_session_handle @83
85   - lib3270_get_display_charset @84
86   - lib3270_get_element @85
87   - lib3270_get_field_attribute @86
88   - lib3270_get_field_bounds @87
89   - lib3270_get_field_end @88
90   - lib3270_get_field_len @89
91   - lib3270_get_field_start @90
92   - lib3270_get_field_string_at @91
93   - lib3270_get_ft_callbacks @92
94   - lib3270_get_ft_state @93
95   - lib3270_get_has_copy @94
96   - lib3270_get_has_selection @95
97   - lib3270_get_height @96
98   - lib3270_get_host @97
99   - lib3270_get_host_charset @98
100   - lib3270_get_host_type @99
101   - lib3270_get_host_type_name @100
102   - lib3270_get_installation_path @101
103   - lib3270_get_int_properties_list @102
104   - lib3270_get_int_property @103
105   - lib3270_get_is_protected @104
106   - lib3270_get_is_protected_at @105
107   - lib3270_get_keyboard_lock_state @106
108   - lib3270_get_length @107
109   - lib3270_get_lock_on_operator_error @108
110   - lib3270_get_lock_status @109
111   - lib3270_get_log_filename @110
112   - lib3270_get_lunames @111
113   - lib3270_get_max_height @112
114   - lib3270_get_max_width @113
115   - lib3270_get_model @114
116   - lib3270_get_model_name @115
117   - lib3270_get_model_number @116
118   - lib3270_get_next_unprotected @117
119   - lib3270_get_numeric_lock @118
120   - lib3270_get_oia_box_solid @119
121   - lib3270_get_option_list @120
122   - lib3270_get_oversize @121
123   - lib3270_get_pointer @122
124   - lib3270_get_product_name @123
125   - lib3270_get_program_message @124
126   - lib3270_get_region @125
127   - lib3270_get_revision @126
128   - lib3270_get_screen_size @127
129   - lib3270_get_selected @128
130   - lib3270_get_selected_text @129
131   - lib3270_get_selection @130
132   - lib3270_get_selection_bounds @131
133   - lib3270_get_selection_flags @132
134   - lib3270_get_selection_rectangle @133
135   - lib3270_get_session_callbacks @134
136   - lib3270_get_session_id @135
137   - lib3270_get_ssl_crl_text @136
138   - lib3270_get_ssl_peer_certificate_text @137
139   - lib3270_get_ssl_state @138
140   - lib3270_get_ssl_state_description @139
141   - lib3270_get_ssl_state_icon_name @140
142   - lib3270_get_ssl_state_message @141
143   - lib3270_get_string_at @142
144   - lib3270_get_string_at_address @143
145   - lib3270_get_string_properties_list @144
146   - lib3270_get_task_count @145
147   - lib3270_get_toggle @146
148   - lib3270_get_toggle_description @147
149   - lib3270_get_toggle_id @148
150   - lib3270_get_toggle_label @149
151   - lib3270_get_toggle_list @150
152   - lib3270_get_toggle_name @151
153   - lib3270_get_toggle_summary @152
154   - lib3270_get_toggles @153
155   - lib3270_get_trace_filename @154
156   - lib3270_get_trace_handler @155
157   - lib3270_get_translation_domain @156
158   - lib3270_get_typeahead @157
159   - lib3270_get_undera @158
160   - lib3270_get_unlock_delay @159
161   - lib3270_get_unsigned_properties_list @160
162   - lib3270_get_url @161
163   - lib3270_get_user_data @162
164   - lib3270_get_version @163
165   - lib3270_get_version_info @164
166   - lib3270_get_width @165
167   - lib3270_get_word_bounds @166
168   - lib3270_getpeername @167
169   - lib3270_getsockname @168
170   - lib3270_half_connected @169
171   - lib3270_has_active_script @170
172   - lib3270_has_selection @171
173   - lib3270_host_get_name @172
174   - lib3270_iconv_free @173
175   - lib3270_iconv_from_host @174
176   - lib3270_iconv_new @175
177   - lib3270_iconv_to_host @176
178   - lib3270_in_3270 @177
179   - lib3270_in_ansi @178
180   - lib3270_in_e @179
181   - lib3270_in_neither @180
182   - lib3270_in_sscp @181
183   - lib3270_in_tn3270e @182
184   - lib3270_input_string @183
185   - lib3270_is_as400 @184
186   - lib3270_is_connected @185
187   - lib3270_is_disconnected @186
188   - lib3270_is_formatted @187
189   - lib3270_is_protected @188
190   - lib3270_is_ready @189
191   - lib3270_is_secure @190
192   - lib3270_is_selected @191
193   - lib3270_is_tso @192
194   - lib3270_is_unlocked @193
195   - lib3270_kybdreset @194
196   - lib3270_load @195
197   - lib3270_main_iterate @196
198   - lib3270_malloc @197
199   - lib3270_move_cursor @198
200   - lib3270_move_selected_area @199
201   - lib3270_move_selection @200
202   - lib3270_newline @201
203   - lib3270_nextfield @202
204   - lib3270_nextword @203
205   - lib3270_pakey @204
206   - lib3270_parse_host_type @205
207   - lib3270_paste_next @206
208   - lib3270_paste_text @207
209   - lib3270_pconnected @208
210   - lib3270_pfkey @209
211   - lib3270_popup @210
212   - lib3270_popup_an_errno @211
213   - lib3270_popup_clone_printf @212
214   - lib3270_popup_dialog @213
215   - lib3270_popup_va @214
216   - lib3270_previousfield @215
217   - lib3270_previousword @216
218   - lib3270_print @217
219   - lib3270_print_all @218
220   - lib3270_print_copy @219
221   - lib3270_print_selected @220
222   - lib3270_property_get_by_name @221
223   - lib3270_property_get_description @222
224   - lib3270_property_get_label @223
225   - lib3270_property_get_name @224
226   - lib3270_property_get_summary @225
227   - lib3270_property_get_tooltip @226
228   - lib3270_realloc @227
229   - lib3270_receive @228
230   - lib3270_reconnect @229
231   - lib3270_register_action_group_listener @230
232   - lib3270_register_fd_handlers @231
233   - lib3270_register_io_controller @232
234   - lib3270_register_schange @233
235   - lib3270_register_timer_handlers @234
236   - lib3270_register_toggle_listener @235
237   - lib3270_remap_char @236
238   - lib3270_remove_poll @237
239   - lib3270_remove_poll_fd @238
240   - lib3270_reselect @239
241   - lib3270_reset_callbacks @240
242   - lib3270_reset_charset @241
243   - lib3270_reset_ft_callbacks @242
244   - lib3270_ring_bell @243
245   - lib3270_run_task @244
246   - lib3270_save @245
247   - lib3270_save_all @246
248   - lib3270_save_copy @247
249   - lib3270_save_selected @248
250   - lib3270_select_all @249
251   - lib3270_select_field @250
252   - lib3270_select_field_at @251
253   - lib3270_select_region @252
254   - lib3270_select_to @253
255   - lib3270_select_word @254
256   - lib3270_select_word_at @255
257   - lib3270_selection_get_length @256
258   - lib3270_selection_new @257
259   - lib3270_send @258
260   - lib3270_service_get_name @259
261   - lib3270_session_free @260
262   - lib3270_session_new @261
263   - lib3270_set_as400 @262
264   - lib3270_set_auto_reconnect @263
265   - lib3270_set_boolean_property @264
266   - lib3270_set_color_type @265
267   - lib3270_set_connected_initial @266
268   - lib3270_set_cursor_address @267
269   - lib3270_set_cursor_position @268
270   - lib3270_set_dft_buffersize @269
271   - lib3270_set_disconnected @270
272   - lib3270_set_field @271
273   - lib3270_set_has_copy @272
274   - lib3270_set_host_charset @273
275   - lib3270_set_host_type @274
276   - lib3270_set_host_type_by_name @275
277   - lib3270_set_int_property @276
278   - lib3270_set_lock_on_operator_error @277
279   - lib3270_set_log_filename @278
280   - lib3270_set_log_handler @279
281   - lib3270_set_lunames @280
282   - lib3270_set_model @281
283   - lib3270_set_model_name @282
284   - lib3270_set_model_number @283
285   - lib3270_set_numeric_lock @284
286   - lib3270_set_oversize @285
287   - lib3270_set_poll_state @286
288   - lib3270_set_popup_handler @287
289   - lib3270_set_session_id @288
290   - lib3270_set_string @289
291   - lib3270_set_string_at @290
292   - lib3270_set_string_at_address @291
293   - lib3270_set_string_property @292
294   - lib3270_set_syslog @293
295   - lib3270_set_toggle @294
296   - lib3270_set_trace_filename @295
297   - lib3270_set_trace_handler @296
298   - lib3270_set_tso @297
299   - lib3270_set_uint_property @298
300   - lib3270_set_unlock_delay @299
301   - lib3270_set_url @300
302   - lib3270_set_user_data @301
303   - lib3270_setup_session @302
304   - lib3270_ssl_get_crl_download @303
305   - lib3270_ssl_set_crl_download @304
306   - lib3270_state_get_name @305
307   - lib3270_strdup @306
308   - lib3270_strdup_printf @307
309   - lib3270_strip @308
310   - lib3270_sysreq @309
311   - lib3270_testpattern @310
312   - lib3270_toggle @311
313   - lib3270_toggle_get_by_name @312
314   - lib3270_toggle_get_description @313
315   - lib3270_toggle_get_from_id @314
316   - lib3270_toggle_get_label @315
317   - lib3270_toggle_get_name @316
318   - lib3270_toggle_get_summary @317
319   - lib3270_trace_data @318
320   - lib3270_trace_event @319
321   - lib3270_translate_char @320
322   - lib3270_translate_ft_message @321
323   - lib3270_translate_to_address @322
324   - lib3270_unregister_action_group_listener @323
325   - lib3270_unregister_schange @324
326   - lib3270_unregister_toggle_listener @325
327   - lib3270_unselect @326
328   - lib3270_unsigned_property_get_by_name @327
329   - lib3270_update_poll_fd @328
330   - lib3270_vsprintf @329
331   - lib3270_wait @330
332   - lib3270_wait_for_cstate @331
333   - lib3270_wait_for_keyboard_unlock @332
334   - lib3270_wait_for_ready @333
335   - lib3270_wait_for_string @334
336   - lib3270_wait_for_string_at @335
337   - lib3270_wait_for_string_at_address @336
338   - lib3270_wait_for_update @337
339   - lib3270_win32_create_regkey @338
340   - lib3270_win32_get_dword @339
341   - lib3270_win32_local_charset @340
342   - lib3270_win32_set_string @341
343   - lib3270_win32_strerror @342
344   - lib3270_win32_translate_error_code @343
345   - lib3270_write_dstrace @344
346   - lib3270_write_event_trace @345
347   - lib3270_write_log @346
348   - lib3270_write_nettrace @347
349   - lib3270_write_rc @348
350   - lib3270_write_screen_trace @349
351   - lib3270_write_trace @350
352   - lib3270_write_va_log @351
  1 +EXPORTS
  2 + lib3270_action @1
  3 + lib3270_action_activate @2
  4 + lib3270_action_get_by_name @3
  5 + lib3270_action_group_get_activatable @4
  6 + lib3270_action_group_notify @5
  7 + lib3270_action_is_activatable @6
  8 + lib3270_activate_by_name @7
  9 + lib3270_add_poll_fd @8
  10 + lib3270_allow_reconnect @9
  11 + lib3270_asc2ebc @10
  12 + lib3270_attn @11
  13 + lib3270_autoptr_cleanup_HKEY @12
  14 + lib3270_autoptr_cleanup_LIB3270_POPUP @13
  15 + lib3270_autoptr_cleanup_char @14
  16 + lib3270_backspace @15
  17 + lib3270_break @16
  18 + lib3270_build_config_filename @17
  19 + lib3270_build_data_filename @18
  20 + lib3270_build_filename @19
  21 + lib3270_calloc @20
  22 + lib3270_can_paste_next @21
  23 + lib3270_charsettable @22
  24 + lib3270_check_revision @23
  25 + lib3270_chomp @24
  26 + lib3270_chug @25
  27 + lib3270_clear @26
  28 + lib3270_clear_operator_error @27
  29 + lib3270_cmp_string_at @28
  30 + lib3270_cmp_string_at_address @29
  31 + lib3270_connect_url @30
  32 + lib3270_connection_state_get_name @31
  33 + lib3270_crl_get_preferred_protocol @32
  34 + lib3270_crl_set_preferred_protocol @33
  35 + lib3270_cursor_down @34
  36 + lib3270_cursor_left @35
  37 + lib3270_cursor_right @36
  38 + lib3270_cursor_up @37
  39 + lib3270_cut_selected @38
  40 + lib3270_data_recv @39
  41 + lib3270_delete @40
  42 + lib3270_deletefield @41
  43 + lib3270_deleteword @42
  44 + lib3270_disconnect @43
  45 + lib3270_drag_selection @44
  46 + lib3270_dup @45
  47 + lib3270_ebc2asc @46
  48 + lib3270_emulate_input @47
  49 + lib3270_enter @48
  50 + lib3270_erase @49
  51 + lib3270_erase_selected @50
  52 + lib3270_eraseeof @51
  53 + lib3270_eraseeol @52
  54 + lib3270_eraseinput @53
  55 + lib3270_field_addr @54
  56 + lib3270_field_length @55
  57 + lib3270_fieldend @56
  58 + lib3270_fieldmark @57
  59 + lib3270_firstfield @58
  60 + lib3270_free @59
  61 + lib3270_ft_cancel @60
  62 + lib3270_ft_destroy @61
  63 + lib3270_ft_get_user_data @62
  64 + lib3270_ft_new @63
  65 + lib3270_ft_set_blksize @64
  66 + lib3270_ft_set_lrecl @65
  67 + lib3270_ft_set_options @66
  68 + lib3270_ft_set_primspace @67
  69 + lib3270_ft_set_secspace @68
  70 + lib3270_ft_set_user_data @69
  71 + lib3270_ft_start @70
  72 + lib3270_get_action @71
  73 + lib3270_get_actions @72
  74 + lib3270_get_associated_luname @73
  75 + lib3270_get_attribute_at_address @74
  76 + lib3270_get_auto_reconnect @75
  77 + lib3270_get_boolean_properties_list @76
  78 + lib3270_get_color_type @77
  79 + lib3270_get_connection_state @78
  80 + lib3270_get_connection_state_as_string @79
  81 + lib3270_get_contents @80
  82 + lib3270_get_cursor_address @81
  83 + lib3270_get_cursor_position @82
  84 + lib3270_get_default_charset @83
  85 + lib3270_get_default_host @84
  86 + lib3270_get_default_session_handle @85
  87 + lib3270_get_display_charset @86
  88 + lib3270_get_element @87
  89 + lib3270_get_field_attribute @88
  90 + lib3270_get_field_bounds @89
  91 + lib3270_get_field_end @90
  92 + lib3270_get_field_len @91
  93 + lib3270_get_field_start @92
  94 + lib3270_get_field_string_at @93
  95 + lib3270_get_ft_callbacks @94
  96 + lib3270_get_ft_state @95
  97 + lib3270_get_has_copy @96
  98 + lib3270_get_has_selection @97
  99 + lib3270_get_height @98
  100 + lib3270_get_host @99
  101 + lib3270_get_host_charset @100
  102 + lib3270_get_host_type @101
  103 + lib3270_get_host_type_name @102
  104 + lib3270_get_installation_path @103
  105 + lib3270_get_int_properties_list @104
  106 + lib3270_get_int_property @105
  107 + lib3270_get_is_protected @106
  108 + lib3270_get_is_protected_at @107
  109 + lib3270_get_keyboard_lock_state @108
  110 + lib3270_get_length @109
  111 + lib3270_get_lock_on_operator_error @110
  112 + lib3270_get_lock_status @111
  113 + lib3270_get_log_filename @112
  114 + lib3270_get_lunames @113
  115 + lib3270_get_max_height @114
  116 + lib3270_get_max_width @115
  117 + lib3270_get_model @116
  118 + lib3270_get_model_name @117
  119 + lib3270_get_model_number @118
  120 + lib3270_get_next_unprotected @119
  121 + lib3270_get_numeric_lock @120
  122 + lib3270_get_oia_box_solid @121
  123 + lib3270_get_option_list @122
  124 + lib3270_get_oversize @123
  125 + lib3270_get_pointer @124
  126 + lib3270_get_product_name @125
  127 + lib3270_get_program_message @126
  128 + lib3270_get_program_message_as_string @127
  129 + lib3270_get_region @128
  130 + lib3270_get_revision @129
  131 + lib3270_get_screen_size @130
  132 + lib3270_get_selected @131
  133 + lib3270_get_selected_text @132
  134 + lib3270_get_selection @133
  135 + lib3270_get_selection_bounds @134
  136 + lib3270_get_selection_flags @135
  137 + lib3270_get_selection_rectangle @136
  138 + lib3270_get_session_callbacks @137
  139 + lib3270_get_session_id @138
  140 + lib3270_get_ssl_crl_text @139
  141 + lib3270_get_ssl_peer_certificate_text @140
  142 + lib3270_get_ssl_state @141
  143 + lib3270_get_ssl_state_as_string @142
  144 + lib3270_get_ssl_state_description @143
  145 + lib3270_get_ssl_state_icon_name @144
  146 + lib3270_get_ssl_state_message @145
  147 + lib3270_get_string_at @146
  148 + lib3270_get_string_at_address @147
  149 + lib3270_get_string_properties_list @148
  150 + lib3270_get_task_count @149
  151 + lib3270_get_termname @150
  152 + lib3270_get_termtype @151
  153 + lib3270_get_toggle @152
  154 + lib3270_get_toggle_description @153
  155 + lib3270_get_toggle_id @154
  156 + lib3270_get_toggle_label @155
  157 + lib3270_get_toggle_list @156
  158 + lib3270_get_toggle_name @157
  159 + lib3270_get_toggle_summary @158
  160 + lib3270_get_toggles @159
  161 + lib3270_get_trace_filename @160
  162 + lib3270_get_trace_handler @161
  163 + lib3270_get_translation_domain @162
  164 + lib3270_get_typeahead @163
  165 + lib3270_get_undera @164
  166 + lib3270_get_unlock_delay @165
  167 + lib3270_get_unsigned_properties_list @166
  168 + lib3270_get_url @167
  169 + lib3270_get_user_data @168
  170 + lib3270_get_version @169
  171 + lib3270_get_version_info @170
  172 + lib3270_get_width @171
  173 + lib3270_get_word_bounds @172
  174 + lib3270_getpeername @173
  175 + lib3270_getsockname @174
  176 + lib3270_half_connected @175
  177 + lib3270_has_active_script @176
  178 + lib3270_has_selection @177
  179 + lib3270_host_get_name @178
  180 + lib3270_iconv_free @179
  181 + lib3270_iconv_from_host @180
  182 + lib3270_iconv_new @181
  183 + lib3270_iconv_to_host @182
  184 + lib3270_in_3270 @183
  185 + lib3270_in_ansi @184
  186 + lib3270_in_e @185
  187 + lib3270_in_neither @186
  188 + lib3270_in_sscp @187
  189 + lib3270_in_tn3270e @188
  190 + lib3270_input_string @189
  191 + lib3270_is_as400 @190
  192 + lib3270_is_connected @191
  193 + lib3270_is_disconnected @192
  194 + lib3270_is_formatted @193
  195 + lib3270_is_protected @194
  196 + lib3270_is_ready @195
  197 + lib3270_is_secure @196
  198 + lib3270_is_selected @197
  199 + lib3270_is_tso @198
  200 + lib3270_is_unlocked @199
  201 + lib3270_kybdreset @200
  202 + lib3270_load @201
  203 + lib3270_main_iterate @202
  204 + lib3270_malloc @203
  205 + lib3270_move_cursor @204
  206 + lib3270_move_selected_area @205
  207 + lib3270_move_selection @206
  208 + lib3270_newline @207
  209 + lib3270_nextfield @208
  210 + lib3270_nextword @209
  211 + lib3270_pakey @210
  212 + lib3270_parse_host_type @211
  213 + lib3270_paste_next @212
  214 + lib3270_paste_text @213
  215 + lib3270_pconnected @214
  216 + lib3270_pfkey @215
  217 + lib3270_popup @216
  218 + lib3270_popup_an_errno @217
  219 + lib3270_popup_clone_printf @218
  220 + lib3270_popup_dialog @219
  221 + lib3270_popup_va @220
  222 + lib3270_previousfield @221
  223 + lib3270_previousword @222
  224 + lib3270_print @223
  225 + lib3270_print_all @224
  226 + lib3270_print_copy @225
  227 + lib3270_print_selected @226
  228 + lib3270_property_get_by_name @227
  229 + lib3270_property_get_description @228
  230 + lib3270_property_get_label @229
  231 + lib3270_property_get_name @230
  232 + lib3270_property_get_summary @231
  233 + lib3270_property_get_tooltip @232
  234 + lib3270_realloc @233
  235 + lib3270_receive @234
  236 + lib3270_reconnect @235
  237 + lib3270_register_action_group_listener @236
  238 + lib3270_register_fd_handlers @237
  239 + lib3270_register_io_controller @238
  240 + lib3270_register_schange @239
  241 + lib3270_register_timer_handlers @240
  242 + lib3270_register_toggle_listener @241
  243 + lib3270_remap_char @242
  244 + lib3270_remove_poll @243
  245 + lib3270_remove_poll_fd @244
  246 + lib3270_reselect @245
  247 + lib3270_reset_callbacks @246
  248 + lib3270_reset_charset @247
  249 + lib3270_reset_ft_callbacks @248
  250 + lib3270_ring_bell @249
  251 + lib3270_run_task @250
  252 + lib3270_save @251
  253 + lib3270_save_all @252
  254 + lib3270_save_copy @253
  255 + lib3270_save_selected @254
  256 + lib3270_select_all @255
  257 + lib3270_select_field @256
  258 + lib3270_select_field_at @257
  259 + lib3270_select_region @258
  260 + lib3270_select_to @259
  261 + lib3270_select_word @260
  262 + lib3270_select_word_at @261
  263 + lib3270_selection_get_length @262
  264 + lib3270_selection_new @263
  265 + lib3270_send @264
  266 + lib3270_service_get_name @265
  267 + lib3270_session_free @266
  268 + lib3270_session_new @267
  269 + lib3270_set_as400 @268
  270 + lib3270_set_auto_reconnect @269
  271 + lib3270_set_boolean_property @270
  272 + lib3270_set_color_type @271
  273 + lib3270_set_connected_initial @272
  274 + lib3270_set_cursor_address @273
  275 + lib3270_set_cursor_position @274
  276 + lib3270_set_dft_buffersize @275
  277 + lib3270_set_disconnected @276
  278 + lib3270_set_field @277
  279 + lib3270_set_has_copy @278
  280 + lib3270_set_host_charset @279
  281 + lib3270_set_host_type @280
  282 + lib3270_set_host_type_by_name @281
  283 + lib3270_set_int_property @282
  284 + lib3270_set_lock_on_operator_error @283
  285 + lib3270_set_log_filename @284
  286 + lib3270_set_log_handler @285
  287 + lib3270_set_lunames @286
  288 + lib3270_set_model @287
  289 + lib3270_set_model_name @288
  290 + lib3270_set_model_number @289
  291 + lib3270_set_numeric_lock @290
  292 + lib3270_set_oversize @291
  293 + lib3270_set_poll_state @292
  294 + lib3270_set_popup_handler @293
  295 + lib3270_set_session_id @294
  296 + lib3270_set_string @295
  297 + lib3270_set_string_at @296
  298 + lib3270_set_string_at_address @297
  299 + lib3270_set_string_property @298
  300 + lib3270_set_syslog @299
  301 + lib3270_set_toggle @300
  302 + lib3270_set_trace_filename @301
  303 + lib3270_set_trace_handler @302
  304 + lib3270_set_tso @303
  305 + lib3270_set_uint_property @304
  306 + lib3270_set_unlock_delay @305
  307 + lib3270_set_url @306
  308 + lib3270_set_user_data @307
  309 + lib3270_setup_session @308
  310 + lib3270_ssl_get_crl_download @309
  311 + lib3270_ssl_set_crl_download @310
  312 + lib3270_state_get_name @311
  313 + lib3270_strdup @312
  314 + lib3270_strdup_printf @313
  315 + lib3270_strip @314
  316 + lib3270_sysreq @315
  317 + lib3270_testpattern @316
  318 + lib3270_toggle @317
  319 + lib3270_toggle_get_by_name @318
  320 + lib3270_toggle_get_description @319
  321 + lib3270_toggle_get_from_id @320
  322 + lib3270_toggle_get_label @321
  323 + lib3270_toggle_get_name @322
  324 + lib3270_toggle_get_summary @323
  325 + lib3270_trace_data @324
  326 + lib3270_trace_event @325
  327 + lib3270_translate_char @326
  328 + lib3270_translate_ft_message @327
  329 + lib3270_translate_to_address @328
  330 + lib3270_unregister_action_group_listener @329
  331 + lib3270_unregister_schange @330
  332 + lib3270_unregister_toggle_listener @331
  333 + lib3270_unselect @332
  334 + lib3270_unsigned_property_get_by_name @333
  335 + lib3270_update_poll_fd @334
  336 + lib3270_vsprintf @335
  337 + lib3270_wait @336
  338 + lib3270_wait_for_connected @337
  339 + lib3270_wait_for_cstate @338
  340 + lib3270_wait_for_keyboard_unlock @339
  341 + lib3270_wait_for_ready @340
  342 + lib3270_wait_for_string @341
  343 + lib3270_wait_for_string_at @342
  344 + lib3270_wait_for_string_at_address @343
  345 + lib3270_wait_for_update @344
  346 + lib3270_win32_create_regkey @345
  347 + lib3270_win32_get_dword @346
  348 + lib3270_win32_local_charset @347
  349 + lib3270_win32_set_string @348
  350 + lib3270_win32_strerror @349
  351 + lib3270_win32_translate_error_code @350
  352 + lib3270_write_dstrace @351
  353 + lib3270_write_event_trace @352
  354 + lib3270_write_log @353
  355 + lib3270_write_nettrace @354
  356 + lib3270_write_rc @355
  357 + lib3270_write_screen_trace @356
  358 + lib3270_write_trace @357
  359 + lib3270_write_va_log @358
... ...
win/mingw-build.sh 0 → 100755
... ... @@ -0,0 +1,53 @@
  1 +#!/bin/bash
  2 +#
  3 +# SPDX-License-Identifier: LGPL-3.0-or-later
  4 +#
  5 +# Copyright (C) 2008 Banco do Brasil S.A.
  6 +#
  7 +# This program is free software: you can redistribute it and/or modify
  8 +# it under the terms of the GNU Lesser General Public License as published
  9 +# by the Free Software Foundation, either version 3 of the License, or
  10 +# (at your option) any later version.
  11 +#
  12 +# This program is distributed in the hope that it will be useful,
  13 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  14 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15 +# GNU General Public License for more details.
  16 +#
  17 +# You should have received a copy of the GNU Lesser General Public License
  18 +# along with this program. If not, see <https://www.gnu.org/licenses/>.
  19 +
  20 +#
  21 +# References:
  22 +#
  23 +# * https://www.msys2.org/docs/ci/
  24 +#
  25 +
  26 +echo "Running ${0}"
  27 +
  28 +LOGFILE=build.log
  29 +rm -f ${LOGFILE}
  30 +
  31 +die ( ) {
  32 + [ -s $LOGFILE ] && tail $LOGFILE
  33 + [ "$1" ] && echo "$*"
  34 + exit -1
  35 +}
  36 +
  37 +cd $(dirname $(dirname $(readlink -f ${0})))
  38 +
  39 +#
  40 +# Install pre-reqs
  41 +#
  42 +#echo "Installing pre-reqs..."
  43 +#pacman -U --noconfirm *.pkg.tar.zst || die "pacman failure"
  44 +
  45 +#
  46 +# Build
  47 +#
  48 +echo "Building package..."
  49 +dos2unix PKGBUILD.mingw || die "dos2unix failure"
  50 +makepkg BUILDDIR=/tmp/pkg -p PKGBUILD.mingw || die "makepkg failure"
  51 +
  52 +echo "Build complete"
  53 +
... ...
win/msvc-build.sh 0 → 100644
... ... @@ -0,0 +1,60 @@
  1 +#!/bin/bash
  2 +#
  3 +# References:
  4 +#
  5 +# * https://www.msys2.org/docs/ci/
  6 +#
  7 +#
  8 +echo "Running ${0}"
  9 +
  10 +LOGFILE=build.log
  11 +rm -f ${LOGFILE}
  12 +
  13 +die ( ) {
  14 + [ -s $LOGFILE ] && tail $LOGFILE
  15 + [ "$1" ] && echo "$*"
  16 + exit -1
  17 +}
  18 +
  19 +srcdir="$(dirname $(dirname $(readlink -f "${0}")))"
  20 +cd ${srcdir}
  21 +if [ "$?" != "0" ]; then
  22 + echo "Cant cd to ${srcdir}"
  23 + exit -1
  24 +fi
  25 +
  26 +if [ -z ${PKG_CONFIG} ]; then
  27 + PKG_CONFIG=${MINGW_PREFX}/bin/pkg-config
  28 +fi
  29 +
  30 +PACKAGE_NAME=$(grep AC_INIT configure.ac | cut -d[ -f2 | cut -d] -f1)
  31 +if [ -z ${PACKAGE_NAME} ]; then
  32 + echo "Cant determine package name"
  33 + exit -1
  34 +fi
  35 +
  36 +PACKAGE_VERSION=$(grep AC_INIT configure.ac | cut -d[ -f3 | cut -d] -f1)
  37 +if [ -z ${PACKAGE_VERSION} ]; then
  38 + echo "Cant determine package name"
  39 + exit -1
  40 +fi
  41 +
  42 +#
  43 +# Build LIB3270
  44 +#
  45 +echo "Building lib3270"
  46 +./autogen.sh > $LOGFILE 2>&1 || die "Autogen failure"
  47 +./configure > $LOGFILE 2>&1 || die "Configure failure"
  48 +make clean > $LOGFILE 2>&1 || die "Make clean failure"
  49 +make all > $LOGFILE 2>&1 || die "Make failure"
  50 +make DESTDIR=.bin/package.msvc install > $LOGFILE 2>&1 || die "Install failure"
  51 +
  52 +cd .bin/package.msvc
  53 +zip \
  54 + -9 -r \
  55 + -x'*.a' \
  56 + -x'*.pc' \
  57 + ${srcdir}/${MINGW_PACKAGE_PREFIX}-${PACKAGE_NAME}-${PACKAGE_VERSION}.devel.zip * \
  58 + > $LOGFILE 2>&1 || die "Zip failure"
  59 +
  60 +
0 61 \ No newline at end of file
... ...
win/x86_64/CHANGELOG 0 → 100644
... ... @@ -0,0 +1,4 @@
  1 +-------------------------------------------------------------------
  2 +Tue Nov 13 12:45:25 UTC 2018 - perry.werneck@gmail.com
  3 +
  4 +- lib3270 is now an independant package.
... ...
win/x86_64/_service
... ... @@ -4,9 +4,9 @@
4 4 <service name="tar_scm">
5 5 <param name="changesgenerate">enable</param>
6 6 <param name="url">https://github.com/PerryWerneck/lib3270.git</param>
7   - <param name="revision">develop</param>
8 7 <param name="versionformat">@PARENT_TAG@+git%cd</param>
9 8 <param name="scm">git</param>
  9 + <param name="revision">develop</param>
10 10 </service>
11 11  
12 12 <!-- https://github.com/openSUSE/obs-service-extract_file -->
... ...
win/x86_64/mingw64-lib3270.spec
... ... @@ -54,13 +54,14 @@ BuildRequires: mingw64-cross-gcc
54 54 BuildRequires: mingw64-cross-gcc-c++
55 55 BuildRequires: mingw64-cross-pkg-config
56 56 BuildRequires: mingw64-filesystem
57   -BuildRequires: mingw64-libopenssl-devel
58 57 BuildRequires: mingw64-zlib-devel
59   -#BuildRequires: mingw64(lib:iconv)
60   -BuildRequires: mingw64-win_iconv-devel
  58 +BuildRequires: mingw64(lib:iconv)
61 59 BuildRequires: mingw64(lib:intl)
62 60 BuildRequires: mingw64-gettext-tools
63 61  
  62 +BuildRequires: mingw64(pkg:libcrypto) >= 1.1
  63 +BuildRequires: mingw64(pkg:libssl) >= 1.1
  64 +
64 65 %description
65 66 TN3270 access library, originally designed as part of the %{_product} application.
66 67  
... ...