Commit 07c9e8437e4c39fa04dfb0e0eb9b87a6ef3fa527

Authored by Perry Werneck
1 parent a550d906

Removing old code.

Showing 61 changed files with 0 additions and 9662 deletions   Show diff stats
android/.classpath
... ... @@ -1,8 +0,0 @@
1   -<?xml version="1.0" encoding="UTF-8"?>
2   -<classpath>
3   - <classpathentry kind="src" path="src"/>
4   - <classpathentry kind="src" path="gen"/>
5   - <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
6   - <classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
7   - <classpathentry kind="output" path="bin/classes"/>
8   -</classpath>
android/.project
... ... @@ -1,33 +0,0 @@
1   -<?xml version="1.0" encoding="UTF-8"?>
2   -<projectDescription>
3   - <name>pw3270</name>
4   - <comment></comment>
5   - <projects>
6   - </projects>
7   - <buildSpec>
8   - <buildCommand>
9   - <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
10   - <arguments>
11   - </arguments>
12   - </buildCommand>
13   - <buildCommand>
14   - <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
15   - <arguments>
16   - </arguments>
17   - </buildCommand>
18   - <buildCommand>
19   - <name>org.eclipse.jdt.core.javabuilder</name>
20   - <arguments>
21   - </arguments>
22   - </buildCommand>
23   - <buildCommand>
24   - <name>com.android.ide.eclipse.adt.ApkBuilder</name>
25   - <arguments>
26   - </arguments>
27   - </buildCommand>
28   - </buildSpec>
29   - <natures>
30   - <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
31   - <nature>org.eclipse.jdt.core.javanature</nature>
32   - </natures>
33   -</projectDescription>
android/.settings/org.eclipse.jdt.core.prefs
... ... @@ -1,4 +0,0 @@
1   -eclipse.preferences.version=1
2   -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
3   -org.eclipse.jdt.core.compiler.compliance=1.5
4   -org.eclipse.jdt.core.compiler.source=1.5
android/AndroidManifest.xml
... ... @@ -1,28 +0,0 @@
1   -<?xml version="1.0" encoding="utf-8"?>
2   -<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3   - package="br.com.bb.pw3270"
4   - android:versionCode="1"
5   - android:versionName="1.0" >
6   -
7   - <uses-sdk android:minSdkVersion="15" />
8   - <uses-permission android:name="android.permission.INTERNET"></uses-permission>
9   -
10   - <application
11   - android:icon="@drawable/ic_launcher"
12   - android:label="@string/app_name" >
13   - <activity
14   - android:name=".PW3270Activity"
15   - android:label="@string/app_name"
16   - android:configChanges="orientation" >
17   -
18   - <intent-filter>
19   - <action android:name="android.intent.action.MAIN" />
20   -
21   - <category android:name="android.intent.category.LAUNCHER" />
22   - </intent-filter>
23   - </activity>
24   - <activity android:name="SettingsActivity"></activity>
25   -
26   - </application>
27   -
28   -</manifest>
android/Makefile
... ... @@ -1,131 +0,0 @@
1   -#
2   -# "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
3   -# (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
4   -# aplicativos mainframe. Registro no INPI sob o nome G3270.
5   -#
6   -# Copyright (C) <2008> <Banco do Brasil S.A.>
7   -#
8   -# Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
9   -# os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
10   -# Free Software Foundation.
11   -#
12   -# Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
13   -# GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
14   -# A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
15   -# obter mais detalhes.
16   -#
17   -# Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
18   -# programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple
19   -# Place, Suite 330, Boston, MA, 02111-1307, USA
20   -#
21   -# Contatos:
22   -#
23   -# perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
24   -#
25   -
26   -#
27   -# Referência:
28   -# http://developer.android.com/tools/building/building-cmdline.html
29   -#
30   -
31   -JDK_HOME=/usr/java/default
32   -JAVAH=$(JDK_HOME)/bin/javah
33   -JAVAC=$(JDK_HOME)/bin/javac
34   -ANT=/usr/bin/ant
35   -
36   -ANDROIDSDK?=/opt/android-sdk-linux
37   -ANDROIDNDK?=/opt/android-ndk-r8d
38   -ANDROIDCLASSPATH=$(ANDROIDSDK)/platforms/android-16/android.jar
39   -
40   -NDKBUILD=$(ANDROIDNDK)/ndk-build
41   -MKDIR=/bin/mkdir -p
42   -CONVERT=rsvg-convert
43   -
44   -CLASSPATH=br/com/bb/pw3270
45   -JAVASRCDIR=src/$(CLASSPATH)
46   -
47   -RESOLUTION=xhdpi mdpi ldpi hdpi
48   -
49   -#---[ Rules ]------------------------------------------------------------------
50   -
51   -bin/classes/$(CLASSPATH)/%.class: src/$(CLASSPATH)/%.java
52   - @$(MKDIR) `dirname $@`
53   - @echo "Compile thumb : `basename $@` <= `basename $<`"
54   - @$(JAVAC) -classpath $(ANDROIDCLASSPATH) -d bin/classes $<
55   -
56   -res/drawable-xhdpi/%.png: %.svg
57   - @echo "Gen XHDPI : `basename $@` <= `basename $<`"
58   - @$(MKDIR) `dirname $@`
59   - @$(CONVERT) --format=png --width=96 --height=96 --output=$@ $<
60   -
61   -res/drawable-mdpi/%.png: %.svg
62   - @echo "Gen MDPI : `basename $@` <= `basename $<`"
63   - @$(MKDIR) `dirname $@`
64   - @$(CONVERT) --format=png --width=48 --height=48 --output=$@ $<
65   -
66   -res/drawable-ldpi/%.png: %.svg
67   - @echo "Gen LDPI : `basename $@` <= `basename $<`"
68   - @$(MKDIR) `dirname $@`
69   - @$(CONVERT) --format=png --width=36 --height=36 --output=$@ $<
70   -
71   -res/drawable-hdpi/%.png: %.svg
72   - @echo "Gen HDPI : `basename $@` <= `basename $<`"
73   - @$(MKDIR) `dirname $@`
74   - @$(CONVERT) --format=png --width=72 --height=72 --output=$@ $<
75   -
76   -#---[ Targets ]----------------------------------------------------------------
77   -
78   -all: pw3270-release-unsigned.apk
79   -
80   -Debug: bin/pw3270-debug.apk
81   -
82   -bin/pw3270-debug.apk: icons libs/armeabi/lib3270.so $(JAVASRCDIR)/*.java
83   - @JAVA_HOME=$(JDK_HOME) $(ANT) debug
84   -
85   -pw3270-release-unsigned.apk: icons libs/armeabi/lib3270.so $(JAVASRCDIR)/*.java
86   - @JAVA_HOME=$(JDK_HOME) $(ANT) release
87   -
88   -libs/armeabi/lib3270.so: jni/lib3270jni.h jni/*.cpp
89   - @echo " GEN $@"
90   - @chmod +x ../src/lib3270/mkversion.sh
91   - @../src/lib3270/mkversion.sh
92   - @$(NDKBUILD)
93   -
94   -icons: $(foreach DIR, $(RESOLUTION), res/drawable-$(DIR)/ic_launcher.png)
95   -
96   -clean:
97   - @JAVA_HOME=$(JDK_HOME) $(ANT) clean
98   - @rm -fr bin
99   - @rm -fr obj
100   - @rm -f jni/lib3270jni.h
101   - @rm -f sigs.txt
102   - @rm -f $(foreach DIR, $(RESOLUTION), res/drawable-$(DIR)/*.png)
103   -
104   -cleanDebug: clean
105   -
106   -res/drawable-xhdpi/ic_launcher.png: ../src/pw3270/pixmaps/pw3270.svg
107   - @echo "Laucher xhdpi : `basename $@` <= `basename $<`"
108   - @$(MKDIR) `dirname $@`
109   - @$(CONVERT) --format=png --width=96 --height=96 --output=$@ $<
110   -
111   -res/drawable-mdpi/ic_launcher.png: ../src/pw3270/pixmaps/pw3270.svg
112   - @echo "Laucher mdpi : `basename $@` <= `basename $<`"
113   - @$(MKDIR) `dirname $@`
114   - @$(CONVERT) --format=png --width=48 --height=48 --output=$@ $<
115   -
116   -res/drawable-ldpi/ic_launcher.png: ../src/pw3270/pixmaps/pw3270.svg
117   - @echo "Laucher ldpi : `basename $@` <= `basename $<`"
118   - @$(MKDIR) `dirname $@`
119   - @$(CONVERT) --format=png --width=36 --height=36 --output=$@ $<
120   -
121   -res/drawable-hdpi/ic_launcher.png: ../src/pw3270/pixmaps/pw3270.svg
122   - @echo "Laucher hdpi : `basename $@` <= `basename $<`"
123   - @$(MKDIR) `dirname $@`
124   - @$(CONVERT) --format=png --width=72 --height=72 --output=$@ $<
125   -
126   -sigs.txt: bin/classes/$(CLASSPATH)/lib3270.class
127   - @javap -classpath ./bin/classes -s -p br.com.bb.pw3270.lib3270 > $@
128   -
129   -jni/lib3270jni.h: bin/classes/$(CLASSPATH)/lib3270.class
130   - @echo " GEN `basename $@`"
131   - @$(JAVAH) -o $@ -classpath $(ANDROIDCLASSPATH):bin/classes $(subst /,.,$(CLASSPATH)).lib3270
android/build.xml
... ... @@ -1,83 +0,0 @@
1   -<?xml version="1.0" encoding="UTF-8"?>
2   -<project name="pw3270" default="help">
3   -
4   - <!-- The local.properties file is created and updated by the 'android' tool.
5   - It contains the path to the SDK. It should *NOT* be checked into
6   - Version Control Systems. -->
7   - <property file="local.properties" />
8   -
9   - <!-- The ant.properties file can be created by you. It is only edited by the
10   - 'android' tool to add properties to it.
11   - This is the place to change some Ant specific build properties.
12   - Here are some properties you may want to change/update:
13   -
14   - source.dir
15   - The name of the source directory. Default is 'src'.
16   - out.dir
17   - The name of the output directory. Default is 'bin'.
18   -
19   - For other overridable properties, look at the beginning of the rules
20   - files in the SDK, at tools/ant/build.xml
21   -
22   - Properties related to the SDK location or the project target should
23   - be updated using the 'android' tool with the 'update' action.
24   -
25   - This file is an integral part of the build system for your
26   - application and should be checked into Version Control Systems.
27   -
28   - -->
29   - <property file="ant.properties" />
30   -
31   - <!-- The project.properties file is created and updated by the 'android'
32   - tool, as well as ADT.
33   -
34   - This contains project specific properties such as project target, and library
35   - dependencies. Lower level build properties are stored in ant.properties
36   - (or in .classpath for Eclipse projects).
37   -
38   - This file is an integral part of the build system for your
39   - application and should be checked into Version Control Systems. -->
40   - <loadproperties srcFile="project.properties" />
41   -
42   - <!-- quick check on sdk.dir -->
43   - <fail
44   - message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through an env var"
45   - unless="sdk.dir"
46   - />
47   -
48   - <!--
49   - Import per project custom build rules if present at the root of the project.
50   - This is the place to put custom intermediary targets such as:
51   - -pre-build
52   - -pre-compile
53   - -post-compile (This is typically used for code obfuscation.
54   - Compiled code location: ${out.classes.absolute.dir}
55   - If this is not done in place, override ${out.dex.input.absolute.dir})
56   - -post-package
57   - -post-build
58   - -pre-clean
59   - -->
60   - <import file="custom_rules.xml" optional="true" />
61   -
62   - <!-- Import the actual build file.
63   -
64   - To customize existing targets, there are two options:
65   - - Customize only one target:
66   - - copy/paste the target into this file, *before* the
67   - <import> task.
68   - - customize it to your needs.
69   - - Customize the whole content of build.xml
70   - - copy/paste the content of the rules files (minus the top node)
71   - into this file, replacing the <import> task.
72   - - customize to your needs.
73   -
74   - ***********************
75   - ****** IMPORTANT ******
76   - ***********************
77   - In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
78   - in order to avoid having your file be overridden by tools such as "android update project"
79   - -->
80   - <!-- version-tag: 1 -->
81   - <import file="${sdk.dir}/tools/ant/build.xml" />
82   -
83   -</project>
android/ic_connect.svg
... ... @@ -1,93 +0,0 @@
1   -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2   -<!-- Created with Inkscape (http://www.inkscape.org/) -->
3   -
4   -<svg
5   - xmlns:dc="http://purl.org/dc/elements/1.1/"
6   - xmlns:cc="http://creativecommons.org/ns#"
7   - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8   - xmlns:svg="http://www.w3.org/2000/svg"
9   - xmlns="http://www.w3.org/2000/svg"
10   - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11   - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12   - width="45.000008"
13   - height="44.796928"
14   - id="svg4447"
15   - version="1.1"
16   - inkscape:version="0.48.2 r9819"
17   - sodipodi:docname="connect.svg">
18   - <defs
19   - id="defs4449" />
20   - <sodipodi:namedview
21   - id="base"
22   - pagecolor="#ffffff"
23   - bordercolor="#666666"
24   - borderopacity="1.0"
25   - inkscape:pageopacity="0.0"
26   - inkscape:pageshadow="2"
27   - inkscape:zoom="5.6"
28   - inkscape:cx="-8.8755188"
29   - inkscape:cy="16.217373"
30   - inkscape:document-units="px"
31   - inkscape:current-layer="layer1"
32   - showgrid="false"
33   - fit-margin-top="0"
34   - fit-margin-left="0"
35   - fit-margin-right="0"
36   - fit-margin-bottom="0"
37   - inkscape:window-width="1280"
38   - inkscape:window-height="966"
39   - inkscape:window-x="0"
40   - inkscape:window-y="26"
41   - inkscape:window-maximized="1" />
42   - <metadata
43   - id="metadata4452">
44   - <rdf:RDF>
45   - <cc:Work
46   - rdf:about="">
47   - <dc:format>image/svg+xml</dc:format>
48   - <dc:type
49   - rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
50   - <dc:title />
51   - </cc:Work>
52   - </rdf:RDF>
53   - </metadata>
54   - <g
55   - inkscape:label="Camada 1"
56   - inkscape:groupmode="layer"
57   - id="layer1"
58   - transform="translate(-349.54724,-503.78263)">
59   - <g
60   - id="g2987"
61   - transform="translate(-7.0314067,0)">
62   - <g
63   - id="Battery_-_charging"
64   - transform="translate(281.87974,386.63159)">
65   - <path
66   - sodipodi:nodetypes="ccssccccccccccscc"
67   - id="path1353"
68   - d="m 112.668,142.443 -9.347,0 0,10e-4 c 0,3.977 -3.256,7.232 -7.234,7.232 l -6.6,0 0,-2.894 -7.232,0 0,-4.339 7.232,0 0,-5.742 -7.232,0 0,-4.34 7.232,0 0,-2.938 6.6,0 c 3.979,0 7.234,3.254 7.234,7.232 l 9.348,0"
69   - inkscape:connector-curvature="0"
70   - style="fill:#333333" />
71   - </g>
72   - <g
73   - transform="matrix(1.2859907,0,0,1,-89.445423,-0.17091598)"
74   - style="fill:#333333;fill-opacity:1;stroke:#333333;stroke-opacity:1"
75   - id="g4566">
76   - <rect
77   - style="fill:#333333;fill-opacity:1;stroke:#333333;stroke-width:0.65551269;stroke-linecap:butt;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
78   - id="rect4546"
79   - width="3.2658451"
80   - height="19.597486"
81   - x="354.63577"
82   - y="516.50861" />
83   - <rect
84   - style="fill:#333333;fill-opacity:1;stroke:#333333;stroke-width:0.69507933;stroke-linecap:butt;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
85   - id="rect4546-4"
86   - width="3.2262783"
87   - height="22.30492"
88   - x="352.60605"
89   - y="515.15491" />
90   - </g>
91   - </g>
92   - </g>
93   -</svg>
android/ic_disconnect.svg
... ... @@ -1,89 +0,0 @@
1   -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2   -<!-- Created with Inkscape (http://www.inkscape.org/) -->
3   -
4   -<svg
5   - xmlns:dc="http://purl.org/dc/elements/1.1/"
6   - xmlns:cc="http://creativecommons.org/ns#"
7   - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8   - xmlns:svg="http://www.w3.org/2000/svg"
9   - xmlns="http://www.w3.org/2000/svg"
10   - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11   - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12   - width="45.000008"
13   - height="44.796928"
14   - id="svg4447"
15   - version="1.1"
16   - inkscape:version="0.48.2 r9819"
17   - sodipodi:docname="disconnect.svg">
18   - <defs
19   - id="defs4449" />
20   - <sodipodi:namedview
21   - id="base"
22   - pagecolor="#ffffff"
23   - bordercolor="#666666"
24   - borderopacity="1.0"
25   - inkscape:pageopacity="0.0"
26   - inkscape:pageshadow="2"
27   - inkscape:zoom="7.9195959"
28   - inkscape:cx="16.481624"
29   - inkscape:cy="16.217373"
30   - inkscape:document-units="px"
31   - inkscape:current-layer="layer1"
32   - showgrid="false"
33   - fit-margin-top="0"
34   - fit-margin-left="0"
35   - fit-margin-right="0"
36   - fit-margin-bottom="0"
37   - inkscape:window-width="1280"
38   - inkscape:window-height="966"
39   - inkscape:window-x="0"
40   - inkscape:window-y="26"
41   - inkscape:window-maximized="1" />
42   - <metadata
43   - id="metadata4452">
44   - <rdf:RDF>
45   - <cc:Work
46   - rdf:about="">
47   - <dc:format>image/svg+xml</dc:format>
48   - <dc:type
49   - rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
50   - <dc:title></dc:title>
51   - </cc:Work>
52   - </rdf:RDF>
53   - </metadata>
54   - <g
55   - inkscape:label="Camada 1"
56   - inkscape:groupmode="layer"
57   - id="layer1"
58   - transform="translate(-349.54724,-503.78263)">
59   - <g
60   - transform="translate(281.87974,386.63159)"
61   - id="Battery_-_charging">
62   - <path
63   - style="fill:#333333"
64   - inkscape:connector-curvature="0"
65   - d="m 112.668,142.443 -9.347,0 0,10e-4 c 0,3.977 -3.256,7.232 -7.234,7.232 l -6.6,0 0,-2.894 -7.232,0 0,-4.339 7.232,0 0,-5.742 -7.232,0 0,-4.34 7.232,0 0,-2.938 6.6,0 c 3.979,0 7.234,3.254 7.234,7.232 l 9.348,0"
66   - id="path1353"
67   - sodipodi:nodetypes="ccssccccccccccscc" />
68   - </g>
69   - <g
70   - id="g4566"
71   - style="fill:#333333;fill-opacity:1;stroke:#333333;stroke-opacity:1"
72   - transform="translate(1.2626907,-0.12627312)">
73   - <rect
74   - y="516.50861"
75   - x="354.63577"
76   - height="19.597486"
77   - width="3.2658451"
78   - id="rect4546"
79   - style="fill:#333333;fill-opacity:1;stroke:#333333;stroke-width:0.65551269;stroke-linecap:butt;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
80   - <rect
81   - y="515.15491"
82   - x="352.60605"
83   - height="22.30492"
84   - width="3.2262783"
85   - id="rect4546-4"
86   - style="fill:#333333;fill-opacity:1;stroke:#333333;stroke-width:0.69507933;stroke-linecap:butt;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
87   - </g>
88   - </g>
89   -</svg>
android/ic_settings.svg
... ... @@ -1,77 +0,0 @@
1   -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2   -<!-- Created with Inkscape (http://www.inkscape.org/) -->
3   -
4   -<svg
5   - xmlns:dc="http://purl.org/dc/elements/1.1/"
6   - xmlns:cc="http://creativecommons.org/ns#"
7   - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8   - xmlns:svg="http://www.w3.org/2000/svg"
9   - xmlns="http://www.w3.org/2000/svg"
10   - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11   - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12   - width="45.000008"
13   - height="44.796928"
14   - id="svg4447"
15   - version="1.1"
16   - inkscape:version="0.48.2 r9819"
17   - sodipodi:docname="Novo documento 2">
18   - <defs
19   - id="defs4449" />
20   - <sodipodi:namedview
21   - id="base"
22   - pagecolor="#ffffff"
23   - bordercolor="#666666"
24   - borderopacity="1.0"
25   - inkscape:pageopacity="0.0"
26   - inkscape:pageshadow="2"
27   - inkscape:zoom="5.6"
28   - inkscape:cx="10.30575"
29   - inkscape:cy="16.217373"
30   - inkscape:document-units="px"
31   - inkscape:current-layer="layer1"
32   - showgrid="false"
33   - fit-margin-top="0"
34   - fit-margin-left="0"
35   - fit-margin-right="0"
36   - fit-margin-bottom="0"
37   - inkscape:window-width="1280"
38   - inkscape:window-height="966"
39   - inkscape:window-x="0"
40   - inkscape:window-y="26"
41   - inkscape:window-maximized="1" />
42   - <metadata
43   - id="metadata4452">
44   - <rdf:RDF>
45   - <cc:Work
46   - rdf:about="">
47   - <dc:format>image/svg+xml</dc:format>
48   - <dc:type
49   - rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
50   - <dc:title></dc:title>
51   - </cc:Work>
52   - </rdf:RDF>
53   - </metadata>
54   - <g
55   - inkscape:label="Camada 1"
56   - inkscape:groupmode="layer"
57   - id="layer1"
58   - transform="translate(-349.54724,-503.78263)">
59   - <g
60   - transform="translate(222.09224,-33.108444)"
61   - id="Settings">
62   - <g
63   - id="g1208">
64   - <path
65   - style="fill:#333333"
66   - inkscape:connector-curvature="0"
67   - d="m 169.92,548.999 c -0.181,-0.441 -0.497,-0.633 -0.703,-0.426 -0.206,0.205 -0.575,0.451 -0.819,0.543 -0.244,0.094 -1.056,-0.443 -1.392,-0.779 h -0.001 c -0.336,-0.338 -0.688,-0.813 -0.78,-1.057 -0.092,-0.244 0.444,-1.055 0.78,-1.393 l 0.011,-0.01 c 0.337,-0.338 0.348,-0.898 0.023,-1.248 l -3.978,-3.666 c -0.374,-0.295 -0.851,-0.248 -1.059,0.104 -0.209,0.35 -0.555,0.76 -0.769,0.91 -0.214,0.148 -1.133,-0.17 -1.541,-0.414 -0.409,-0.242 -0.866,-0.617 -1.017,-0.83 -0.149,-0.215 0.132,-1.066 0.326,-1.393 0.194,-0.328 -0.013,-0.729 -0.461,-0.889 l -5.998,-1.547 c -0.47,-0.078 -0.854,0.205 -0.854,0.631 0,0.426 -0.088,0.969 -0.194,1.207 -0.107,0.238 -1.061,0.434 -1.536,0.434 -0.475,0 -1.06,-0.088 -1.298,-0.195 -0.238,-0.107 -0.433,-1.02 -0.433,-1.445 0,-0.425 -0.384,-0.709 -0.854,-0.631 l -5.998,1.547 c -0.448,0.16 -0.655,0.561 -0.461,0.889 0.195,0.326 0.379,0.807 0.408,1.066 0.03,0.258 -0.689,0.914 -1.099,1.156 -0.408,0.244 -0.955,0.467 -1.215,0.496 -0.26,0.029 -0.885,-0.643 -1.095,-0.992 -0.208,-0.352 -0.686,-0.398 -1.06,-0.104 l -3.978,3.666 c -0.324,0.35 -0.313,0.91 0.024,1.248 l 0.011,0.01 c 0.336,0.338 0.688,0.813 0.78,1.057 0.092,0.244 -0.444,1.055 -0.781,1.393 -0.336,0.336 -0.812,0.688 -1.056,0.779 -0.244,0.091 -0.949,-0.338 -1.155,-0.543 -0.206,-0.207 -0.522,-0.016 -0.703,0.426 0,0 -2.54,6.197 -2.54,10.189 0,12.428 10.073,22.5 22.5,22.5 12.427,0 22.5,-10.072 22.5,-22.5 0.005,-3.992 -2.535,-10.189 -2.535,-10.189 z m -19.96,21.541 c -6.213,0 -11.25,-5.037 -11.25,-11.25 0,-5.076 3.363,-9.363 7.981,-10.764 l 2.882,-5.764 c 0.213,-0.426 0.561,-0.426 0.773,0 l 2.882,5.764 c 4.619,1.4 7.981,5.688 7.981,10.764 0.001,6.213 -5.036,11.25 -11.249,11.25 z"
68   - id="path1210" />
69   - <path
70   - style="fill:#333333"
71   - inkscape:connector-curvature="0"
72   - d="m 149.96,551.501 c -4.295,0 -7.788,3.494 -7.788,7.789 0,4.295 3.493,7.787 7.788,7.787 4.295,0 7.788,-3.492 7.788,-7.787 0,-4.295 -3.493,-7.789 -7.788,-7.789 z"
73   - id="path1212" />
74   - </g>
75   - </g>
76   - </g>
77   -</svg>
android/jni/Android.mk
... ... @@ -1,40 +0,0 @@
1   -#
2   -# "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
3   -# (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
4   -# aplicativos mainframe. Registro no INPI sob o nome G3270.
5   -#
6   -# Copyright (C) <2008> <Banco do Brasil S.A.>
7   -#
8   -# Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
9   -# os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
10   -# Free Software Foundation.
11   -#
12   -# Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
13   -# GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
14   -# A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
15   -# obter mais detalhes.
16   -#
17   -# Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
18   -# programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple
19   -# Place, Suite 330, Boston, MA, 02111-1307, USA
20   -#
21   -# Contatos:
22   -#
23   -# perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
24   -#
25   -
26   -LOCAL_PATH := $(call my-dir)
27   -
28   -include $(CLEAR_VARS)
29   -
30   -include ../src/lib3270/sources.mak
31   -
32   -LOCAL_CFLAGS=-I../src/include
33   -LOCAL_DEFAULT_CPP_EXTENSION := cpp
34   -LOCAL_MODULE := lib3270
35   -LOCAL_LDLIBS := -llog
36   -LOCAL_SRC_FILES := $(foreach SRC, $(TERMINAL_SOURCES) $(NETWORK_SOURCES), ../../src/lib3270/$(SRC)) \
37   - main.cpp misc.cpp text.cpp actions.cpp
38   -
39   -include $(BUILD_SHARED_LIBRARY)
40   -
android/jni/actions.cpp
... ... @@ -1,59 +0,0 @@
1   -/*
2   - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
3   - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
4   - * aplicativos mainframe. Registro no INPI sob o nome G3270. Registro no INPI sob o nome G3270.
5   - *
6   - * Copyright (C) <2008> <Banco do Brasil S.A.>
7   - *
8   - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
9   - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
10   - * Free Software Foundation.
11   - *
12   - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
13   - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
14   - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
15   - * obter mais detalhes.
16   - *
17   - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
18   - * programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple
19   - * Place, Suite 330, Boston, MA, 02111-1307, USA
20   - *
21   - * Este programa está nomeado como actions.cpp e possui - linhas de código.
22   - *
23   - * Contatos:
24   - *
25   - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
26   - *
27   - */
28   -
29   - #include "globals.h"
30   - #include <lib3270/actions.h>
31   - #include <string.h>
32   -
33   -/*--[ Implement ]------------------------------------------------------------------------------------*/
34   -
35   -JNIEXPORT void JNICALL Java_br_com_bb_pw3270_lib3270_sendEnter(JNIEnv *env, jobject obj)
36   -{
37   - PW3270_JNI_BEGIN
38   -
39   - if(lib3270_connected(PW3270_SESSION))
40   - lib3270_enter(PW3270_SESSION);
41   - else
42   - pw3270_jni_post_message(1,LIB3270_MESSAGE_DISCONNECTED);
43   -
44   - PW3270_JNI_END
45   -}
46   -
47   -JNIEXPORT void JNICALL Java_br_com_bb_pw3270_lib3270_sendPFkey(JNIEnv *env, jobject obj, jint key)
48   -{
49   - PW3270_JNI_BEGIN
50   -
51   - if(lib3270_connected(PW3270_SESSION))
52   - lib3270_pfkey(PW3270_SESSION,key);
53   - else
54   - pw3270_jni_post_message(1,LIB3270_MESSAGE_DISCONNECTED);
55   -
56   - PW3270_JNI_END
57   -}
58   -
59   -
android/jni/globals.h
... ... @@ -1,66 +0,0 @@
1   -/*
2   - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
3   - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
4   - * aplicativos mainframe. Registro no INPI sob o nome G3270. Registro no INPI sob o nome G3270.
5   - *
6   - * Copyright (C) <2008> <Banco do Brasil S.A.>
7   - *
8   - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
9   - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
10   - * Free Software Foundation.
11   - *
12   - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
13   - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
14   - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
15   - * obter mais detalhes.
16   - *
17   - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
18   - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin
19   - * St, Fifth Floor, Boston, MA 02110-1301 USA
20   - *
21   - * Este programa está nomeado como globals.h e possui - linhas de código.
22   - *
23   - * Contatos:
24   - *
25   - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
26   - *
27   - */
28   -
29   - #include "lib3270jni.h"
30   -
31   - #include <lib3270.h>
32   - #include <lib3270/session.h>
33   - #include <lib3270/log.h>
34   -
35   -/*--[ Defines ]--------------------------------------------------------------------------------------*/
36   -
37   - #define PW3270_JNI_BEGIN pw3270_jni_lock(env,obj);
38   - #define PW3270_JNI_END pw3270_jni_unlock();
39   -
40   - #define PW3270_JNI_ENV pw3270_jni_active->env
41   - #define PW3270_JNI_OBJ pw3270_jni_active->obj
42   -
43   - #define PW3270_SESSION lib3270_get_default_session_handle()
44   -
45   - #define pw3270_jni_call_void(name, sig, ...) pw3270_jni_active->env->CallVoidMethod(pw3270_jni_active->obj,lib3270_getmethodID(name,sig), __VA_ARGS__)
46   - #define pw3270_jni_call_int(name, sig, ...) pw3270_jni_active->env->CallIntMethod(pw3270_jni_active->obj,lib3270_getmethodID(name,sig), __VA_ARGS__)
47   - #define pw3270_jni_new_byte_array(len) pw3270_jni_active->env->NewByteArray(len)
48   -
49   - typedef struct _pw3270_jni
50   - {
51   - struct _pw3270_jni * parent;
52   - JNIEnv * env;
53   - jobject obj;
54   - } PW3270_JNI;
55   -
56   -/*--[ Globals ]--------------------------------------------------------------------------------------*/
57   -
58   -
59   - extern PW3270_JNI *pw3270_jni_active;
60   -
61   - int pw3270_jni_lock(JNIEnv *env, jobject obj);
62   - void pw3270_jni_unlock();
63   - void pw3270_jni_post_message(int msgid, int arg1 = 0, int arg2 = 0);
64   - jstring pw3270_jni_new_string(const char *str);
65   - jmethodID lib3270_getmethodID(const char *name, const char *sig);
66   -
android/jni/main.cpp
... ... @@ -1,469 +0,0 @@
1   -/*
2   - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
3   - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
4   - * aplicativos mainframe. Registro no INPI sob o nome G3270. Registro no INPI sob o nome G3270.
5   - *
6   - * Copyright (C) <2008> <Banco do Brasil S.A.>
7   - *
8   - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
9   - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
10   - * Free Software Foundation.
11   - *
12   - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
13   - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
14   - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
15   - * obter mais detalhes.
16   - *
17   - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
18   - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin
19   - * St, Fifth Floor, Boston, MA 02110-1301 USA
20   - *
21   - * Este programa está nomeado como main.cpp e possui - linhas de código.
22   - *
23   - * Contatos:
24   - *
25   - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
26   - *
27   - */
28   -
29   - #include "globals.h"
30   - #include <stdio.h>
31   - #include <pthread.h>
32   - #include <string.h>
33   - #include <lib3270/popup.h>
34   - #include <lib3270/internals.h>
35   - #include <lib3270/html.h>
36   -
37   -/*--[ Structs ]--------------------------------------------------------------------------------------*/
38   -
39   - typedef struct _timer
40   - {
41   - size_t sz;
42   - bool enabled;
43   - H3270 * session;
44   - void (*proc)(H3270 *session);
45   - } TIMER;
46   -
47   -/*--[ Globals ]--------------------------------------------------------------------------------------*/
48   -
49   - const char * java_class_name = "br/com/bb/pw3270/lib3270";
50   - PW3270_JNI * pw3270_jni_active = NULL;
51   - static pthread_mutex_t mutex;
52   - static char * startup_script = NULL;
53   -
54   -/*--[ Implement ]------------------------------------------------------------------------------------*/
55   -
56   -
57   -jmethodID lib3270_getmethodID(const char *name, const char *sig)
58   -{
59   - if(!pw3270_jni_active)
60   - {
61   - __android_log_print(ANDROID_LOG_ERROR, PACKAGE_NAME, "%s(%s,%s) called outside jni environment",__FUNCTION__,name,sig);
62   - return NULL;
63   - }
64   -
65   - return PW3270_JNI_ENV->GetMethodID(PW3270_JNI_ENV->GetObjectClass(PW3270_JNI_OBJ), name, sig );
66   -}
67   -
68   -void pw3270_jni_post_message(int msgid, int arg1, int arg2)
69   -{
70   - trace("%s: pw3270_env=%p pw3270_obj=%p msgid=%d",__FUNCTION__,PW3270_JNI_ENV,PW3270_JNI_OBJ,msgid);
71   -
72   - if(pw3270_jni_active)
73   - pw3270_jni_call_void("postMessage", "(III)V",(jint) msgid, (jint) arg1, (jint) arg2);
74   -}
75   -
76   -static void changed(H3270 *session, int offset, int len)
77   -{
78   - trace("%s: offset=%d len=%d",__FUNCTION__,offset,len);
79   -
80   - {
81   - char *text = lib3270_get_string_at_address(PW3270_SESSION,0,-1,'\n');
82   - if(text)
83   - {
84   - char *strtok_r(char *str, const char *delim, char **saveptr);
85   - char *save;
86   -
87   -/*
88   - __android_log_print(ANDROID_LOG_DEBUG, PACKAGE_NAME, "Contents:\n");
89   - for(char *ptr = strtok_r(text,"\n",&save);ptr;ptr = strtok_r(NULL,"\n",&save))
90   - __android_log_print(ANDROID_LOG_DEBUG, PACKAGE_NAME, "%s\n",ptr);
91   -*/
92   -
93   - lib3270_free(text);
94   - }
95   - }
96   -
97   - pw3270_jni_post_message(2,offset,len);
98   -}
99   -
100   -static void erase(H3270 *session)
101   -{
102   - pw3270_jni_post_message(4);
103   -}
104   -
105   -static int popuphandler(H3270 *session, void *terminal, LIB3270_NOTIFY type, const char *title, const char *msg, const char *fmt, va_list args)
106   -{
107   - if(PW3270_JNI_ENV)
108   - {
109   - static const char *sig = "(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V";
110   - char * descr = lib3270_vsprintf(fmt, args);
111   -
112   - if(msg)
113   - {
114   - pw3270_jni_call_void( "postPopup",
115   - sig,
116   - (jint) type,
117   - pw3270_jni_new_string(title),
118   - pw3270_jni_new_string(msg),
119   - pw3270_jni_new_string(descr) );
120   -
121   - }
122   - else
123   - {
124   - pw3270_jni_call_void( "postPopup",
125   - sig,
126   - (jint) type,
127   - pw3270_jni_new_string(title),
128   - pw3270_jni_new_string(descr),
129   - pw3270_jni_new_string("") );
130   - }
131   -
132   - lib3270_free(descr);
133   - }
134   - else
135   - {
136   - __android_log_print(ANDROID_LOG_VERBOSE, PACKAGE_NAME, "Can't open popup \"%s\", no jni env for active session",title);
137   - }
138   -}
139   -
140   -void update_status(H3270 *session, LIB3270_MESSAGE id)
141   -{
142   - pw3270_jni_post_message(1,(int) id);
143   -}
144   -
145   -static int write_buffer(H3270 *session, unsigned const char *buf, int len)
146   -{
147   - int rc = -1;
148   -
149   - __android_log_print(ANDROID_LOG_DEBUG, PACKAGE_NAME, "%s: Writing %d bytes",__FUNCTION__,len);
150   -
151   - if(PW3270_JNI_ENV)
152   - {
153   - jbyteArray buffer = pw3270_jni_new_byte_array(len);
154   -
155   - PW3270_JNI_ENV->SetByteArrayRegion(buffer, 0, len, (jbyte*) buf);
156   -
157   - rc = pw3270_jni_call_int("send_data", "([BI)I", buffer, (jint) len );
158   - }
159   - else
160   - {
161   - __android_log_print(ANDROID_LOG_ERROR, PACKAGE_NAME, "Can't send %d bytes, no jni env for active session",len);
162   - }
163   -
164   - trace("%s exits with rc=%d",__FUNCTION__,rc);
165   -
166   - return rc;
167   -}
168   -
169   -static void * add_timer(unsigned long interval_ms, H3270 *session, void (*proc)(H3270 *session))
170   -{
171   - TIMER * timer = (TIMER *) lib3270_malloc(sizeof(TIMER));
172   -
173   - timer->sz = sizeof(timer);
174   - timer->enabled = true;
175   - timer->session = session;
176   - timer->proc = proc;
177   -
178   - trace("Timer %08lx created",(unsigned long) timer);
179   -
180   - pw3270_jni_call_void("newTimer", "(JI)V", (jlong) timer, (jint) interval_ms);
181   -
182   - return timer;
183   -}
184   -
185   -static void remove_timer(void *id)
186   -{
187   - TIMER *timer = (TIMER *) id;
188   -
189   - if(timer == NULL)
190   - return;
191   -
192   - __android_log_print(ANDROID_LOG_VERBOSE, PACKAGE_NAME, "Disabling timer %08lx",(unsigned long) timer);
193   -
194   - timer->enabled = false;
195   -
196   -}
197   -
198   -JNIEXPORT void JNICALL Java_br_com_bb_pw3270_lib3270_timerFinish(JNIEnv *env, jobject obj, jlong id)
199   -{
200   - TIMER *timer = (TIMER *) id;
201   -
202   - if(timer == NULL)
203   - return;
204   -
205   - PW3270_JNI_BEGIN
206   -
207   - if(timer->enabled)
208   - {
209   - __android_log_print(ANDROID_LOG_VERBOSE, PACKAGE_NAME, "Running timer %08lx",(unsigned long) timer);
210   - timer->proc(timer->session);
211   - }
212   -
213   - lib3270_free(timer);
214   -
215   - PW3270_JNI_END
216   -
217   -}
218   -
219   -#ifdef X3270_TRACE
220   -static void tracehandler(H3270 *session, const char *fmt, va_list args)
221   -{
222   - static char * buffer = NULL;
223   - static int szBuffer = 0;
224   -
225   - char temp[4096];
226   - size_t sz;
227   - char * src;
228   - char * dst;
229   -
230   - if(!szBuffer)
231   - {
232   - buffer = (char *) lib3270_malloc(szBuffer = 4096);
233   - *buffer = 0;
234   - }
235   -
236   - sz = vsnprintf(temp,4095,fmt,args);
237   -
238   - if( (sz+strlen(buffer)) > szBuffer)
239   - {
240   - szBuffer += (sz+strlen(buffer)+1);
241   - buffer = (char *) lib3270_realloc(buffer,szBuffer);
242   - }
243   -
244   - dst = buffer+strlen(buffer);
245   - for(src = temp;*src;src++)
246   - {
247   - if(*src == '\n')
248   - {
249   - *dst = 0;
250   - __android_log_print(ANDROID_LOG_DEBUG, PACKAGE_NAME, "%s", buffer);
251   - dst = buffer;
252   - }
253   - else
254   - {
255   - *(dst++) = *src;
256   - }
257   - }
258   -
259   - *dst = 0;
260   -
261   -}
262   -#endif // X3270_TRACE
263   -
264   -static void ctlr_done(H3270 *session)
265   -{
266   - __android_log_print(ANDROID_LOG_DEBUG, PACKAGE_NAME, "%s",__FUNCTION__);
267   - pw3270_jni_post_message(5);
268   -}
269   -
270   -static void autostart(H3270 *session)
271   -{
272   - if(startup_script)
273   - {
274   - // Input startup script contents
275   - lib3270_emulate_input(PW3270_SESSION,startup_script,-1,0);
276   - free(startup_script);
277   - startup_script = NULL;
278   - }
279   -}
280   -
281   -jint JNI_OnLoad(JavaVM *vm, void *reserved)
282   -{
283   - H3270 * session = lib3270_session_new("","bracket");
284   -
285   - __android_log_print(ANDROID_LOG_VERBOSE, PACKAGE_NAME, "Initializing %s",PACKAGE_NAME);
286   -
287   - pthread_mutex_init(&mutex,NULL);
288   -
289   -#ifdef X3270_TRACE
290   - lib3270_set_trace_handler(tracehandler);
291   -#endif // X3270_TRACE
292   -
293   - lib3270_set_popup_handler(popuphandler);
294   - lib3270_register_time_handlers(add_timer,remove_timer);
295   -
296   - session->write = write_buffer;
297   - session->changed = changed;
298   - session->erase = erase;
299   - session->ctlr_done = ctlr_done;
300   - session->update_status = update_status;
301   - session->autostart = autostart;
302   -
303   - return JNI_VERSION_1_4;
304   -}
305   -
306   -void JNI_OnUnload(JavaVM *vm, void *reserved)
307   -{
308   - __android_log_print(ANDROID_LOG_VERBOSE, PACKAGE_NAME, "Deinitializing %s",PACKAGE_NAME);
309   - pthread_mutex_destroy(&mutex);
310   -}
311   -
312   -JNIEXPORT jboolean JNICALL Java_br_com_bb_pw3270_lib3270_isConnected(JNIEnv *env, jobject obj)
313   -{
314   - jboolean rc;
315   -
316   - PW3270_JNI_BEGIN
317   -
318   - rc = lib3270_connected(lib3270_get_default_session_handle()) ? JNI_TRUE : JNI_FALSE;
319   -
320   - PW3270_JNI_END
321   -
322   - return rc;
323   -}
324   -
325   -JNIEXPORT jboolean JNICALL Java_br_com_bb_pw3270_lib3270_isTerminalReady(JNIEnv *env, jobject obj)
326   -{
327   - PW3270_JNI_BEGIN
328   -
329   -
330   - PW3270_JNI_END
331   -
332   - return JNI_FALSE;
333   -}
334   -
335   -JNIEXPORT void JNICALL Java_br_com_bb_pw3270_lib3270_setHost(JNIEnv *env, jobject obj, jstring hostname)
336   -{
337   - PW3270_JNI_BEGIN
338   -
339   - lib3270_set_url(PW3270_SESSION,env->GetStringUTFChars(hostname, 0));
340   -
341   - PW3270_JNI_END
342   -}
343   -
344   -JNIEXPORT void JNICALL Java_br_com_bb_pw3270_lib3270_setStartupScript(JNIEnv *env, jobject obj, jstring str)
345   -{
346   - const char *text;
347   -
348   - PW3270_JNI_BEGIN
349   -
350   - text = env->GetStringUTFChars(str, 0);
351   -
352   - if(startup_script)
353   - free(startup_script);
354   -
355   - if(text || strlen(text) > 0)
356   - startup_script = strdup(text);
357   - else
358   - startup_script = NULL;
359   -
360   - PW3270_JNI_END
361   -
362   -}
363   -
364   -
365   -JNIEXPORT jstring JNICALL Java_br_com_bb_pw3270_lib3270_getHost(JNIEnv *env, jobject obj)
366   -{
367   - return env->NewStringUTF(lib3270_get_hostname(lib3270_get_default_session_handle()));
368   -}
369   -
370   -JNIEXPORT void JNICALL Java_br_com_bb_pw3270_lib3270_set_1connection_1status(JNIEnv *env, jobject obj, jboolean connected)
371   -{
372   - PW3270_JNI_BEGIN
373   -
374   - trace("Host is %s",connected ? "connected" : "disconnected");
375   -
376   - if(connected)
377   - {
378   - lib3270_set_connected(PW3270_SESSION);
379   - lib3270_setup_session(PW3270_SESSION);
380   - }
381   - else
382   - {
383   - lib3270_set_disconnected(PW3270_SESSION);
384   - }
385   -
386   - PW3270_JNI_END
387   -}
388   -
389   -JNIEXPORT void JNICALL Java_br_com_bb_pw3270_lib3270_procRecvdata(JNIEnv *env, jobject obj, jbyteArray buffer, jint sz)
390   -{
391   - unsigned char *netrbuf;
392   -
393   - PW3270_JNI_BEGIN
394   -
395   - netrbuf = (unsigned char *) env->GetByteArrayElements(buffer,NULL);
396   - lib3270_data_recv(PW3270_SESSION, (size_t) sz, netrbuf);
397   - PW3270_JNI_ENV->ReleaseByteArrayElements(buffer, (signed char *) netrbuf, 0);
398   -
399   - PW3270_JNI_END
400   -
401   -}
402   -
403   -int pw3270_jni_lock(JNIEnv *env, jobject obj)
404   -{
405   - int status;
406   -
407   - PW3270_JNI *datablock = (PW3270_JNI *) lib3270_malloc(sizeof(PW3270_JNI));
408   -
409   - datablock->parent = pw3270_jni_active;
410   - datablock->env = env;
411   - datablock->obj = obj;
412   -
413   -// __android_log_print(ANDROID_LOG_DEBUG, PACKAGE_NAME, "%s",__FUNCTION__);
414   -
415   - status = pthread_mutex_trylock(&mutex);
416   - if(status)
417   - {
418   - __android_log_print(ANDROID_LOG_VERBOSE, PACKAGE_NAME, "Error %s when trying mutex semaphore (rc=%d)",strerror(status),status);
419   - status = pthread_mutex_lock(&mutex);
420   - if(status)
421   - {
422   - __android_log_print(ANDROID_LOG_VERBOSE, PACKAGE_NAME, "Error %s acquiring mutex semaphore (rc=%d)",strerror(status),status);
423   - }
424   - }
425   -
426   -/*
427   - if(!pw3270_jni_active || pw3270_jni_active->env != env)
428   - {
429   - // Environment change, lock
430   - if(!pthread_mutex_trylock(&mutex))
431   - {
432   - __android_log_print(ANDROID_LOG_DEBUG, PACKAGE_NAME, "Recursive access");
433   - }
434   -
435   - trace("%s: Environment has changed",__FUNCTION__);
436   - pthread_mutex_lock(&mutex);
437   - }
438   -
439   - */
440   -
441   - pw3270_jni_active = datablock;
442   -
443   - return status;
444   -
445   -}
446   -
447   -void pw3270_jni_unlock(void)
448   -{
449   - PW3270_JNI *datablock = pw3270_jni_active;
450   - pw3270_jni_active = datablock->parent;
451   -
452   - pthread_mutex_unlock(&mutex);
453   -
454   -/*
455   - if(!pw3270_jni_active || pw3270_jni_active->env != datablock->env)
456   - {
457   - // Environment change, unlock
458   - trace("%s: Environment has changed",__FUNCTION__);
459   - pthread_mutex_unlock(&mutex);
460   - }
461   -*/
462   -
463   - lib3270_free(datablock);
464   -}
465   -
466   -jstring pw3270_jni_new_string(const char *str)
467   -{
468   - return pw3270_jni_active->env->NewStringUTF(str ? str : "");
469   -}
android/jni/misc.cpp
... ... @@ -1,70 +0,0 @@
1   -/*
2   - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
3   - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
4   - * aplicativos mainframe. Registro no INPI sob o nome G3270. Registro no INPI sob o nome G3270.
5   - *
6   - * Copyright (C) <2008> <Banco do Brasil S.A.>
7   - *
8   - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
9   - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
10   - * Free Software Foundation.
11   - *
12   - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
13   - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
14   - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
15   - * obter mais detalhes.
16   - *
17   - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
18   - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin
19   - * St, Fifth Floor, Boston, MA 02110-1301 USA
20   - *
21   - * Este programa está nomeado como misc.cpp e possui - linhas de código.
22   - *
23   - * Contatos:
24   - *
25   - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
26   - *
27   - */
28   -
29   - #include "globals.h"
30   -
31   -/*--[ Implement ]------------------------------------------------------------------------------------*/
32   -
33   -JNIEXPORT jstring JNICALL Java_br_com_bb_pw3270_lib3270_getVersion(JNIEnv *env, jobject obj)
34   -{
35   - return env->NewStringUTF(lib3270_get_version());
36   -}
37   -
38   -JNIEXPORT jstring JNICALL Java_br_com_bb_pw3270_lib3270_getRevision(JNIEnv *env, jobject obj)
39   -{
40   - return env->NewStringUTF(lib3270_get_revision());
41   -}
42   -
43   -JNIEXPORT jstring JNICALL Java_br_com_bb_pw3270_lib3270_getEncoding(JNIEnv *env, jobject obj)
44   -{
45   - return env->NewStringUTF(lib3270_get_display_charset(lib3270_get_default_session_handle()));
46   -}
47   -
48   -JNIEXPORT void JNICALL Java_br_com_bb_pw3270_lib3270_setToggle(JNIEnv *env, jobject obj, jstring name, jboolean state)
49   -{
50   - LIB3270_TOGGLE id = lib3270_get_toggle_id(env->GetStringUTFChars(name, 0));
51   -
52   - PW3270_JNI_BEGIN
53   -
54   - if(id >= 0)
55   - lib3270_set_toggle(PW3270_SESSION,id,state ? 1 : 0);
56   -
57   - PW3270_JNI_END
58   -
59   -}
60   -
61   -JNIEXPORT jboolean JNICALL Java_br_com_bb_pw3270_lib3270_in3270 (JNIEnv *env, jobject obj)
62   -{
63   - jboolean rc;
64   -
65   - PW3270_JNI_BEGIN
66   - rc = lib3270_in_3270(PW3270_SESSION) ? JNI_TRUE : JNI_FALSE;
67   - PW3270_JNI_END
68   -
69   - return rc;
70   -}
android/jni/text.cpp
... ... @@ -1,141 +0,0 @@
1   -/*
2   - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
3   - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
4   - * aplicativos mainframe. Registro no INPI sob o nome G3270. Registro no INPI sob o nome G3270.
5   - *
6   - * Copyright (C) <2008> <Banco do Brasil S.A.>
7   - *
8   - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
9   - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
10   - * Free Software Foundation.
11   - *
12   - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
13   - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
14   - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
15   - * obter mais detalhes.
16   - *
17   - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
18   - * programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple
19   - * Place, Suite 330, Boston, MA, 02111-1307, USA
20   - *
21   - * Este programa está nomeado como text.cpp e possui - linhas de código.
22   - *
23   - * Contatos:
24   - *
25   - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
26   - *
27   - */
28   -
29   - #include "globals.h"
30   - #include <lib3270/html.h>
31   - #include <string.h>
32   -
33   -/*--[ Implement ]------------------------------------------------------------------------------------*/
34   -
35   -static jbyteArray retString(const char *txt)
36   -{
37   - size_t len = strlen(txt);
38   - jbyteArray ret = PW3270_JNI_ENV->NewByteArray(len);
39   - PW3270_JNI_ENV->SetByteArrayRegion(ret, 0, len, (jbyte*) txt);
40   - return ret;
41   -}
42   -
43   -JNIEXPORT jbyteArray JNICALL Java_br_com_bb_pw3270_lib3270_getHTML(JNIEnv *env, jobject obj)
44   -{
45   - jbyteArray ret;
46   -
47   - PW3270_JNI_BEGIN
48   -
49   -// trace("%s starts, session=%p",__FUNCTION__,PW3270_SESSION);
50   -
51   - char *text = lib3270_get_as_html(PW3270_SESSION,(LIB3270_HTML_OPTION) (LIB3270_HTML_OPTION_ALL|LIB3270_HTML_OPTION_FORM));
52   -
53   - if(text)
54   - {
55   -// trace("Retornar:\n%s\n",text);
56   - ret = retString(text);
57   - lib3270_free(text);
58   - }
59   - else
60   - {
61   - ret = retString("<b>Empty session</b>");
62   - }
63   -
64   -// trace("%s ends",__FUNCTION__);
65   -
66   - PW3270_JNI_END
67   -
68   - return ret;
69   -}
70   -
71   -JNIEXPORT jbyteArray JNICALL Java_br_com_bb_pw3270_lib3270_getText(JNIEnv *env, jobject obj)
72   -{
73   - jbyteArray ret;
74   -
75   - PW3270_JNI_BEGIN
76   -
77   -// trace("%s starts",__FUNCTION__);
78   -
79   - char *text = lib3270_get_string_at_address(PW3270_SESSION,0,-1,'\n');
80   -
81   - if(text)
82   - {
83   - ret = retString(text);
84   - lib3270_free(text);
85   - }
86   - else
87   - {
88   - ret = retString("");
89   - }
90   -
91   -// trace("%s ends",__FUNCTION__);
92   -
93   - PW3270_JNI_END
94   -
95   - return ret;
96   -}
97   -
98   -
99   -JNIEXPORT void JNICALL Java_br_com_bb_pw3270_lib3270_setTextAt(JNIEnv *env, jobject obj, jint pos, jbyteArray inText, jint szText)
100   -{
101   - PW3270_JNI_BEGIN
102   -
103   - if(lib3270_connected(PW3270_SESSION))
104   - {
105   - unsigned char str[szText+1];
106   - int f;
107   - jbyte * bt = env->GetByteArrayElements(inText,0);
108   -
109   - for(int f=0;f<szText;f++)
110   - str[f] = (char) bt[f];
111   - str[szText] = 0;
112   -
113   -// trace("Buffer(%d/%d)=\"%s\"",(int) pos, lib3270_field_addr(PW3270_SESSION, (int) pos), str);
114   -
115   - if( ((int) pos) == lib3270_field_addr(PW3270_SESSION, (int) pos))
116   - {
117   - // Begin of field, clear it first
118   - int sz = lib3270_field_length(PW3270_SESSION,pos);
119   - unsigned char * buffer = (unsigned char *) lib3270_malloc(sz+1);
120   -
121   - memset(buffer,' ',sz);
122   -
123   - lib3270_clear_operator_error(PW3270_SESSION);
124   - lib3270_set_cursor_address(PW3270_SESSION,(int) pos);
125   - lib3270_set_string(PW3270_SESSION,buffer);
126   -
127   - lib3270_free(buffer);
128   - }
129   -
130   - lib3270_clear_operator_error(PW3270_SESSION);
131   - lib3270_set_cursor_address(PW3270_SESSION,(int) pos);
132   - lib3270_set_string(PW3270_SESSION,str);
133   -
134   - lib3270_clear_operator_error(PW3270_SESSION);
135   -
136   - env->ReleaseByteArrayElements(inText,bt,JNI_ABORT);
137   - }
138   -
139   - PW3270_JNI_END
140   -}
141   -
android/lib3270NDK.cbp
... ... @@ -1,76 +0,0 @@
1   -<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
2   -<CodeBlocks_project_file>
3   - <FileVersion major="1" minor="6" />
4   - <Project>
5   - <Option title="lib3270 android NDK" />
6   - <Option makefile_is_custom="1" />
7   - <Option pch_mode="2" />
8   - <Option compiler="gcc" />
9   - <Build>
10   - <Target title="Debug">
11   - <Option output=".bin/Debug/lib3270 android NDK" prefix_auto="1" extension_auto="1" />
12   - <Option object_output=".obj/Debug/" />
13   - <Option type="1" />
14   - <Option compiler="gcc" />
15   - <Compiler>
16   - <Add option="-g" />
17   - </Compiler>
18   - </Target>
19   - <Target title="Release">
20   - <Option output=".bin/Release/lib3270 android NDK" prefix_auto="1" extension_auto="1" />
21   - <Option object_output=".obj/Release/" />
22   - <Option type="1" />
23   - <Option compiler="gcc" />
24   - <Compiler>
25   - <Add option="-O2" />
26   - </Compiler>
27   - <Linker>
28   - <Add option="-s" />
29   - </Linker>
30   - </Target>
31   - </Build>
32   - <Compiler>
33   - <Add option="-Wall" />
34   - </Compiler>
35   - <Unit filename="../src/include/lib3270.h" />
36   - <Unit filename="../src/include/lib3270/actions.h" />
37   - <Unit filename="../src/include/lib3270/html.h" />
38   - <Unit filename="../src/include/lib3270/internals.h" />
39   - <Unit filename="../src/include/lib3270/log.h" />
40   - <Unit filename="../src/include/lib3270/session.h" />
41   - <Unit filename="../src/lib3270/ctlr.c">
42   - <Option compilerVar="CC" />
43   - </Unit>
44   - <Unit filename="../src/lib3270/html.c">
45   - <Option compilerVar="CC" />
46   - </Unit>
47   - <Unit filename="../src/lib3270/kybd.c">
48   - <Option compilerVar="CC" />
49   - </Unit>
50   - <Unit filename="../src/lib3270/selection.c">
51   - <Option compilerVar="CC" />
52   - </Unit>
53   - <Unit filename="../src/lib3270/sources.mak" />
54   - <Unit filename="../src/lib3270/telnet.c">
55   - <Option compilerVar="CC" />
56   - </Unit>
57   - <Unit filename="../src/lib3270/trace_ds.c">
58   - <Option compilerVar="CC" />
59   - </Unit>
60   - <Unit filename="Makefile" />
61   - <Unit filename="jni/Android.mk" />
62   - <Unit filename="jni/actions.cpp" />
63   - <Unit filename="jni/globals.h" />
64   - <Unit filename="jni/lib3270jni.h" />
65   - <Unit filename="jni/main.cpp" />
66   - <Unit filename="jni/misc.cpp" />
67   - <Unit filename="jni/text.cpp" />
68   - <Unit filename="res/raw/jsmain.js" />
69   - <Unit filename="src/br/com/bb/pw3270/PW3270Activity.java" />
70   - <Unit filename="src/br/com/bb/pw3270/lib3270.java" />
71   - <Extensions>
72   - <code_completion />
73   - <debugger />
74   - </Extensions>
75   - </Project>
76   -</CodeBlocks_project_file>
android/local.properties
... ... @@ -1,10 +0,0 @@
1   -# This file is automatically generated by Android Tools.
2   -# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3   -#
4   -# This file must *NOT* be checked into Version Control Systems,
5   -# as it contains information specific to your local configuration.
6   -
7   -# location of the SDK. This is only used by Ant
8   -# For customization when using a Version Control System, please read the
9   -# header note.
10   -sdk.dir=/opt/android-sdk-linux
android/proguard-project.txt
... ... @@ -1,20 +0,0 @@
1   -# To enable ProGuard in your project, edit project.properties
2   -# to define the proguard.config property as described in that file.
3   -#
4   -# Add project specific ProGuard rules here.
5   -# By default, the flags in this file are appended to flags specified
6   -# in ${sdk.dir}/tools/proguard/proguard-android.txt
7   -# You can edit the include path and order by changing the ProGuard
8   -# include property in project.properties.
9   -#
10   -# For more details, see
11   -# http://developer.android.com/guide/developing/tools/proguard.html
12   -
13   -# Add any project specific keep options here:
14   -
15   -# If your project uses WebView with JS, uncomment the following
16   -# and specify the fully qualified class name to the JavaScript interface
17   -# class:
18   -#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19   -# public *;
20   -#}
android/project.properties
... ... @@ -1,14 +0,0 @@
1   -# This file is automatically generated by Android Tools.
2   -# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3   -#
4   -# This file must be checked in Version Control Systems.
5   -#
6   -# To customize properties used by the Ant build system edit
7   -# "ant.properties", and override values to adapt the script to your
8   -# project structure.
9   -#
10   -# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11   -#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12   -
13   -# Project target.
14   -target=android-16
android/res/layout/about.xml
... ... @@ -1,18 +0,0 @@
1   -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2   - android:id="@+id/layout_root"
3   - android:orientation="horizontal"
4   - android:layout_width="fill_parent"
5   - android:layout_height="fill_parent"
6   - android:padding="10dp"
7   - >
8   - <ImageView android:id="@+id/image"
9   - android:layout_width="wrap_content"
10   - android:layout_height="fill_parent"
11   - android:layout_marginRight="10dp"
12   - />
13   - <TextView android:id="@+id/text"
14   - android:layout_width="wrap_content"
15   - android:layout_height="fill_parent"
16   - android:textColor="#FFF"
17   - />
18   -</LinearLayout>
android/res/layout/menu.xml
... ... @@ -1,14 +0,0 @@
1   -<?xml version="1.0" encoding="utf-8"?>
2   -<menu xmlns:android="http://schemas.android.com/apk/res/android"
3   - android:layout_width="match_parent"
4   - android:layout_height="match_parent" >
5   -
6   - <item android:id="@+id/connect"
7   - android:title="Conectar" />
8   - <item android:id="@+id/disconnect"
9   - android:title="Desconectar" />
10   - <item android:id="@+id/settings"
11   - android:title="Configurar" />
12   - <item android:id="@+id/about"
13   - android:title="Versão" />
14   -</menu>
android/res/raw/index.html
... ... @@ -1,45 +0,0 @@
1   -<!DOCTYPE html>
2   -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pt-br" lang="pt-br" >
3   -<head>
4   - <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
5   - <meta name="author" content="Perry Werneck, perry@werneck.eti.br">
6   - <link rel="stylesheet" type="text/css" href="file:theme.css" />
7   - <script type="text/javascript" src="file:jsmain.js"></script>
8   - <title>pw3270</title>
9   -</head>
10   -
11   -<body onload="terminalUpdate()">
12   -<div id="terminal">
13   -</div>
14   -
15   -<div id="pfbar">
16   -<div class="pfkey"><a href="#" onclick="return pfkey(1)">PF1</a></div>
17   -<div class="pfkey"><a href="#" onclick="return pfkey(2)">PF2</a></div>
18   -<div class="pfkey"><a href="#" onclick="return pfkey(3)">PF3</a></div>
19   -<div class="pfkey"><a href="#" onclick="return pfkey(4)">PF4</a></div>
20   -<div class="pfkey"><a href="#" onclick="return pfkey(5)">PF5</a></div>
21   -<div class="pfkey"><a href="#" onclick="return pfkey(6)">PF6</a></div>
22   -<div class="pfkey"><a href="#" onclick="return pfkey(7)">PF7</a></div>
23   -<div class="pfkey"><a href="#" onclick="return pfkey(8)">PF8</a></div>
24   -<div class="pfkey"><a href="#" onclick="return pfkey(9)">PF9</a></div>
25   -<div class="pfkey"><a href="#" onclick="return pfkey(10)">PF10</a></div>
26   -<div class="pfkey"><a href="#" onclick="return pfkey(11)">PF11</a></div>
27   -<div class="pfkey"><a href="#" onclick="return pfkey(12)">PF12</a></div>
28   -<div class="pfkey"><a href="#" onclick="return xmit()">ENTER</a></div>
29   -<br />
30   -<div class="pfkey"><a href="#" onclick="return pfkey(13)">PF13</a></div>
31   -<div class="pfkey"><a href="#" onclick="return pfkey(14)">PF14</a></div>
32   -<div class="pfkey"><a href="#" onclick="return pfkey(15)">PF15</a></div>
33   -<div class="pfkey"><a href="#" onclick="return pfkey(16)">PF16</a></div>
34   -<div class="pfkey"><a href="#" onclick="return pfkey(17)">PF17</a></div>
35   -<div class="pfkey"><a href="#" onclick="return pfkey(18)">PF18</a></div>
36   -<div class="pfkey"><a href="#" onclick="return pfkey(19)">PF19</a></div>
37   -<div class="pfkey"><a href="#" onclick="return pfkey(20)">PF20</a></div>
38   -<div class="pfkey"><a href="#" onclick="return pfkey(21)">PF21</a></div>
39   -<div class="pfkey"><a href="#" onclick="return pfkey(22)">PF22</a></div>
40   -<div class="pfkey"><a href="#" onclick="return pfkey(23)">PF23</a></div>
41   -<div class="pfkey"><a href="#" onclick="return pfkey(24)">PF24</a></div>
42   -<div class="pfkey"><a href="#" onclick="return eraseinput()">Clear</a></div>
43   -</div>
44   -</body>
45   -</html>
android/res/raw/jsmain.js
... ... @@ -1,85 +0,0 @@
1   -
2   -function setupWindow()
3   -{
4   - var input = document.getElementsByTagName("input");
5   -
6   - window.onkeypress = function()
7   - {
8   - if(event.keyCode == 13)
9   - {
10   - xmit();
11   - return false;
12   - }
13   - return true;
14   - }
15   -
16   - for(var i=0;i<input.length;i++)
17   - {
18   - if(input[i].name.substr(0,2) == "PF")
19   - {
20   - input[i].pfkey = parseInt(input[i].name.substr(3));
21   -
22   - input[i].onclick = function()
23   - {
24   - pw3270.pfkey(this.pfkey);
25   - }
26   - }
27   -
28   - }
29   -
30   -}
31   -
32   -function terminalUpdate()
33   -{
34   - if(pw3270.isConnected())
35   - {
36   - document.getElementById("terminal").innerHTML = pw3270.getscreencontents();
37   - document.getElementById("pfbar").style.visible = "visible";
38   - document.getElementById("terminal").style.visible = "visible";
39   - }
40   - else
41   - {
42   - document.getElementById("pfbar").style.visible = "hidden";
43   - document.getElementById("terminal").style.visible = "hidden";
44   - document.getElementById("pfbar").innerHTML = "";
45   - document.getElementById("terminal").innerHTML = "";
46   - }
47   -
48   - setupWindow();
49   - pw3270.ready();
50   -}
51   -
52   -function pfkey(id)
53   -{
54   - pw3270.busy();
55   - pw3270.pfkey(id);
56   - return false;
57   -}
58   -
59   -function xmit()
60   -{
61   - var form = document.getElementById("form3270");
62   -
63   - pw3270.busy();
64   -
65   - if(form != undefined)
66   - {
67   - for(var i=0;i < form.elements.length;i++)
68   - {
69   - if(form.elements[i].name.substr(0,1) == "F")
70   - {
71   - var offset = parseInt(form.elements[i].name.substr(1),10);
72   - pw3270.setStringAt(offset,form.elements[i].value);
73   - }
74   - }
75   - }
76   -
77   - pw3270.sendEnter();
78   -
79   - return false;
80   -}
81   -
82   -function eraseinput()
83   -{
84   - return false;
85   -}
android/res/raw/theme.css
... ... @@ -1,479 +0,0 @@
1   -
2   -body
3   -{
4   - background-color: black;
5   - color: green;
6   -}
7   -
8   -body, input
9   -{
10   - font-family: courier;
11   - font-size: 20px;
12   -}
13   -
14   -#terminal
15   -{
16   - width: 49em;
17   -}
18   -
19   -input
20   -{
21   - border: none;
22   - padding: 0px;
23   - background-color: black;
24   - color: #ffff00;
25   - margin-left: 0.5em;
26   - margin-right: 0.5em;
27   - border-radius: 3px;
28   - outline:none;
29   -}
30   -
31   -
32   -input:focus
33   -{
34   - background-color: #303030;
35   -}
36   -
37   -input[type="text"], input[type="password"], input[type="text"]:focus, input[type="password"]:focus
38   -{
39   - background-color: #303030;
40   -}
41   -
42   -#terminal
43   -{
44   - z-index: 10;
45   - background-color: black;
46   -}
47   -
48   -#pfbar
49   -{
50   - z-index: -1;
51   - width: 48em;
52   - background: black;
53   - color: white;
54   - text-align: left;
55   - border-top: 1px solid #fff;
56   -}
57   -
58   -a
59   -{
60   - text-decoration: none;
61   - color: black;
62   -}
63   -
64   -.pfkey
65   -{
66   - margin: 1px;
67   - background: gray;
68   - color: black;
69   - width: 3.9em;
70   - border: 1px solid darkgray;
71   - text-decoration: none;
72   - font-size: 15px;
73   - font-family: arial;
74   - display: inline-block;
75   - text-align: center;
76   - border-radius: 3px;
77   -}
78   -
79   -.IW001
80   -{
81   - width: 1.5em;
82   -}
83   -
84   -.IW002
85   -{
86   - width: 1.3em;
87   -}
88   -
89   -.IW003
90   -{
91   - width: 2.0em;
92   -}
93   -
94   -.IW004
95   -{
96   - width: 2.6em;
97   -}
98   -
99   -.IW005
100   -{
101   - width: 3.2em;
102   -}
103   -
104   -.IW006
105   -{
106   - width: 3.8em;
107   -}
108   -
109   -.IW007
110   -{
111   - width: 4.4em;
112   -}
113   -
114   -.IW008
115   -{
116   - width: 5em;
117   -}
118   -
119   -.IW009
120   -{
121   - width: 5.6em;
122   -}
123   -
124   -.IW010
125   -{
126   - width: 6.2em;
127   -}
128   -
129   -.IW011
130   -{
131   - width: 6.8em;
132   -}
133   -
134   -.IW012
135   -{
136   - width: 7.4em;
137   -}
138   -
139   -.IW013
140   -{
141   - width: 8.0em;
142   -}
143   -
144   -.IW014
145   -{
146   - width: 8.6em;
147   -}
148   -
149   -.IW015
150   -{
151   - width: 9.2em;
152   -}
153   -
154   -.IW016
155   -{
156   - width: 9.8em;
157   -}
158   -
159   -.IW017
160   -{
161   - width: 10.4em;
162   -}
163   -
164   -.IW018
165   -{
166   - width: 11em;
167   -}
168   -
169   -.IW019
170   -{
171   - width: 11.6em;
172   -}
173   -
174   -.IW020
175   -{
176   - width: 12.2em;
177   -}
178   -
179   -.IW021
180   -{
181   - width: 12.8em;
182   -}
183   -
184   -.IW022
185   -{
186   - width: 13.4em;
187   -}
188   -
189   -.IW023
190   -{
191   - width: 14em;
192   -}
193   -
194   -.IW024
195   -{
196   - width: 14.6em;
197   -}
198   -
199   -.IW025
200   -{
201   - width: 15.2em;
202   -}
203   -
204   -.IW026
205   -{
206   - width: 15.8em;
207   -}
208   -
209   -.IW027
210   -{
211   - width: 16.4em;
212   -}
213   -
214   -.IW028
215   -{
216   - width: 17em;
217   -}
218   -
219   -.IW029
220   -{
221   - width: 17.6em;
222   -}
223   -
224   -.IW030
225   -{
226   - width: 18.2em;
227   -}
228   -
229   -.IW031
230   -{
231   - width: 18.8em;
232   -}
233   -
234   -.IW032
235   -{
236   - width: 19.4em;
237   -}
238   -
239   -.IW033
240   -{
241   - width: 20em;
242   -}
243   -
244   -.IW034
245   -{
246   - width: 20.6em;
247   -}
248   -
249   -.IW035
250   -{
251   - width: 21.2em;
252   -}
253   -
254   -.IW036
255   -{
256   - width: 21.8em;
257   -}
258   -
259   -.IW037
260   -{
261   - width: 22.4em;
262   -}
263   -
264   -.IW038
265   -{
266   - width: 23em;
267   -}
268   -
269   -.IW039
270   -{
271   - width: 23.6em;
272   -}
273   -
274   -.IW040
275   -{
276   - width: 24.2em;
277   -}
278   -
279   -.IW041
280   -{
281   - width: 24.8em;
282   -}
283   -
284   -.IW042
285   -{
286   - width: 25.4em;
287   -}
288   -
289   -.IW043
290   -{
291   - width: 26em;
292   -}
293   -
294   -.IW044
295   -{
296   - width: 26.6em;
297   -}
298   -
299   -.IW045
300   -{
301   - width: 27.2em;
302   -}
303   -
304   -.IW046
305   -{
306   - width: 27.8em;
307   -}
308   -
309   -.IW047
310   -{
311   - width: 28.4em;
312   -}
313   -
314   -.IW048
315   -{
316   - width: 29em;
317   -}
318   -
319   -.IW049
320   -{
321   - width: 29.6em;
322   -}
323   -
324   -.IW050
325   -{
326   - width: 30.2em;
327   -}
328   -
329   -.IW051
330   -{
331   - width: 30.8em;
332   -}
333   -
334   -.IW052
335   -{
336   - width: 31.4em;
337   -}
338   -
339   -.IW053
340   -{
341   - width: 32em;
342   -}
343   -
344   -.IW054
345   -{
346   - width: 32.6em;
347   -}
348   -
349   -.IW055
350   -{
351   - width: 33.2em;
352   -}
353   -
354   -.IW056
355   -{
356   - width: 33.8em;
357   -}
358   -
359   -.IW057
360   -{
361   - width: 34.4em;
362   -}
363   -
364   -.IW058
365   -{
366   - width: 35em;
367   -}
368   -
369   -.IW059
370   -{
371   - width: 35.6em;
372   -}
373   -
374   -.IW060
375   -{
376   - width: 36.2em;
377   -}
378   -
379   -.IW061
380   -{
381   - width: 36.8em;
382   -}
383   -
384   -.IW062
385   -{
386   - width: 37.4em;
387   -}
388   -
389   -.IW063
390   -{
391   - width: 38em;
392   -}
393   -
394   -.IW064
395   -{
396   - width: 38.6em;
397   -}
398   -
399   -.IW065
400   -{
401   - width: 39.2em;
402   -}
403   -
404   -.IW066
405   -{
406   - width: 39.8em;
407   -}
408   -
409   -.IW067
410   -{
411   - width: 40.4em;
412   -}
413   -
414   -.IW068
415   -{
416   - width: 41em;
417   -}
418   -
419   -.IW069
420   -{
421   - width: 41.6em;
422   -}
423   -
424   -.IW070
425   -{
426   - width: 42.2em;
427   -}
428   -
429   -.IW071
430   -{
431   - width: 42.8em;
432   -}
433   -
434   -.IW072
435   -{
436   - width: 43.4em;
437   -}
438   -
439   -.IW073
440   -{
441   - width: 44em;
442   -}
443   -
444   -.IW074
445   -{
446   - width: 44.6em;
447   -}
448   -
449   -.IW075
450   -{
451   - width: 45.2em;
452   -}
453   -
454   -.IW076
455   -{
456   - width: 45.8em;
457   -}
458   -
459   -.IW077
460   -{
461   - width: 46.4em;
462   -}
463   -
464   -.IW078
465   -{
466   - width: 47em;
467   -}
468   -
469   -.IW079
470   -{
471   - width: 47.6em;
472   -}
473   -
474   -.IW080
475   -{
476   - margin-left: 0px;
477   - margin-right: 0px;
478   - width: 48em;
479   -}
android/res/values/drawables.xml
... ... @@ -1,4 +0,0 @@
1   -<?xml version="1.0" encoding="utf-8"?>
2   -<resources>
3   -
4   -</resources>
android/res/values/strings.xml
... ... @@ -1,24 +0,0 @@
1   -<?xml version="1.0" encoding="utf-8"?>
2   -<resources>
3   - <string name="app_name">PW3270</string>
4   - <string-array name="program_msg">
5   - <item></item>
6   - <item>X System</item>
7   - <item>X Aguarde</item>
8   - <item>Conectado</item>
9   - <item>Desconectado</item>
10   - <item>X Aguardando</item>
11   - <item>X -f</item>
12   - <item>X Protegido</item>
13   - <item>X Numérico</item>
14   - <item>X Overflow</item>
15   - <item>X Inhibit</item>
16   - <item>X Lock</item>
17   - <item>X</item>
18   - <item>X Resolvendo</item>
19   - <item>X Conectando</item>
20   - </string-array>
21   - <string name="wait">Em processamento</string>
22   -
23   -
24   -</resources>
25 0 \ No newline at end of file
android/res/xml/preferences.xml
... ... @@ -1,60 +0,0 @@
1   -<?xml version="1.0" encoding="utf-8"?>
2   -
3   -<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
4   -
5   - <PreferenceCategory
6   - android:title="Configuração pw3270"
7   - android:key="host_category">
8   -
9   - <EditTextPreference
10   - android:key="hostname"
11   - android:title="Endereço do host"
12   - android:summary="Define o endereço do host a conectar"
13   - android:dialogTitle="Endereço do servidor"
14   - android:dialogMessage="Informe nome do servidor"
15   - android:defaultValue="" />
16   -
17   - <EditTextPreference
18   - android:key="port"
19   - android:title="Porta a conectar"
20   - android:summary="Define a porta a conectar"
21   - android:dialogTitle="Porta de conexão"
22   - android:dialogMessage="Informe a porta para conexão"
23   - android:defaultValue="23" />
24   -
25   - <CheckBoxPreference
26   - android:key="ssl"
27   - android:summaryOff="Não usar SSL nas conexões ao host"
28   - android:summaryOn="Usar SSL nas conexões ao host"
29   - android:title="Conexão segura"
30   - android:defaultValue="false"
31   - />
32   -
33   - <CheckBoxPreference
34   - android:key="autoconnect"
35   - android:summaryOn="Conectar ao iniciar"
36   - android:summaryOff="Não conectar ao iniciar"
37   - android:title="Conecta ao host ao iniciar"
38   - android:defaultValue="true"
39   - />
40   -
41   - <CheckBoxPreference
42   - android:key="reconnect"
43   - android:summaryOn="Reconectar automaticamente"
44   - android:summaryOff="Não reconectar automaticamente"
45   - android:title="Reconexão automática"
46   - android:defaultValue="false"
47   - />
48   -
49   - <EditTextPreference
50   - android:key="logonstring"
51   - android:title="String de conexão"
52   - android:summary="Define texto a enviar ao conectar"
53   - android:dialogTitle="String de conexão"
54   - android:dialogMessage="Informe texto a enviar logo após a conexão"
55   - android:defaultValue="" />
56   -
57   - </PreferenceCategory>
58   -
59   -</PreferenceScreen>
60   -
android/src/br/com/bb/pw3270/PW3270Activity.java
... ... @@ -1,227 +0,0 @@
1   -/*
2   - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
3   - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
4   - * aplicativos mainframe. Registro no INPI sob o nome G3270.
5   - *
6   - * Copyright (C) <2008> <Banco do Brasil S.A.>
7   - *
8   - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
9   - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
10   - * Free Software Foundation.
11   - *
12   - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
13   - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
14   - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
15   - * obter mais detalhes.
16   - *
17   - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
18   - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin
19   - * St, Fifth Floor, Boston, MA 02110-1301 USA
20   - *
21   - * Este programa está nomeado como PW3270Activity.hava e possui - linhas de
22   - * código.
23   - *
24   - * Contatos:
25   - *
26   - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
27   - * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)
28   - *
29   - */
30   -
31   -package br.com.bb.pw3270;
32   -
33   -import android.app.Activity;
34   -import android.app.AlertDialog;
35   -import android.os.Bundle;
36   -import android.util.Log;
37   -import android.content.Intent;
38   -import android.content.res.*;
39   -import android.webkit.WebResourceResponse;
40   -import android.webkit.WebView;
41   -import android.webkit.WebViewClient;
42   -import android.app.ProgressDialog;
43   -import android.view.Menu;
44   -import android.view.MenuInflater;
45   -import android.view.MenuItem;
46   -import android.widget.ImageView;
47   -import android.widget.TextView;
48   -import android.content.Context;
49   -import android.view.LayoutInflater;
50   -import android.view.View;
51   -import android.view.ViewGroup;
52   -
53   -// import java.io.InputStream;
54   -
55   -// import android.app.Dialog;
56   -
57   -public class PW3270Activity extends Activity
58   -{
59   - private static final String TAG = "pw3270";
60   - private static lib3270 host = null;
61   -
62   -
63   - /** Called when the activity is first created. */
64   - @Override
65   - public void onCreate(Bundle savedInstanceState)
66   - {
67   - super.onCreate(savedInstanceState);
68   - initUI();
69   - }
70   -
71   - protected void initUI()
72   - {
73   - if(host == null)
74   - {
75   - host = new lib3270(this)
76   - {
77   - public String getProgramMessageText(int id)
78   - {
79   - String message[] = res.getStringArray(R.array.program_msg);
80   - try
81   - {
82   - return message[id];
83   - } catch(Exception e)
84   - {
85   - return e.getLocalizedMessage();
86   - }
87   -
88   - }
89   - };
90   - }
91   - else
92   - {
93   - host.setActivity(this);
94   - }
95   -
96   - Log.d(TAG, "Initializing UI");
97   -
98   - host.dlgSysMessage = new ProgressDialog(this);
99   - host.dlgSysMessage.setCancelable(false);
100   - host.dlgSysMessage.setTitle(host.res.getString(R.string.wait));
101   -
102   - // Reference:
103   - // http://developer.android.com/reference/android/webkit/WebView.html
104   - host.setView(new WebView(this)).setWebViewClient(new WebViewClient()
105   - {
106   -
107   - @Override
108   - public WebResourceResponse shouldInterceptRequest(WebView view, String url)
109   - {
110   - int id = R.raw.index;
111   - String mime = "text/html";
112   - int pos = url.lastIndexOf("/");
113   -
114   - if(pos >=0 )
115   - url = url.substring(pos+1);
116   -
117   - Log.i(TAG,"Loading [" + url + "]");
118   -
119   - if(url.equalsIgnoreCase("jsmain.js"))
120   - {
121   - id = R.raw.jsmain;
122   - }
123   - else if(url.equalsIgnoreCase("theme.css"))
124   - {
125   - mime = "text/css";
126   - id = R.raw.theme;
127   - }
128   -
129   - // http://developer.android.com/reference/android/webkit/WebResourceResponse.html
130   - return new WebResourceResponse(mime,"utf-8",host.mainact.getResources().openRawResource(id));
131   - }
132   -
133   - });
134   -
135   - setContentView(host.view);
136   -
137   - host.view.loadUrl("file:index.html");
138   - }
139   -
140   - @Override
141   - public boolean onCreateOptionsMenu(Menu menu)
142   - {
143   - MenuInflater inflater = getMenuInflater();
144   - Log.d(TAG,"Popup menu");
145   - inflater.inflate(R.layout.menu, menu);
146   - return true;
147   - }
148   -
149   - @Override
150   - public boolean onOptionsItemSelected(MenuItem item)
151   - {
152   - // Handle item selection
153   - switch (item.getItemId())
154   - {
155   - case R.id.connect:
156   - host.connect();
157   - break;
158   -
159   - case R.id.disconnect:
160   - host.disconnect();
161   - break;
162   -
163   - case R.id.settings:
164   - Intent myIntent = new Intent(host.view.getContext(), SettingsActivity.class);
165   - startActivityForResult(myIntent, 0);
166   - break;
167   -
168   - case R.id.about:
169   - showAboutDialog();
170   - break;
171   -
172   - default:
173   - return super.onOptionsItemSelected(item);
174   - }
175   - return true;
176   -
177   - }
178   -
179   - private void showAboutDialog()
180   - {
181   - AlertDialog.Builder builder;
182   - AlertDialog alertDialog;
183   - Context mContext = getApplicationContext();
184   -
185   - LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(LAYOUT_INFLATER_SERVICE);
186   -
187   - View layout = inflater.inflate(R.layout.about, (ViewGroup) findViewById(R.id.layout_root));
188   -
189   - TextView text = (TextView) layout.findViewById(R.id.text);
190   - text.setText(host.res.getString(R.string.app_name) + " Vrs " + host.getVersion() + "-" + host.getRevision());
191   -
192   - ImageView image = (ImageView) layout.findViewById(R.id.image);
193   - image.setImageResource(R.drawable.ic_launcher);
194   -
195   - builder = new AlertDialog.Builder(this);
196   - builder.setView(layout);
197   - alertDialog = builder.create();
198   -
199   - alertDialog.show();
200   - }
201   -
202   - @Override
203   - public void onConfigurationChanged(Configuration newConfig)
204   - {
205   - Log.d(TAG, "Configuration Changed");
206   - super.onConfigurationChanged(newConfig);
207   - initUI();
208   - }
209   -
210   - @Override
211   - protected void onSaveInstanceState(Bundle outState)
212   - {
213   - super.onSaveInstanceState(outState);
214   - // Save the state of the WebView
215   - host.view.saveState(outState);
216   - }
217   -
218   - @Override
219   - protected void onRestoreInstanceState(Bundle savedInstanceState)
220   - {
221   - super.onRestoreInstanceState(savedInstanceState);
222   - // Restore the state of the WebView
223   - host.view.restoreState(savedInstanceState);
224   - host.view.reload();
225   - }
226   -
227   -}
android/src/br/com/bb/pw3270/SettingsActivity.java
... ... @@ -1,94 +0,0 @@
1   -/*
2   - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
3   - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
4   - * aplicativos mainframe. Registro no INPI sob o nome G3270.
5   - *
6   - * Copyright (C) <2008> <Banco do Brasil S.A.>
7   - *
8   - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
9   - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
10   - * Free Software Foundation.
11   - *
12   - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
13   - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
14   - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
15   - * obter mais detalhes.
16   - *
17   - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
18   - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin
19   - * St, Fifth Floor, Boston, MA 02110-1301 USA
20   - *
21   - * Este programa está nomeado como SettingsActivity.hava e possui - linhas de
22   - * código.
23   - *
24   - * Contatos:
25   - *
26   - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
27   - * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)
28   - *
29   - */
30   -
31   -package br.com.bb.pw3270;
32   -
33   -import android.os.Bundle;
34   -import android.preference.Preference;
35   -import android.preference.PreferenceFragment;
36   -import android.app.Activity;
37   -
38   -public class SettingsActivity extends Activity
39   -{
40   - public static class SettingsFragment extends PreferenceFragment
41   - {
42   - private class stringSetting implements Preference.OnPreferenceChangeListener
43   - {
44   -
45   - public stringSetting(Preference p)
46   - {
47   - String text = p.getSharedPreferences().getString(p.getKey(),"");
48   -
49   - if(text != "")
50   - p.setSummary(text);
51   -
52   - p.setOnPreferenceChangeListener(this);
53   - }
54   -
55   - public boolean onPreferenceChange(Preference p, Object value)
56   - {
57   - p.setSummary((String) value);
58   - return true;
59   - }
60   - }
61   -
62   - @Override
63   - public void onCreate(Bundle savedInstanceState)
64   - {
65   - super.onCreate(savedInstanceState);
66   -
67   - // Load the preferences from an XML resource
68   - addPreferencesFromResource(R.xml.preferences);
69   -
70   - // Update summary from settings
71   - new stringSetting(findPreference("hostname"));
72   - new stringSetting(findPreference("port"));
73   - new stringSetting(findPreference("logonstring"));
74   -
75   - }
76   -
77   -
78   - }
79   -
80   - @Override
81   - protected void onCreate(Bundle savedInstanceState)
82   - {
83   - super.onCreate(savedInstanceState);
84   -
85   - // Display the fragment as the main content.
86   - getFragmentManager().beginTransaction()
87   - .replace(android.R.id.content, new SettingsFragment())
88   - .commit();
89   - }
90   -
91   -}
92   -
93   -
94   -
android/src/br/com/bb/pw3270/lib3270.java
... ... @@ -1,687 +0,0 @@
1   -/*
2   - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
3   - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
4   - * aplicativos mainframe. Registro no INPI sob o nome G3270. Registro no INPI sob o nome G3270.
5   - *
6   - * Copyright (C) <2008> <Banco do Brasil S.A.>
7   - *
8   - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
9   - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
10   - * Free Software Foundation.
11   - *
12   - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
13   - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
14   - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
15   - * obter mais detalhes.
16   - *
17   - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
18   - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin
19   - * St, Fifth Floor, Boston, MA 02110-1301 USA
20   - *
21   - * Este programa está nomeado como lib3270.java e possui - linhas de código.
22   - *
23   - * Contatos:
24   - *
25   - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
26   - *
27   - */
28   -
29   -package br.com.bb.pw3270;
30   -
31   -import java.lang.Thread;
32   -
33   -import android.app.Activity;
34   -import android.app.AlertDialog;
35   -import android.app.ProgressDialog;
36   -import android.content.SharedPreferences;
37   -import android.content.res.Resources;
38   -import android.os.Handler;
39   -import android.os.Message;
40   -import android.os.CountDownTimer;
41   -import android.preference.PreferenceManager;
42   -import android.util.Log;
43   -import android.webkit.WebChromeClient;
44   -// import android.webkit.WebResourceResponse;
45   -import android.webkit.WebView;
46   -// import android.webkit.WebViewClient;
47   -import javax.net.SocketFactory;
48   -import java.net.Socket;
49   -import javax.net.ssl.SSLSocketFactory;
50   -import java.io.DataInputStream;
51   -import java.io.DataOutputStream;
52   -
53   -// import java.util.Vector;
54   -
55   -public abstract class lib3270
56   -{
57   - private static final String TAG = "lib3270";
58   -
59   - protected int screenState = -1;
60   -
61   - private lib3270 hSession = this;
62   -
63   - public ProgressDialog dlgSysMessage = null;
64   - public WebView view = null;
65   - public Resources res = null;
66   - public Activity mainact = null;
67   -
68   - private static boolean initialized = false;
69   - private static NetworkThread mainloop = null;
70   - private static boolean connected = false;
71   - private static boolean reconnect = false;
72   - private static boolean refresh = true;
73   - private static Socket sock = null;
74   -
75   - private static DataOutputStream outData = null;
76   - private static DataInputStream inData = null;
77   -
78   - protected SharedPreferences settings;
79   -
80   - // Define the Handler that receives messages from the thread
81   - final Handler mHandler = new Handler()
82   - {
83   - public void handleMessage(Message msg)
84   - {
85   - switch (msg.what)
86   - {
87   - case 0: // Connection lost
88   - reload();
89   - if(!hSession.isConnected() && settings.getString("hostname","") != "" && settings.getBoolean("reconnect",false))
90   - {
91   - Log.d(TAG,"Connection lost, reconnecting");
92   - connect();
93   - }
94   - break;
95   -
96   - case 1: // OIA message has changed
97   - showProgramMessage(msg.arg1);
98   - break;
99   -
100   - case 2: // Screen changed
101   - Log.d(TAG, "Screen changed");
102   - screenState = 1;
103   - break;
104   -
105   - case 3: // Popup
106   - popupMessageInfo popup = (popupMessageInfo) msg.obj;
107   - showPopupMessage(msg.arg1, popup.title, popup.text, popup.info);
108   - break;
109   -
110   - case 4: // erase
111   - if(screenState != 2)
112   - {
113   - screenState = 2;
114   - reload();
115   - }
116   - break;
117   -
118   - case 5: // ctlr_done
119   - break;
120   -
121   - case 7: // ready
122   - if(initialized)
123   - {
124   - dlgSysMessage.hide();
125   - }
126   - else
127   - {
128   - initialized = true;
129   - if(settings.getString("hostname","") != "" && settings.getBoolean("autoconnect",false))
130   - connect();
131   - else
132   - dlgSysMessage.hide();
133   - }
134   - break;
135   -
136   - case 8: // busy
137   - break;
138   -
139   - case 9: // Create timer
140   - new timer(((Long) msg.obj).longValue(), msg.arg1);
141   - break;
142   -
143   -/*
144   - case 10: // Run autostart
145   - String str = settings.getString("logonstring","");
146   - Log.v(TAG, "Logon string is \"" + str + "\"");
147   - if( str != "")
148   - runStartupString(str);
149   - break;
150   -*/
151   - }
152   - }
153   - };
154   -
155   -
156   - static
157   - {
158   - System.loadLibrary("3270");
159   - }
160   -
161   - lib3270(Activity act)
162   - {
163   - String toggle[] = { "dstrace", "screentrace", "eventtrace", "reconnect" };
164   -
165   - setActivity(act);
166   - this.screenState = -1;
167   -
168   - for(int f = 0; f < toggle.length; f++)
169   - setToggle(toggle[f],settings.getBoolean(toggle[f],false));
170   -
171   - }
172   -
173   - private class timer extends CountDownTimer
174   - {
175   - private long id;
176   - private lib3270 terminal;
177   -
178   - timer(long timer_id, int msec)
179   - {
180   - super(msec, msec);
181   -
182   - terminal = hSession;
183   - id = timer_id;
184   -
185   - Log.d(TAG, "Timer " + id + " set to " + msec + " ms");
186   -
187   - this.start();
188   - }
189   -
190   - public void onTick(long millisUntilFinished)
191   - {
192   - }
193   -
194   - public void onFinish()
195   - {
196   - Log.d(TAG, "Timer " + id + " finished");
197   -
198   - Thread t = new Thread()
199   - {
200   - public void run()
201   - {
202   - terminal.timerFinish(id);
203   - }
204   - };
205   -
206   - t.start();
207   - }
208   -
209   - }
210   -
211   - private class popupMessageInfo
212   - {
213   - public String title;
214   - public String text;
215   - public String info;
216   -
217   - popupMessageInfo(String title, String text, String info)
218   - {
219   - this.title = title;
220   - this.text = text;
221   - this.info = info;
222   - }
223   - }
224   -
225   - protected int send_data(byte[] data, int len)
226   - {
227   - Log.d(TAG, "Bytes a enviar: " + len);
228   -
229   - try
230   - {
231   - outData.write(data, 0, len);
232   - outData.flush();
233   - return len;
234   - }
235   - catch (Exception e)
236   - {
237   - String msg = e.getLocalizedMessage();
238   -
239   - if (msg == null)
240   - msg = e.toString();
241   -
242   - if (msg == null)
243   - msg = "";
244   -
245   - Log.d(TAG, "Erro ao enviar dados: " + msg);
246   -
247   - postPopup(1, "Desconectado", "Erro de comunicação ao enviar dados", msg);
248   -
249   - net_cleanup();
250   - }
251   - return -1;
252   - }
253   -
254   - // Main Thread
255   - private class NetworkThread extends Thread
256   - {
257   - private boolean connect()
258   - {
259   - // Connecta no host
260   - SocketFactory socketFactory;
261   - String hostname = settings.getString("hostname","");
262   - Integer port = Integer.valueOf(settings.getString("port", "23"));
263   -
264   - if (hostname == "" || port == 0)
265   - return false;
266   -
267   - postMessage(1, 14, 0);
268   -
269   - if(settings.getBoolean("ssl",false))
270   - {
271   - // Host é SSL
272   - socketFactory = SSLSocketFactory.getDefault();
273   - Log.v(TAG,"Conecting with SSLSocketFactory");
274   - }
275   - else
276   - {
277   - Log.v(TAG,"Conecting with SocketFactory");
278   - socketFactory = SocketFactory.getDefault();
279   - }
280   -
281   - try
282   - {
283   - Log.v(TAG,"Getting socket for " + hostname + ":" + port.toString());
284   - sock = socketFactory.createSocket(hostname, port);
285   -
286   - sock.setKeepAlive(true);
287   - // sock.setSoTimeout(1000);
288   -
289   - outData = new DataOutputStream(sock.getOutputStream());
290   - inData = new DataInputStream(sock.getInputStream());
291   - }
292   - catch (Exception e)
293   - {
294   - String msg = e.getLocalizedMessage();
295   -
296   - if (msg == null)
297   - msg = e.toString();
298   -
299   - if (msg == null)
300   - msg = "";
301   -
302   - Log.i(TAG, "Erro ao conectar: " + msg);
303   -
304   - postPopup(0, "Erro na conexão", "Não foi possível conectar", msg);
305   -
306   - return false;
307   - }
308   -
309   - Log.i(TAG, "Conectado ao host");
310   - return true;
311   -
312   - }
313   -
314   - public void run()
315   - {
316   - info(TAG, "Network thread started");
317   - reconnect = connected = connect();
318   -
319   - if (connected)
320   - {
321   - set_connection_status(true);
322   -
323   - try
324   - {
325   - sock.setSoTimeout(100);
326   - } catch (Exception e) { connected = false; }
327   -
328   - while (connected && sock.isConnected() )
329   - {
330   - try
331   - {
332   - byte[] in = new byte[16384];
333   -
334   - int sz = inData.read(in, 0, 16384);
335   -
336   - if (sz > 0)
337   - procRecvdata(in,sz);
338   -
339   - } catch (Exception e) { }
340   -
341   - }
342   -
343   - if(connected)
344   - {
345   - postPopup(1, "Desconectado", "Erro de comunicação ao receber dados", "");
346   - connected = false;
347   - }
348   - }
349   -
350   - Log.v(TAG, "Exiting communication thread");
351   -
352   - try
353   - {
354   - sock.close();
355   - }
356   - catch (Exception e) { }
357   -
358   - sock = null;
359   - outData = null;
360   - inData = null;
361   -
362   - set_connection_status(false);
363   -
364   - mainloop = null;
365   - info(TAG, "Network thread stopped");
366   -
367   - if(reconnect)
368   - postMessage(0, 0, 0); // Pede por reconexão
369   -
370   - }
371   -
372   - }
373   -
374   - public void postMessage(int what, int arg1, int arg2)
375   - {
376   - Message msg = mHandler.obtainMessage();
377   - msg.what = what;
378   - msg.arg1 = arg1;
379   - msg.arg2 = arg2;
380   - mHandler.sendMessage(msg);
381   - }
382   -
383   - public void postPopup(int type, String title, String text, String info)
384   - {
385   - Message msg = mHandler.obtainMessage();
386   - msg.what = 3;
387   - msg.arg1 = type;
388   - msg.obj = new popupMessageInfo(title, text, info);
389   - mHandler.sendMessage(msg);
390   - }
391   -
392   - void setActivity(Activity act)
393   - {
394   - this.mainact = act;
395   - this.settings = PreferenceManager.getDefaultSharedPreferences(act);
396   - this.res = act.getResources();
397   - }
398   -
399   - WebView setView(WebView v)
400   - {
401   - this.view = v;
402   -
403   - view.addJavascriptInterface(this, "pw3270");
404   -
405   - view.setWebChromeClient(new WebChromeClient());
406   -
407   - view.getSettings().setBuiltInZoomControls(true);
408   - view.getSettings().setSupportZoom(true);
409   - view.getSettings().setUseWideViewPort(true);
410   - view.getSettings().setLoadWithOverviewMode(true);
411   - view.getSettings().setJavaScriptEnabled(true);
412   -
413   - return view;
414   -
415   - }
416   -
417   - public abstract String getProgramMessageText(int id);
418   -
419   - /*---[ Signal methods ]--------------------------------------------------*/
420   -
421   - protected void showProgramMessage(int id)
422   - {
423   - switch(id)
424   - {
425   - case 0: // LIB3270_MESSAGE_NONE
426   - if(screenState != 0)
427   - {
428   - screenState = 0;
429   - reload();
430   - }
431   - break;
432   -
433   - case 4: // LIB3270_MESSAGE_DISCONNECTED
434   - Log.v(TAG, "Status changed to disconnected");
435   - connected = false;
436   - net_cleanup();
437   - reload();
438   - break;
439   -
440   - case 3: // LIB3270_MESSAGE_CONNECTED
441   - Log.v(TAG, "Status changed to connected");
442   - break;
443   -
444   - // 01 LIB3270_MESSAGE_SYSWAIT
445   - // 02 LIB3270_MESSAGE_TWAIT
446   - // 03 LIB3270_MESSAGE_CONNECTED
447   - // 05 LIB3270_MESSAGE_AWAITING_FIRST
448   - // 06 LIB3270_MESSAGE_MINUS
449   - // 07 LIB3270_MESSAGE_PROTECTED
450   - // 08 LIB3270_MESSAGE_NUMERIC
451   - // 09 LIB3270_MESSAGE_OVERFLOW
452   - // 10 LIB3270_MESSAGE_INHIBIT
453   - // 11 LIB3270_MESSAGE_KYBDLOCK
454   - // 12 LIB3270_MESSAGE_X
455   - // 13 LIB3270_MESSAGE_RESOLVING
456   - // 14 LIB3270_MESSAGE_CONNECTING
457   -
458   - default:
459   - dlgSysMessage.setMessage(getProgramMessageText(id));
460   - dlgSysMessage.show();
461   - }
462   - }
463   -
464   - protected void showPopupMessage(int type, String title, String text, String info)
465   - {
466   - /*
467   - Log.v(TAG,"Popup Message:");
468   - Log.v(TAG,title);
469   - Log.v(TAG,text);
470   - Log.v(TAG,info);
471   - */
472   -
473   - AlertDialog d = new AlertDialog.Builder(mainact).create();
474   -
475   - if(title != "")
476   - d.setTitle(title);
477   -
478   - if(text != "")
479   - d.setMessage(text);
480   -
481   - d.setCancelable(true);
482   - dlgSysMessage.hide();
483   - d.show();
484   - }
485   -
486   - protected void info(String tag, String msg)
487   - {
488   - Log.i(tag, msg);
489   - }
490   -
491   - protected void error(String tag, String msg)
492   - {
493   - Log.e(tag, msg);
494   - }
495   -
496   - protected void reload()
497   - {
498   - view.reload();
499   - }
500   -
501   - public void pfkey(int id)
502   - {
503   - sendPFkey(id);
504   - }
505   -
506   - public void xmit()
507   - {
508   - sendEnter();
509   - }
510   -
511   - public void ready()
512   - {
513   - postMessage(7, 0, 0);
514   - }
515   -
516   - public void busy()
517   - {
518   - postMessage(8, 0, 0);
519   - }
520   -
521   - /*
522   - public void showProgressDialog(String msg)
523   - {
524   - }
525   - */
526   -
527   - /*---[ External methods ]------------------------------------------------*/
528   -
529   - public int connect()
530   - {
531   - if(connected)
532   - {
533   - Log.v(TAG, "Already connected");
534   - return -1;
535   - }
536   -
537   - Log.v(TAG, "Connecting");
538   - if (mainloop == null)
539   - {
540   - info(TAG, "Starting comm thread");
541   - setStartupScript(settings.getString("logonstring",""));
542   - mainloop = new NetworkThread();
543   - mainloop.start();
544   - return 0;
545   - }
546   - Log.v(TAG, "Comm thread already active during connect");
547   - disconnect();
548   -
549   - return -1;
550   - }
551   -
552   - private int net_cleanup()
553   - {
554   - connected = false;
555   -/*
556   - if(sock != null)
557   - {
558   - Thread t = new Thread()
559   - {
560   - public void run()
561   - {
562   - Log.v(TAG, "Stopping network activity");
563   -
564   - if(sock.isConnected())
565   - {
566   - try
567   - {
568   - sock.shutdownInput();
569   - return;
570   - }
571   - catch(Exception e) { }
572   - }
573   -
574   - if(!(sock == null && sock.isClosed()))
575   - {
576   - try
577   - {
578   - sock.close();
579   - return;
580   - }
581   - catch(Exception e) { }
582   - }
583   - }
584   - };
585   -
586   - t.start();
587   - }
588   - */
589   - return 0;
590   - }
591   -
592   - public int disconnect()
593   - {
594   - Log.v(TAG, "Disconnecting");
595   - connected = reconnect = false;
596   - net_cleanup();
597   - return 0;
598   - }
599   -
600   - public void setStringAt(int offset, String str)
601   - {
602   - refresh = false;
603   - try {
604   - setTextAt(offset, str.getBytes(getEncoding()), str.length());
605   - } catch (Exception e) {
606   - }
607   - refresh = true;
608   - }
609   -
610   -// @SuppressWarnings("unused")
611   - public String getscreencontents()
612   - {
613   - String text;
614   -
615   - try
616   - {
617   - text = new String(getHTML(),getEncoding());
618   - }
619   - catch(Exception e)
620   - {
621   - Log.e(TAG,e.getLocalizedMessage());
622   - return "";
623   - }
624   -
625   - return text;
626   - }
627   -
628   -
629   - /*---[ Native calls ]----------------------------------------------------*/
630   - private native int processEvents();
631   -
632   - // private native int do_connect();
633   - private native void set_connection_status(boolean state);
634   -
635   - // Misc calls
636   - public native String getEncoding();
637   -
638   - public native String getVersion();
639   -
640   - public native String getRevision();
641   -
642   - public native void setToggle(String name, boolean state);
643   -
644   - // Network I/O
645   - public native void procRecvdata(byte[] data, int len);
646   -
647   - // Connect/Disconnect status
648   - public native void setHost(String host);
649   -
650   - public native String getHost();
651   -
652   - public native boolean isConnected();
653   -
654   - public native boolean isTerminalReady();
655   -
656   - // Timers
657   - protected void newTimer(long id, int msec)
658   - {
659   - Message msg = mHandler.obtainMessage();
660   -
661   - msg.what = 9; // MSG_CREATETIMER
662   - msg.arg1 = msec;
663   - msg.obj = new Long(id);
664   -
665   - mHandler.sendMessage(msg);
666   -
667   - }
668   -
669   - private native void timerFinish(long id);
670   -
671   - // Keyboard actions
672   - public native void sendEnter();
673   -
674   - public native void sendPFkey(int id);
675   -
676   - // Get/Set screen contents
677   - public native byte[] getHTML();
678   -
679   - public native byte[] getText();
680   -
681   - public native void setTextAt(int offset, byte[] str, int len);
682   -
683   - public native boolean in3270();
684   -
685   - public native void setStartupScript(String str);
686   -
687   -}
android/stacktrace.sh
... ... @@ -1,3 +0,0 @@
1   -#!/bin/bash -x
2   -adb logcat | ndk-stack -sym obj/local/armeabi
3   -
man/Makefile.in
... ... @@ -1 +0,0 @@
1   -man_MANS = pw3270.1 pw3270.5
man/man1/pw3270.1
... ... @@ -1,83 +0,0 @@
1   -.\" Process this file with
2   -.\" groff -man -Tascii foo.1
3   -.\"
4   -.TH PW3270 1 "JUNE 2012" pw3270 "User Manual"
5   -.SH NAME
6   -pw3270 \- a modern tn3270 emulator
7   -.SH SYNOPSIS
8   -.B pw3270 [-a
9   -.I application-name
10   -.B ] [-h
11   -.I hostname:port
12   -.B ] [-s
13   -.I session name
14   -.B ]
15   -.B ] [-c
16   -.I session colors
17   -.B ] [-t
18   -.I system type
19   -.B ] [-a
20   -.I application name
21   -.B ]
22   -.SH DESCRIPTION
23   -.B pw3270
24   -is a modern, GTK-based, completely free tn3270 emulator.
25   -
26   -Based on the original x3270 code by Paul Mattes, it was created originally for Banco do Brasil. It's now an official Brazilian Government Public Software project, and is used worldwide.
27   -
28   -pw3270 is fully themable, and each element on the screen can be individually customized through the configuration files. It also supports all kinds of monospaced TrueType and bitmap fonts your system already supports.
29   -
30   -pw3270 supports many advanced clipboard features, allowing you to copy and paste data on forms, respecting the individual fields and positions on screen.
31   -
32   -File transfers are supported, for uploads and downloads.
33   -
34   -Printing is implemented using the native GTK print dialogs.
35   -
36   -
37   -In addition to the modern GUI, a development library
38   -.BR lib3270 (3)
39   -has been created to allow you to create your own programs using the 3270 protocol.
40   -
41   -.SH OPTIONS
42   -.IP "--help"
43   -Shows the available options.
44   -.IP "-h hostname:port"
45   -Connects to the host and port specified. Use the form
46   -.I "L:hostname:port"
47   -for a secure (SSL) connection.
48   -.IP "-a application-name"
49   -Specifies an alternate application name. This is useful if you want to name each host window differently (with the service name or host address, for example). The default is to always name the window "pw3270".
50   -.IP "-s session-name"
51   -Specifies an anternate session-name. This affects some plugins who does IPC communications, like the dbus one.
52   -.IP "-c colors"
53   -Change the response to a Query(Color); when 8 pw3270 will respond with a list of 8 supported colors; when 16 the response will be a list of the 16 standard colors.
54   -.IP "-t System type"
55   -Change the host type parameter; this afects the file transfer (TSO or VM) and, for AS-400, the PFkey action.
56   -.SH FILES
57   -.IP "-l Send messages to syslog"
58   -Send application messages to system log.
59   -.IP "-S toggle1,toggle2,...,toggleN"
60   -Turn the informed toggles "ON"
61   -.IP "-R toggle1,toggle2,...,toggleN"
62   -Turn the informed toggles "OFF"
63   -.I /etc/pw3270.conf
64   -.RS
65   -The system wide configuration file. See
66   -.BR pw3270 (5)
67   -for further details.
68   -.RE
69   -.I ~/.config/pw3270.conf
70   -.RS
71   -Per user configuration file. See
72   -.BR pw3270 (5)
73   -for further details.
74   -.SH AUTHORS
75   -Perry Werneck <perry.werneck at gmail dot com>
76   -
77   -Erico Mendonca <erico.mendonca at gmail dot com>
78   -
79   -The official project page is located at http://www.softwarepublico.gov.br/dotlrn/clubs/pw3270 .
80   -
81   -.SH "SEE ALSO"
82   -.BR pw3270 (5)
83   -
man/man5/pw3270.5
... ... @@ -1,50 +0,0 @@
1   -.\" Process this file with
2   -.\" groff -man -Tascii foo.1
3   -.\"
4   -.TH PW3270 1 "JUNE 2012" pw3270 "User Manual"
5   -.SH NAME
6   -pw3270.conf \- configuration file for pw3270
7   -.SH SYNOPSIS
8   -This configuration file can be used to pre-customize some of pw3270's features.
9   -
10   -The order of precedence while searching for this file is:
11   -.IP "/etc/pw3270.conf"
12   -System-wide configuration.
13   -
14   -.IP "~/.config/pw3270.conf"
15   -User-specific configuration.
16   -
17   -.SH SECTIONS
18   -
19   -The file follows a windows-style INI file format, with section name headers in square brackets, and parameters in the "name=value" syntax.
20   -
21   -.IP "Section: view"
22   -
23   -Contains configuration relative to the GUI elements.
24   -
25   -.I toolbar.default
26   -.RS
27   -Indicates whether the main toolbar is visible or not.
28   -.B Default: true.
29   -
30   -.RE
31   -.IP "Section: host"
32   -
33   -Contains configuration relative to the hosts available for the user to connect to.
34   -
35   -.I uri
36   -.RS
37   -Hostname or IP address, in the format hostname:port. Use s:hostname:port for SSL connections.
38   -
39   -.RE
40   -
41   -.SH AUTHORS
42   -Perry Werneck <perry.werneck at gmail dot com>
43   -
44   -Erico Mendonca <erico.mendonca at gmail dot com>
45   -
46   -The official project page is located at http://www.softwarepublico.gov.br/dotlrn/clubs/pw3270 .
47   -
48   -.SH "SEE ALSO"
49   -.BR pw3270 (1)
50   -
pw3270.komodoproject
... ... @@ -1,254 +0,0 @@
1   -<?xml version="1.0" encoding="UTF-8"?>
2   -<!-- Komodo Project File - DO NOT EDIT -->
3   -<project id="835c3792-90af-274e-8705-405cacf376e1" kpf_version="5" name="pw3270.komodoproject">
4   -<preference-set idref="835c3792-90af-274e-8705-405cacf376e1">
5   - <long id="caretStyle">1</long>
6   - <long id="caretWidth">1</long>
7   - <boolean id="checkDiskFile">1</boolean>
8   - <boolean id="checkNetworkDiskFile">1</boolean>
9   - <long id="codeintel_highlight_variables_auto_delay">250</long>
10   - <boolean id="codeintel_highlight_variables_auto_keyboard">0</boolean>
11   - <boolean id="codeintel_highlight_variables_auto_mouse">1</boolean>
12   - <boolean id="codeintel_highlight_variables_match_prefix">0</boolean>
13   - <long id="codeintel_highlight_variables_min_auto_length">2</long>
14   - <boolean id="codeintel_highlight_variables_use_scope">1</boolean>
15   - <boolean id="dedentOnColon">0</boolean>
16   - <string id="defaultDateFormat">%25a %25b %25d %25H:%25M:%25S %25Y</string>
17   - <string id="donotask_action_close_deleted_files"></string>
18   - <string id="donotask_action_dragdrop_uri"></string>
19   - <string id="donotask_action_reload_changed_files"></string>
20   - <boolean id="donotask_buffer_conflicts_with_file_on_disk">0</boolean>
21   - <boolean id="donotask_close_deleted_files">0</boolean>
22   - <boolean id="donotask_dragdrop_uri">0</boolean>
23   - <boolean id="donotask_reload_changed_files">0</boolean>
24   - <boolean id="donotask_revert_buffer">0</boolean>
25   - <boolean id="donotask_treat_large_documents_as_text">0</boolean>
26   - <string id="editAutoIndentStyle">smart</string>
27   - <long id="editAutoWrapColumn">80</long>
28   - <boolean id="editBackspaceDedents">1</boolean>
29   - <boolean id="editElectricBrace">1</boolean>
30   - <boolean id="editFoldLines">1</boolean>
31   - <string id="editFoldStyle">squaretree</string>
32   - <boolean id="editRestoreFoldPoints">0</boolean>
33   - <boolean id="editSmartCutCopyWithoutSelection">1</boolean>
34   - <boolean id="editSmartSoftCharacters">1</boolean>
35   - <boolean id="editTabCompletes">0</boolean>
36   - <boolean id="editUseEdge">1</boolean>
37   - <boolean id="editUseLinting">1</boolean>
38   - <long id="editWordWrapIndentation">0</long>
39   - <long id="editWordWrapMarker">0</long>
40   - <long id="editWrapType">0</long>
41   - <boolean id="enableSmartSoftCharactersInsideLine">0</boolean>
42   - <boolean id="encodingAutoDetect">1</boolean>
43   - <string id="encodingDefault">mac-roman</string>
44   - <boolean id="encodingEnvironment">1</boolean>
45   - <boolean id="encodingHTML">0</boolean>
46   - <boolean id="encodingModeline">1</boolean>
47   - <boolean id="encodingXMLDec">1</boolean>
48   - <boolean id="foldSeparateBlockParts">0</boolean>
49   - <boolean id="hyperlinksEnableGotoDefinition">1</boolean>
50   - <boolean id="hyperlinksEnabled">1</boolean>
51   - <string relative="path" id="import_dirname"></string>
52   - <string id="import_exclude_matches">*.*~;*.bak;*.tmp;CVS;.#*;*.pyo;*.pyc;.svn;.git;.hg;.bzr;*%25*;tmp*.html;.DS_Store;*.swp;*.kpf;*.komodoproject;.komodotools;__pycache__</string>
53   - <string id="import_include_matches"></string>
54   - <boolean id="indentStringsAfterParens">0</boolean>
55   - <long id="indentWidth">4</long>
56   - <string id="jshintOptions"></string>
57   - <string id="jshint_linter_chooser">default</string>
58   - <string id="jshint_linter_specific"></string>
59   - <string id="jslintOptions"></string>
60   - <string id="jslint_linter_chooser">default</string>
61   - <string id="jslint_linter_specific"></string>
62   -<preference-set id="languages">
63   -<preference-set id="languages/Ada">
64   - <boolean id="Ada/newBOM">0</boolean>
65   - <string id="Ada/newEncoding">Default Encoding</string>
66   -</preference-set>
67   -<preference-set id="languages/Apache">
68   - <boolean id="Apache/newBOM">0</boolean>
69   - <string id="Apache/newEncoding">Default Encoding</string>
70   -</preference-set>
71   -<preference-set id="languages/Baan">
72   - <boolean id="Baan/newBOM">0</boolean>
73   - <string id="Baan/newEncoding">Default Encoding</string>
74   -</preference-set>
75   -<preference-set id="languages/Batch">
76   - <boolean id="Batch/newBOM">0</boolean>
77   - <string id="Batch/newEncoding">Default Encoding</string>
78   -</preference-set>
79   -<preference-set id="languages/Bullant">
80   - <boolean id="Bullant/newBOM">0</boolean>
81   - <string id="Bullant/newEncoding">Default Encoding</string>
82   -</preference-set>
83   -<preference-set id="languages/C#">
84   - <boolean id="C#/newBOM">0</boolean>
85   - <string id="C#/newEncoding">Default Encoding</string>
86   -</preference-set>
87   -<preference-set id="languages/C++">
88   - <boolean id="C++/newBOM">0</boolean>
89   - <string id="C++/newEncoding">utf-8</string>
90   -</preference-set>
91   -<preference-set id="languages/CSS">
92   - <boolean id="CSS/newBOM">0</boolean>
93   - <string id="CSS/newEncoding">Default Encoding</string>
94   -</preference-set>
95   -<preference-set id="languages/Diff">
96   - <boolean id="Diff/newBOM">0</boolean>
97   - <string id="Diff/newEncoding">Default Encoding</string>
98   -</preference-set>
99   -<preference-set id="languages/Eiffel">
100   - <boolean id="Eiffel/newBOM">0</boolean>
101   - <string id="Eiffel/newEncoding">Default Encoding</string>
102   -</preference-set>
103   -<preference-set id="languages/Errors">
104   - <boolean id="C++/newBOM">0</boolean>
105   - <string id="C++/newEncoding">Default Encoding</string>
106   -</preference-set>
107   -<preference-set id="languages/Fortran">
108   - <boolean id="Fortran/newBOM">0</boolean>
109   - <string id="Fortran/newEncoding">Default Encoding</string>
110   -</preference-set>
111   -<preference-set id="languages/Fortran 77">
112   - <boolean id="Fortran 77/newBOM">0</boolean>
113   - <string id="Fortran 77/newEncoding">Default Encoding</string>
114   -</preference-set>
115   -<preference-set id="languages/HTML">
116   - <boolean id="HTML/newBOM">0</boolean>
117   - <string id="HTML/newEncoding">Default Encoding</string>
118   -</preference-set>
119   -<preference-set id="languages/IDL">
120   - <boolean id="IDL/newBOM">0</boolean>
121   - <string id="IDL/newEncoding">Default Encoding</string>
122   -</preference-set>
123   -<preference-set id="languages/Java">
124   - <boolean id="Java/newBOM">0</boolean>
125   - <string id="Java/newEncoding">Default Encoding</string>
126   -</preference-set>
127   -<preference-set id="languages/JavaScript">
128   - <boolean id="JavaScript/newBOM">0</boolean>
129   - <string id="JavaScript/newEncoding">Default Encoding</string>
130   -</preference-set>
131   -<preference-set id="languages/LaTeX">
132   - <boolean id="LaTeX/newBOM">0</boolean>
133   - <string id="LaTeX/newEncoding">Default Encoding</string>
134   -</preference-set>
135   -<preference-set id="languages/Lisp">
136   - <boolean id="Lisp/newBOM">0</boolean>
137   - <string id="Lisp/newEncoding">Default Encoding</string>
138   -</preference-set>
139   -<preference-set id="languages/Lua">
140   - <boolean id="Lua/newBOM">0</boolean>
141   - <string id="Lua/newEncoding">Default Encoding</string>
142   -</preference-set>
143   -<preference-set id="languages/Makefile">
144   - <boolean id="Makefile/newBOM">0</boolean>
145   - <string id="Makefile/newEncoding">Default Encoding</string>
146   - <boolean id="useTabs">1</boolean>
147   -</preference-set>
148   -<preference-set id="languages/Matlab">
149   - <boolean id="Matlab/newBOM">0</boolean>
150   - <string id="Matlab/newEncoding">Default Encoding</string>
151   -</preference-set>
152   -<preference-set id="languages/PHP">
153   - <boolean id="PHP/newBOM">0</boolean>
154   - <string id="PHP/newEncoding">Default Encoding</string>
155   -</preference-set>
156   -<preference-set id="languages/Pascal">
157   - <boolean id="Pascal/newBOM">0</boolean>
158   - <string id="Pascal/newEncoding">Default Encoding</string>
159   -</preference-set>
160   -<preference-set id="languages/Perl">
161   - <boolean id="Perl/newBOM">0</boolean>
162   - <string id="Perl/newEncoding">Default Encoding</string>
163   -</preference-set>
164   -<preference-set id="languages/Python">
165   - <boolean id="Python/newBOM">0</boolean>
166   - <string id="Python/newEncoding">ascii</string>
167   -</preference-set>
168   -<preference-set id="languages/Python3">
169   - <boolean id="Python3/newBOM">0</boolean>
170   - <string id="Python3/newEncoding">ascii</string>
171   -</preference-set>
172   -<preference-set id="languages/RHTML">
173   - <boolean id="RHTML/newBOM">0</boolean>
174   - <string id="RHTML/newEncoding">Default Encoding</string>
175   - <long id="indentWidth">2</long>
176   -</preference-set>
177   -<preference-set id="languages/Ruby">
178   - <boolean id="Ruby/newBOM">0</boolean>
179   - <string id="Ruby/newEncoding">Default Encoding</string>
180   - <long id="indentWidth">2</long>
181   -</preference-set>
182   -<preference-set id="languages/SQL">
183   - <boolean id="SQL/newBOM">0</boolean>
184   - <string id="SQL/newEncoding">Default Encoding</string>
185   -</preference-set>
186   -<preference-set id="languages/Tcl">
187   - <boolean id="Tcl/newBOM">0</boolean>
188   - <string id="Tcl/newEncoding">Default Encoding</string>
189   -</preference-set>
190   -<preference-set id="languages/Text">
191   - <boolean id="Text/newBOM">0</boolean>
192   - <string id="Text/newEncoding">Default Encoding</string>
193   -</preference-set>
194   -<preference-set id="languages/VisualBasic">
195   - <boolean id="VisualBasic/newBOM">0</boolean>
196   - <string id="VisualBasic/newEncoding">utf-8</string>
197   -</preference-set>
198   -<preference-set id="languages/XML">
199   - <boolean id="XML/newBOM">0</boolean>
200   - <string id="XML/newEncoding">utf-8</string>
201   -</preference-set>
202   -<preference-set id="languages/XSLT">
203   - <boolean id="XSLT/newBOM">0</boolean>
204   - <string id="XSLT/newEncoding">utf-8</string>
205   -</preference-set>
206   -<preference-set id="languages/nnCrontab">
207   - <boolean id="nnCrontab/newBOM">0</boolean>
208   - <string id="nnCrontab/newEncoding">Default Encoding</string>
209   -</preference-set>
210   -</preference-set>
211   - <boolean id="lintClearOnTextChange">0</boolean>
212   - <long id="lintDelay">1000</long>
213   - <boolean id="lintEOLs">1</boolean>
214   - <boolean id="lintHTML5Lib">0</boolean>
215   - <boolean id="lintHTMLTidy">1</boolean>
216   - <boolean id="lintHTML_CheckWith_Perl_HTML_Lint">0</boolean>
217   - <boolean id="lintHTML_CheckWith_Perl_HTML_Tidy">0</boolean>
218   - <boolean id="lintJavaScriptEnableStrict">1</boolean>
219   - <boolean id="lintJavaScriptEnableWarnings">1</boolean>
220   - <boolean id="lintJavaScript_SpiderMonkey">1</boolean>
221   - <boolean id="lintWithJSHint">0</boolean>
222   - <boolean id="lintWithJSLint">0</boolean>
223   - <boolean id="lint_coffee_script">1</boolean>
224   - <boolean id="lint_python3_with_standard_python">1</boolean>
225   - <boolean id="lint_python_with_pychecker">0</boolean>
226   - <boolean id="lint_python_with_pyflakes">0</boolean>
227   - <boolean id="lint_python_with_pylint">0</boolean>
228   - <boolean id="lint_python_with_standard_python">1</boolean>
229   - <string id="perl_lintOption">cw</string>
230   - <boolean id="perl_lintOption_disableBeginBlocks">1</boolean>
231   - <boolean id="perl_lintOption_includeCurrentDirForLinter">1</boolean>
232   - <string id="perl_lintOption_perlCriticLevel">off</string>
233   - <string id="pychecker_checking_rcfile"></string>
234   - <string id="pychecker_wrapper_location"></string>
235   - <string id="pylint_checking_rcfile"></string>
236   - <string id="ruby_lintOption">cwT</string>
237   - <boolean id="scrollEndAtLastLine">0</boolean>
238   - <long id="scrollWidth">2000</long>
239   - <boolean id="scrollWidthTracking">0</boolean>
240   - <boolean id="select_most_recent_buffer_on_buffer_close">0</boolean>
241   - <boolean id="showEOL">0</boolean>
242   - <boolean id="showIndentationGuides">1</boolean>
243   - <boolean id="showLineNumbers">1</boolean>
244   - <boolean id="showWhitespace">0</boolean>
245   - <long id="tabWidth">8</long>
246   - <string id="tidy_accessibility">0</string>
247   - <string id="tidy_configpath"></string>
248   - <string id="tidy_errorlevel">errors</string>
249   - <boolean id="useSmartTabs">1</boolean>
250   - <boolean id="useTabs">1</boolean>
251   - <string id="userEnvironmentStartupOverride"></string>
252   - <long id="ySlop">5</long>
253   -</preference-set>
254   -</project>
pw3270.xcodeproj/project.pbxproj
... ... @@ -1,824 +0,0 @@
1   -// !$*UTF8*$!
2   -{
3   - archiveVersion = 1;
4   - classes = {
5   - };
6   - objectVersion = 46;
7   - objects = {
8   -
9   -/* Begin PBXFileReference section */
10   - C21BB73815D940960093E2FA /* Makefile.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Makefile.in; sourceTree = "<group>"; };
11   - C23EFD5315D99E2D00673C59 /* updateChangeLog.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = updateChangeLog.sh; sourceTree = "<group>"; };
12   - C272066315D7F88300CCCD22 /* configure.ac */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = configure.ac; sourceTree = "<group>"; };
13   - C272066715D7FBF700CCCD22 /* action_table.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = action_table.h; sourceTree = "<group>"; };
14   - C272066815D7FBF700CCCD22 /* actions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = actions.h; sourceTree = "<group>"; };
15   - C272066915D7FBF700CCCD22 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; };
16   - C272066A15D7FBF700CCCD22 /* config.h.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = config.h.in; sourceTree = "<group>"; };
17   - C272066B15D7FBF700CCCD22 /* filetransfer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = filetransfer.h; sourceTree = "<group>"; };
18   - C272066C15D7FBF700CCCD22 /* html.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = html.h; sourceTree = "<group>"; };
19   - C272066D15D7FBF700CCCD22 /* internals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = internals.h; sourceTree = "<group>"; };
20   - C272066E15D7FBF700CCCD22 /* log.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = log.h; sourceTree = "<group>"; };
21   - C272066F15D7FBF700CCCD22 /* macros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = macros.h; sourceTree = "<group>"; };
22   - C272067015D7FBF700CCCD22 /* popup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = popup.h; sourceTree = "<group>"; };
23   - C272067115D7FBF700CCCD22 /* selection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = selection.h; sourceTree = "<group>"; };
24   - C272067215D7FBF700CCCD22 /* session.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = session.h; sourceTree = "<group>"; };
25   - C272067315D7FBF700CCCD22 /* stamp-h1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "stamp-h1"; sourceTree = "<group>"; };
26   - C272067415D7FBF700CCCD22 /* trace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = trace.h; sourceTree = "<group>"; };
27   - C272067515D7FBF700CCCD22 /* lib3270.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lib3270.h; sourceTree = "<group>"; };
28   - C272067715D7FBF700CCCD22 /* pw3270.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pw3270.h; sourceTree = "<group>"; };
29   - C272067815D7FBF700CCCD22 /* rules.mak */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = rules.mak; sourceTree = "<group>"; };
30   - C272067915D7FBF700CCCD22 /* rules.mak.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = rules.mak.in; sourceTree = "<group>"; };
31   - C272067A15D7FBF700CCCD22 /* v3270.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = v3270.h; sourceTree = "<group>"; };
32   - C272067D15D7FBF700CCCD22 /* mkfb */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = mkfb; sourceTree = "<group>"; };
33   - C272067E15D7FBF700CCCD22 /* mkfb.dSYM */ = {isa = PBXFileReference; lastKnownFileType = wrapper.dsym; path = mkfb.dSYM; sourceTree = "<group>"; };
34   - C272068115D7FBF700CCCD22 /* ansi.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = ansi.o; sourceTree = "<group>"; };
35   - C272068215D7FBF700CCCD22 /* bounds.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = bounds.o; sourceTree = "<group>"; };
36   - C272068315D7FBF700CCCD22 /* charset.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = charset.o; sourceTree = "<group>"; };
37   - C272068415D7FBF700CCCD22 /* ctlr.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = ctlr.o; sourceTree = "<group>"; };
38   - C272068515D7FBF700CCCD22 /* fallbacks.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = fallbacks.o; sourceTree = "<group>"; };
39   - C272068615D7FBF700CCCD22 /* ft.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = ft.o; sourceTree = "<group>"; };
40   - C272068715D7FBF700CCCD22 /* ft_cut.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = ft_cut.o; sourceTree = "<group>"; };
41   - C272068815D7FBF700CCCD22 /* ft_dft.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = ft_dft.o; sourceTree = "<group>"; };
42   - C272068915D7FBF700CCCD22 /* glue.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = glue.o; sourceTree = "<group>"; };
43   - C272068A15D7FBF700CCCD22 /* host.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = host.o; sourceTree = "<group>"; };
44   - C272068B15D7FBF700CCCD22 /* html.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = html.o; sourceTree = "<group>"; };
45   - C272068C15D7FBF700CCCD22 /* iocalls.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = iocalls.o; sourceTree = "<group>"; };
46   - C272068D15D7FBF700CCCD22 /* kybd.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = kybd.o; sourceTree = "<group>"; };
47   - C272068E15D7FBF700CCCD22 /* log.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = log.o; sourceTree = "<group>"; };
48   - C272068F15D7FBF700CCCD22 /* macros.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = macros.o; sourceTree = "<group>"; };
49   - C272069015D7FBF700CCCD22 /* paste.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = paste.o; sourceTree = "<group>"; };
50   - C272069115D7FBF700CCCD22 /* proxy.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = proxy.o; sourceTree = "<group>"; };
51   - C272069215D7FBF700CCCD22 /* resolver.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = resolver.o; sourceTree = "<group>"; };
52   - C272069315D7FBF700CCCD22 /* resources.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = resources.o; sourceTree = "<group>"; };
53   - C272069415D7FBF700CCCD22 /* rpq.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = rpq.o; sourceTree = "<group>"; };
54   - C272069515D7FBF700CCCD22 /* screen.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = screen.o; sourceTree = "<group>"; };
55   - C272069615D7FBF700CCCD22 /* see.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = see.o; sourceTree = "<group>"; };
56   - C272069715D7FBF700CCCD22 /* selection.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = selection.o; sourceTree = "<group>"; };
57   - C272069815D7FBF700CCCD22 /* session.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = session.o; sourceTree = "<group>"; };
58   - C272069915D7FBF700CCCD22 /* sf.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = sf.o; sourceTree = "<group>"; };
59   - C272069A15D7FBF700CCCD22 /* state.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = state.o; sourceTree = "<group>"; };
60   - C272069B15D7FBF700CCCD22 /* tables.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = tables.o; sourceTree = "<group>"; };
61   - C272069C15D7FBF700CCCD22 /* telnet.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = telnet.o; sourceTree = "<group>"; };
62   - C272069D15D7FBF700CCCD22 /* toggles.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = toggles.o; sourceTree = "<group>"; };
63   - C272069E15D7FBF700CCCD22 /* trace_ds.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = trace_ds.o; sourceTree = "<group>"; };
64   - C272069F15D7FBF700CCCD22 /* utf8.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = utf8.o; sourceTree = "<group>"; };
65   - C27206A015D7FBF700CCCD22 /* util.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = util.o; sourceTree = "<group>"; };
66   - C27206A115D7FBF700CCCD22 /* version.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = version.o; sourceTree = "<group>"; };
67   - C27206A215D7FBF700CCCD22 /* 3270ds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 3270ds.h; sourceTree = "<group>"; };
68   - C27206A315D7FBF700CCCD22 /* actions.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = actions.c; sourceTree = "<group>"; };
69   - C27206A415D7FBF700CCCD22 /* actionsc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = actionsc.h; sourceTree = "<group>"; };
70   - C27206A515D7FBF700CCCD22 /* ansi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ansi.c; sourceTree = "<group>"; };
71   - C27206A615D7FBF700CCCD22 /* ansic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ansic.h; sourceTree = "<group>"; };
72   - C27206A715D7FBF700CCCD22 /* api.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = api.h; sourceTree = "<group>"; };
73   - C27206A815D7FBF700CCCD22 /* apl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = apl.c; sourceTree = "<group>"; };
74   - C27206A915D7FBF700CCCD22 /* aplc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = aplc.h; sourceTree = "<group>"; };
75   - C27206AA15D7FBF700CCCD22 /* appres.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = appres.h; sourceTree = "<group>"; };
76   - C27206AB15D7FBF700CCCD22 /* arpa_telnet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = arpa_telnet.h; sourceTree = "<group>"; };
77   - C27206AC15D7FBF700CCCD22 /* bounds.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bounds.c; sourceTree = "<group>"; };
78   - C27206AD15D7FBF700CCCD22 /* cg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cg.h; sourceTree = "<group>"; };
79   - C27206AE15D7FBF700CCCD22 /* charset.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = charset.c; sourceTree = "<group>"; };
80   - C27206AF15D7FBF700CCCD22 /* charsetc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = charsetc.h; sourceTree = "<group>"; };
81   - C27206B015D7FBF700CCCD22 /* childc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = childc.h; sourceTree = "<group>"; };
82   - C27206B115D7FBF700CCCD22 /* ctlr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ctlr.c; sourceTree = "<group>"; };
83   - C27206B215D7FBF700CCCD22 /* ctlrc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ctlrc.h; sourceTree = "<group>"; };
84   - C27206B315D7FBF700CCCD22 /* fallbacks.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fallbacks.c; sourceTree = "<group>"; };
85   - C27206B415D7FBF700CCCD22 /* ft.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ft.c; sourceTree = "<group>"; };
86   - C27206B515D7FBF700CCCD22 /* ft_cut.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ft_cut.c; sourceTree = "<group>"; };
87   - C27206B615D7FBF700CCCD22 /* ft_cut_ds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ft_cut_ds.h; sourceTree = "<group>"; };
88   - C27206B715D7FBF700CCCD22 /* ft_cutc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ft_cutc.h; sourceTree = "<group>"; };
89   - C27206B815D7FBF700CCCD22 /* ft_dft.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ft_dft.c; sourceTree = "<group>"; };
90   - C27206B915D7FBF700CCCD22 /* ft_dft_ds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ft_dft_ds.h; sourceTree = "<group>"; };
91   - C27206BA15D7FBF700CCCD22 /* ft_dftc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ft_dftc.h; sourceTree = "<group>"; };
92   - C27206BB15D7FBF700CCCD22 /* ftc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftc.h; sourceTree = "<group>"; };
93   - C27206BC15D7FBF700CCCD22 /* globals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = globals.h; sourceTree = "<group>"; };
94   - C27206BD15D7FBF700CCCD22 /* glue.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = glue.c; sourceTree = "<group>"; };
95   - C27206BE15D7FBF700CCCD22 /* gluec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gluec.h; sourceTree = "<group>"; };
96   - C27206BF15D7FBF700CCCD22 /* host.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = host.c; sourceTree = "<group>"; };
97   - C27206C015D7FBF700CCCD22 /* hostc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hostc.h; sourceTree = "<group>"; };
98   - C27206C115D7FBF700CCCD22 /* html.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = html.c; sourceTree = "<group>"; };
99   - C27206C215D7FBF700CCCD22 /* icmdc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = icmdc.h; sourceTree = "<group>"; };
100   - C27206C315D7FBF700CCCD22 /* iocalls.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = iocalls.c; sourceTree = "<group>"; };
101   - C27206C415D7FBF700CCCD22 /* keypadc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = keypadc.h; sourceTree = "<group>"; };
102   - C27206C515D7FBF700CCCD22 /* kybd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = kybd.c; sourceTree = "<group>"; };
103   - C27206C615D7FBF700CCCD22 /* kybdc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = kybdc.h; sourceTree = "<group>"; };
104   - C27206C715D7FBF700CCCD22 /* lib3270.cbp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = lib3270.cbp; sourceTree = "<group>"; };
105   - C27206C815D7FBF700CCCD22 /* localdefs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = localdefs.h; sourceTree = "<group>"; };
106   - C27206C915D7FBF700CCCD22 /* log.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = log.c; sourceTree = "<group>"; };
107   - C27206CA15D7FBF700CCCD22 /* macros.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = macros.c; sourceTree = "<group>"; };
108   - C27206CB15D7FBF700CCCD22 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
109   - C27206CC15D7FBF700CCCD22 /* Makefile.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Makefile.in; sourceTree = "<group>"; };
110   - C27206CD15D7FBF700CCCD22 /* mkfb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mkfb.c; sourceTree = "<group>"; };
111   - C27206CE15D7FBF700CCCD22 /* mkversion.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = mkversion.sh; sourceTree = "<group>"; };
112   - C27206CF15D7FBF700CCCD22 /* mkversion.sh.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = mkversion.sh.in; sourceTree = "<group>"; };
113   - C27206D015D7FBF700CCCD22 /* objects.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = objects.h; sourceTree = "<group>"; };
114   - C27206D115D7FBF700CCCD22 /* paste.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = paste.c; sourceTree = "<group>"; };
115   - C27206D215D7FBF700CCCD22 /* popupsc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = popupsc.h; sourceTree = "<group>"; };
116   - C27206D315D7FBF700CCCD22 /* print.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = print.c; sourceTree = "<group>"; };
117   - C27206D415D7FBF700CCCD22 /* printc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = printc.h; sourceTree = "<group>"; };
118   - C27206D515D7FBF700CCCD22 /* printer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = printer.c; sourceTree = "<group>"; };
119   - C27206D615D7FBF700CCCD22 /* printerc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = printerc.h; sourceTree = "<group>"; };
120   - C27206D715D7FBF700CCCD22 /* proxy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = proxy.c; sourceTree = "<group>"; };
121   - C27206D815D7FBF700CCCD22 /* proxyc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = proxyc.h; sourceTree = "<group>"; };
122   - C27206D915D7FBF700CCCD22 /* resolver.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = resolver.c; sourceTree = "<group>"; };
123   - C27206DA15D7FBF700CCCD22 /* resolverc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = resolverc.h; sourceTree = "<group>"; };
124   - C27206DB15D7FBF700CCCD22 /* resources.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = resources.c; sourceTree = "<group>"; };
125   - C27206DC15D7FBF700CCCD22 /* resources.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = resources.h; sourceTree = "<group>"; };
126   - C27206DD15D7FBF700CCCD22 /* rpq.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = rpq.c; sourceTree = "<group>"; };
127   - C27206DE15D7FBF700CCCD22 /* savec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = savec.h; sourceTree = "<group>"; };
128   - C27206DF15D7FBF700CCCD22 /* screen.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = screen.c; sourceTree = "<group>"; };
129   - C27206E015D7FBF700CCCD22 /* screen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = screen.h; sourceTree = "<group>"; };
130   - C27206E115D7FBF700CCCD22 /* screenc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = screenc.h; sourceTree = "<group>"; };
131   - C27206E215D7FBF700CCCD22 /* scrollc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = scrollc.h; sourceTree = "<group>"; };
132   - C27206E315D7FBF700CCCD22 /* see.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = see.c; sourceTree = "<group>"; };
133   - C27206E415D7FBF700CCCD22 /* seec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = seec.h; sourceTree = "<group>"; };
134   - C27206E515D7FBF700CCCD22 /* selection.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = selection.c; sourceTree = "<group>"; };
135   - C27206E615D7FBF700CCCD22 /* session.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = session.c; sourceTree = "<group>"; };
136   - C27206E715D7FBF700CCCD22 /* sf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sf.c; sourceTree = "<group>"; };
137   - C27206E815D7FBF700CCCD22 /* sf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sf.h; sourceTree = "<group>"; };
138   - C27206E915D7FBF700CCCD22 /* shlobj_missing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = shlobj_missing.h; sourceTree = "<group>"; };
139   - C27206EA15D7FBF700CCCD22 /* sources.mak */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = sources.mak; sourceTree = "<group>"; };
140   - C27206EB15D7FBF700CCCD22 /* state.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = state.c; sourceTree = "<group>"; };
141   - C27206EC15D7FBF700CCCD22 /* statusc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = statusc.h; sourceTree = "<group>"; };
142   - C27206ED15D7FBF700CCCD22 /* tables.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tables.c; sourceTree = "<group>"; };
143   - C27206EE15D7FBF700CCCD22 /* tablesc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tablesc.h; sourceTree = "<group>"; };
144   - C27206EF15D7FBF700CCCD22 /* telnet.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = telnet.c; sourceTree = "<group>"; };
145   - C27206F015D7FBF700CCCD22 /* telnetc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = telnetc.h; sourceTree = "<group>"; };
146   - C27206F115D7FBF700CCCD22 /* testprogram.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testprogram.c; sourceTree = "<group>"; };
147   - C27206F215D7FBF700CCCD22 /* tn3270e.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tn3270e.h; sourceTree = "<group>"; };
148   - C27206F315D7FBF700CCCD22 /* toggle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = toggle.h; sourceTree = "<group>"; };
149   - C27206F415D7FBF700CCCD22 /* toggles.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = toggles.c; sourceTree = "<group>"; };
150   - C27206F515D7FBF700CCCD22 /* togglesc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = togglesc.h; sourceTree = "<group>"; };
151   - C27206F615D7FBF700CCCD22 /* trace_ds.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = trace_ds.c; sourceTree = "<group>"; };
152   - C27206F715D7FBF700CCCD22 /* trace_dsc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = trace_dsc.h; sourceTree = "<group>"; };
153   - C27206F815D7FBF700CCCD22 /* utf8.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = utf8.c; sourceTree = "<group>"; };
154   - C27206F915D7FBF700CCCD22 /* utf8c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utf8c.h; sourceTree = "<group>"; };
155   - C27206FA15D7FBF700CCCD22 /* util.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = util.c; sourceTree = "<group>"; };
156   - C27206FB15D7FBF700CCCD22 /* utilc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utilc.h; sourceTree = "<group>"; };
157   - C27206FC15D7FBF700CCCD22 /* version.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = version.c; sourceTree = "<group>"; };
158   - C27206FD15D7FBF700CCCD22 /* w3misc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = w3misc.c; sourceTree = "<group>"; };
159   - C27206FE15D7FBF700CCCD22 /* w3miscc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = w3miscc.h; sourceTree = "<group>"; };
160   - C27206FF15D7FBF700CCCD22 /* widec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = widec.h; sourceTree = "<group>"; };
161   - C272070015D7FBF700CCCD22 /* winvers.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = winvers.c; sourceTree = "<group>"; };
162   - C272070115D7FBF700CCCD22 /* winversc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = winversc.h; sourceTree = "<group>"; };
163   - C272070215D7FBF700CCCD22 /* X11keysym.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = X11keysym.h; sourceTree = "<group>"; };
164   - C272070315D7FBF700CCCD22 /* X3270.xad */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = X3270.xad; sourceTree = "<group>"; };
165   - C272070415D7FBF700CCCD22 /* xio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = xio.c; sourceTree = "<group>"; };
166   - C272070515D7FBF700CCCD22 /* xioc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xioc.h; sourceTree = "<group>"; };
167   - C272070615D7FBF700CCCD22 /* xl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xl.h; sourceTree = "<group>"; };
168   - C272070715D7FBF700CCCD22 /* XtGlue.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = XtGlue.c; sourceTree = "<group>"; };
169   - C272070B15D7FBF700CCCD22 /* actions.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = actions.o; sourceTree = "<group>"; };
170   - C272070C15D7FBF700CCCD22 /* colors.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = colors.o; sourceTree = "<group>"; };
171   - C272070E15D7FBF700CCCD22 /* config.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = config.o; sourceTree = "<group>"; };
172   - C272070F15D7FBF700CCCD22 /* dialog.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = dialog.o; sourceTree = "<group>"; };
173   - C272071015D7FBF700CCCD22 /* filetransfer.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = filetransfer.o; sourceTree = "<group>"; };
174   - C272071115D7FBF700CCCD22 /* fonts.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = fonts.o; sourceTree = "<group>"; };
175   - C272071215D7FBF700CCCD22 /* print.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = print.o; sourceTree = "<group>"; };
176   - C272071315D7FBF700CCCD22 /* tools.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = tools.o; sourceTree = "<group>"; };
177   - C272071515D7FBF700CCCD22 /* accelerator.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = accelerator.o; sourceTree = "<group>"; };
178   - C272071615D7FBF700CCCD22 /* action.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = action.o; sourceTree = "<group>"; };
179   - C272071715D7FBF700CCCD22 /* menu.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = menu.o; sourceTree = "<group>"; };
180   - C272071815D7FBF700CCCD22 /* menubar.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = menubar.o; sourceTree = "<group>"; };
181   - C272071915D7FBF700CCCD22 /* menuitem.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = menuitem.o; sourceTree = "<group>"; };
182   - C272071A15D7FBF700CCCD22 /* parsefile.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = parsefile.o; sourceTree = "<group>"; };
183   - C272071B15D7FBF700CCCD22 /* parser.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = parser.o; sourceTree = "<group>"; };
184   - C272071C15D7FBF700CCCD22 /* popup.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = popup.o; sourceTree = "<group>"; };
185   - C272071D15D7FBF700CCCD22 /* script.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = script.o; sourceTree = "<group>"; };
186   - C272071E15D7FBF700CCCD22 /* separator.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = separator.o; sourceTree = "<group>"; };
187   - C272071F15D7FBF700CCCD22 /* toolbar.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = toolbar.o; sourceTree = "<group>"; };
188   - C272072015D7FBF700CCCD22 /* toolitem.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = toolitem.o; sourceTree = "<group>"; };
189   - C272072215D7FBF700CCCD22 /* accessible.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = accessible.o; sourceTree = "<group>"; };
190   - C272072315D7FBF700CCCD22 /* draw.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = draw.o; sourceTree = "<group>"; };
191   - C272072415D7FBF700CCCD22 /* iocallback.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = iocallback.o; sourceTree = "<group>"; };
192   - C272072515D7FBF700CCCD22 /* keyboard.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = keyboard.o; sourceTree = "<group>"; };
193   - C272072615D7FBF700CCCD22 /* marshal.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = marshal.o; sourceTree = "<group>"; };
194   - C272072715D7FBF700CCCD22 /* mouse.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = mouse.o; sourceTree = "<group>"; };
195   - C272072815D7FBF700CCCD22 /* oia.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = oia.o; sourceTree = "<group>"; };
196   - C272072915D7FBF700CCCD22 /* selection.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = selection.o; sourceTree = "<group>"; };
197   - C272072A15D7FBF700CCCD22 /* widget.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = widget.o; sourceTree = "<group>"; };
198   - C272072B15D7FBF700CCCD22 /* window.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = window.o; sourceTree = "<group>"; };
199   - C272072C15D7FBF700CCCD22 /* actions.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = actions.c; sourceTree = "<group>"; };
200   - C272072D15D7FBF700CCCD22 /* colors.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = colors.c; sourceTree = "<group>"; };
201   - C272072F15D7FBF700CCCD22 /* common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = common.h; sourceTree = "<group>"; };
202   - C272073015D7FBF700CCCD22 /* common.h.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = common.h.in; sourceTree = "<group>"; };
203   - C272073115D7FBF700CCCD22 /* config.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = config.c; sourceTree = "<group>"; };
204   - C272073215D7FBF700CCCD22 /* sources.mak */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = sources.mak; sourceTree = "<group>"; };
205   - C272073315D7FBF700CCCD22 /* dialog.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dialog.c; sourceTree = "<group>"; };
206   - C272073415D7FBF700CCCD22 /* filetransfer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = filetransfer.c; sourceTree = "<group>"; };
207   - C272073515D7FBF700CCCD22 /* filetransfer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = filetransfer.h; sourceTree = "<group>"; };
208   - C272073615D7FBF700CCCD22 /* fonts.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fonts.c; sourceTree = "<group>"; };
209   - C272073715D7FBF700CCCD22 /* globals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = globals.h; sourceTree = "<group>"; };
210   - C272073815D7FBF700CCCD22 /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = "<group>"; };
211   - C272073915D7FBF700CCCD22 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
212   - C272073A15D7FBF700CCCD22 /* Makefile.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Makefile.in; sourceTree = "<group>"; };
213   - C272073C15D7FBF700CCCD22 /* pw3270-logo.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "pw3270-logo.svg"; sourceTree = "<group>"; };
214   - C272073D15D7FBF700CCCD22 /* pw3270.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = pw3270.svg; sourceTree = "<group>"; };
215   - C272073E15D7FBF700CCCD22 /* print.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = print.c; sourceTree = "<group>"; };
216   - C272073F15D7FBF700CCCD22 /* pw3270-GTK.cbp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "pw3270-GTK.cbp"; sourceTree = "<group>"; };
217   - C272074015D7FBF700CCCD22 /* pw3270.ico */ = {isa = PBXFileReference; lastKnownFileType = image.ico; path = pw3270.ico; sourceTree = "<group>"; };
218   - C272074115D7FBF700CCCD22 /* tools.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tools.c; sourceTree = "<group>"; };
219   - C272074315D7FBF700CCCD22 /* accelerator.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = accelerator.c; sourceTree = "<group>"; };
220   - C272074415D7FBF700CCCD22 /* action.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = action.c; sourceTree = "<group>"; };
221   - C272074515D7FBF700CCCD22 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
222   - C272074615D7FBF700CCCD22 /* Makefile.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Makefile.in; sourceTree = "<group>"; };
223   - C272074715D7FBF700CCCD22 /* memchk.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = memchk.sh; sourceTree = "<group>"; };
224   - C272074815D7FBF700CCCD22 /* menu.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = menu.c; sourceTree = "<group>"; };
225   - C272074915D7FBF700CCCD22 /* menubar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = menubar.c; sourceTree = "<group>"; };
226   - C272074A15D7FBF700CCCD22 /* menuitem.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = menuitem.c; sourceTree = "<group>"; };
227   - C272074B15D7FBF700CCCD22 /* parsefile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = parsefile.c; sourceTree = "<group>"; };
228   - C272074C15D7FBF700CCCD22 /* parser.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = parser.c; sourceTree = "<group>"; };
229   - C272074D15D7FBF700CCCD22 /* parser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = parser.h; sourceTree = "<group>"; };
230   - C272074E15D7FBF700CCCD22 /* popup.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = popup.c; sourceTree = "<group>"; };
231   - C272074F15D7FBF700CCCD22 /* private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = private.h; sourceTree = "<group>"; };
232   - C272075015D7FBF700CCCD22 /* script.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = script.c; sourceTree = "<group>"; };
233   - C272075115D7FBF700CCCD22 /* separator.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = separator.c; sourceTree = "<group>"; };
234   - C272075215D7FBF700CCCD22 /* sources.mak */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = sources.mak; sourceTree = "<group>"; };
235   - C272075315D7FBF700CCCD22 /* testprogram.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testprogram.c; sourceTree = "<group>"; };
236   - C272075415D7FBF700CCCD22 /* toolbar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = toolbar.c; sourceTree = "<group>"; };
237   - C272075515D7FBF700CCCD22 /* toolitem.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = toolitem.c; sourceTree = "<group>"; };
238   - C272075615D7FBF700CCCD22 /* uiparser.cbp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = uiparser.cbp; sourceTree = "<group>"; };
239   - C272075815D7FBF700CCCD22 /* accessible.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = accessible.c; sourceTree = "<group>"; };
240   - C272075915D7FBF700CCCD22 /* accessible.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = accessible.h; sourceTree = "<group>"; };
241   - C272075A15D7FBF700CCCD22 /* draw.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = draw.c; sourceTree = "<group>"; };
242   - C272075B15D7FBF700CCCD22 /* genmarshal */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = genmarshal; sourceTree = "<group>"; };
243   - C272075C15D7FBF700CCCD22 /* iocallback.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = iocallback.c; sourceTree = "<group>"; };
244   - C272075D15D7FBF700CCCD22 /* keyboard.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = keyboard.c; sourceTree = "<group>"; };
245   - C272075E15D7FBF700CCCD22 /* locked.xbm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = locked.xbm; sourceTree = "<group>"; };
246   - C272075F15D7FBF700CCCD22 /* marshal.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = marshal.c; sourceTree = "<group>"; };
247   - C272076015D7FBF700CCCD22 /* marshal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = marshal.h; sourceTree = "<group>"; };
248   - C272076115D7FBF700CCCD22 /* mouse.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mouse.c; sourceTree = "<group>"; };
249   - C272076215D7FBF700CCCD22 /* oia.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = oia.c; sourceTree = "<group>"; };
250   - C272076315D7FBF700CCCD22 /* private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = private.h; sourceTree = "<group>"; };
251   - C272076415D7FBF700CCCD22 /* selection.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = selection.c; sourceTree = "<group>"; };
252   - C272076515D7FBF700CCCD22 /* sources.mak */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = sources.mak; sourceTree = "<group>"; };
253   - C272076615D7FBF700CCCD22 /* unlocked.xbm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = unlocked.xbm; sourceTree = "<group>"; };
254   - C272076715D7FBF700CCCD22 /* widget.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = widget.c; sourceTree = "<group>"; };
255   - C272076815D7FBF700CCCD22 /* valgrind.suppression */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = valgrind.suppression; sourceTree = "<group>"; };
256   - C272076915D7FBF700CCCD22 /* window.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = window.c; sourceTree = "<group>"; };
257   - C272076B15D7FBF700CCCD22 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
258   - C272076C15D7FBF700CCCD22 /* Makefile.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Makefile.in; sourceTree = "<group>"; };
259   - C272076D15D7FBF700CCCD22 /* xml2pot.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = xml2pot.c; sourceTree = "<group>"; };
260   - C2C3E14D15F0598900B02C1C /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = mac/Info.plist; sourceTree = "<group>"; };
261   - C2C3E14E15F0598900B02C1C /* launcher.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = launcher.sh; path = mac/launcher.sh; sourceTree = "<group>"; };
262   - C2C3E15015F09BE200B02C1C /* pw3270.bundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = pw3270.bundle; sourceTree = "<group>"; };
263   - C2C4DAD815D8282600E8C6A0 /* autogen.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = autogen.sh; sourceTree = "<group>"; };
264   -/* End PBXFileReference section */
265   -
266   -/* Begin PBXGroup section */
267   - C232305B15D7F01F00E76E83 = {
268   - isa = PBXGroup;
269   - children = (
270   - C2C3E14715F0547300B02C1C /* Bundle */,
271   - C23EFD5315D99E2D00673C59 /* updateChangeLog.sh */,
272   - C21BB73815D940960093E2FA /* Makefile.in */,
273   - C2C4DAD815D8282600E8C6A0 /* autogen.sh */,
274   - C272066315D7F88300CCCD22 /* configure.ac */,
275   - C272066415D7FBF700CCCD22 /* src */,
276   - );
277   - sourceTree = "<group>";
278   - usesTabs = 1;
279   - wrapsLines = 0;
280   - };
281   - C272066415D7FBF700CCCD22 /* src */ = {
282   - isa = PBXGroup;
283   - children = (
284   - C272066515D7FBF700CCCD22 /* include */,
285   - C272067B15D7FBF700CCCD22 /* lib3270 */,
286   - C272070815D7FBF700CCCD22 /* pw3270 */,
287   - C272076A15D7FBF700CCCD22 /* tools */,
288   - );
289   - path = src;
290   - sourceTree = "<group>";
291   - };
292   - C272066515D7FBF700CCCD22 /* include */ = {
293   - isa = PBXGroup;
294   - children = (
295   - C272066615D7FBF700CCCD22 /* lib3270 */,
296   - C272067515D7FBF700CCCD22 /* lib3270.h */,
297   - C272067615D7FBF700CCCD22 /* pw3270 */,
298   - C272067715D7FBF700CCCD22 /* pw3270.h */,
299   - C272067815D7FBF700CCCD22 /* rules.mak */,
300   - C272067915D7FBF700CCCD22 /* rules.mak.in */,
301   - C272067A15D7FBF700CCCD22 /* v3270.h */,
302   - );
303   - path = include;
304   - sourceTree = "<group>";
305   - };
306   - C272066615D7FBF700CCCD22 /* lib3270 */ = {
307   - isa = PBXGroup;
308   - children = (
309   - C272066715D7FBF700CCCD22 /* action_table.h */,
310   - C272066815D7FBF700CCCD22 /* actions.h */,
311   - C272066915D7FBF700CCCD22 /* config.h */,
312   - C272066A15D7FBF700CCCD22 /* config.h.in */,
313   - C272066B15D7FBF700CCCD22 /* filetransfer.h */,
314   - C272066C15D7FBF700CCCD22 /* html.h */,
315   - C272066D15D7FBF700CCCD22 /* internals.h */,
316   - C272066E15D7FBF700CCCD22 /* log.h */,
317   - C272066F15D7FBF700CCCD22 /* macros.h */,
318   - C272067015D7FBF700CCCD22 /* popup.h */,
319   - C272067115D7FBF700CCCD22 /* selection.h */,
320   - C272067215D7FBF700CCCD22 /* session.h */,
321   - C272067315D7FBF700CCCD22 /* stamp-h1 */,
322   - C272067415D7FBF700CCCD22 /* trace.h */,
323   - );
324   - path = lib3270;
325   - sourceTree = "<group>";
326   - };
327   - C272067615D7FBF700CCCD22 /* pw3270 */ = {
328   - isa = PBXGroup;
329   - children = (
330   - );
331   - path = pw3270;
332   - sourceTree = "<group>";
333   - };
334   - C272067B15D7FBF700CCCD22 /* lib3270 */ = {
335   - isa = PBXGroup;
336   - children = (
337   - C272067C15D7FBF700CCCD22 /* .bin */,
338   - C272067F15D7FBF700CCCD22 /* .obj */,
339   - C27206A215D7FBF700CCCD22 /* 3270ds.h */,
340   - C27206A315D7FBF700CCCD22 /* actions.c */,
341   - C27206A415D7FBF700CCCD22 /* actionsc.h */,
342   - C27206A515D7FBF700CCCD22 /* ansi.c */,
343   - C27206A615D7FBF700CCCD22 /* ansic.h */,
344   - C27206A715D7FBF700CCCD22 /* api.h */,
345   - C27206A815D7FBF700CCCD22 /* apl.c */,
346   - C27206A915D7FBF700CCCD22 /* aplc.h */,
347   - C27206AA15D7FBF700CCCD22 /* appres.h */,
348   - C27206AB15D7FBF700CCCD22 /* arpa_telnet.h */,
349   - C27206AC15D7FBF700CCCD22 /* bounds.c */,
350   - C27206AD15D7FBF700CCCD22 /* cg.h */,
351   - C27206AE15D7FBF700CCCD22 /* charset.c */,
352   - C27206AF15D7FBF700CCCD22 /* charsetc.h */,
353   - C27206B015D7FBF700CCCD22 /* childc.h */,
354   - C27206B115D7FBF700CCCD22 /* ctlr.c */,
355   - C27206B215D7FBF700CCCD22 /* ctlrc.h */,
356   - C27206B315D7FBF700CCCD22 /* fallbacks.c */,
357   - C27206B415D7FBF700CCCD22 /* ft.c */,
358   - C27206B515D7FBF700CCCD22 /* ft_cut.c */,
359   - C27206B615D7FBF700CCCD22 /* ft_cut_ds.h */,
360   - C27206B715D7FBF700CCCD22 /* ft_cutc.h */,
361   - C27206B815D7FBF700CCCD22 /* ft_dft.c */,
362   - C27206B915D7FBF700CCCD22 /* ft_dft_ds.h */,
363   - C27206BA15D7FBF700CCCD22 /* ft_dftc.h */,
364   - C27206BB15D7FBF700CCCD22 /* ftc.h */,
365   - C27206BC15D7FBF700CCCD22 /* globals.h */,
366   - C27206BD15D7FBF700CCCD22 /* glue.c */,
367   - C27206BE15D7FBF700CCCD22 /* gluec.h */,
368   - C27206BF15D7FBF700CCCD22 /* host.c */,
369   - C27206C015D7FBF700CCCD22 /* hostc.h */,
370   - C27206C115D7FBF700CCCD22 /* html.c */,
371   - C27206C215D7FBF700CCCD22 /* icmdc.h */,
372   - C27206C315D7FBF700CCCD22 /* iocalls.c */,
373   - C27206C415D7FBF700CCCD22 /* keypadc.h */,
374   - C27206C515D7FBF700CCCD22 /* kybd.c */,
375   - C27206C615D7FBF700CCCD22 /* kybdc.h */,
376   - C27206C715D7FBF700CCCD22 /* lib3270.cbp */,
377   - C27206C815D7FBF700CCCD22 /* localdefs.h */,
378   - C27206C915D7FBF700CCCD22 /* log.c */,
379   - C27206CA15D7FBF700CCCD22 /* macros.c */,
380   - C27206CB15D7FBF700CCCD22 /* Makefile */,
381   - C27206CC15D7FBF700CCCD22 /* Makefile.in */,
382   - C27206CD15D7FBF700CCCD22 /* mkfb.c */,
383   - C27206CE15D7FBF700CCCD22 /* mkversion.sh */,
384   - C27206CF15D7FBF700CCCD22 /* mkversion.sh.in */,
385   - C27206D015D7FBF700CCCD22 /* objects.h */,
386   - C27206D115D7FBF700CCCD22 /* paste.c */,
387   - C27206D215D7FBF700CCCD22 /* popupsc.h */,
388   - C27206D315D7FBF700CCCD22 /* print.c */,
389   - C27206D415D7FBF700CCCD22 /* printc.h */,
390   - C27206D515D7FBF700CCCD22 /* printer.c */,
391   - C27206D615D7FBF700CCCD22 /* printerc.h */,
392   - C27206D715D7FBF700CCCD22 /* proxy.c */,
393   - C27206D815D7FBF700CCCD22 /* proxyc.h */,
394   - C27206D915D7FBF700CCCD22 /* resolver.c */,
395   - C27206DA15D7FBF700CCCD22 /* resolverc.h */,
396   - C27206DB15D7FBF700CCCD22 /* resources.c */,
397   - C27206DC15D7FBF700CCCD22 /* resources.h */,
398   - C27206DD15D7FBF700CCCD22 /* rpq.c */,
399   - C27206DE15D7FBF700CCCD22 /* savec.h */,
400   - C27206DF15D7FBF700CCCD22 /* screen.c */,
401   - C27206E015D7FBF700CCCD22 /* screen.h */,
402   - C27206E115D7FBF700CCCD22 /* screenc.h */,
403   - C27206E215D7FBF700CCCD22 /* scrollc.h */,
404   - C27206E315D7FBF700CCCD22 /* see.c */,
405   - C27206E415D7FBF700CCCD22 /* seec.h */,
406   - C27206E515D7FBF700CCCD22 /* selection.c */,
407   - C27206E615D7FBF700CCCD22 /* session.c */,
408   - C27206E715D7FBF700CCCD22 /* sf.c */,
409   - C27206E815D7FBF700CCCD22 /* sf.h */,
410   - C27206E915D7FBF700CCCD22 /* shlobj_missing.h */,
411   - C27206EA15D7FBF700CCCD22 /* sources.mak */,
412   - C27206EB15D7FBF700CCCD22 /* state.c */,
413   - C27206EC15D7FBF700CCCD22 /* statusc.h */,
414   - C27206ED15D7FBF700CCCD22 /* tables.c */,
415   - C27206EE15D7FBF700CCCD22 /* tablesc.h */,
416   - C27206EF15D7FBF700CCCD22 /* telnet.c */,
417   - C27206F015D7FBF700CCCD22 /* telnetc.h */,
418   - C27206F115D7FBF700CCCD22 /* testprogram.c */,
419   - C27206F215D7FBF700CCCD22 /* tn3270e.h */,
420   - C27206F315D7FBF700CCCD22 /* toggle.h */,
421   - C27206F415D7FBF700CCCD22 /* toggles.c */,
422   - C27206F515D7FBF700CCCD22 /* togglesc.h */,
423   - C27206F615D7FBF700CCCD22 /* trace_ds.c */,
424   - C27206F715D7FBF700CCCD22 /* trace_dsc.h */,
425   - C27206F815D7FBF700CCCD22 /* utf8.c */,
426   - C27206F915D7FBF700CCCD22 /* utf8c.h */,
427   - C27206FA15D7FBF700CCCD22 /* util.c */,
428   - C27206FB15D7FBF700CCCD22 /* utilc.h */,
429   - C27206FC15D7FBF700CCCD22 /* version.c */,
430   - C27206FD15D7FBF700CCCD22 /* w3misc.c */,
431   - C27206FE15D7FBF700CCCD22 /* w3miscc.h */,
432   - C27206FF15D7FBF700CCCD22 /* widec.h */,
433   - C272070015D7FBF700CCCD22 /* winvers.c */,
434   - C272070115D7FBF700CCCD22 /* winversc.h */,
435   - C272070215D7FBF700CCCD22 /* X11keysym.h */,
436   - C272070315D7FBF700CCCD22 /* X3270.xad */,
437   - C272070415D7FBF700CCCD22 /* xio.c */,
438   - C272070515D7FBF700CCCD22 /* xioc.h */,
439   - C272070615D7FBF700CCCD22 /* xl.h */,
440   - C272070715D7FBF700CCCD22 /* XtGlue.c */,
441   - );
442   - path = lib3270;
443   - sourceTree = "<group>";
444   - };
445   - C272067C15D7FBF700CCCD22 /* .bin */ = {
446   - isa = PBXGroup;
447   - children = (
448   - C272067D15D7FBF700CCCD22 /* mkfb */,
449   - C272067E15D7FBF700CCCD22 /* mkfb.dSYM */,
450   - );
451   - path = .bin;
452   - sourceTree = "<group>";
453   - };
454   - C272067F15D7FBF700CCCD22 /* .obj */ = {
455   - isa = PBXGroup;
456   - children = (
457   - C272068015D7FBF700CCCD22 /* Debug */,
458   - );
459   - path = .obj;
460   - sourceTree = "<group>";
461   - };
462   - C272068015D7FBF700CCCD22 /* Debug */ = {
463   - isa = PBXGroup;
464   - children = (
465   - C272068115D7FBF700CCCD22 /* ansi.o */,
466   - C272068215D7FBF700CCCD22 /* bounds.o */,
467   - C272068315D7FBF700CCCD22 /* charset.o */,
468   - C272068415D7FBF700CCCD22 /* ctlr.o */,
469   - C272068515D7FBF700CCCD22 /* fallbacks.o */,
470   - C272068615D7FBF700CCCD22 /* ft.o */,
471   - C272068715D7FBF700CCCD22 /* ft_cut.o */,
472   - C272068815D7FBF700CCCD22 /* ft_dft.o */,
473   - C272068915D7FBF700CCCD22 /* glue.o */,
474   - C272068A15D7FBF700CCCD22 /* host.o */,
475   - C272068B15D7FBF700CCCD22 /* html.o */,
476   - C272068C15D7FBF700CCCD22 /* iocalls.o */,
477   - C272068D15D7FBF700CCCD22 /* kybd.o */,
478   - C272068E15D7FBF700CCCD22 /* log.o */,
479   - C272068F15D7FBF700CCCD22 /* macros.o */,
480   - C272069015D7FBF700CCCD22 /* paste.o */,
481   - C272069115D7FBF700CCCD22 /* proxy.o */,
482   - C272069215D7FBF700CCCD22 /* resolver.o */,
483   - C272069315D7FBF700CCCD22 /* resources.o */,
484   - C272069415D7FBF700CCCD22 /* rpq.o */,
485   - C272069515D7FBF700CCCD22 /* screen.o */,
486   - C272069615D7FBF700CCCD22 /* see.o */,
487   - C272069715D7FBF700CCCD22 /* selection.o */,
488   - C272069815D7FBF700CCCD22 /* session.o */,
489   - C272069915D7FBF700CCCD22 /* sf.o */,
490   - C272069A15D7FBF700CCCD22 /* state.o */,
491   - C272069B15D7FBF700CCCD22 /* tables.o */,
492   - C272069C15D7FBF700CCCD22 /* telnet.o */,
493   - C272069D15D7FBF700CCCD22 /* toggles.o */,
494   - C272069E15D7FBF700CCCD22 /* trace_ds.o */,
495   - C272069F15D7FBF700CCCD22 /* utf8.o */,
496   - C27206A015D7FBF700CCCD22 /* util.o */,
497   - C27206A115D7FBF700CCCD22 /* version.o */,
498   - );
499   - path = Debug;
500   - sourceTree = "<group>";
501   - };
502   - C272070815D7FBF700CCCD22 /* pw3270 */ = {
503   - isa = PBXGroup;
504   - children = (
505   - C272070915D7FBF700CCCD22 /* .obj */,
506   - C272072C15D7FBF700CCCD22 /* actions.c */,
507   - C272072D15D7FBF700CCCD22 /* colors.c */,
508   - C272072E15D7FBF700CCCD22 /* common */,
509   - C272073315D7FBF700CCCD22 /* dialog.c */,
510   - C272073415D7FBF700CCCD22 /* filetransfer.c */,
511   - C272073515D7FBF700CCCD22 /* filetransfer.h */,
512   - C272073615D7FBF700CCCD22 /* fonts.c */,
513   - C272073715D7FBF700CCCD22 /* globals.h */,
514   - C272073815D7FBF700CCCD22 /* main.c */,
515   - C272073915D7FBF700CCCD22 /* Makefile */,
516   - C272073A15D7FBF700CCCD22 /* Makefile.in */,
517   - C272073B15D7FBF700CCCD22 /* pixmaps */,
518   - C272073E15D7FBF700CCCD22 /* print.c */,
519   - C272073F15D7FBF700CCCD22 /* pw3270-GTK.cbp */,
520   - C272074015D7FBF700CCCD22 /* pw3270.ico */,
521   - C272074115D7FBF700CCCD22 /* tools.c */,
522   - C272074215D7FBF700CCCD22 /* uiparser */,
523   - C272075715D7FBF700CCCD22 /* v3270 */,
524   - C272076815D7FBF700CCCD22 /* valgrind.suppression */,
525   - C272076915D7FBF700CCCD22 /* window.c */,
526   - );
527   - path = pw3270;
528   - sourceTree = "<group>";
529   - };
530   - C272070915D7FBF700CCCD22 /* .obj */ = {
531   - isa = PBXGroup;
532   - children = (
533   - C272070A15D7FBF700CCCD22 /* Debug */,
534   - );
535   - path = .obj;
536   - sourceTree = "<group>";
537   - };
538   - C272070A15D7FBF700CCCD22 /* Debug */ = {
539   - isa = PBXGroup;
540   - children = (
541   - C272070B15D7FBF700CCCD22 /* actions.o */,
542   - C272070C15D7FBF700CCCD22 /* colors.o */,
543   - C272070D15D7FBF700CCCD22 /* common */,
544   - C272070F15D7FBF700CCCD22 /* dialog.o */,
545   - C272071015D7FBF700CCCD22 /* filetransfer.o */,
546   - C272071115D7FBF700CCCD22 /* fonts.o */,
547   - C272071215D7FBF700CCCD22 /* print.o */,
548   - C272071315D7FBF700CCCD22 /* tools.o */,
549   - C272071415D7FBF700CCCD22 /* uiparser */,
550   - C272072115D7FBF700CCCD22 /* v3270 */,
551   - C272072B15D7FBF700CCCD22 /* window.o */,
552   - );
553   - path = Debug;
554   - sourceTree = "<group>";
555   - };
556   - C272070D15D7FBF700CCCD22 /* common */ = {
557   - isa = PBXGroup;
558   - children = (
559   - C272070E15D7FBF700CCCD22 /* config.o */,
560   - );
561   - path = common;
562   - sourceTree = "<group>";
563   - };
564   - C272071415D7FBF700CCCD22 /* uiparser */ = {
565   - isa = PBXGroup;
566   - children = (
567   - C272071515D7FBF700CCCD22 /* accelerator.o */,
568   - C272071615D7FBF700CCCD22 /* action.o */,
569   - C272071715D7FBF700CCCD22 /* menu.o */,
570   - C272071815D7FBF700CCCD22 /* menubar.o */,
571   - C272071915D7FBF700CCCD22 /* menuitem.o */,
572   - C272071A15D7FBF700CCCD22 /* parsefile.o */,
573   - C272071B15D7FBF700CCCD22 /* parser.o */,
574   - C272071C15D7FBF700CCCD22 /* popup.o */,
575   - C272071D15D7FBF700CCCD22 /* script.o */,
576   - C272071E15D7FBF700CCCD22 /* separator.o */,
577   - C272071F15D7FBF700CCCD22 /* toolbar.o */,
578   - C272072015D7FBF700CCCD22 /* toolitem.o */,
579   - );
580   - path = uiparser;
581   - sourceTree = "<group>";
582   - };
583   - C272072115D7FBF700CCCD22 /* v3270 */ = {
584   - isa = PBXGroup;
585   - children = (
586   - C272072215D7FBF700CCCD22 /* accessible.o */,
587   - C272072315D7FBF700CCCD22 /* draw.o */,
588   - C272072415D7FBF700CCCD22 /* iocallback.o */,
589   - C272072515D7FBF700CCCD22 /* keyboard.o */,
590   - C272072615D7FBF700CCCD22 /* marshal.o */,
591   - C272072715D7FBF700CCCD22 /* mouse.o */,
592   - C272072815D7FBF700CCCD22 /* oia.o */,
593   - C272072915D7FBF700CCCD22 /* selection.o */,
594   - C272072A15D7FBF700CCCD22 /* widget.o */,
595   - );
596   - path = v3270;
597   - sourceTree = "<group>";
598   - };
599   - C272072E15D7FBF700CCCD22 /* common */ = {
600   - isa = PBXGroup;
601   - children = (
602   - C272072F15D7FBF700CCCD22 /* common.h */,
603   - C272073015D7FBF700CCCD22 /* common.h.in */,
604   - C272073115D7FBF700CCCD22 /* config.c */,
605   - C272073215D7FBF700CCCD22 /* sources.mak */,
606   - );
607   - path = common;
608   - sourceTree = "<group>";
609   - };
610   - C272073B15D7FBF700CCCD22 /* pixmaps */ = {
611   - isa = PBXGroup;
612   - children = (
613   - C272073C15D7FBF700CCCD22 /* pw3270-logo.svg */,
614   - C272073D15D7FBF700CCCD22 /* pw3270.svg */,
615   - );
616   - path = pixmaps;
617   - sourceTree = "<group>";
618   - };
619   - C272074215D7FBF700CCCD22 /* uiparser */ = {
620   - isa = PBXGroup;
621   - children = (
622   - C272074315D7FBF700CCCD22 /* accelerator.c */,
623   - C272074415D7FBF700CCCD22 /* action.c */,
624   - C272074515D7FBF700CCCD22 /* Makefile */,
625   - C272074615D7FBF700CCCD22 /* Makefile.in */,
626   - C272074715D7FBF700CCCD22 /* memchk.sh */,
627   - C272074815D7FBF700CCCD22 /* menu.c */,
628   - C272074915D7FBF700CCCD22 /* menubar.c */,
629   - C272074A15D7FBF700CCCD22 /* menuitem.c */,
630   - C272074B15D7FBF700CCCD22 /* parsefile.c */,
631   - C272074C15D7FBF700CCCD22 /* parser.c */,
632   - C272074D15D7FBF700CCCD22 /* parser.h */,
633   - C272074E15D7FBF700CCCD22 /* popup.c */,
634   - C272074F15D7FBF700CCCD22 /* private.h */,
635   - C272075015D7FBF700CCCD22 /* script.c */,
636   - C272075115D7FBF700CCCD22 /* separator.c */,
637   - C272075215D7FBF700CCCD22 /* sources.mak */,
638   - C272075315D7FBF700CCCD22 /* testprogram.c */,
639   - C272075415D7FBF700CCCD22 /* toolbar.c */,
640   - C272075515D7FBF700CCCD22 /* toolitem.c */,
641   - C272075615D7FBF700CCCD22 /* uiparser.cbp */,
642   - );
643   - path = uiparser;
644   - sourceTree = "<group>";
645   - };
646   - C272075715D7FBF700CCCD22 /* v3270 */ = {
647   - isa = PBXGroup;
648   - children = (
649   - C272075815D7FBF700CCCD22 /* accessible.c */,
650   - C272075915D7FBF700CCCD22 /* accessible.h */,
651   - C272075A15D7FBF700CCCD22 /* draw.c */,
652   - C272075B15D7FBF700CCCD22 /* genmarshal */,
653   - C272075C15D7FBF700CCCD22 /* iocallback.c */,
654   - C272075D15D7FBF700CCCD22 /* keyboard.c */,
655   - C272075E15D7FBF700CCCD22 /* locked.xbm */,
656   - C272075F15D7FBF700CCCD22 /* marshal.c */,
657   - C272076015D7FBF700CCCD22 /* marshal.h */,
658   - C272076115D7FBF700CCCD22 /* mouse.c */,
659   - C272076215D7FBF700CCCD22 /* oia.c */,
660   - C272076315D7FBF700CCCD22 /* private.h */,
661   - C272076415D7FBF700CCCD22 /* selection.c */,
662   - C272076515D7FBF700CCCD22 /* sources.mak */,
663   - C272076615D7FBF700CCCD22 /* unlocked.xbm */,
664   - C272076715D7FBF700CCCD22 /* widget.c */,
665   - );
666   - path = v3270;
667   - sourceTree = "<group>";
668   - };
669   - C272076A15D7FBF700CCCD22 /* tools */ = {
670   - isa = PBXGroup;
671   - children = (
672   - C272076B15D7FBF700CCCD22 /* Makefile */,
673   - C272076C15D7FBF700CCCD22 /* Makefile.in */,
674   - C272076D15D7FBF700CCCD22 /* xml2pot.c */,
675   - );
676   - path = tools;
677   - sourceTree = "<group>";
678   - };
679   - C2C3E14715F0547300B02C1C /* Bundle */ = {
680   - isa = PBXGroup;
681   - children = (
682   - C2C3E15015F09BE200B02C1C /* pw3270.bundle */,
683   - C2C3E14D15F0598900B02C1C /* Info.plist */,
684   - C2C3E14E15F0598900B02C1C /* launcher.sh */,
685   - );
686   - name = Bundle;
687   - sourceTree = "<group>";
688   - };
689   -/* End PBXGroup section */
690   -
691   -/* Begin PBXLegacyTarget section */
692   - C232306215D7F01F00E76E83 /* Debug */ = {
693   - isa = PBXLegacyTarget;
694   - buildArgumentsString = Debug;
695   - buildConfigurationList = C232306515D7F01F00E76E83 /* Build configuration list for PBXLegacyTarget "Debug" */;
696   - buildPhases = (
697   - );
698   - buildToolPath = /usr/bin/make;
699   - buildWorkingDirectory = "";
700   - dependencies = (
701   - );
702   - name = Debug;
703   - passBuildSettingsInEnvironment = 1;
704   - productName = pw3270;
705   - };
706   -/* End PBXLegacyTarget section */
707   -
708   -/* Begin PBXProject section */
709   - C232305D15D7F01F00E76E83 /* Project object */ = {
710   - isa = PBXProject;
711   - attributes = {
712   - LastUpgradeCheck = 0440;
713   - ORGANIZATIONNAME = "Perry Werneck";
714   - };
715   - buildConfigurationList = C232306015D7F01F00E76E83 /* Build configuration list for PBXProject "pw3270" */;
716   - compatibilityVersion = "Xcode 3.2";
717   - developmentRegion = English;
718   - hasScannedForEncodings = 0;
719   - knownRegions = (
720   - en,
721   - );
722   - mainGroup = C232305B15D7F01F00E76E83;
723   - projectDirPath = "";
724   - projectRoot = "";
725   - targets = (
726   - C232306215D7F01F00E76E83 /* Debug */,
727   - );
728   - };
729   -/* End PBXProject section */
730   -
731   -/* Begin XCBuildConfiguration section */
732   - C232306315D7F01F00E76E83 /* Debug */ = {
733   - isa = XCBuildConfiguration;
734   - buildSettings = {
735   - ALWAYS_SEARCH_USER_PATHS = NO;
736   - ARCHS = "$(ARCHS_STANDARD_64_BIT)";
737   - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
738   - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
739   - COPY_PHASE_STRIP = NO;
740   - GCC_C_LANGUAGE_STANDARD = gnu99;
741   - GCC_DYNAMIC_NO_PIC = NO;
742   - GCC_ENABLE_OBJC_EXCEPTIONS = YES;
743   - GCC_OPTIMIZATION_LEVEL = 0;
744   - GCC_PREPROCESSOR_DEFINITIONS = (
745   - "DEBUG=1",
746   - "$(inherited)",
747   - );
748   - GCC_SYMBOLS_PRIVATE_EXTERN = NO;
749   - GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
750   - GCC_WARN_ABOUT_RETURN_TYPE = YES;
751   - GCC_WARN_UNINITIALIZED_AUTOS = YES;
752   - GCC_WARN_UNUSED_VARIABLE = YES;
753   - MACOSX_DEPLOYMENT_TARGET = 10.8;
754   - ONLY_ACTIVE_ARCH = YES;
755   - SDKROOT = macosx;
756   - };
757   - name = Debug;
758   - };
759   - C232306415D7F01F00E76E83 /* Release */ = {
760   - isa = XCBuildConfiguration;
761   - buildSettings = {
762   - ALWAYS_SEARCH_USER_PATHS = NO;
763   - ARCHS = "$(ARCHS_STANDARD_64_BIT)";
764   - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
765   - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
766   - COPY_PHASE_STRIP = YES;
767   - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
768   - GCC_C_LANGUAGE_STANDARD = gnu99;
769   - GCC_ENABLE_OBJC_EXCEPTIONS = YES;
770   - GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
771   - GCC_WARN_ABOUT_RETURN_TYPE = YES;
772   - GCC_WARN_UNINITIALIZED_AUTOS = YES;
773   - GCC_WARN_UNUSED_VARIABLE = YES;
774   - MACOSX_DEPLOYMENT_TARGET = 10.8;
775   - SDKROOT = macosx;
776   - };
777   - name = Release;
778   - };
779   - C232306615D7F01F00E76E83 /* Debug */ = {
780   - isa = XCBuildConfiguration;
781   - buildSettings = {
782   - DEBUGGING_SYMBOLS = YES;
783   - GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
784   - GCC_OPTIMIZATION_LEVEL = 0;
785   - OTHER_CFLAGS = "";
786   - OTHER_LDFLAGS = "";
787   - PRODUCT_NAME = "$(TARGET_NAME)";
788   - };
789   - name = Debug;
790   - };
791   - C232306715D7F01F00E76E83 /* Release */ = {
792   - isa = XCBuildConfiguration;
793   - buildSettings = {
794   - OTHER_CFLAGS = "";
795   - OTHER_LDFLAGS = "";
796   - PRODUCT_NAME = "$(TARGET_NAME)";
797   - };
798   - name = Release;
799   - };
800   -/* End XCBuildConfiguration section */
801   -
802   -/* Begin XCConfigurationList section */
803   - C232306015D7F01F00E76E83 /* Build configuration list for PBXProject "pw3270" */ = {
804   - isa = XCConfigurationList;
805   - buildConfigurations = (
806   - C232306315D7F01F00E76E83 /* Debug */,
807   - C232306415D7F01F00E76E83 /* Release */,
808   - );
809   - defaultConfigurationIsVisible = 0;
810   - defaultConfigurationName = Release;
811   - };
812   - C232306515D7F01F00E76E83 /* Build configuration list for PBXLegacyTarget "Debug" */ = {
813   - isa = XCConfigurationList;
814   - buildConfigurations = (
815   - C232306615D7F01F00E76E83 /* Debug */,
816   - C232306715D7F01F00E76E83 /* Release */,
817   - );
818   - defaultConfigurationIsVisible = 0;
819   - defaultConfigurationName = Release;
820   - };
821   -/* End XCConfigurationList section */
822   - };
823   - rootObject = C232305D15D7F01F00E76E83 /* Project object */;
824   -}
pw3270.xcodeproj/project.xcworkspace/contents.xcworkspacedata
... ... @@ -1,7 +0,0 @@
1   -<?xml version="1.0" encoding="UTF-8"?>
2   -<Workspace
3   - version = "1.0">
4   - <FileRef
5   - location = "self:pw3270.xcodeproj">
6   - </FileRef>
7   -</Workspace>
pw3270.xcodeproj/xcuserdata/perry.xcuserdatad/xcschemes/pw3270.xcscheme
... ... @@ -1,59 +0,0 @@
1   -<?xml version="1.0" encoding="UTF-8"?>
2   -<Scheme
3   - LastUpgradeVersion = "0440"
4   - version = "1.3">
5   - <BuildAction
6   - parallelizeBuildables = "YES"
7   - buildImplicitDependencies = "YES">
8   - <BuildActionEntries>
9   - <BuildActionEntry
10   - buildForTesting = "YES"
11   - buildForRunning = "YES"
12   - buildForProfiling = "YES"
13   - buildForArchiving = "YES"
14   - buildForAnalyzing = "YES">
15   - <BuildableReference
16   - BuildableIdentifier = "primary"
17   - BlueprintIdentifier = "C232306215D7F01F00E76E83"
18   - BuildableName = "Debug"
19   - BlueprintName = "Debug"
20   - ReferencedContainer = "container:pw3270.xcodeproj">
21   - </BuildableReference>
22   - </BuildActionEntry>
23   - </BuildActionEntries>
24   - </BuildAction>
25   - <TestAction
26   - selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
27   - selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
28   - shouldUseLaunchSchemeArgsEnv = "YES"
29   - buildConfiguration = "Debug">
30   - <Testables>
31   - </Testables>
32   - </TestAction>
33   - <LaunchAction
34   - selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
35   - selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
36   - launchStyle = "0"
37   - useCustomWorkingDirectory = "NO"
38   - buildConfiguration = "Debug"
39   - ignoresPersistentStateOnLaunch = "NO"
40   - debugDocumentVersioning = "YES"
41   - allowLocationSimulation = "YES">
42   - <AdditionalOptions>
43   - </AdditionalOptions>
44   - </LaunchAction>
45   - <ProfileAction
46   - shouldUseLaunchSchemeArgsEnv = "YES"
47   - savedToolIdentifier = ""
48   - useCustomWorkingDirectory = "NO"
49   - buildConfiguration = "Release"
50   - debugDocumentVersioning = "YES">
51   - </ProfileAction>
52   - <AnalyzeAction
53   - buildConfiguration = "Debug">
54   - </AnalyzeAction>
55   - <ArchiveAction
56   - buildConfiguration = "Release"
57   - revealArchiveInOrganizer = "YES">
58   - </ArchiveAction>
59   -</Scheme>
pw3270.xcodeproj/xcuserdata/perry.xcuserdatad/xcschemes/xcschememanagement.plist
... ... @@ -1,32 +0,0 @@
1   -<?xml version="1.0" encoding="UTF-8"?>
2   -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3   -<plist version="1.0">
4   -<dict>
5   - <key>SchemeUserState</key>
6   - <dict>
7   - <key>pw3270 copy.xcscheme</key>
8   - <dict>
9   - <key>orderHint</key>
10   - <integer>1</integer>
11   - </dict>
12   - <key>pw3270.xcscheme</key>
13   - <dict>
14   - <key>orderHint</key>
15   - <integer>0</integer>
16   - </dict>
17   - </dict>
18   - <key>SuppressBuildableAutocreation</key>
19   - <dict>
20   - <key>C232306215D7F01F00E76E83</key>
21   - <dict>
22   - <key>primary</key>
23   - <true/>
24   - </dict>
25   - <key>C272076E15D7FED400CCCD22</key>
26   - <dict>
27   - <key>primary</key>
28   - <true/>
29   - </dict>
30   - </dict>
31   -</dict>
32   -</plist>
sdk/Makefile.in
... ... @@ -1,110 +0,0 @@
1   -#
2   -# "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
3   -# (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
4   -# aplicativos mainframe. Registro no INPI sob o nome G3270.
5   -#
6   -# Copyright (C) <2008> <Banco do Brasil S.A.>
7   -#
8   -# Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
9   -# os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
10   -# Free Software Foundation.
11   -#
12   -# Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
13   -# GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
14   -# A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
15   -# obter mais detalhes.
16   -#
17   -# Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
18   -# programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple
19   -# Place, Suite 330, Boston, MA, 02111-1307, USA
20   -#
21   -# Contatos:
22   -#
23   -# perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
24   -# erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça)
25   -#
26   -
27   -LIBNAME=@DLLPREFIX@@PACKAGE_TARNAME@@DLLEXT@
28   -
29   -#---[ Configuration values ]-------------------------------------------------------------
30   -
31   -prefix=@prefix@
32   -exec_prefix=@exec_prefix@
33   -includedir=@includedir@
34   -libdir=@libdir@
35   -
36   -BASEDIR=@BASEDIR@
37   -SRCDIR=$(BASEDIR)/.src/$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
38   -
39   -PACKAGE_NAME=@PACKAGE_NAME@
40   -PACKAGE_VERSION=@PACKAGE_VERSION@
41   -PACKAGE_TARNAME=@PACKAGE_TARNAME@
42   -
43   -MKDIR=@MKDIR_P@
44   -INSTALL=@INSTALL@
45   -INSTALL_DATA=@INSTALL_DATA@
46   -LN_S=@LN_S@
47   -
48   -#---[ Rules ]----------------------------------------------------------------------------
49   -
50   -$(DESTDIR)$(libdir)/pkgconfig/%.pc: \
51   - %.pc
52   -
53   - @$(MKDIR) `dirname $@`
54   - @$(INSTALL_DATA) $^ $@
55   -
56   -$(DESTDIR)$(includedir)/%.h: \
57   - $(BASEDIR)/src/include/%.h
58   -
59   - @$(MKDIR) `dirname $@`
60   - @$(INSTALL_DATA) $^ $@
61   -
62   -$(SRCDIR)/src/include/%.h: \
63   - $(BASEDIR)/src/include/%.h
64   -
65   - @$(MKDIR) `dirname $@`
66   - @$(INSTALL_DATA) $^ $@
67   -
68   -
69   -#---[ Targets ]--------------------------------------------------------------------------
70   -
71   -install: \
72   - $(foreach SRC, $(notdir $(wildcard $(BASEDIR)/src/include/pw3270/*.h)), $(DESTDIR)$(includedir)/pw3270/$(SRC)) \
73   - $(DESTDIR)$(includedir)/pw3270.h \
74   - $(DESTDIR)$(includedir)/pw3270cpp.h
75   -
76   - @$(MKDIR) $(DESTDIR)$(libdir)
77   -
78   - @$(LN_S) -f \
79   - $(LIBNAME).@PACKAGE_MAJOR_VERSION@.@PACKAGE_MINOR_VERSION@ \
80   - $(DESTDIR)$(libdir)/$(LIBNAME).@PACKAGE_MAJOR_VERSION@
81   -
82   - @$(LN_S) -f \
83   - $(LIBNAME).@PACKAGE_MAJOR_VERSION@ \
84   - $(DESTDIR)$(libdir)/$(LIBNAME)
85   -
86   - # Install PKG-CONFIG files
87   -
88   - @mkdir -p $(DESTDIR)$(libdir)/pkgconfig
89   -
90   - @$(INSTALL_DATA) \
91   - $(BASEDIR)/sdk/*.pc \
92   - $(DESTDIR)$(libdir)/pkgconfig
93   -
94   -
95   -$(SRCDIR)/sdk: \
96   - $(foreach SRC, $(notdir $(wildcard $(BASEDIR)/src/include/lib3270/*.h)), $(SRCDIR)/src/include/lib3270/$(SRC)) \
97   - $(foreach SRC, $(notdir $(wildcard $(BASEDIR)/src/include/pw3270/*.h)), $(SRCDIR)/src/include/pw3270/$(SRC)) \
98   - $(SRCDIR)/src/include/lib3270.h \
99   - $(SRCDIR)/src/include/pw3270.h \
100   - $(SRCDIR)/src/include/pw3270cpp.h
101   -
102   - @$(MKDIR) $@
103   - @$(INSTALL_DATA) *.in $@
104   -
105   - @$(INSTALL_DATA) \
106   - $(BASEDIR)/src/include/*.in \
107   - $(SRCDIR)/src/include
108   -
109   -
110   -
sdk/pw3270.pc.in
... ... @@ -1,16 +0,0 @@
1   -prefix=@prefix@
2   -exec_prefix=@exec_prefix@
3   -libdir=@libdir@
4   -includedir=@includedir@
5   -
6   -version_major=@PACKAGE_MAJOR_VERSION@
7   -version_minor=@PACKAGE_MINOR_VERSION@
8   -gtk_version=@GTK_MODVERSION@
9   -
10   -Name: @PACKAGE_TARNAME@
11   -Description: @PACKAGE@ GTK widgets and support calls for plugin development
12   -Version: @PACKAGE_VERSION@
13   -Libs: -L\@libdir@ -l@PACKAGE_TARNAME@
14   -Libs.private: lib3270
15   -Cflags: -I@includedir@
16   -
src/libpw3270cpp/Makefile.in
... ... @@ -1,222 +0,0 @@
1   -#
2   -# "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
3   -# (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
4   -# aplicativos mainframe. Registro no INPI sob o nome G3270.
5   -#
6   -# Copyright (C) <2008> <Banco do Brasil S.A.>
7   -#
8   -# Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
9   -# os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
10   -# Free Software Foundation.
11   -#
12   -# Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
13   -# GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
14   -# A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
15   -# obter mais detalhes.
16   -#
17   -# Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
18   -# programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple
19   -# Place, Suite 330, Boston, MA, 02111-1307, USA
20   -#
21   -# Contatos:
22   -#
23   -# perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
24   -# erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça)
25   -#
26   -
27   -MODULE_NAME=libpw3270cpp
28   -
29   -SOURCES=session.cc exception.cc local.cc remote.cc service.cc module.cc
30   -
31   -#---[ Configuration values ]-------------------------------------------------------------
32   -
33   -PACKAGE_NAME=@PACKAGE_NAME@
34   -PACKAGE_VERSION=@PACKAGE_VERSION@
35   -PACKAGE_TARNAME=@PACKAGE_TARNAME@
36   -
37   -prefix=@prefix@
38   -exec_prefix=@exec_prefix@
39   -bindir=@bindir@
40   -sbindir=@sbindir@
41   -libdir=@libdir@
42   -includedir=@includedir@
43   -
44   -
45   -BASEDIR=@BASEDIR@
46   -SRCDIR=$(BASEDIR)/.src/$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)/src/$(MODULE_NAME)
47   -POTDIR=$(BASEDIR)/.pot/$(PACKAGE_TARNAME)/$(MODULE_NAME)
48   -
49   -OBJDIR=.obj
50   -OBJDBG=$(OBJDIR)/Debug
51   -OBJRLS=$(OBJDIR)/Release
52   -
53   -MKDIR=@MKDIR_P@
54   -CC=@CXX@
55   -LD=@CXX@
56   -AR=@AR@
57   -XGETTEXT=@XGETTEXT@
58   -MSGCAT=@MSGCAT@
59   -INSTALL=@INSTALL@
60   -VALGRIND=@VALGRIND@
61   -INSTALL_DATA=@INSTALL_DATA@
62   -INSTALL_PROGRAM=@INSTALL_PROGRAM@
63   -
64   -CFLAGS= \
65   - @CFLAGS@ \
66   - -Wno-deprecated-declarations \
67   - -I$(BASEDIR)/src/include \
68   - @LIB3270_CFLAGS@ \
69   - @DBUS_CFLAGS@ \
70   - @GTK_CFLAGS@
71   -
72   -LIBS= \
73   - @LIBS@ \
74   - @DBUS_LIBS@ \
75   - @LIBICONV@
76   -
77   -#---[ Rules ]----------------------------------------------------------------------------
78   -
79   -DEPENDS=\
80   - $(BASEDIR)/src/include/*.h \
81   - $(BASEDIR)/src/include/pw3270/*.h \
82   - *.h \
83   - Makefile
84   -
85   -$(OBJDBG)/%.o: \
86   - %.cc \
87   - $(DEPENDS)
88   -
89   - @echo $< ...
90   - @$(MKDIR) `dirname $@`
91   - @$(CC) \
92   - $(CFLAGS) \
93   - @DBG_CFLAGS@ \
94   - -DBUILD_DATE=`date +"%Y%m%d"`\
95   - -o $@ -c $<
96   -
97   -$(OBJRLS)/%.o: \
98   - %.cc \
99   - $(DEPENDS)
100   -
101   - @echo $< ...
102   - @$(MKDIR) `dirname $@`
103   - @$(CC) $(CFLAGS) \
104   - @RLS_CFLAGS@ \
105   - -DBUILD_DATE=`date +"%Y%m%d"` \
106   - -o $@ -c $<
107   -
108   -$(POTDIR)/%.pot: %.c
109   -
110   - @echo $(notdir $@) ...
111   - @$(MKDIR) `dirname $@`
112   - @$(XGETTEXT) \
113   - --default-domain=$(PACKAGE) \
114   - --language=C \
115   - --keyword=_ \
116   - --keyword=N_ \
117   - --keyword=MSG_:2 \
118   - --output=$@ \
119   - $<
120   -
121   - @touch $@
122   -
123   -#---[ Release Targets ]------------------------------------------------------------------
124   -
125   -all: \
126   - $(BASEDIR)/.bin/Release/$(MODULE_NAME).a
127   -
128   -Release: \
129   - $(BASEDIR)/.bin/Release/$(MODULE_NAME).a
130   -
131   -install: \
132   - $(DESTDIR)$(libdir)/$(MODULE_NAME).a
133   -
134   - @$(MKDIR) $(DESTDIR)/$(includedir)/pw3270
135   - @$(INSTALL_DATA) ../include/pw3270cpp.h $(DESTDIR)/$(includedir)/pw3270
136   -
137   -$(DESTDIR)$(libdir)/$(MODULE_NAME).a: \
138   - $(BASEDIR)/.bin/Release/$(MODULE_NAME).a
139   -
140   - @echo $@ ...
141   - @$(MKDIR) `dirname $@`
142   - @$(INSTALL_DATA) $^ $@
143   -
144   -$(BASEDIR)/.bin/Release/$(MODULE_NAME).a: \
145   - $(foreach SRC, $(basename $(SOURCES)), $(OBJRLS)/$(SRC).o)
146   -
147   - @echo $@ ...
148   - @$(MKDIR) `dirname $@`
149   - @$(AR) rcs $@ $^
150   -
151   -pot: \
152   - $(BASEDIR)/.pot/$(PACKAGE_TARNAME)/$(MODULE_NAME).pot
153   -
154   -$(BASEDIR)/.pot/$(PACKAGE_TARNAME)/$(MODULE_NAME).pot: \
155   - $(foreach SRC, $(basename $(SOURCES)), $(POTDIR)/$(SRC).pot)
156   -
157   - @rm -f $@
158   - @mkdir -p `dirname $@`
159   - @$(MSGCAT) --sort-output $^ > $@
160   -
161   -$(SRCDIR): \
162   - clean
163   -
164   - @$(MKDIR) $@
165   - @$(INSTALL_DATA) *.cc *.h *.in *.cbp $@
166   -
167   -
168   -#---[ Debug Targets ]--------------------------------------------------------------------
169   -
170   -Debug: \
171   - $(BASEDIR)/.bin/Debug/$(MODULE_NAME).a
172   -
173   -$(BASEDIR)/.bin/Debug/$(MODULE_NAME).a: \
174   - $(foreach SRC, $(basename $(SOURCES)), $(OBJDBG)/$(SRC).o)
175   -
176   - @echo $@ ...
177   - @$(MKDIR) `dirname $@`
178   - @$(AR) rcs $@ $^
179   -
180   -.bin/Debug/$(MODULE_NAME)@EXEEXT@: \
181   - $(OBJDBG)/testprogram.o \
182   - $(BASEDIR)/.bin/Debug/$(MODULE_NAME).a
183   -
184   - @$(MKDIR) `dirname $@`
185   - @$(LD) $(APP_LDFLAGS) -o $@ $^ $(LIBS)
186   -
187   -run: \
188   - .bin/Debug/$(MODULE_NAME)@EXEEXT@
189   -
190   -ifeq ($(VALGRIND),no)
191   - .bin/Debug/$(MODULE_NAME)@EXEEXT@
192   -else
193   - @touch valgrind.suppression
194   - @$(VALGRIND) \
195   - --leak-check=full \
196   - --track-origins=yes \
197   - --gen-suppressions=all \
198   - --suppressions=valgrind.suppression \
199   - .bin/Debug/$(MODULE_NAME)@EXEEXT@
200   -endif
201   -
202   -
203   -#---[ Clean Targets]---------------------------------------------------------------------
204   -
205   -cleanDebug:
206   -
207   - @rm -fr $(BASEDIR)/.obj/Debug/$(MODULE_NAME).a \
208   - $(OBJDBG)
209   - @rm -fr .bin
210   -
211   -cleanRelease:
212   -
213   - @rm -fr $(BASEDIR)/.obj/Release/$(MODULE_NAME).a \
214   - $(OBJRLS)
215   -
216   - @rm -fr $(POTDIR)
217   -
218   -clean: \
219   - cleanDebug \
220   - cleanRelease
221   -
222   -
src/libpw3270cpp/classlib.cbp
... ... @@ -1,53 +0,0 @@
1   -<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
2   -<CodeBlocks_project_file>
3   - <FileVersion major="1" minor="6" />
4   - <Project>
5   - <Option title="pw3270 Class Library" />
6   - <Option makefile_is_custom="1" />
7   - <Option pch_mode="2" />
8   - <Option compiler="gcc" />
9   - <Build>
10   - <Target title="Debug">
11   - <Option output=".bin/Debug/libpw3270cpp" prefix_auto="1" extension_auto="1" />
12   - <Option object_output=".obj/Debug/" />
13   - <Option type="1" />
14   - <Option compiler="gcc" />
15   - <Compiler>
16   - <Add option="-g" />
17   - </Compiler>
18   - </Target>
19   - <Target title="Release">
20   - <Option output=".bin/Release/pw3270 Class Library" prefix_auto="1" extension_auto="1" />
21   - <Option working_dir="" />
22   - <Option object_output=".obj/Release/" />
23   - <Option type="2" />
24   - <Option compiler="gcc" />
25   - <Compiler>
26   - <Add option="-O2" />
27   - </Compiler>
28   - <Linker>
29   - <Add option="-s" />
30   - </Linker>
31   - </Target>
32   - </Build>
33   - <Compiler>
34   - <Add option="-Wall" />
35   - </Compiler>
36   - <Unit filename="../include/pw3270/ipcpackets.h" />
37   - <Unit filename="../include/pw3270cpp.h" />
38   - <Unit filename="Makefile.in" />
39   - <Unit filename="exception.cc" />
40   - <Unit filename="local.cc" />
41   - <Unit filename="module.cc" />
42   - <Unit filename="private.h" />
43   - <Unit filename="remote.cc" />
44   - <Unit filename="service.cc" />
45   - <Unit filename="session.cc" />
46   - <Unit filename="testprogram.cc" />
47   - <Extensions>
48   - <envvars />
49   - <code_completion />
50   - <debugger />
51   - </Extensions>
52   - </Project>
53   -</CodeBlocks_project_file>
src/libpw3270cpp/exception.cc
... ... @@ -1,100 +0,0 @@
1   -/*
2   - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
3   - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
4   - * aplicativos mainframe. Registro no INPI sob o nome G3270.
5   - *
6   - * Copyright (C) <2008> <Banco do Brasil S.A.>
7   - *
8   - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
9   - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
10   - * Free Software Foundation.
11   - *
12   - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
13   - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
14   - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
15   - * obter mais detalhes.
16   - *
17   - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
18   - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin
19   - * St, Fifth Floor, Boston, MA 02110-1301 USA
20   - *
21   - * Este programa está nomeado como exception.cc e possui - linhas de código.
22   - *
23   - * Contatos:
24   - *
25   - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
26   - * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)
27   - *
28   - */
29   -
30   - #include <stdarg.h>
31   - #include <stdio.h>
32   - #include <string.h>
33   -
34   - #include <pw3270cpp.h>
35   -
36   -/*--[ Implement ]--------------------------------------------------------------------------------------------------*/
37   -
38   - namespace PW3270_NAMESPACE
39   - {
40   -
41   - exception::exception(int syscode)
42   - {
43   - snprintf(this->msg,4095,"%s",strerror(syscode));
44   - }
45   -
46   - exception::exception(const char *fmt, ...)
47   - {
48   - va_list arg_ptr;
49   - va_start(arg_ptr, fmt);
50   - vsnprintf(this->msg,4095,fmt,arg_ptr);
51   - va_end(arg_ptr);
52   - }
53   -
54   -#ifdef _WIN32
55   - exception::exception(DWORD error, const char *fmt, ...)
56   - {
57   - LPVOID lpMsgBuf = 0;
58   - char * ptr;
59   - size_t szPrefix;
60   -
61   - va_list arg_ptr;
62   - va_start(arg_ptr, fmt);
63   - vsnprintf(this->msg,4095,fmt,arg_ptr);
64   - va_end(arg_ptr);
65   -
66   - szPrefix = strlen(this->msg);
67   -
68   - FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |FORMAT_MESSAGE_IGNORE_INSERTS, NULL, error, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &lpMsgBuf, 0, NULL);
69   -
70   - for(ptr= (char *) lpMsgBuf;*ptr && *ptr != '\n';ptr++);
71   - *ptr = 0;
72   -
73   - snprintf(this->msg+szPrefix,4095-szPrefix,": %s (rc=%d)",(char *) lpMsgBuf,(int) error);
74   -
75   - LocalFree(lpMsgBuf);
76   -
77   - }
78   -#else
79   - exception::exception(int error, const char *fmt, ...)
80   - {
81   - size_t szPrefix;
82   -
83   - va_list arg_ptr;
84   - va_start(arg_ptr, fmt);
85   - vsnprintf(this->msg,4095,fmt,arg_ptr);
86   - va_end(arg_ptr);
87   -
88   - szPrefix = strlen(this->msg);
89   -
90   - snprintf(this->msg+szPrefix,4095-szPrefix,": %s (rc=%d)",strerror(error),(int) error);
91   -
92   - }
93   -#endif // _WIN32
94   -
95   - const char * exception::what() const throw()
96   - {
97   - return this->msg;
98   - }
99   -
100   - }
src/libpw3270cpp/local.cc
... ... @@ -1,615 +0,0 @@
1   -/*
2   - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
3   - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
4   - * aplicativos mainframe. Registro no INPI sob o nome G3270.
5   - *
6   - * Copyright (C) <2008> <Banco do Brasil S.A.>
7   - *
8   - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
9   - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
10   - * Free Software Foundation.
11   - *
12   - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
13   - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
14   - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
15   - * obter mais detalhes.
16   - *
17   - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
18   - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin
19   - * St, Fifth Floor, Boston, MA 02110-1301 USA
20   - *
21   - * Este programa está nomeado como local.cc e possui - linhas de código.
22   - *
23   - * Contatos:
24   - *
25   - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
26   - * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)
27   - *
28   - */
29   -
30   -#ifdef _WIN32
31   -
32   - // http://msdn.microsoft.com/en-us/library/windows/desktop/ms684179(v=vs.85).aspx
33   - #ifndef LOAD_LIBRARY_SEARCH_DEFAULT_DIRS
34   - #define LOAD_LIBRARY_SEARCH_DEFAULT_DIRS 0x00001000
35   - #endif // LOAD_LIBRARY_SEARCH_DEFAULT_DIRS
36   -
37   - #ifndef LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR
38   - #define LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR 0x00000100
39   - #endif // LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR
40   -
41   - #include <windows.h>
42   -
43   -#else
44   -
45   - #include <dlfcn.h>
46   -
47   -#endif
48   -
49   -#include "private.h"
50   -
51   -#include <lib3270/log.h>
52   -#include <lib3270/popup.h>
53   -#include <lib3270/trace.h>
54   -#include <string.h>
55   -#include <stdio.h>
56   -
57   -#ifdef HAVE_SYSLOG
58   - #include <syslog.h>
59   - #include <stdarg.h>
60   -#endif // HAVE_SYSLOG
61   -
62   -/*--[ Implement ]--------------------------------------------------------------------------------------------------*/
63   -
64   - extern "C"
65   - {
66   - static void loghandler(H3270 *session, const char *module, int rc, const char *fmt, va_list args)
67   - {
68   - #ifdef HAVE_SYSLOG
69   - openlog(PACKAGE_NAME, LOG_NDELAY, LOG_USER);
70   - vsyslog(LOG_INFO,fmt,args);
71   - closelog();
72   - #endif // HAVE_SYSLOG
73   - }
74   -
75   - static void tracehandler(H3270 *session, void *dunno, const char *fmt, va_list args)
76   - {
77   - #ifdef HAVE_SYSLOG
78   -
79   - #define MAX_LOG_LENGTH 200
80   -
81   - static char line[MAX_LOG_LENGTH+1];
82   - char temp[MAX_LOG_LENGTH];
83   - char * ptr;
84   - size_t len = strlen(line);
85   -
86   - vsnprintf(temp,MAX_LOG_LENGTH-len,fmt,args);
87   -
88   - ptr = strchr(temp,'\n');
89   - if(!ptr)
90   - {
91   - strncat(line,temp,MAX_LOG_LENGTH);
92   - if(strlen(line) >= MAX_LOG_LENGTH)
93   - {
94   - openlog(PACKAGE_NAME, LOG_NDELAY, LOG_USER);
95   - syslog(LOG_INFO,"%s",line);
96   - closelog();
97   - *line = 0;
98   - }
99   - return;
100   - }
101   -
102   - *ptr = 0;
103   - strncat(line,temp,MAX_LOG_LENGTH);
104   -
105   - openlog(PACKAGE_NAME, LOG_NDELAY, LOG_USER);
106   - syslog(LOG_DEBUG,"%s",line);
107   - closelog();
108   -
109   - strncpy(line,ptr+1,MAX_LOG_LENGTH);
110   -
111   - #endif // HAVE_SYSLOG
112   - }
113   -
114   - }
115   -
116   - namespace PW3270_NAMESPACE
117   - {
118   -
119   - class local : public session, protected module, protected recursive_mutex
120   - {
121   - private:
122   -
123   - // Lib3270 entry points
124   - const char * (*_get_version)(void);
125   - LIB3270_CSTATE (*_get_connection_state)(H3270 *h);
126   - LIB3270_MESSAGE (*_get_program_message)(H3270 *h);
127   - LIB3270_SSL_STATE (*_get_secure)(H3270 *h);
128   -
129   -
130   - int (*_disconnect)(H3270 *h);
131   - int (*_connect)(H3270 *h, const char *url, int wait);
132   - const char (*_set_url)(H3270 *h, const char *n);
133   - const char * (*_get_url)(H3270 *h, char *str, int len);
134   - int (*_is_connected)(H3270 *h);
135   - void (*_main_iterate)(H3270 *h, int wait);
136   - int (*_wait)(H3270 *hSession, int seconds);
137   - int (*_enter)(H3270 *hSession);
138   - int (*_pfkey)(H3270 *hSession, int key);
139   - int (*_pakey)(H3270 *hSession, int key);
140   - int (*_wait_for_ready)(H3270 *hSession, int seconds);
141   - char * (*_get_text)(H3270 *h, int offset, int len, char lf);
142   - char * (*_get_text_at)(H3270 *h, int row, int col, int len, char lf);
143   - int (*_cmp_text_at)(H3270 *h, int row, int col, const char *text, char lf);
144   - int (*_set_text_at)(H3270 *h, int row, int col, const unsigned char *str);
145   - int (*_is_ready)(H3270 *h);
146   - int (*_set_cursor_position)(H3270 *h, int row, int col);
147   - int (*_set_toggle)(H3270 *h, LIB3270_TOGGLE ix, int value);
148   - int (*_get_field_start)(H3270 *h, int baddr);
149   - int (*_get_field_len)(H3270 *h, int baddr);
150   - int (*_set_cursor_addr)(H3270 *h, int addr);
151   - int (*_get_cursor_addr)(H3270 *h);
152   - int (*_emulate_input)(H3270 *session, const char *s, int len, int pasting);
153   - int (*_get_next_unprotected)(H3270 *hSession, int baddr0);
154   - int (*_get_is_protected)(H3270 *hSession, int baddr);
155   - int (*_get_is_protected_at)(H3270 *hSession, int row, int col);
156   - void (*_popup_va)(H3270 *session, LIB3270_NOTIFY id , const char *title, const char *message, const char *fmt, va_list);
157   - void * (*_free)(void *);
158   - const char * (*_get_display_charset)(H3270 *hSession);
159   - int (*_set_host_charset)(H3270 *hSession, const char *name);
160   - const char * (*_get_host_charset)(H3270 *hSession);
161   - int (*_print)(H3270 *hSession);
162   - int (*_erase)(H3270 *hSession);
163   - int (*_erase_eof)(H3270 *hSession);
164   - int (*_erase_eol)(H3270 *hSession);
165   - int (*_erase_input)(H3270 *hSession);
166   - int (*_action)(H3270 *hSession, const char *name);
167   - int (*_set_unlock_delay)(H3270 *hSession, unsigned short ms);
168   -
169   - int (*_get_width)(H3270 *hSession);
170   - int (*_get_height)(H3270 *hSession);
171   - int (*_get_length)(H3270 *hSession);
172   -
173   - const char * (*_ebc2asc)(H3270 *hSession, unsigned char *buffer, int sz);
174   - const char * (*_asc2ebc)(H3270 *hSession, unsigned char *buffer, int sz);
175   -
176   - protected:
177   -
178   - H3270 * hSession;
179   -
180   - void load_methods() {
181   -
182   - void (*set_log_handler)(void (*loghandler)(H3270 *, const char *, int, const char *, va_list));
183   - void (*set_trace_handler)(H3270 *hSession, LIB3270_TRACE_HANDLER handler, void *userdata);
184   -
185   - struct _call
186   - {
187   - void **entry;
188   - const char * name;
189   - } call[] =
190   - {
191   - { (void **) & set_log_handler, "lib3270_set_log_handler" },
192   - { (void **) & set_trace_handler, "lib3270_set_trace_handler" },
193   -
194   - { (void **) & _is_connected, "lib3270_is_connected" },
195   - { (void **) & _get_connection_state, "lib3270_get_connection_state" },
196   - { (void **) & _get_program_message, "lib3270_get_program_message" },
197   - { (void **) & _get_secure, "lib3270_get_secure" },
198   -
199   - { (void **) & _get_version, "lib3270_get_version" },
200   - { (void **) & _disconnect, "lib3270_disconnect" },
201   - { (void **) & _connect, "lib3270_connect_url" },
202   - { (void **) & _set_url, "lib3270_set_url" },
203   - { (void **) & _get_url, "lib3270_get_url" },
204   - { (void **) & _main_iterate, "lib3270_main_iterate" },
205   - { (void **) & _wait, "lib3270_wait" },
206   - { (void **) & _enter, "lib3270_enter" },
207   - { (void **) & _pfkey, "lib3270_pfkey" },
208   - { (void **) & _pakey, "lib3270_pakey" },
209   - { (void **) & _wait_for_ready, "lib3270_wait_for_ready" },
210   - { (void **) & _get_text, "lib3270_get_string_at_address" },
211   -
212   - { (void **) & _get_text_at, "lib3270_get_string_at" },
213   - { (void **) & _cmp_text_at, "lib3270_cmp_text_at" },
214   - { (void **) & _set_text_at, "lib3270_set_string_at" },
215   -
216   - { (void **) & _is_ready, "lib3270_is_ready" },
217   - { (void **) & _set_cursor_position, "lib3270_set_cursor_position" },
218   - { (void **) & _set_toggle, "lib3270_set_toggle" },
219   - { (void **) & _get_field_start, "lib3270_get_field_start" },
220   - { (void **) & _get_field_len, "lib3270_get_field_len" },
221   - { (void **) & _set_cursor_addr, "lib3270_set_cursor_address" },
222   - { (void **) & _get_cursor_addr, "lib3270_get_cursor_address" },
223   - { (void **) & _emulate_input, "lib3270_emulate_input" },
224   - { (void **) & _get_next_unprotected, "lib3270_get_next_unprotected" },
225   - { (void **) & _get_is_protected, "lib3270_get_is_protected" },
226   - { (void **) & _get_is_protected_at, "lib3270_get_is_protected_at" },
227   - { (void **) & _popup_va, "lib3270_popup_va" },
228   - { (void **) & _free, "lib3270_free" },
229   - { (void **) & _get_display_charset, "lib3270_get_display_charset" },
230   - { (void **) & _set_host_charset, "lib3270_set_host_charset" },
231   - { (void **) & _get_host_charset, "lib3270_get_host_charset" },
232   -
233   - { (void **) & _erase, "lib3270_erase" },
234   - { (void **) & _erase_eof, "lib3270_eraseeof" },
235   - { (void **) & _erase_eol, "lib3270_eraseeol" },
236   - { (void **) & _erase_input, "lib3270_eraseinput" },
237   -
238   - { (void **) & _print, "lib3270_print" },
239   - { (void **) & _ebc2asc, "lib3270_ebc2asc" },
240   - { (void **) & _asc2ebc, "lib3270_asc2ebc" },
241   -
242   - { (void **) & _action, "lib3270_action" },
243   - { (void **) & _set_unlock_delay, "lib3270_set_unlock_delay" },
244   -
245   - { (void **) & _get_width, "lib3270_get_width" },
246   - { (void **) & _get_height, "lib3270_get_height" },
247   - { (void **) & _get_length, "lib3270_get_length" },
248   -
249   - };
250   -
251   - for(unsigned int f = 0; f < (sizeof (call) / sizeof ((call)[0]));f++)
252   - {
253   - *call[f].entry = (void *) get_symbol(call[f].name);
254   - if(!*call[f].entry)
255   - throw exception("Can't find symbol %s",call[f].name);
256   - }
257   -
258   - // Get Session handle, setup base callbacks
259   - set_log_handler(loghandler);
260   - set_trace_handler(this->hSession, tracehandler, NULL);
261   -
262   - set_display_charset();
263   -
264   - }
265   -
266   - public:
267   -
268   - local() : module(LIB3270_STRINGIZE_VALUE_OF(LIB3270_NAME),PACKAGE_VERSION)
269   - {
270   - }
271   -
272   - virtual ~local()
273   - {
274   - }
275   -
276   - bool is_connected(void)
277   - {
278   - return _is_connected(hSession);
279   - }
280   -
281   - LIB3270_CSTATE get_cstate(void)
282   - {
283   - return _get_connection_state(hSession);
284   - }
285   -
286   - LIB3270_MESSAGE get_program_message(void) {
287   - return _get_program_message(hSession);
288   - }
289   -
290   - LIB3270_SSL_STATE get_secure(void) {
291   - return _get_secure(hSession);
292   - };
293   -
294   - int connect(const char *host, time_t wait = 0) {
295   - this->lock();
296   - int rc = _connect(hSession,host,wait);
297   - this->unlock();
298   - return rc;
299   - }
300   -
301   - int connect() {
302   - return connect("");
303   - }
304   -
305   - /*
306   - int connect(void)
307   - {
308   - this->lock();
309   - int rc = _connect(hSession,0);
310   - this->unlock();
311   -
312   - return rc;
313   - }
314   - */
315   -
316   - int set_url(const char *uri)
317   - {
318   - return (_set_url(hSession,uri) == 0);
319   - }
320   -
321   - string get_url()
322   - {
323   - char buffer[1024];
324   - return string(_get_url(hSession,buffer,sizeof(buffer)));
325   - }
326   -
327   - int disconnect(void)
328   - {
329   - this->lock();
330   - int rc = _disconnect(hSession);
331   - this->unlock();
332   -
333   - return rc;
334   - }
335   -
336   - bool is_ready(void)
337   - {
338   - return _is_ready(hSession) != 0;
339   - }
340   -
341   - int wait_for_ready(int seconds)
342   - {
343   - return _wait_for_ready(hSession,seconds);
344   - }
345   -
346   - int wait(int seconds)
347   - {
348   - return _wait(hSession,seconds);
349   - }
350   -
351   - int iterate(bool wait)
352   - {
353   - this->lock();
354   - _main_iterate(hSession,wait);
355   - this->unlock();
356   - return 0;
357   - }
358   -
359   - string get_text_at(int row, int col, size_t sz, bool lf)
360   - {
361   - string rc;
362   - char * ptr = _get_text_at(hSession,row,col,sz,lf ? '\n' : 0);
363   -
364   - if(ptr)
365   - {
366   - rc.assign(ptr);
367   - _free(ptr);
368   - }
369   -
370   - return rc;
371   - }
372   -
373   - int set_text_at(int row, int col, const char *str)
374   - {
375   - return _set_text_at(hSession,row,col,(const unsigned char *) str);
376   - }
377   -
378   - int cmp_text_at(int row, int col, const char *text, bool lf)
379   - {
380   - return _cmp_text_at(hSession,row,col,text,lf ? '\n' : 0);
381   - }
382   -
383   - string get_text(int offset, size_t len, bool lf)
384   - {
385   - string rc;
386   - char * ptr = _get_text(hSession,offset,len,lf ? '\n' : 0);
387   -
388   - if(ptr)
389   - {
390   - rc.assign(ptr);
391   - _free(ptr);
392   - }
393   -
394   - return rc;
395   - }
396   -
397   - int set_cursor_position(int row, int col)
398   - {
399   - return _set_cursor_position(hSession,row,col);
400   - }
401   -
402   - int set_cursor_addr(int addr)
403   - {
404   - return _set_cursor_addr(hSession,addr);
405   - }
406   -
407   - int get_cursor_addr(void)
408   - {
409   - return _get_cursor_addr(hSession);
410   - }
411   -
412   - int enter(void)
413   - {
414   - return _enter(hSession);
415   - }
416   -
417   - int pfkey(int key)
418   - {
419   - return _pfkey(hSession,key);
420   - }
421   -
422   - int pakey(int key)
423   - {
424   - return _pakey(hSession,key);
425   - }
426   -
427   - int quit(void)
428   - {
429   - return EINVAL;
430   - }
431   -
432   - int set_toggle(LIB3270_TOGGLE ix, bool value)
433   - {
434   - return _set_toggle(hSession, ix, (int) value);
435   - }
436   -
437   - int emulate_input(const char *str)
438   - {
439   - return _emulate_input(hSession,str,-1,1);
440   - }
441   -
442   - int get_field_start(int baddr)
443   - {
444   - return _get_field_start(hSession,baddr);
445   - }
446   -
447   - int get_field_len(int baddr)
448   - {
449   - return _get_field_len(hSession,baddr);
450   - }
451   -
452   - int get_next_unprotected(int baddr)
453   - {
454   - return _get_next_unprotected(hSession,baddr);
455   - }
456   -
457   - int get_is_protected(int baddr)
458   - {
459   - return _get_is_protected(hSession,baddr);
460   - }
461   -
462   - int get_is_protected_at(int row, int col)
463   - {
464   - return _get_is_protected_at(hSession,row,col);
465   - }
466   -
467   - int popup_dialog(LIB3270_NOTIFY id , const char *title, const char *message, const char *fmt, ...)
468   - {
469   - va_list args;
470   - va_start(args, fmt);
471   - _popup_va(hSession, id, title, message, fmt, args);
472   - va_end(args);
473   - return 0;
474   - }
475   -
476   - string get_display_charset(void)
477   - {
478   - return string(_get_display_charset(hSession));
479   - }
480   -
481   - int set_host_charset(const char *charset)
482   - {
483   - return _set_host_charset(hSession,charset);
484   - }
485   -
486   - string get_host_charset(void)
487   - {
488   - return string(_get_host_charset(hSession));
489   - }
490   -
491   - int erase(void)
492   - {
493   - return _erase(hSession);
494   - }
495   -
496   - int erase_eof(void)
497   - {
498   - return _erase_eof(hSession);
499   - }
500   -
501   - int erase_eol(void)
502   - {
503   - return _erase_eol(hSession);
504   - }
505   -
506   - int erase_input(void)
507   - {
508   - return _erase_input(hSession);
509   - }
510   -
511   - int print(void)
512   - {
513   - return _print(hSession);
514   - }
515   -
516   -
517   - const char * asc2ebc(unsigned char *str, int sz)
518   - {
519   - return _asc2ebc(hSession,str,sz);
520   - }
521   -
522   - const char * ebc2asc(unsigned char *str, int sz)
523   - {
524   - return _ebc2asc(hSession,str,sz);
525   - }
526   -
527   - int action(const char *name)
528   - {
529   - return _action(hSession,name);
530   - }
531   -
532   - void set_unlock_delay(unsigned short ms)
533   - {
534   - _set_unlock_delay(hSession,ms);
535   - }
536   -
537   - int get_width(void) {
538   - return _get_width(hSession);
539   - }
540   -
541   - int get_height(void) {
542   - return _get_height(hSession);
543   - }
544   -
545   - int get_length(void) {
546   - return _get_length(hSession);
547   - }
548   -
549   - };
550   -
551   - session * session::create_local(void)
552   - {
553   - class obj : public local {
554   - public:
555   - obj() : local() {
556   -
557   - H3270 * (*lib3270_new)(const char *) = (H3270 * (*)(const char *)) get_symbol("lib3270_session_new");
558   -
559   - if(!lib3270_new)
560   - throw exception("Can't find symbol %s","lib3270_session_new");
561   -
562   - this->hSession = lib3270_new("");
563   -
564   - load_methods();
565   -
566   - }
567   -
568   - virtual ~obj() {
569   -
570   - this->lock();
571   -
572   - if(is_connected()) {
573   - disconnect();
574   - }
575   -
576   - try
577   - {
578   - static void (*session_free)(H3270 *h) = (void (*)(H3270 *)) get_symbol("lib3270_session_free");
579   -
580   - if(session_free && this->hSession)
581   - session_free(this->hSession);
582   -
583   - this->hSession = 0;
584   -
585   - }
586   - catch(exception e) { }
587   -
588   - this->unlock();
589   -
590   - }
591   - };
592   -
593   - return new obj();
594   - }
595   -
596   - session * session::create_local(H3270 *hSession)
597   - {
598   - class obj : public local {
599   - public:
600   - obj(H3270 *hSession) : local()
601   - {
602   - this->hSession = hSession;
603   - load_methods();
604   - }
605   -
606   - virtual ~obj() {
607   - }
608   -
609   - };
610   -
611   - return new obj(hSession);
612   - }
613   -
614   - }
615   -
src/libpw3270cpp/module.cc
... ... @@ -1,218 +0,0 @@
1   -/*
2   - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
3   - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
4   - * aplicativos mainframe. Registro no INPI sob o nome G3270.
5   - *
6   - * Copyright (C) <2008> <Banco do Brasil S.A.>
7   - *
8   - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
9   - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
10   - * Free Software Foundation.
11   - *
12   - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
13   - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
14   - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
15   - * obter mais detalhes.
16   - *
17   - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
18   - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin
19   - * St, Fifth Floor, Boston, MA 02110-1301 USA
20   - *
21   - * Este programa está nomeado como module.cc e possui - linhas de código.
22   - *
23   - * Contatos:
24   - *
25   - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
26   - * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)
27   - *
28   - */
29   -
30   -#ifdef _WIN32
31   -
32   - // http://msdn.microsoft.com/en-us/library/windows/desktop/ms684179(v=vs.85).aspx
33   - #ifndef LOAD_LIBRARY_SEARCH_DEFAULT_DIRS
34   - #define LOAD_LIBRARY_SEARCH_DEFAULT_DIRS 0x00001000
35   - #endif // LOAD_LIBRARY_SEARCH_DEFAULT_DIRS
36   -
37   - #ifndef LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR
38   - #define LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR 0x00000100
39   - #endif // LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR
40   -
41   - #include <windows.h>
42   -
43   -#else
44   -
45   - #include <dlfcn.h>
46   -
47   -#endif
48   -
49   -#include <pw3270cpp.h>
50   -
51   -/*---[ Implement ]----------------------------------------------------------------------------------*/
52   -
53   -
54   -namespace PW3270_NAMESPACE
55   -{
56   -
57   -#ifdef _WIN32
58   - int module::get_datadir(LPSTR datadir)
59   - {
60   - HKEY hKey = 0;
61   - unsigned long datalen = strlen(datadir);
62   -
63   - *datadir = 0;
64   -
65   - if(RegOpenKeyEx(HKEY_LOCAL_MACHINE,"Software\\pw3270",0,KEY_QUERY_VALUE,&hKey) == ERROR_SUCCESS)
66   - {
67   - unsigned long datatype; // #defined in winnt.h (predefined types 0-11)
68   - if(RegQueryValueExA(hKey,"datadir",NULL,&datatype,(LPBYTE) datadir,&datalen) != ERROR_SUCCESS)
69   - *datadir = 0;
70   - RegCloseKey(hKey);
71   - }
72   -
73   - return *datadir;
74   - }
75   -#endif // _WIN32
76   -
77   - module::module(const char *name, const char *version)
78   - {
79   - string dllname = name;
80   -
81   -#ifdef _WIN32
82   -
83   - dllname += ".dll";
84   - if(version)
85   - {
86   - dllname += ".";
87   - dllname += version;
88   - }
89   -
90   - HMODULE kernel;
91   - HANDLE cookie = NULL;
92   - DWORD rc;
93   - HANDLE WINAPI (*AddDllDirectory)(PCWSTR NewDirectory);
94   - BOOL WINAPI (*RemoveDllDirectory)(HANDLE Cookie);
95   - UINT errorMode;
96   - char datadir[4096];
97   - char buffer[4096];
98   -
99   - kernel = LoadLibrary("kernel32.dll");
100   - AddDllDirectory = (HANDLE WINAPI (*)(PCWSTR)) GetProcAddress(kernel,"AddDllDirectory");
101   - RemoveDllDirectory = (BOOL WINAPI (*)(HANDLE)) GetProcAddress(kernel,"RemoveDllDirectory");
102   -
103   - // Notify user in case of error loading protocol DLL
104   - // http://msdn.microsoft.com/en-us/library/windows/desktop/ms680621(v=vs.85).aspx
105   - errorMode = SetErrorMode(1);
106   -
107   - memset(datadir,' ',4095);
108   - datadir[4095] = 0;
109   -
110   - if(get_datadir(datadir))
111   - {
112   - trace("Datadir=[%s] AddDllDirectory=%p RemoveDllDirectory=%p\n",datadir,AddDllDirectory,RemoveDllDirectory);
113   -
114   - if(AddDllDirectory)
115   - {
116   - wchar_t *path = (wchar_t *) malloc(4096*sizeof(wchar_t));
117   - mbstowcs(path, datadir, 4095);
118   - cookie = AddDllDirectory(path);
119   - free(path);
120   - }
121   -
122   -#ifdef DEBUG
123   - snprintf(buffer,4096,"%s\\.bin\\Debug\\%s",datadir,dllname.c_str());
124   -#else
125   - snprintf(buffer,4096,"%s\\%s",datadir,dllname.c_str());
126   -#endif // DEBUG
127   -
128   - trace("Loading [%s] [%s]",buffer,datadir);
129   - hModule = LoadLibrary(buffer);
130   -
131   - trace("Module=%p rc=%d",hModule,(int) GetLastError());
132   -
133   - if(hModule == NULL)
134   - {
135   - // Enable DLL error popup and try again with full path
136   - SetErrorMode(0);
137   - hModule = LoadLibraryEx(buffer,NULL,LOAD_LIBRARY_SEARCH_DEFAULT_DIRS|LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR);
138   - }
139   -
140   - rc = GetLastError();
141   -
142   - trace("%s hModule=%p rc=%d",buffer,hModule,(int) rc);
143   - }
144   - else
145   - {
146   - hModule = LoadLibrary(dllname.c_str());
147   - rc = GetLastError();
148   - }
149   -
150   - SetErrorMode(errorMode);
151   -
152   - trace("%s hModule=%p rc=%d",dllname.c_str(),hModule,(int) rc);
153   -
154   - if(cookie && RemoveDllDirectory)
155   - RemoveDllDirectory(cookie);
156   -
157   - if(kernel)
158   - FreeLibrary(kernel);
159   -
160   - if(!hModule)
161   - {
162   - throw exception("%s: %s",dllname.c_str(),session::win32_strerror(rc).c_str());
163   - }
164   -
165   -#else
166   - dllname += ".so";
167   - if(version)
168   - {
169   - dllname += ".";
170   - dllname += version;
171   - }
172   -
173   - dlerror();
174   -
175   - trace("Loading %s",dllname.c_str());
176   - hModule = dlopen(dllname.c_str(), RTLD_NOW);
177   - if(!hModule)
178   - throw exception("Can't load lib3270: %s",dllname.c_str());
179   -
180   -#endif // _WIN32
181   -
182   -
183   - }
184   -
185   - module::~module()
186   - {
187   -#ifdef _WIN32
188   - FreeLibrary(hModule);
189   -#else
190   - dlclose(hModule);
191   -#endif // _WIN32
192   - }
193   -
194   -
195   - void * module::get_symbol(const char *name)
196   - {
197   - void *symbol;
198   -
199   -#ifdef _WIN32
200   -
201   - symbol = (void *) GetProcAddress(hModule,name);
202   -
203   - if(!symbol)
204   - throw exception("Can't load symbol %s",name);
205   -
206   -#else
207   - symbol = dlsym(hModule,name);
208   -
209   - if(!symbol)
210   - throw exception("Can't load symbol %s dlerror was \"%s\"",name,dlerror());
211   -
212   -#endif // _WIN32
213   -
214   - return symbol;
215   - }
216   -
217   -}
218   -
src/libpw3270cpp/private.h
... ... @@ -1,119 +0,0 @@
1   -/*
2   - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
3   - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
4   - * aplicativos mainframe. Registro no INPI sob o nome G3270.
5   - *
6   - * Copyright (C) <2008> <Banco do Brasil S.A.>
7   - *
8   - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
9   - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
10   - * Free Software Foundation.
11   - *
12   - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
13   - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
14   - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
15   - * obter mais detalhes.
16   - *
17   - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
18   - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin
19   - * St, Fifth Floor, Boston, MA 02110-1301 USA
20   - *
21   - * Este programa está nomeado como private.h e possui - linhas de código.
22   - *
23   - * Contatos:
24   - *
25   - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
26   - * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)
27   - *
28   - */
29   -
30   -#ifndef PRIVATE_H_INCLUDED
31   -
32   - #define PRIVATE_H_INCLUDED
33   -
34   - #include <config.h>
35   - #include <cstring>
36   - #include <pw3270cpp.h>
37   -
38   - #if defined(_WIN32)
39   -
40   - class recursive_mutex {
41   - private:
42   - HANDLE hMutex;
43   -
44   - public:
45   - recursive_mutex() {
46   - hMutex = CreateMutex(NULL,FALSE,NULL);
47   - };
48   -
49   - ~recursive_mutex() {
50   - CloseHandle(hMutex);
51   - };
52   -
53   - void lock(void) {
54   - WaitForSingleObject(hMutex,INFINITE);
55   - };
56   -
57   - void unlock(void) {
58   - ReleaseMutex(hMutex);
59   - };
60   -
61   - bool try_lock(void) {
62   - if(WaitForSingleObject(hMutex,1) == WAIT_OBJECT_0)
63   - return true;
64   - return false;
65   - };
66   - };
67   -
68   - #elif __cplusplus < 201103L
69   -
70   - #define nullptr NULL
71   -
72   - class recursive_mutex {
73   - private:
74   - pthread_mutex_t mtx;
75   - pthread_mutexattr_t mtxAttr;
76   -
77   - public:
78   - recursive_mutex() {
79   -
80   - memset(&mtx,0,sizeof(mtx));
81   - memset(&mtxAttr,0,sizeof(mtxAttr));
82   -
83   - pthread_mutexattr_init(&mtxAttr);
84   - pthread_mutexattr_settype(&mtxAttr, PTHREAD_MUTEX_RECURSIVE);
85   - pthread_mutex_init(&mtx, &mtxAttr);
86   - };
87   -
88   - ~recursive_mutex() {
89   - pthread_mutex_destroy(&mtx);
90   - };
91   -
92   - void lock(void) {
93   - pthread_mutex_lock(&mtx);
94   - };
95   -
96   - void unlock(void) {
97   - pthread_mutex_unlock(&mtx);
98   - };
99   -
100   - bool try_lock(void) {
101   - return pthread_mutex_trylock(&mtx) == 0;
102   - };
103   - };
104   -
105   - #else
106   -
107   - #include <mutex>
108   -
109   - #endif // !c11
110   -
111   - namespace PW3270_NAMESPACE
112   - {
113   -
114   - session * create_service_client(const char *session);
115   -
116   - }
117   -
118   -
119   -#endif // PRIVATE_H_INCLUDED
src/libpw3270cpp/remote.cc
... ... @@ -1,1656 +0,0 @@
1   -/*
2   - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
3   - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
4   - * aplicativos mainframe. Registro no INPI sob o nome G3270.
5   - *
6   - * Copyright (C) <2008> <Banco do Brasil S.A.>
7   - *
8   - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
9   - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
10   - * Free Software Foundation.
11   - *
12   - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
13   - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
14   - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
15   - * obter mais detalhes.
16   - *
17   - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
18   - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin
19   - * St, Fifth Floor, Boston, MA 02110-1301 USA
20   - *
21   - * Este programa está nomeado como remote.cc e possui - linhas de código.
22   - *
23   - * Contatos:
24   - *
25   - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
26   - * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)
27   - *
28   - */
29   -
30   - #include <config.h>
31   - #include <iostream>
32   -
33   - #if defined(HAVE_DBUS)
34   - #include <stdio.h>
35   - #include <dbus/dbus.h>
36   - #include <string.h>
37   - #include <malloc.h>
38   - #include <sys/types.h>
39   - #include <limits.h>
40   -
41   - #ifndef DBUS_TIMEOUT_INFINITE
42   - #define DBUS_TIMEOUT_INFINITE ((int) 0x7fffffff)
43   - #endif // !DBUS_TIMEOUT_INFINITE
44   -
45   - #endif // HAVE_DBUS
46   -
47   - #if defined(_WIN32)
48   - #include <windows.h>
49   - #include <pw3270/ipcpackets.h>
50   - #include <process.h>
51   - #else
52   - #include <unistd.h>
53   -
54   - #define HLLAPI_PACKET_IS_CONNECTED "isConnected"
55   - #define HLLAPI_PACKET_GET_CSTATE "getConnectionState"
56   - #define HLLAPI_PACKET_GET_PROGRAM_MESSAGE "getProgramMessage"
57   - #define HLLAPI_PACKET_GET_SSL_STATE "getSecureState"
58   - #define HLLAPI_PACKET_IS_READY "isReady"
59   - #define HLLAPI_PACKET_DISCONNECT "disconnect"
60   - #define HLLAPI_PACKET_GET_HOST "getURL"
61   - #define HLLAPI_PACKET_SET_HOST "setURL"
62   - #define HLLAPI_PACKET_GET_CURSOR "getCursorAddress"
63   - #define HLLAPI_PACKET_GET_WIDTH "getScreenWidth"
64   - #define HLLAPI_PACKET_GET_HEIGHT "getScreenHeight"
65   - #define HLLAPI_PACKET_GET_LENGTH "getScreenLength"
66   - #define HLLAPI_PACKET_ENTER "enter"
67   - #define HLLAPI_PACKET_QUIT "quit"
68   - #define HLLAPI_PACKET_ERASE "erase"
69   - #define HLLAPI_PACKET_ERASE_EOF "eraseEOF"
70   - #define HLLAPI_PACKET_ERASE_EOL "eraseEOL"
71   - #define HLLAPI_PACKET_ERASE_INPUT "eraseInput"
72   - #define HLLAPI_PACKET_PRINT "print"
73   - #define HLLAPI_PACKET_ASC2EBC "asc2ebc"
74   - #define HLLAPI_PACKET_EBC2ASC "ebc2asc"
75   - #define HLLAPI_PACKET_SET_UNLOCK_DELAY "setUnlockDelay"
76   - #endif // _WIN32
77   -
78   - #include <pw3270cpp.h>
79   - #include <lib3270/log.h>
80   -
81   - #include "private.h"
82   -
83   -#if defined(HAVE_DBUS)
84   - static const char * prefix_dest = "br.com.bb.";
85   - static const char * prefix_path = "/br/com/bb/";
86   -#endif // HAVE_DBUS
87   -
88   -/*--[ Implement ]--------------------------------------------------------------------------------------------------*/
89   -
90   - namespace PW3270_NAMESPACE
91   - {
92   -
93   - class remote : public session
94   - {
95   - private:
96   -
97   -#if defined(_WIN32)
98   -
99   - HANDLE hPipe;
100   -
101   - int query_intval(HLLAPI_PACKET id)
102   - {
103   - struct hllapi_packet_query query = { id };
104   - struct hllapi_packet_result response;
105   - DWORD cbSize = sizeof(query);
106   - if(TransactNamedPipe(hPipe,(LPVOID) &query, cbSize, &response, sizeof(response), &cbSize,NULL))
107   - return response.rc;
108   -
109   - throw exception(GetLastError(),"%s","Transaction error");
110   - }
111   -
112   - int query_strval(HLLAPI_PACKET id, unsigned char *buffer, size_t sz)
113   - {
114   - DWORD cbSize = sizeof(struct hllapi_packet_text)+sz;
115   - struct hllapi_packet_text * query;
116   - struct hllapi_packet_text * response;
117   - int rc = -1;
118   -
119   - query = (struct hllapi_packet_text *) malloc(cbSize+2);
120   - memset(query,0,cbSize+2);
121   - query->packet_id = id;
122   - memcpy(query->text,buffer,sz);
123   -
124   - response = (struct hllapi_packet_text *) malloc(cbSize+2);
125   - memset(response,0,cbSize+2);
126   -
127   - if(TransactNamedPipe(hPipe,(LPVOID) query, cbSize, &response, cbSize, &cbSize,NULL))
128   - {
129   - if(response->packet_id)
130   - {
131   - rc = response->packet_id;
132   - }
133   - else
134   - {
135   - rc = 0;
136   - strncpy((char *) buffer,response->text,sz);
137   - }
138   - }
139   -
140   - free(response);
141   - free(query);
142   -
143   - return rc;
144   -
145   - }
146   -
147   - string query_string(void *query, size_t szQuery, size_t len)
148   - {
149   - struct hllapi_packet_text * response;
150   - DWORD sz = sizeof(struct hllapi_packet_text)+len;
151   - DWORD cbSize = (DWORD) sz;
152   - string s;
153   - char buffer[sz+2];
154   -
155   - memset(buffer,0,sz+2);
156   -
157   - response = (struct hllapi_packet_text *) buffer;
158   -
159   - if(TransactNamedPipe(hPipe,(LPVOID) query, szQuery, response, sz, &cbSize,NULL))
160   - {
161   - buffer[min(cbSize,sz)] = 0;
162   -
163   - trace("TransactNamedPipe call %d returns \"%s\"",(int) *( (unsigned char *) query), response->text);
164   -
165   - if(!response->packet_id)
166   - s.assign(response->text);
167   - }
168   - else
169   - {
170   - trace("TransactNamedPipe error on call %d",(int) *( (unsigned char *) query));
171   - s.assign("");
172   - }
173   -
174   - return s;
175   - }
176   -
177   - int query_intval(void *pkt, size_t szQuery, bool dynamic = false)
178   - {
179   - struct hllapi_packet_result response;
180   - DWORD cbSize = (DWORD) szQuery;
181   - BOOL status;
182   -
183   - status = TransactNamedPipe(hPipe,(LPVOID) pkt, cbSize, &response, sizeof(response), &cbSize,NULL);
184   -
185   - if(dynamic)
186   - free(pkt);
187   -
188   - if(status)
189   - return response.rc;
190   -
191   - throw exception(GetLastError(),"%s","Transaction error");
192   -
193   - }
194   -
195   - void set_intval(HLLAPI_PACKET id, int value)
196   - {
197   - struct hllapi_packet_set_int packet;
198   - DWORD cbSize = (DWORD) sizeof(packet);
199   - BOOL status;
200   -
201   - memset(&packet,0,sizeof(packet));
202   - packet.packet_id = id;
203   - packet.value = value;
204   -
205   - status = TransactNamedPipe(hPipe,(LPVOID) &packet, cbSize, &packet, sizeof(packet), &cbSize,NULL);
206   -
207   - if(!status)
208   - throw exception(GetLastError(),"%s","Transaction error");
209   -
210   - }
211   -
212   -
213   -#elif defined(HAVE_DBUS)
214   -
215   - DBusConnection * conn;
216   - char * dest;
217   - char * path;
218   - char * intf;
219   - int sequence;
220   -
221   - DBusMessage * create_message(const char *method)
222   - {
223   - DBusMessage * msg = dbus_message_new_method_call( this->dest, // Destination
224   - this->path, // Path
225   - this->intf, // Interface
226   - method); // method
227   -
228   - if (!msg)
229   - throw exception("Error creating DBUS message for method %s",method);
230   -
231   - return msg;
232   -
233   - }
234   -
235   - DBusMessage * call(DBusMessage *msg)
236   - {
237   - DBusMessage * reply;
238   - DBusError error;
239   -
240   - dbus_error_init(&error);
241   - reply = dbus_connection_send_with_reply_and_block(conn,msg,10000,&error);
242   - dbus_message_unref(msg);
243   -
244   - if(!reply)
245   - {
246   - exception e = exception("%s",error.message);
247   - dbus_error_free(&error);
248   - throw e;
249   - }
250   - return reply;
251   - }
252   -
253   - string get_string(DBusMessage * msg)
254   - {
255   - string rc;
256   -
257   - if(msg)
258   - {
259   - DBusMessageIter iter;
260   -
261   - if(dbus_message_iter_init(msg, &iter))
262   - {
263   - if(dbus_message_iter_get_arg_type(&iter) == DBUS_TYPE_STRING)
264   - {
265   - const char * str;
266   - dbus_message_iter_get_basic(&iter, &str);
267   - trace("Response: [%s]",str);
268   - rc.assign(str);
269   - dbus_message_unref(msg);
270   - return rc;
271   - }
272   -
273   - exception e = exception("DBUS Return type was %c, expecting %c",dbus_message_iter_get_arg_type(&iter),DBUS_TYPE_INT32);
274   - dbus_message_unref(msg);
275   -
276   - throw e;
277   -
278   - }
279   -
280   - }
281   -
282   - return rc;
283   - }
284   -
285   - string query_string(const char *method)
286   - {
287   - return get_string(call(create_message(method)));
288   - }
289   -
290   - int get_intval(DBusMessage * msg)
291   - {
292   - if(msg)
293   - {
294   - DBusMessageIter iter;
295   -
296   - if(dbus_message_iter_init(msg, &iter))
297   - {
298   - if(dbus_message_iter_get_arg_type(&iter) == DBUS_TYPE_INT32)
299   - {
300   - dbus_int32_t iSigned;
301   - dbus_message_iter_get_basic(&iter, &iSigned);
302   - dbus_message_unref(msg);
303   - return (int) iSigned;
304   - }
305   -
306   - exception e = exception("DBUS Return type was %c, expecting %c",dbus_message_iter_get_arg_type(&iter),DBUS_TYPE_INT32);
307   -
308   - dbus_message_unref(msg);
309   - throw e;
310   - return -1;
311   - }
312   - dbus_message_unref(msg);
313   - }
314   - return -1;
315   - }
316   -
317   - int query_intval(const char *method)
318   - {
319   - return get_intval(call(create_message(method)));
320   - }
321   -
322   - int query_intval(const char *method, int first_arg_type, ...)
323   - {
324   - va_list var_args;
325   - DBusMessage * msg = dbus_message_new_method_call( this->dest, // Destination
326   - this->path, // Path
327   - this->intf, // Interface
328   - method); // method
329   -
330   - if (!msg)
331   - {
332   - throw exception("Error creating DBUS message for method %s",method);
333   - return -1;
334   - }
335   -
336   - va_start(var_args, first_arg_type);
337   - dbus_message_append_args_valist(msg,first_arg_type,var_args);
338   - va_end(var_args);
339   -
340   - return get_intval(call(msg));
341   - }
342   -
343   - int query_strval(const char *method, unsigned char *buffer, size_t sz)
344   - {
345   - DBusMessage * outMsg = create_message(method);
346   -
347   - if(outMsg)
348   - {
349   - dbus_message_append_args(outMsg, DBUS_TYPE_STRING, &buffer, DBUS_TYPE_INVALID);
350   -
351   - DBusMessage * rspMsg = call(outMsg);
352   - if(rspMsg)
353   - {
354   - DBusMessageIter iter;
355   -
356   - if(dbus_message_iter_init(rspMsg, &iter))
357   - {
358   - if(dbus_message_iter_get_arg_type(&iter) == DBUS_TYPE_STRING)
359   - {
360   - const char * str;
361   - dbus_message_iter_get_basic(&iter, &str);
362   - trace("Response: [%s]",str);
363   - strncpy((char *) buffer,str,sz);
364   - dbus_message_unref(rspMsg);
365   - return 0;
366   - }
367   -
368   - exception e = exception("DBUS Return type was %c, expecting %c",dbus_message_iter_get_arg_type(&iter),DBUS_TYPE_INT32);
369   - dbus_message_unref(rspMsg);
370   -
371   - throw e;
372   -
373   - }
374   - }
375   - }
376   -
377   - return -1;
378   - }
379   -
380   - void set_intval(const char *method, int value)
381   - {
382   - DBusMessage * outMsg = create_message(method);
383   -
384   - if(outMsg)
385   - {
386   - dbus_int32_t v = (dbus_int32_t) value;
387   -
388   - dbus_message_append_args(outMsg, DBUS_TYPE_INT32, &v, DBUS_TYPE_INVALID);
389   -
390   - DBusMessage * rspMsg = call(outMsg);
391   - dbus_message_unref(rspMsg);
392   -
393   - }
394   - }
395   -
396   -#else
397   -
398   -
399   - int query_intval(const char *method)
400   - {
401   - throw exception("Call to unimplemented RPC method \"%s\"",method);
402   - return -1;
403   - }
404   -
405   - int query_strval(const char *method, unsigned char *buffer, size_t sz)
406   - {
407   - throw exception("Call to unimplemented RPC method \"%s\"",method);
408   - return -1;
409   - }
410   -
411   -
412   -#endif
413   -
414   - public:
415   -
416   -#if defined(HAVE_DBUS)
417   - const char * makeBusName(string &name)
418   - {
419   - int val;
420   -
421   - // First uses the object ID
422   - val = this->sequence;
423   - while(val > 0)
424   - {
425   - char str[] = { (char) ('a'+(val % 25)), 0 };
426   - name.append(str);
427   - val /= 25;
428   - }
429   - name.append(".");
430   -
431   - val = (int) getpid();
432   - while(val > 0)
433   - {
434   - #pragma GCC diagnostic push
435   - #pragma GCC diagnostic ignored "-Wnarrowing"
436   - char str[] = { 'a'+(val % 25), 0 };
437   - #pragma GCC diagnostic pop
438   - name.append(str);
439   - val /= 25;
440   - }
441   - name.append(".");
442   -
443   - // And last, the project info
444   - name.append(intf);
445   -
446   - trace("Busname=\"%s\" sequence=%d this=%p",name.c_str(),sequence,this);
447   -
448   - return name.c_str();
449   -
450   - }
451   -#endif // HAVE_DBUS
452   -
453   -#if defined(_WIN32)
454   -
455   - static string getRegistryKey(const char *name)
456   - {
457   - char buffer[4096];
458   - HKEY hKey = 0;
459   - unsigned long datalen = sizeof(buffer);
460   -
461   - debug("%s(%s)",__FUNCTION__,name);
462   -
463   - *buffer = 0;
464   - if(RegOpenKeyEx(HKEY_LOCAL_MACHINE,"Software\\pw3270",0,KEY_QUERY_VALUE,&hKey) != ERROR_SUCCESS)
465   - {
466   - throw exception("Can't open key %s","HKLM\\Software\\pw3270");
467   - }
468   - else
469   - {
470   - unsigned long datatype; // #defined in winnt.h (predefined types 0-11)
471   -
472   - if(RegQueryValueExA(hKey,name,NULL,&datatype,(LPBYTE) buffer,&datalen) != ERROR_SUCCESS)
473   - *buffer = 0;
474   - RegCloseKey(hKey);
475   - }
476   -
477   - return string(buffer);
478   -
479   - }
480   -
481   -#endif // defined
482   -
483   - remote(const char *session)
484   - {
485   -#if defined(_WIN32)
486   - static DWORD dwMode = PIPE_READMODE_MESSAGE;
487   - char buffer[4096];
488   - char * str;
489   - char * ptr;
490   - time_t timer = time(0)+1;
491   -
492   - hPipe = INVALID_HANDLE_VALUE;
493   -
494   - trace("%s(%s)",__FUNCTION__,session);
495   -
496   - if(strcasecmp(session,"start") == 0 || strcasecmp(session,"new") == 0)
497   - {
498   - // Start a new session
499   - string appName = getRegistryKey("appName");
500   - char buffer[80];
501   - STARTUPINFO si;
502   - PROCESS_INFORMATION pi;
503   -
504   - // Get application path
505   -
506   - if(!appName.size())
507   - {
508   - throw exception("key %s\\appName is invalid","HKLM\\Software\\pw3270");
509   - return;
510   - }
511   -
512   - trace("%s appname=%s\n",__FUNCTION__,appName.c_str());
513   -
514   - snprintf(buffer,79,"%s --session=\"H%06d\"",appName.c_str(),getpid());
515   -
516   - ZeroMemory( &si, sizeof(si) );
517   - si.cb = sizeof(si);
518   - ZeroMemory( &pi, sizeof(pi) );
519   -
520   - // si.dwFlags = STARTF_PREVENTPINNING;
521   - trace("App: %s",appName.c_str());
522   - trace("CmdLine: %s",buffer);
523   -
524   - if(CreateProcess(NULL,buffer,NULL,NULL,0,NORMAL_PRIORITY_CLASS,NULL,NULL,&si,&pi))
525   - {
526   - CloseHandle( pi.hProcess );
527   - CloseHandle( pi.hThread );
528   - }
529   - else
530   - {
531   - throw exception("Can't start %s",appName.c_str());
532   - return;
533   - }
534   -
535   - snprintf(buffer,4095,"H%06d_a",getpid());
536   - str = strdup(buffer);
537   -
538   - // Até 20 segundos para o processo iniciar.
539   - timer = time(0)+20;
540   -
541   - }
542   - else
543   - {
544   - // Use an existing session
545   - str = strdup(session);
546   -
547   - // Convert session name
548   - for(ptr=str;*ptr;ptr++)
549   - {
550   - if(*ptr == ':')
551   - *ptr = '_';
552   - else
553   - *ptr = tolower(*ptr);
554   - }
555   -
556   - // Wait?
557   - int delay;
558   -
559   - try
560   - {
561   - delay = atoi(getRegistryKey("hllapiWait").c_str());
562   - }
563   - catch(std::exception &e)
564   - {
565   - delay = 0;
566   - }
567   -
568   - if(delay) {
569   - timer = time(0) + delay;
570   - }
571   -
572   -
573   - }
574   -
575   - snprintf(buffer,4095,"\\\\.\\pipe\\%s",str);
576   -
577   - free(str);
578   -
579   - trace("Searching for \"%s\"",buffer);
580   -
581   - hPipe = CreateFile(buffer,GENERIC_WRITE|GENERIC_READ,0,NULL,OPEN_EXISTING,0,NULL);
582   -
583   - if(hPipe == INVALID_HANDLE_VALUE)
584   - {
585   - // Cant get session, wait.
586   - while(hPipe == INVALID_HANDLE_VALUE && time(0) < timer)
587   - {
588   - hPipe = CreateFile(buffer,GENERIC_WRITE|GENERIC_READ,0,NULL,OPEN_EXISTING,0,NULL);
589   - Sleep(1);
590   - }
591   - }
592   -
593   - if(hPipe == INVALID_HANDLE_VALUE)
594   - {
595   - throw exception("Can´t create service pipe %s",buffer);
596   - }
597   - else if(!SetNamedPipeHandleState(hPipe,&dwMode,NULL,NULL))
598   - {
599   - exception e = exception(GetLastError(),"%s","Can´t set pipe state");
600   - CloseHandle(hPipe);
601   - hPipe = INVALID_HANDLE_VALUE;
602   - throw e;
603   - }
604   -
605   -#elif defined(HAVE_DBUS)
606   -
607   - static int sq = 0;
608   - DBusError err;
609   - int rc;
610   - char * str = strdup(session);
611   - char * ptr;
612   - string busName;
613   -
614   -
615   - this->path = nullptr;
616   - this->intf = nullptr;
617   - this->sequence = (++sq) + time(0);
618   -
619   - try {
620   -
621   - trace("%s str=%p sequence=%d",__FUNCTION__,str,sequence);
622   -
623   - for(ptr=str;*ptr;ptr++)
624   - *ptr = tolower(*ptr);
625   -
626   - ptr = strchr(str,':');
627   -
628   - if(ptr)
629   - {
630   - size_t sz;
631   -
632   - *(ptr++) = 0;
633   -
634   - // Build destination
635   - sz = strlen(ptr)+strlen(str)+strlen(prefix_dest)+2;
636   - dest = (char *) malloc(sz+1);
637   - strncpy(dest,prefix_dest,sz);
638   - strncat(dest,str,sz);
639   - strncat(dest,".",sz);
640   - strncat(dest,ptr,sz);
641   -
642   - // Path and interface always use the same name.
643   - path = strdup("/br/com/bb/pw3270");
644   - intf = strdup("br.com.bb.pw3270");
645   -
646   - }
647   - else
648   - {
649   - size_t sz;
650   -
651   - // Build destination
652   - sz = strlen(str)+strlen(prefix_dest)+2;
653   - dest = (char *) malloc(sz+1);
654   - strncpy(dest,prefix_dest,sz);
655   - strncat(dest,str,sz);
656   -
657   - // Build path
658   - sz = strlen(str)+strlen(prefix_path);
659   - path = (char *) malloc(sz+1);
660   - strncpy(path,prefix_path,sz);
661   - strncat(path,str,sz);
662   -
663   - // Build intf
664   - sz = strlen(str)+strlen(prefix_dest)+1;
665   - intf = (char *) malloc(sz+1);
666   - strncpy(intf,prefix_dest,sz);
667   - strncat(intf,str,sz);
668   -
669   - }
670   -
671   - trace("DBUS:\nDestination:\t[%s]\nPath:\t\t[%s]\nInterface:\t[%s]",dest,path,intf);
672   -
673   - free(str);
674   -
675   - dbus_error_init(&err);
676   -
677   - conn = dbus_bus_get(DBUS_BUS_SESSION, &err);
678   - trace("dbus_bus_get conn=%p",conn);
679   -
680   - if (dbus_error_is_set(&err))
681   - {
682   - exception e = exception("DBUS Connection Error (%s)", err.message);
683   - dbus_error_free(&err);
684   - throw e;
685   - return;
686   - }
687   -
688   - if(!conn)
689   - {
690   - throw exception("%s", "DBUS Connection failed");
691   - return;
692   - }
693   -
694   -
695   - rc = dbus_bus_request_name(conn, makeBusName(busName), DBUS_NAME_FLAG_REPLACE_EXISTING , &err);
696   - trace("dbus_bus_request_name(%s) rc=%d",busName.c_str(),rc);
697   -
698   - if (dbus_error_is_set(&err))
699   - {
700   - exception e = exception("Name Error (%s)", err.message);
701   - dbus_error_free(&err);
702   - throw e;
703   - return;
704   - }
705   -
706   - if(rc != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER)
707   - {
708   - trace("%s: DBUS request for name %s failed",__FUNCTION__, busName.c_str());
709   - throw exception("DBUS request for \"%s\" failed",session);
710   - }
711   -
712   - trace("%s: Using DBUS name %s",__FUNCTION__,busName.c_str());
713   -
714   - const char * id = "r";
715   - static const dbus_int32_t flag = 1;
716   - query_intval("setScript", DBUS_TYPE_STRING, &id, DBUS_TYPE_INT32, &flag, DBUS_TYPE_INVALID);
717   -
718   - } catch(...) {
719   -
720   - if(path) {
721   - free(path);
722   - path = nullptr;
723   - }
724   -
725   - if(intf) {
726   - free(intf);
727   - intf = nullptr;
728   - }
729   -
730   - }
731   -
732   -#else
733   -
734   - throw exception("%s","RPC support is incomplete.");
735   -
736   -#endif
737   - }
738   -
739   - virtual ~remote()
740   - {
741   -#if defined(_WIN32)
742   -
743   - if(hPipe != INVALID_HANDLE_VALUE)
744   - CloseHandle(hPipe);
745   -
746   -#elif defined(HAVE_DBUS)
747   -
748   - try
749   - {
750   - const char * id = "r";
751   - static const dbus_int32_t flag = 0;
752   - query_intval("setScript", DBUS_TYPE_STRING, &id, DBUS_TYPE_INT32, &flag, DBUS_TYPE_INVALID);
753   - }
754   - catch(exception e)
755   - {
756   - std::cerr << e.what();
757   - }
758   -
759   - string busName;
760   - makeBusName(busName);
761   -
762   - free(dest);
763   - free(path);
764   - free(intf);
765   -
766   - DBusError err;
767   -
768   - dbus_error_init(&err);
769   - dbus_bus_release_name(conn,busName.c_str(),&err);
770   -
771   - if (dbus_error_is_set(&err))
772   - {
773   - //exception e = exception("Error when releasing DBUS name (%s)", err.message);
774   - std::cerr << err.message;
775   - dbus_error_free(&err);
776   - //throw e;
777   - }
778   -
779   -#else
780   -
781   -#endif
782   - }
783   -
784   - bool is_connected(void)
785   - {
786   - return query_intval(HLLAPI_PACKET_IS_CONNECTED) != 0;
787   - }
788   -
789   - LIB3270_CSTATE get_cstate(void)
790   - {
791   - return (LIB3270_CSTATE) query_intval(HLLAPI_PACKET_GET_CSTATE);
792   - }
793   -
794   - LIB3270_MESSAGE get_program_message(void) {
795   - return (LIB3270_MESSAGE) query_intval(HLLAPI_PACKET_GET_PROGRAM_MESSAGE);
796   - }
797   -
798   - LIB3270_SSL_STATE get_secure(void) {
799   - return (LIB3270_SSL_STATE) query_intval(HLLAPI_PACKET_GET_SSL_STATE);
800   - }
801   -
802   - virtual int connect()
803   - {
804   - return connect("",0);
805   - }
806   -
807   - virtual int connect(const char *url, time_t wait)
808   - {
809   - int rc = EINVAL;
810   -
811   - debug("%s(%s,%u)",__FUNCTION__,url,(unsigned int) wait);
812   -
813   - if(!url) {
814   - url = "";
815   - }
816   -
817   -#if defined(_WIN32)
818   -
819   - size_t cbSize = sizeof(struct hllapi_packet_query) + strlen(url) + 1;
820   - struct hllapi_packet_query * pkt = (struct hllapi_packet_query *) malloc(cbSize);
821   -
822   - memset(pkt,0,cbSize);
823   -
824   - pkt->packet_id = HLLAPI_PACKET_CONNECT_URL;
825   -
826   - strcpy(((char *) (pkt+1)), url);
827   -
828   - rc = query_intval((void *) pkt, cbSize, true);
829   -
830   - if(!rc && wait) {
831   - time_t end = time(0) + wait;
832   - while(!is_connected()) {
833   - if(time(0) > end) {
834   - debug("%s: Timeout",__FUNCTION__);
835   - return ETIMEDOUT;
836   - }
837   - Sleep(500);
838   - }
839   - }
840   -
841   -#elif defined(HAVE_DBUS)
842   -
843   - rc = query_intval("connect", DBUS_TYPE_STRING, &url, DBUS_TYPE_INVALID);
844   -
845   - debug("connect(%s) rc=%d (%s)",url,rc,strerror(rc));
846   -
847   - if(!rc && wait) {
848   - time_t end = time(0) + wait;
849   - while(!is_connected()) {
850   - if(time(0) > end) {
851   - debug("%s: Timeout",__FUNCTION__);
852   - return ETIMEDOUT;
853   - }
854   - usleep(500);
855   - }
856   - }
857   -
858   -#endif
859   - debug("connect(%s) rc=%d (%s)",url,rc,strerror(rc));
860   -
861   - return rc;
862   -
863   - }
864   -
865   - int set_url(const char *uri)
866   - {
867   - int rc;
868   -
869   -#if defined(_WIN32)
870   -
871   - size_t cbSize = sizeof(struct hllapi_packet_text)+strlen(uri);
872   - struct hllapi_packet_text * pkt = (struct hllapi_packet_text *) malloc(cbSize);
873   -
874   - pkt->packet_id = HLLAPI_PACKET_SET_HOST;
875   - strcpy(pkt->text,uri);
876   -
877   - rc = query_intval((void *) pkt,cbSize,true);
878   -
879   -#elif defined(HAVE_DBUS)
880   -
881   - rc = query_intval(HLLAPI_PACKET_SET_HOST, DBUS_TYPE_STRING, &uri, DBUS_TYPE_INVALID);
882   -
883   -#else
884   -
885   - rc = -1;
886   -
887   -#endif
888   -
889   - return rc;
890   -
891   - }
892   -
893   - string get_url()
894   - {
895   -#if defined(_WIN32)
896   -
897   - struct hllapi_packet_query query = { HLLAPI_PACKET_GET_HOST };
898   - return query_string(&query,sizeof(query),1024);
899   -
900   -#elif defined(HAVE_DBUS)
901   -
902   - return query_string(HLLAPI_PACKET_GET_HOST);
903   -
904   -#else
905   - return string();
906   -#endif
907   - }
908   -
909   - int wait_for_ready(int seconds)
910   - {
911   -#if defined(_WIN32)
912   -
913   - time_t end = time(0)+seconds;
914   -
915   - while(time(0) < end)
916   - {
917   - if(!is_connected())
918   - return ENOTCONN;
919   -
920   - if(is_ready())
921   - return 0;
922   -
923   - Sleep(250);
924   - }
925   -
926   - return ETIMEDOUT;
927   -
928   -#elif defined(HAVE_DBUS)
929   -
930   - time_t end = time(0)+seconds;
931   -
932   - while(time(0) < end)
933   - {
934   - if(!is_connected())
935   - return ENOTCONN;
936   -
937   - if(is_ready())
938   - return 0;
939   -
940   - sleep(1);
941   - }
942   -
943   - return ETIMEDOUT;
944   -
945   -#else
946   -
947   - return -1;
948   -
949   -#endif
950   -
951   - }
952   -
953   - bool is_ready(void)
954   - {
955   - return query_intval(HLLAPI_PACKET_IS_READY) != 0;
956   - }
957   -
958   -
959   - int disconnect(void)
960   - {
961   - return query_intval(HLLAPI_PACKET_DISCONNECT);
962   - }
963   -
964   -
965   - int wait(int seconds)
966   - {
967   -#if defined(_WIN32)
968   -
969   - time_t end = time(0)+seconds;
970   -
971   - while(time(0) < end)
972   - {
973   - if(!is_connected())
974   - return ENOTCONN;
975   - Sleep(500);
976   - }
977   -
978   - return 0;
979   -
980   -#elif defined(HAVE_DBUS)
981   -
982   - time_t end = time(0)+seconds;
983   -
984   - while(time(0) < end)
985   - {
986   - if(!is_connected())
987   - return ENOTCONN;
988   - usleep(500);
989   - }
990   -
991   - return 0;
992   -
993   -#else
994   -
995   - return -1;
996   -
997   -#endif
998   -
999   - }
1000   -
1001   - int iterate(bool wait)
1002   - {
1003   -#if defined(_WIN32)
1004   - if(wait)
1005   - Sleep(250);
1006   - return 0;
1007   -#elif defined(HAVE_DBUS)
1008   - if(wait)
1009   - sleep(1);
1010   - return 0;
1011   -#else
1012   - return -1;
1013   -#endif
1014   - }
1015   -
1016   - string get_text_at(int row, int col, size_t sz, bool lf)
1017   - {
1018   -#if defined(_WIN32)
1019   -
1020   - struct hllapi_packet_query_at query = { HLLAPI_PACKET_GET_TEXT_AT, (unsigned short) row, (unsigned short) col, (unsigned short) sz, (lf ? '\n' : (char) 0) };
1021   -
1022   - return query_string(&query,sizeof(query),sz);
1023   -
1024   -#elif defined(HAVE_DBUS)
1025   -
1026   - dbus_int32_t r = (dbus_int32_t) row;
1027   - dbus_int32_t c = (dbus_int32_t) col;
1028   - dbus_int32_t l = (dbus_int32_t) sz;
1029   - unsigned char d = lf ? '\n' : 0;
1030   -
1031   - DBusMessage * msg = create_message("getTextAt");
1032   - if(!msg)
1033   - return NULL;
1034   -
1035   - trace("%s(%d,%d,%d)",__FUNCTION__,r,c,l);
1036   - dbus_message_append_args(msg, DBUS_TYPE_INT32, &r, DBUS_TYPE_INT32, &c, DBUS_TYPE_INT32, &l, DBUS_TYPE_BYTE, &d, DBUS_TYPE_INVALID);
1037   -
1038   - return get_string(call(msg));
1039   -
1040   -#else
1041   -
1042   - return string();
1043   -
1044   -#endif
1045   -
1046   - }
1047   -
1048   - int set_text_at(int row, int col, const char *str)
1049   - {
1050   -#if defined(_WIN32)
1051   -
1052   - struct hllapi_packet_text_at * query;
1053   - struct hllapi_packet_result response;
1054   - DWORD cbSize = sizeof(struct hllapi_packet_text_at)+strlen((const char *) str);
1055   -
1056   - query = (struct hllapi_packet_text_at *) malloc(cbSize);
1057   - query->packet_id = HLLAPI_PACKET_SET_TEXT_AT;
1058   - query->row = row;
1059   - query->col = col;
1060   - strcpy(query->text,(const char *) str);
1061   -
1062   - TransactNamedPipe(hPipe,(LPVOID) query, cbSize, &response, sizeof(response), &cbSize,NULL);
1063   -
1064   - free(query);
1065   -
1066   - return response.rc;
1067   -
1068   -#elif defined(HAVE_DBUS)
1069   -
1070   - dbus_int32_t r = (dbus_int32_t) row;
1071   - dbus_int32_t c = (dbus_int32_t) col;
1072   -
1073   - return query_intval("setTextAt", DBUS_TYPE_INT32, &r, DBUS_TYPE_INT32, &c, DBUS_TYPE_STRING, &str, DBUS_TYPE_INVALID);
1074   -
1075   -#else
1076   -
1077   - return -1;
1078   -
1079   -#endif
1080   -
1081   - }
1082   -
1083   - int cmp_text_at(int row, int col, const char *text, bool lf)
1084   - {
1085   - debug("%s(%d,%d,\"%s\")",__FUNCTION__,row,col,text);
1086   -
1087   -#if defined(_WIN32)
1088   -
1089   - struct hllapi_packet_text_at * query;
1090   - size_t cbSize = sizeof(struct hllapi_packet_text_at)+strlen(text);
1091   -
1092   - query = (struct hllapi_packet_text_at *) malloc(cbSize);
1093   - query->packet_id = HLLAPI_PACKET_CMP_TEXT_AT;
1094   - query->row = row;
1095   - query->col = col;
1096   - query->lf = lf ? '\n' : 0;
1097   - strcpy(query->text,text);
1098   -
1099   - return query_intval((void *) query, cbSize, true);
1100   -
1101   -#elif defined(HAVE_DBUS)
1102   -
1103   - dbus_int32_t r = (dbus_int32_t) row;
1104   - dbus_int32_t c = (dbus_int32_t) col;
1105   - unsigned char d = lf ? '\n' : 0;
1106   -
1107   - return query_intval("cmpTextAt", DBUS_TYPE_INT32, &r, DBUS_TYPE_INT32, &c, DBUS_TYPE_STRING, &text, DBUS_TYPE_BYTE, &d, DBUS_TYPE_INVALID);
1108   -
1109   -#endif
1110   -
1111   - return 0;
1112   - }
1113   -
1114   - int wait_for_text_at(int row, int col, const char *key, int timeout)
1115   - {
1116   - time_t end = time(0)+timeout;
1117   -
1118   - while(time(0) < end)
1119   - {
1120   - if(!is_connected())
1121   - return ENOTCONN;
1122   -
1123   - if(!cmp_text_at(row,col,key,false))
1124   - return 0;
1125   -
1126   -#ifdef _WIN32
1127   - Sleep(500);
1128   -#else
1129   - usleep(500);
1130   -#endif
1131   - }
1132   -
1133   - return ETIMEDOUT;
1134   - }
1135   -
1136   - string get_text(int baddr, size_t len, bool lf)
1137   - {
1138   -#if defined(_WIN32)
1139   -
1140   - struct hllapi_packet_query_offset query = { HLLAPI_PACKET_GET_TEXT_AT_OFFSET, (unsigned short) baddr, (unsigned short) len, (lf ? '\n' : (char) 0) };
1141   - return query_string(&query,sizeof(query),len);
1142   -
1143   -#elif defined(HAVE_DBUS)
1144   -
1145   - dbus_int32_t b = (dbus_int32_t) baddr;
1146   - dbus_int32_t l = (dbus_int32_t) len;
1147   - unsigned char d = lf ? '\n' : 0;
1148   -
1149   - DBusMessage * msg = create_message("getText");
1150   - if(!msg)
1151   - return NULL;
1152   -
1153   - trace("%s(%d,%d)",__FUNCTION__,b,l);
1154   - dbus_message_append_args(msg, DBUS_TYPE_INT32, &b, DBUS_TYPE_INT32, &l, DBUS_TYPE_BYTE, &d, DBUS_TYPE_INVALID);
1155   -
1156   - return get_string(call(msg));
1157   -#else
1158   - throw exception("%s","IPC support is unavailable");
1159   - return string();
1160   -#endif
1161   - }
1162   -
1163   -
1164   - int set_cursor_position(int row, int col)
1165   - {
1166   -#if defined(_WIN32)
1167   -
1168   - struct hllapi_packet_cursor query = { HLLAPI_PACKET_SET_CURSOR_POSITION, (unsigned short) row, (unsigned short) col };
1169   -
1170   - return query_intval((void *) &query, sizeof(query));
1171   -
1172   -#elif defined(HAVE_DBUS)
1173   -
1174   - dbus_int32_t r = (dbus_int32_t) row;
1175   - dbus_int32_t c = (dbus_int32_t) col;
1176   -
1177   - return query_intval("setCursorAt", DBUS_TYPE_INT32, &r, DBUS_TYPE_INT32, &c, DBUS_TYPE_INVALID);
1178   -
1179   -#endif
1180   -
1181   - return -1;
1182   - }
1183   -
1184   - int set_cursor_addr(int addr)
1185   - {
1186   -#if defined(_WIN32)
1187   -
1188   - struct hllapi_packet_addr query = { HLLAPI_PACKET_SET_CURSOR, (unsigned short) addr };
1189   -
1190   - return query_intval((void *) &query, sizeof(query));
1191   -
1192   -#elif defined(HAVE_DBUS)
1193   -
1194   - dbus_int32_t k = (dbus_int32_t) addr;
1195   -
1196   - return query_intval("setCursorAddress", DBUS_TYPE_INT32, &k, DBUS_TYPE_INVALID);
1197   -
1198   -#endif
1199   -
1200   - return -1;
1201   - }
1202   -
1203   - int get_cursor_addr(void)
1204   - {
1205   - return query_intval(HLLAPI_PACKET_GET_CURSOR);
1206   - }
1207   -
1208   - int get_width(void) {
1209   - return query_intval(HLLAPI_PACKET_GET_WIDTH);
1210   - }
1211   -
1212   - int get_height(void) {
1213   - return query_intval(HLLAPI_PACKET_GET_HEIGHT);
1214   - }
1215   -
1216   - int get_length(void) {
1217   - return query_intval(HLLAPI_PACKET_GET_LENGTH);
1218   - }
1219   -
1220   - int enter(void)
1221   - {
1222   - return query_intval(HLLAPI_PACKET_ENTER);
1223   - }
1224   -
1225   - int pfkey(int key)
1226   - {
1227   -#if defined(_WIN32)
1228   -
1229   - struct hllapi_packet_keycode query = { HLLAPI_PACKET_PFKEY, (unsigned short) key };
1230   -
1231   - return query_intval((void *) &query, sizeof(query));
1232   -
1233   -#elif defined(HAVE_DBUS)
1234   -
1235   - dbus_int32_t k = (dbus_int32_t) key;
1236   -
1237   - return query_intval("pfKey", DBUS_TYPE_INT32, &k, DBUS_TYPE_INVALID);
1238   -
1239   -#else
1240   -
1241   - return -1;
1242   -
1243   -#endif
1244   -
1245   - }
1246   -
1247   - int pakey(int key)
1248   - {
1249   -#if defined(_WIN32)
1250   -
1251   - struct hllapi_packet_keycode query = { HLLAPI_PACKET_PAKEY, (unsigned short) key };
1252   -
1253   - return query_intval((void *) &query, sizeof(query));
1254   -
1255   -#elif defined(HAVE_DBUS)
1256   -
1257   - dbus_int32_t k = (dbus_int32_t) key;
1258   -
1259   - return query_intval("paKey", DBUS_TYPE_INT32, &k, DBUS_TYPE_INVALID);
1260   -
1261   -#else
1262   -
1263   - return -1;
1264   -
1265   -#endif
1266   -
1267   - }
1268   -
1269   - int quit(void)
1270   - {
1271   - return query_intval(HLLAPI_PACKET_QUIT);
1272   - }
1273   -
1274   - int set_toggle(LIB3270_TOGGLE ix, bool value)
1275   - {
1276   -#if defined(_WIN32)
1277   -
1278   - struct hllapi_packet_set query = { HLLAPI_PACKET_SET_TOGGLE, (unsigned short) ix, (unsigned short) value };
1279   -
1280   - return query_intval((void *) &query, sizeof(query));
1281   -
1282   -#elif defined(HAVE_DBUS)
1283   -
1284   - dbus_int32_t i = (dbus_int32_t) ix;
1285   - dbus_int32_t v = (dbus_int32_t) value;
1286   -
1287   - return query_intval("setToggle", DBUS_TYPE_INT32, &i, DBUS_TYPE_INT32, &v, DBUS_TYPE_INVALID);
1288   -
1289   -#else
1290   - return -1;
1291   -
1292   -#endif
1293   -
1294   - }
1295   -
1296   - int emulate_input(const char *str)
1297   - {
1298   -#if defined(_WIN32)
1299   -
1300   - size_t len = strlen(str);
1301   - struct hllapi_packet_emulate_input * query;
1302   - size_t cbSize = sizeof(struct hllapi_packet_emulate_input)+len;
1303   -
1304   - query = (struct hllapi_packet_emulate_input *) malloc(cbSize);
1305   - query->packet_id = HLLAPI_PACKET_EMULATE_INPUT;
1306   - query->len = len;
1307   - query->pasting = 1;
1308   - strcpy(query->text,str);
1309   -
1310   - return query_intval((void *) query, cbSize, true);
1311   -
1312   -#elif defined(HAVE_DBUS)
1313   -
1314   - return query_intval("input", DBUS_TYPE_STRING, &str, DBUS_TYPE_INVALID);
1315   -#else
1316   -
1317   - return -1;
1318   -
1319   -#endif
1320   -
1321   - }
1322   -
1323   - int action(const char *str)
1324   - {
1325   -
1326   -#if defined(_WIN32)
1327   -
1328   - size_t len = strlen(str);
1329   - struct hllapi_packet_text * query;
1330   - size_t cbSize = sizeof(struct hllapi_packet_text)+len;
1331   -
1332   - query = (struct hllapi_packet_text *) malloc(cbSize);
1333   - query->packet_id = HLLAPI_PACKET_ACTION;
1334   - strcpy(query->text,str);
1335   -
1336   - return query_intval((void *) query, cbSize, true);
1337   -
1338   -#elif defined(HAVE_DBUS)
1339   -
1340   - return query_intval("action", DBUS_TYPE_STRING, &str, DBUS_TYPE_INVALID);
1341   -#else
1342   -
1343   - return -1;
1344   -
1345   -#endif
1346   -
1347   - }
1348   -
1349   -
1350   - int get_field_start(int baddr)
1351   - {
1352   -#if defined(_WIN32)
1353   -
1354   - struct hllapi_packet_addr query = { HLLAPI_PACKET_FIELD_START, (unsigned short) baddr };
1355   -
1356   - return query_intval((void *) &query, sizeof(query));
1357   -
1358   -#elif defined(HAVE_DBUS)
1359   -
1360   - dbus_int32_t k = (dbus_int32_t) baddr;
1361   -
1362   - return query_intval("getFieldStart", DBUS_TYPE_INT32, &k, DBUS_TYPE_INVALID);
1363   -
1364   -#else
1365   -
1366   - return -1;
1367   -
1368   -#endif
1369   -
1370   - }
1371   -
1372   - int get_field_len(int baddr)
1373   - {
1374   -#if defined(_WIN32)
1375   -
1376   - struct hllapi_packet_addr query = { HLLAPI_PACKET_FIELD_LEN, (unsigned short) baddr };
1377   -
1378   - return query_intval((void *) &query, sizeof(query));
1379   -
1380   -#elif defined(HAVE_DBUS)
1381   -
1382   - dbus_int32_t k = (dbus_int32_t) baddr;
1383   -
1384   - return query_intval("getFieldLength", DBUS_TYPE_INT32, &k, DBUS_TYPE_INVALID);
1385   -
1386   -#else
1387   -
1388   - return -1;
1389   -
1390   -#endif
1391   - }
1392   -
1393   - int get_next_unprotected(int baddr)
1394   - {
1395   -#if defined(_WIN32)
1396   -
1397   - struct hllapi_packet_addr query = { HLLAPI_PACKET_NEXT_UNPROTECTED, (unsigned short) baddr };
1398   -
1399   - return query_intval((void *) &query, sizeof(query));
1400   -
1401   -#elif defined(HAVE_DBUS)
1402   -
1403   - dbus_int32_t k = (dbus_int32_t) baddr;
1404   -
1405   - DBusMessage * msg = create_message("getNextUnprotected");
1406   - if(msg)
1407   - {
1408   - dbus_message_append_args(msg, DBUS_TYPE_INT32, &k, DBUS_TYPE_INVALID);
1409   - return get_intval(call(msg));
1410   - }
1411   -
1412   - return -1;
1413   -
1414   -#else
1415   -
1416   - return -1;
1417   -
1418   -#endif
1419   -
1420   - }
1421   -
1422   - int get_is_protected(int baddr)
1423   - {
1424   -#if defined(_WIN32)
1425   -
1426   - struct hllapi_packet_addr query = { HLLAPI_PACKET_IS_PROTECTED, (unsigned short) baddr };
1427   -
1428   - return query_intval((void *) &query, sizeof(query));
1429   -
1430   -#elif defined(HAVE_DBUS)
1431   -
1432   - dbus_int32_t k = (dbus_int32_t) baddr;
1433   -
1434   - DBusMessage * msg = create_message("getIsProtected");
1435   - if(msg)
1436   - {
1437   - dbus_message_append_args(msg, DBUS_TYPE_INT32, &k, DBUS_TYPE_INVALID);
1438   - return get_intval(call(msg));
1439   - }
1440   -
1441   - return -1;
1442   -
1443   -#else
1444   -
1445   - return -1;
1446   -
1447   -#endif
1448   -
1449   - }
1450   -
1451   - int get_is_protected_at(int row,int col)
1452   - {
1453   -#if defined(_WIN32)
1454   -
1455   - struct hllapi_packet_query_at query = { HLLAPI_PACKET_IS_PROTECTED_AT, (unsigned short) row, (unsigned short) col, 0 };
1456   -
1457   - return query_intval((void *) &query, sizeof(query));
1458   -
1459   -#elif defined(HAVE_DBUS)
1460   -
1461   - dbus_int32_t r = (dbus_int32_t) row;
1462   - dbus_int32_t c = (dbus_int32_t) col;
1463   -
1464   - DBusMessage * msg = create_message("getIsProtectedAt");
1465   - if(msg)
1466   - {
1467   - dbus_message_append_args(msg, DBUS_TYPE_INT32, &r, DBUS_TYPE_INT32, &c, DBUS_TYPE_INVALID);
1468   - return get_intval(call(msg));
1469   - }
1470   -
1471   - return -1;
1472   -
1473   -#else
1474   -
1475   - return -1;
1476   -
1477   -#endif
1478   -
1479   - }
1480   -
1481   -
1482   - int set_host_charset(const char *charset)
1483   - {
1484   -#if defined(_WIN32)
1485   -
1486   - size_t len = strlen(charset);
1487   - struct hllapi_packet_set_text * query;
1488   - size_t cbSize = sizeof(struct hllapi_packet_set_text)+len;
1489   -
1490   - query = (struct hllapi_packet_set_text *) malloc(cbSize);
1491   - query->packet_id = HLLAPI_PACKET_SET_HOST_CHARSET;
1492   - query->len = len;
1493   - strcpy(query->text,charset);
1494   -
1495   - return query_intval((void *) query, cbSize, true);
1496   -
1497   -#elif defined(HAVE_DBUS)
1498   -
1499   - return query_intval("setHostCharset", DBUS_TYPE_STRING, &charset, DBUS_TYPE_INVALID);
1500   -
1501   -#else
1502   - return -1;
1503   -#endif
1504   - }
1505   -
1506   - string get_host_charset(void)
1507   - {
1508   -#if defined(_WIN32)
1509   -
1510   - struct hllapi_packet_query query = { HLLAPI_PACKET_GET_HOST_CHARSET };
1511   - return query_string(&query,sizeof(query),100);
1512   -
1513   -#elif defined(HAVE_DBUS)
1514   -
1515   - return query_string("getHostCharset");
1516   -
1517   -#else
1518   -
1519   - return NULL;
1520   -
1521   -#endif
1522   - }
1523   -
1524   -
1525   -#if defined(HAVE_DBUS)
1526   - string get_clipboard(void)
1527   - {
1528   - return query_string("getClipboard");
1529   - }
1530   -
1531   - int set_clipboard(const char *text)
1532   - {
1533   - return query_intval("setClipboard", DBUS_TYPE_STRING, &text, DBUS_TYPE_INVALID);
1534   - }
1535   -
1536   - string get_display_charset(void)
1537   - {
1538   - return query_string("getDisplayCharset");
1539   - }
1540   -
1541   - int popup_dialog(LIB3270_NOTIFY id , const char *title, const char *message, const char *fmt, ...)
1542   - {
1543   - DBusMessage * msg = dbus_message_new_method_call( this->dest, // Destination
1544   - this->path, // Path
1545   - this->intf, // Interface
1546   - "showPopup"); // method
1547   -
1548   - if (!msg)
1549   - {
1550   - throw exception("%s","Error creating DBUS message for popup");
1551   - return -1;
1552   - }
1553   - else
1554   - {
1555   - char text[4096];
1556   - char * ptr = text;
1557   - va_list arg_ptr;
1558   - dbus_int32_t i = (dbus_int32_t) id;
1559   -
1560   - va_start(arg_ptr, fmt);
1561   - vsnprintf(text,4095,fmt,arg_ptr);
1562   - va_end(arg_ptr);
1563   -
1564   - if(!dbus_message_append_args(msg, DBUS_TYPE_INT32, &i, DBUS_TYPE_STRING, &title, DBUS_TYPE_STRING, &message, DBUS_TYPE_STRING, &ptr, DBUS_TYPE_INVALID))
1565   - {
1566   - dbus_message_unref(msg);
1567   - throw exception("%s","Cant append args for popup message");
1568   - }
1569   - else
1570   - {
1571   - DBusMessage * reply;
1572   - DBusError error;
1573   -
1574   - dbus_error_init(&error);
1575   - reply = dbus_connection_send_with_reply_and_block(conn,msg,DBUS_TIMEOUT_INFINITE,&error);
1576   - dbus_message_unref(msg);
1577   -
1578   - if(!reply)
1579   - {
1580   - exception e = exception("%s",error.message);
1581   - dbus_error_free(&error);
1582   - throw e;
1583   - return -1;
1584   - }
1585   -
1586   - return get_intval(reply);
1587   -
1588   - }
1589   - }
1590   - return 0;
1591   - }
1592   -
1593   -#endif // HAVE_DBUS
1594   -
1595   - int erase(void)
1596   - {
1597   - return query_intval(HLLAPI_PACKET_ERASE);
1598   - }
1599   -
1600   - int erase_eof(void)
1601   - {
1602   - return query_intval(HLLAPI_PACKET_ERASE_EOF);
1603   - }
1604   -
1605   - int erase_eol(void)
1606   - {
1607   - return query_intval(HLLAPI_PACKET_ERASE_EOL);
1608   - }
1609   -
1610   - int erase_input(void)
1611   - {
1612   - return query_intval(HLLAPI_PACKET_ERASE_INPUT);
1613   - }
1614   -
1615   - int print(void)
1616   - {
1617   - return query_intval(HLLAPI_PACKET_PRINT);
1618   - }
1619   -
1620   - const char * asc2ebc(unsigned char *text, int sz)
1621   - {
1622   - query_strval(HLLAPI_PACKET_ASC2EBC,text,sz);
1623   - return (const char *) text;
1624   - }
1625   -
1626   - const char * ebc2asc(unsigned char *text, int sz)
1627   - {
1628   - query_strval(HLLAPI_PACKET_EBC2ASC,text,sz);
1629   - return (const char *) text;
1630   - }
1631   -
1632   - void set_unlock_delay(unsigned short ms)
1633   - {
1634   - set_intval(HLLAPI_PACKET_SET_UNLOCK_DELAY,(int) ms);
1635   - }
1636   -
1637   - };
1638   -
1639   - session * session::create_remote(const char *session)
1640   - {
1641   - debug("create(%s)",session);
1642   -
1643   - if(strncasecmp(session,"service://",10)) {
1644   - return new remote(session);
1645   - }
1646   -
1647   -#ifdef HAVE_DBUS
1648   - return create_service_client(session+10);
1649   -#else
1650   - throw exception("Can't create session \"%s\"",session);
1651   -#endif // HAVE_DBUS
1652   -
1653   - }
1654   -
1655   - }
1656   -
src/libpw3270cpp/service.cc
... ... @@ -1,623 +0,0 @@
1   -/*
2   - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
3   - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
4   - * aplicativos mainframe. Registro no INPI sob o nome G3270.
5   - *
6   - * Copyright (C) <2008> <Banco do Brasil S.A.>
7   - *
8   - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
9   - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
10   - * Free Software Foundation.
11   - *
12   - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
13   - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
14   - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
15   - * obter mais detalhes.
16   - *
17   - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
18   - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin
19   - * St, Fifth Floor, Boston, MA 02110-1301 USA
20   - *
21   - * Este programa está nomeado como service.cc e possui - linhas de código.
22   - *
23   - * Contatos:
24   - *
25   - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
26   - *
27   - */
28   -
29   - #include <config.h>
30   -
31   - #ifdef HAVE_DBUS
32   -
33   - #include <iostream>
34   - #include <stdio.h>
35   - #include <dbus/dbus.h>
36   - #include <string.h>
37   - #include <malloc.h>
38   - #include <sys/types.h>
39   - #include <unistd.h>
40   - #include <limits.h>
41   -
42   - #ifndef DBUS_TIMEOUT_INFINITE
43   - #define DBUS_TIMEOUT_INFINITE ((int) 0x7fffffff)
44   - #endif // !DBUS_TIMEOUT_INFINITE
45   -
46   - #include <pw3270cpp.h>
47   - #include <lib3270/log.h>
48   -
49   -/*--[ Implement ]--------------------------------------------------------------------------------------------------*/
50   -
51   - namespace PW3270_NAMESPACE
52   - {
53   - DBusConnection * conn;
54   -
55   - class client : public session
56   - {
57   - private:
58   -
59   - #define DBUS_DESTINATION "br.com.bb.pw3270.service"
60   - #define DBUS_PATH "/br/com/bb/pw3270/service"
61   - #define DBUS_INTERFACE "br.com.bb.pw3270.service"
62   -
63   - DBusConnection * conn;
64   - string name;
65   - const char * id;
66   -
67   - DBusMessage * createMessage(const char *method)
68   - {
69   - DBusMessage * msg = dbus_message_new_method_call( DBUS_DESTINATION, // Destination
70   - DBUS_PATH, // Path
71   - DBUS_INTERFACE, // Interface
72   - method); // method
73   -
74   - if (!msg)
75   - throw exception("Error creating DBUS message for method %s",method);
76   -
77   - return msg;
78   -
79   - }
80   -
81   - DBusMessage * call(DBusMessage *msg)
82   - {
83   - DBusMessage * reply;
84   - DBusError error;
85   -
86   - dbus_error_init(&error);
87   - reply = dbus_connection_send_with_reply_and_block(conn,msg,10000,&error);
88   - dbus_message_unref(msg);
89   -
90   - if(dbus_error_is_set(&error))
91   - {
92   - string msg = error.message;
93   - dbus_error_free(&error);
94   - throw exception("%s",msg.c_str());
95   - }
96   -
97   - if(!reply)
98   - {
99   - throw exception("No reply for %s message","DBUS");
100   - }
101   -
102   - return reply;
103   - }
104   -
105   - string getString(DBusMessage *msg)
106   - {
107   - string rc;
108   -
109   - if(msg)
110   - {
111   - DBusMessageIter iter;
112   -
113   - if(dbus_message_iter_init(msg, &iter))
114   - {
115   - if(dbus_message_iter_get_arg_type(&iter) == DBUS_TYPE_STRING)
116   - {
117   - const char * str;
118   - dbus_message_iter_get_basic(&iter, &str);
119   - trace("Response: [%s]",str);
120   - rc.assign(str);
121   - dbus_message_unref(msg);
122   - return rc;
123   - }
124   -
125   - exception e = exception("DBUS Return type was %c, expecting %c",dbus_message_iter_get_arg_type(&iter),DBUS_TYPE_INT32);
126   - dbus_message_unref(msg);
127   -
128   - throw e;
129   -
130   - }
131   -
132   - }
133   -
134   - return rc;
135   -
136   - }
137   -
138   - int getInteger(DBusMessage *msg) {
139   -
140   - if(msg)
141   - {
142   - DBusMessageIter iter;
143   -
144   - if(dbus_message_iter_init(msg, &iter))
145   - {
146   - if(dbus_message_iter_get_arg_type(&iter) == DBUS_TYPE_INT32)
147   - {
148   - dbus_int32_t iSigned;
149   - dbus_message_iter_get_basic(&iter, &iSigned);
150   - dbus_message_unref(msg);
151   - return (int) iSigned;
152   - }
153   -
154   - exception e = exception("DBUS Return type was %c, expecting %c",dbus_message_iter_get_arg_type(&iter),DBUS_TYPE_INT32);
155   -
156   - dbus_message_unref(msg);
157   - throw e;
158   - }
159   - dbus_message_unref(msg);
160   - }
161   - return -1;
162   -
163   - }
164   -
165   - string getString(const char *method)
166   - {
167   - return getString(call(createMessage(method)));
168   - }
169   -
170   - int getInteger(const char *method)
171   - {
172   - return getInteger(call(createMessage(method)));
173   - }
174   -
175   - int getInteger(const char *method, int first_arg_type, ...)
176   - {
177   - va_list var_args;
178   - DBusMessage * msg = createMessage(method);
179   -
180   - va_start(var_args, first_arg_type);
181   - dbus_message_append_args_valist(msg,first_arg_type,var_args);
182   - va_end(var_args);
183   -
184   - return getInteger(call(msg));
185   - }
186   -
187   - string getString(const char *method, int first_arg_type, ...)
188   - {
189   - va_list var_args;
190   - DBusMessage * msg = createMessage(method);
191   -
192   - va_start(var_args, first_arg_type);
193   - dbus_message_append_args_valist(msg,first_arg_type,var_args);
194   - va_end(var_args);
195   -
196   - return getString(call(msg));
197   - }
198   -
199   - protected:
200   -
201   - virtual string get_text(int baddr = 0, size_t len = 1, bool lf = true)
202   - {
203   - dbus_int32_t a = (dbus_int32_t) baddr;
204   - dbus_int32_t s = (dbus_int32_t) len;
205   - char c = lf ? '\n' : 0;
206   -
207   - return getString( "getText",
208   - DBUS_TYPE_STRING, &this->id,
209   - DBUS_TYPE_INT32, &a,
210   - DBUS_TYPE_INT32, &s,
211   - DBUS_TYPE_BYTE, &c,
212   - DBUS_TYPE_INVALID);
213   -
214   - }
215   -
216   - virtual string get_text_at(int row, int col, size_t sz, bool lf = true)
217   - {
218   - dbus_int32_t r = (dbus_int32_t) row;
219   - dbus_int32_t c = (dbus_int32_t) col;
220   - dbus_int32_t s = (dbus_int32_t) sz;
221   - char l = lf ? '\n' : 0;
222   -
223   - return getString( "getTextAt",
224   - DBUS_TYPE_STRING, &this->id,
225   - DBUS_TYPE_INT32, &r,
226   - DBUS_TYPE_INT32, &c,
227   - DBUS_TYPE_INT32, &s,
228   - DBUS_TYPE_BYTE, &l,
229   - DBUS_TYPE_INVALID);
230   -
231   - }
232   -
233   - virtual int set_text_at(int row, int col, const char *str)
234   - {
235   - dbus_int32_t r = (dbus_int32_t) row;
236   - dbus_int32_t c = (dbus_int32_t) col;
237   -
238   - return getInteger( "setTextAt",
239   - DBUS_TYPE_STRING, &this->id,
240   - DBUS_TYPE_INT32, &r,
241   - DBUS_TYPE_INT32, &c,
242   - DBUS_TYPE_STRING, &str,
243   - DBUS_TYPE_INVALID);
244   - }
245   -
246   - virtual int cmp_text_at(int row, int col, const char *str, bool lf)
247   - {
248   - dbus_int32_t r = (dbus_int32_t) row;
249   - dbus_int32_t c = (dbus_int32_t) col;
250   - char l = lf ? '\n' : 0;
251   -
252   - return getInteger( "cmpTextAt",
253   - DBUS_TYPE_STRING, &this->id,
254   - DBUS_TYPE_INT32, &r,
255   - DBUS_TYPE_INT32, &c,
256   - DBUS_TYPE_STRING, &str,
257   - DBUS_TYPE_BYTE, &l,
258   - DBUS_TYPE_INVALID);
259   - }
260   -
261   - virtual int emulate_input(const char *str)
262   - {
263   - return getInteger( "input",
264   - DBUS_TYPE_STRING, &this->id,
265   - DBUS_TYPE_STRING, &str,
266   - DBUS_TYPE_INVALID);
267   -
268   - }
269   -
270   - public:
271   - client(const char *session)
272   - {
273   - DBusError err;
274   -
275   - dbus_error_init(&err);
276   -#ifdef DEBUG
277   - conn = dbus_bus_get(DBUS_BUS_SESSION, &err);
278   -#else
279   - conn = dbus_bus_get(DBUS_BUS_SYSTEM, &err);
280   -#endif
281   -
282   - if(dbus_error_is_set(&err))
283   - {
284   - exception e = exception("DBUS Connection Error (%s)", err.message);
285   - dbus_error_free(&err);
286   - throw e;
287   - }
288   -
289   - if(!conn)
290   - {
291   - throw exception("%s", "DBUS Connection failed");
292   - }
293   -
294   - if(*session != '?')
295   - {
296   - // Já tem sessão definida, usa.
297   - int rc = getInteger("chkId",DBUS_TYPE_STRING, &session, DBUS_TYPE_INVALID);
298   - if(rc) {
299   - throw exception("%s",strerror(rc));
300   - }
301   - this->name = session;
302   - }
303   - else
304   - {
305   - // Obter um ID de sessão no serviço
306   - this->name = getString("createSession");
307   - }
308   -
309   - trace("Session=%s",this->name.c_str());
310   -
311   - this->id = this->name.c_str();
312   - }
313   -
314   - virtual ~client()
315   - {
316   -
317   - }
318   -
319   - virtual string get_session_name(void) const
320   - {
321   - string rc = "service://";
322   - rc += this->name;
323   - return rc;
324   - }
325   -
326   - virtual bool is_connected(void)
327   - {
328   - return getInteger("isConnected", DBUS_TYPE_STRING, &this->id, DBUS_TYPE_INVALID);
329   - }
330   -
331   - virtual bool is_ready(void)
332   - {
333   - return getInteger("isReady", DBUS_TYPE_STRING, &this->id, DBUS_TYPE_INVALID);
334   - }
335   -
336   - virtual int close(void)
337   - {
338   - return getInteger("destroySession", DBUS_TYPE_STRING, &this->id, DBUS_TYPE_INVALID);
339   - }
340   -
341   - void set_timeout(time_t timeout) {
342   - dbus_int32_t val = (dbus_int32_t) timeout;
343   - getInteger("setTimeout", DBUS_TYPE_STRING, &this->id, DBUS_TYPE_INT32, &val, DBUS_TYPE_INVALID);
344   - }
345   -
346   - void set_autoclose(time_t timeout) {
347   - dbus_int32_t val = (dbus_int32_t) timeout;
348   - getInteger("setAutoClose", DBUS_TYPE_STRING, &this->id, DBUS_TYPE_INT32, &val, DBUS_TYPE_INVALID);
349   - }
350   -
351   - virtual LIB3270_CSTATE get_cstate(void)
352   - {
353   - return (LIB3270_CSTATE) getInteger("getConnectionState", DBUS_TYPE_STRING, &this->id, DBUS_TYPE_INVALID);
354   - }
355   -
356   - virtual LIB3270_MESSAGE get_program_message(void)
357   - {
358   - return (LIB3270_MESSAGE) getInteger("getProgramMessage", DBUS_TYPE_STRING, &this->id, DBUS_TYPE_INVALID);
359   - }
360   -
361   - virtual LIB3270_SSL_STATE get_secure(void)
362   - {
363   - return (LIB3270_SSL_STATE) getInteger("getSecureState", DBUS_TYPE_STRING, &this->id, DBUS_TYPE_INVALID);
364   - }
365   -
366   - virtual int get_width(void)
367   - {
368   - return getInteger("getScreenWidth", DBUS_TYPE_STRING, &this->id, DBUS_TYPE_INVALID);
369   - }
370   -
371   - virtual int get_height(void)
372   - {
373   - return getInteger("getScreenHeight", DBUS_TYPE_STRING, &this->id, DBUS_TYPE_INVALID);
374   - }
375   -
376   - virtual int get_length(void)
377   - {
378   - return getInteger("getScreenLength", DBUS_TYPE_STRING, &this->id, DBUS_TYPE_INVALID);
379   - }
380   -
381   - virtual void set_unlock_delay(unsigned short ms)
382   - {
383   - dbus_int32_t val = (dbus_int32_t) ms;
384   - getInteger("setUnlockDelay", DBUS_TYPE_STRING, &this->id, DBUS_TYPE_INT32, &val, DBUS_TYPE_INVALID);
385   - }
386   -
387   - virtual int set_host_charset(const char *charset)
388   - {
389   - return getInteger("setHostCharset", DBUS_TYPE_STRING, &this->id, DBUS_TYPE_STRING, &charset, DBUS_TYPE_INVALID);
390   - }
391   -
392   - virtual string get_host_charset(void)
393   - {
394   - return getString("getHostCharset", DBUS_TYPE_STRING, &this->id, DBUS_TYPE_INVALID);
395   - }
396   -
397   - virtual int connect()
398   - {
399   - return connect("",0);
400   - }
401   -
402   - virtual int connect(const char *url, time_t wait)
403   - {
404   - int rc = getInteger("connect", DBUS_TYPE_STRING, &this->id, DBUS_TYPE_STRING, &url, DBUS_TYPE_INVALID);
405   -
406   - debug("connect(%s) rc=%d (%s)",url,rc,strerror(rc));
407   -
408   - if(!rc && wait) {
409   - time_t end = time(0) + wait;
410   - while(!is_connected()) {
411   - if(time(0) > end) {
412   - debug("%s: Timeout",__FUNCTION__);
413   - return ETIMEDOUT;
414   - }
415   - usleep(500);
416   - }
417   - }
418   -
419   - debug("connect(%s) rc=%d (%s)",url,rc,strerror(rc));
420   -
421   - return rc;
422   -
423   - }
424   -
425   - virtual int set_url(const char *hostname)
426   - {
427   - return getInteger("setURL", DBUS_TYPE_STRING, &this->id, DBUS_TYPE_STRING, &hostname, DBUS_TYPE_INVALID);
428   - }
429   -
430   - virtual string get_url()
431   - {
432   - return getString("getUrl", DBUS_TYPE_STRING, &this->id, DBUS_TYPE_INVALID);
433   - }
434   -
435   - virtual int disconnect(void)
436   - {
437   - return getInteger("disconnect", DBUS_TYPE_STRING, &this->id, DBUS_TYPE_INVALID);
438   - }
439   -
440   - virtual int wait_for_ready(int seconds)
441   - {
442   - time_t end = time(0)+seconds;
443   -
444   - debug("%s(%d)",__FUNCTION__,seconds);
445   - while(time(0) < end)
446   - {
447   - if(!is_connected()) {
448   - debug("%s: %s",__FUNCTION__,strerror(ENOTCONN));
449   - return ENOTCONN;
450   - }
451   -
452   - if(is_ready())
453   - return 0;
454   -
455   - usleep(500);
456   - }
457   -
458   - debug("%s: Timeout",__FUNCTION__);
459   - return ETIMEDOUT;
460   - }
461   -
462   - virtual int wait(int seconds)
463   - {
464   -
465   - time_t end = time(0)+seconds;
466   -
467   - while(time(0) < end)
468   - {
469   - if(!is_connected())
470   - return ENOTCONN;
471   - usleep(500);
472   - }
473   -
474   - return 0;
475   - }
476   -
477   - virtual int iterate(bool wait)
478   - {
479   - if(wait)
480   - usleep(100);
481   - return 0;
482   - }
483   -
484   - virtual const char * asc2ebc(unsigned char *str, int sz = -1)
485   - {
486   - return (const char *) str;
487   - }
488   -
489   - virtual const char * ebc2asc(unsigned char *str, int sz = -1)
490   - {
491   - return (const char *) str;
492   - }
493   -
494   - virtual int set_cursor_position(int row, int col)
495   - {
496   - dbus_int32_t r = (dbus_int32_t) row;
497   - dbus_int32_t c = (dbus_int32_t) col;
498   -
499   - return getInteger( "setCursorAt",
500   - DBUS_TYPE_STRING, &this->id,
501   - DBUS_TYPE_INT32, &r,
502   - DBUS_TYPE_INT32, &c,
503   - DBUS_TYPE_INVALID);
504   -
505   - }
506   -
507   - virtual int set_cursor_addr(int addr)
508   - {
509   - dbus_int32_t a = (dbus_int32_t) addr;
510   - return getInteger("setCursorAddr", DBUS_TYPE_STRING, &this->id, DBUS_TYPE_INT32, &addr, DBUS_TYPE_INVALID);
511   - }
512   -
513   - virtual int get_cursor_addr(void)
514   - {
515   - return getInteger("getCursorAddr", DBUS_TYPE_STRING, &this->id, DBUS_TYPE_INVALID);
516   - }
517   -
518   - virtual int set_toggle(LIB3270_TOGGLE ix, bool value)
519   - {
520   - dbus_int32_t i = (dbus_int32_t) ix;
521   - dbus_int32_t v = (dbus_int32_t) value;
522   -
523   - return getInteger("setToggle",
524   - DBUS_TYPE_STRING, &this->id,
525   - DBUS_TYPE_INT32, &i,
526   - DBUS_TYPE_INT32, &v,
527   - DBUS_TYPE_INVALID);
528   -
529   - }
530   -
531   - virtual int enter(void)
532   - {
533   - return getInteger("enter", DBUS_TYPE_STRING, &this->id, DBUS_TYPE_INVALID);
534   - }
535   -
536   - virtual int pfkey(int key)
537   - {
538   - dbus_int32_t val = (dbus_int32_t) key;
539   - return getInteger("pfKey", DBUS_TYPE_STRING, &this->id, DBUS_TYPE_INT32, &val, DBUS_TYPE_INVALID);
540   - }
541   -
542   - virtual int pakey(int key)
543   - {
544   - dbus_int32_t val = (dbus_int32_t) key;
545   - return getInteger("paKey", DBUS_TYPE_STRING, &this->id, DBUS_TYPE_INT32, &val, DBUS_TYPE_INVALID);
546   - }
547   -
548   - virtual int quit(void)
549   - {
550   - return getInteger("quit",
551   - DBUS_TYPE_STRING, &this->id,
552   - DBUS_TYPE_INVALID);
553   - }
554   -
555   - virtual int action(const char *name)
556   - {
557   - return getInteger("action",
558   - DBUS_TYPE_STRING, &this->id,
559   - DBUS_TYPE_STRING, &name,
560   - DBUS_TYPE_INVALID);
561   - }
562   -
563   - virtual int erase(void)
564   - {
565   - return getInteger("erase", DBUS_TYPE_STRING, &this->id, DBUS_TYPE_INVALID);
566   - }
567   -
568   - virtual int erase_eof(void)
569   - {
570   - return getInteger("eraseEof", DBUS_TYPE_STRING, &this->id, DBUS_TYPE_INVALID);
571   - }
572   -
573   - virtual int erase_eol(void)
574   - {
575   - return getInteger("eraseEol", DBUS_TYPE_STRING, &this->id, DBUS_TYPE_INVALID);
576   - }
577   -
578   - virtual int erase_input(void)
579   - {
580   - return getInteger("eraseInput", DBUS_TYPE_STRING, &this->id, DBUS_TYPE_INVALID);
581   - }
582   -
583   - virtual int print(void)
584   - {
585   - return getInteger("print", DBUS_TYPE_STRING, &this->id, DBUS_TYPE_INVALID);
586   - }
587   -
588   - virtual int get_field_start(int baddr = -1)
589   - {
590   - return -1;
591   - }
592   -
593   - virtual int get_field_len(int baddr = -1)
594   - {
595   - return -1;
596   - }
597   -
598   - virtual int get_next_unprotected(int baddr = -1)
599   - {
600   - return -1;
601   - }
602   -
603   - virtual int get_is_protected(int baddr = -1)
604   - {
605   - return -1;
606   - }
607   -
608   - virtual int get_is_protected_at(int row, int col)
609   - {
610   - return -1;
611   - }
612   -
613   -
614   - };
615   -
616   - session * create_service_client(const char *session)
617   - {
618   - return new client(session);
619   - }
620   -
621   -
622   - }
623   - #endif // HAVE_DBUS
src/libpw3270cpp/session.cc
... ... @@ -1,765 +0,0 @@
1   -/*
2   - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
3   - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
4   - * aplicativos mainframe. Registro no INPI sob o nome G3270.
5   - *
6   - * Copyright (C) <2008> <Banco do Brasil S.A.>
7   - *
8   - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
9   - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
10   - * Free Software Foundation.
11   - *
12   - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
13   - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
14   - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
15   - * obter mais detalhes.
16   - *
17   - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
18   - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin
19   - * St, Fifth Floor, Boston, MA 02110-1301 USA
20   - *
21   - * Este programa está nomeado como session.cc e possui - linhas de código.
22   - *
23   - * Contatos:
24   - *
25   - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
26   - * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)
27   - *
28   - */
29   -
30   - #include <config.h>
31   - #include <stdarg.h>
32   - #include <stdio.h>
33   - #include <string.h>
34   - #include <malloc.h>
35   -
36   - #include "private.h"
37   -
38   -#ifndef WIN32
39   - #include <unistd.h>
40   -#endif // !WIN32
41   -
42   -#ifdef HAVE_SYSLOG
43   - #include <syslog.h>
44   -#endif // HAVE_SYSLOG
45   -
46   -
47   -/*--[ Implement ]--------------------------------------------------------------------------------------------------*/
48   -
49   - using namespace PW3270_NAMESPACE;
50   -
51   -#if defined(linux)
52   - static void onLoad() __attribute__((constructor));
53   - static void onUnLoad() __attribute__((destructor));
54   -
55   - static void onLoad()
56   - {
57   - session::init();
58   - }
59   -
60   - static void onUnLoad()
61   - {
62   - session::deinit();
63   - }
64   -
65   -#endif // linux
66   -
67   -#ifdef _WIN32
68   -
69   - BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
70   - {
71   - switch(fdwReason)
72   - {
73   - case DLL_PROCESS_ATTACH:
74   - session::init();
75   - break;
76   -
77   - case DLL_PROCESS_DETACH:
78   - session::deinit();
79   - break;
80   - }
81   -
82   - return TRUE;
83   - }
84   -
85   -#endif // _WIN32
86   -
87   -
88   - namespace PW3270_NAMESPACE {
89   -
90   - session * session::first = nullptr;
91   - session * session::last = nullptr;
92   - session * (*session::factory)(const char *name) = nullptr;
93   -
94   - static recursive_mutex mtx;
95   -
96   - inline void lock()
97   - {
98   - mtx.lock();
99   - }
100   -
101   - inline void unlock()
102   - {
103   - mtx.unlock();
104   - }
105   -
106   - void session::init()
107   - {
108   - trace("Loading %s objects",PACKAGE_NAME);
109   - }
110   -
111   - void session::deinit()
112   - {
113   - trace("Unloading %s objects",PACKAGE_NAME);
114   - while(first)
115   - {
116   - delete first;
117   - }
118   -
119   - }
120   -
121   - session::session()
122   - {
123   -
124   -#ifdef HAVE_ICONV
125   - this->conv2Local = (iconv_t) (-1);
126   - this->conv2Host = (iconv_t) (-1);
127   -#endif
128   -
129   - if(first)
130   - {
131   - prev = last;
132   - next = 0;
133   - last->next = this;
134   - last = this;
135   - }
136   - else
137   - {
138   - prev = next = 0;
139   - first = last = this;
140   - }
141   -
142   - }
143   -
144   - session::~session()
145   - {
146   -#ifdef HAVE_ICONV
147   -
148   - if(this->conv2Local != (iconv_t) (-1))
149   - iconv_close(this->conv2Local);
150   -
151   - if(this->conv2Host != (iconv_t) (-1))
152   - iconv_close(this->conv2Host);
153   -
154   -#endif
155   -
156   - if(prev)
157   - prev->next = next;
158   - else
159   - first = next;
160   -
161   - if(next)
162   - next->prev = prev;
163   - else
164   - last = prev;
165   - }
166   -
167   - // Factory methods and settings
168   - session * session::create(const char *name)
169   - {
170   - session *rc = nullptr;
171   -
172   - trace("%s(%s)",__FUNCTION__,name);
173   -
174   - lock();
175   -
176   - try
177   - {
178   - if(factory)
179   - rc = factory(name);
180   - else if(name && *name)
181   - rc = create_remote(name);
182   - else
183   - rc = create_local();
184   -
185   - }
186   - catch(std::exception &e)
187   - {
188   - unlock();
189   - throw exception("%s",e.what());
190   - }
191   -
192   - unlock();
193   -
194   - return rc;
195   - }
196   -
197   - session * session::start(const char *name)
198   - {
199   - return create(name);
200   - }
201   -
202   - bool session::has_default(void)
203   - {
204   - return first != nullptr;
205   - }
206   -
207   - session * session::get_default(void)
208   - {
209   - if(first)
210   - return first;
211   - return create(NULL);
212   - }
213   -
214   - void session::set_plugin(session * (*factory)(const char *name))
215   - {
216   - trace("%s(%p)",__FUNCTION__,factory);
217   - session::factory = factory;
218   - }
219   -
220   - // Object settings
221   - void session::set_display_charset(const char *remote, const char *local)
222   - {
223   - trace("%s(%s,%s)",__FUNCTION__,remote,local);
224   -
225   -#ifdef HAVE_ICONV
226   -
227   - string display_charset = this->get_display_charset();
228   -
229   - if(this->conv2Local != (iconv_t) (-1))
230   - iconv_close(this->conv2Local);
231   -
232   - if(this->conv2Host != (iconv_t) (-1))
233   - iconv_close(this->conv2Host);
234   -
235   - if(!remote)
236   - remote = display_charset.c_str();
237   -
238   - trace("%s remote=%s local=%s",__FUNCTION__,remote,local);
239   -
240   - if(strcmp(local,remote))
241   - {
242   - // Local and remote charsets aren't the same, setup conversion
243   - conv2Local = iconv_open(local, remote);
244   - conv2Host = iconv_open(remote,local);
245   - }
246   - else
247   - {
248   - // Same charset, doesn't convert
249   - conv2Local = conv2Host = (iconv_t)(-1);
250   - }
251   -
252   -#else
253   -
254   - throw exception("%s",strerror(ENOSUP));
255   -
256   -#endif
257   -
258   - }
259   -
260   - string session::get_display_charset(void)
261   - {
262   - return string(get_encoding());
263   - }
264   -
265   - const char * session::get_encoding(void)
266   - {
267   - return "ISO-8859-1";
268   - }
269   -
270   - // 3270 methods
271   - const string session::get_version(void)
272   - {
273   - return string(PACKAGE_VERSION);
274   - }
275   -
276   - const string session::get_revision(void)
277   - {
278   -#ifdef PACKAGE_REVISION
279   - return string(PACKAGE_REVISION);
280   -#else
281   - return string(STRINGIZE_VALUE_OF(BUILD_DATE));
282   -#endif // PACKAGE_REVISION
283   - }
284   -
285   - void session::log(const char *fmt, ...)
286   - {
287   - va_list arg_ptr;
288   - va_start(arg_ptr, fmt);
289   - this->logva(fmt,arg_ptr);
290   - va_end(arg_ptr);
291   - }
292   -
293   - void session::logva(const char *fmt, va_list args)
294   - {
295   - #ifdef HAVE_SYSLOG
296   - openlog(PACKAGE_NAME, LOG_NDELAY, LOG_USER);
297   - vsyslog(LOG_INFO,fmt,args);
298   - closelog();
299   - #else
300   - vfprintf(stderr,fmt,args);
301   - #endif
302   - }
303   -
304   - int session::wait_for_text_at(int row, int col, const char *key, int timeout)
305   - {
306   - time_t end = time(0)+timeout;
307   -
308   - trace("%s(%d,%d,%s,%d)",__FUNCTION__,row,col,key,timeout);
309   -
310   - iterate(false);
311   - while(time(0) < end)
312   - {
313   - trace("Aguardar %d segundos por \"%s\" @%d,%d (%s)",(int) (end - time(0)),key,row,col,get_text_at(row,col,strlen(key)).c_str());
314   -
315   - int rc = wait_for_ready(end - time(0));
316   - if(rc) {
317   - return rc;
318   - }
319   -
320   - if(!cmp_text_at(row,col,key)) {
321   - return 0;
322   - }
323   -
324   - iterate(true);
325   -
326   - }
327   -
328   - trace("Tela:\n%s\n", ((string) *this).c_str());
329   -
330   - return ETIMEDOUT;
331   - }
332   -
333   - int session::set_copy(const char *text)
334   - {
335   - return EINVAL;
336   - }
337   -
338   - string session::get_copy(void)
339   - {
340   - errno = EINVAL;
341   - return string();
342   - }
343   -
344   - string session::get_clipboard(void)
345   - {
346   -#if defined(_WIN32)
347   -
348   - if (! OpenClipboard(0))
349   - {
350   - throw exception(GetLastError(),"%s","Can´t open system clipboard");
351   - return NULL;
352   - }
353   -
354   - HANDLE hData = GetClipboardData(CF_TEXT);
355   - if(!hData)
356   - {
357   - throw exception(GetLastError(),"%s","Can´t get clipboard data");
358   - return NULL;
359   - }
360   -
361   - char * pszText = static_cast<char*>( GlobalLock(hData) );
362   - if(!pszText)
363   - {
364   - throw exception(GetLastError(),"%s","Can´t lock clipboard");
365   - return NULL;
366   - }
367   -
368   - string text = string ( pszText );
369   -
370   - GlobalUnlock( hData );
371   -
372   - CloseClipboard();
373   -
374   - return text;
375   -
376   -#else
377   - errno = EINVAL;
378   - return NULL;
379   -
380   -#endif // _WIN32
381   - }
382   -
383   - int session::set_clipboard(const char *text)
384   - {
385   -#if defined(_WIN32)
386   - if (! OpenClipboard(0))
387   - {
388   - throw exception(GetLastError(),"%s","Can´t open system clipboard");
389   - return -1;
390   - }
391   -
392   - EmptyClipboard();
393   -
394   - size_t size = strlen(text)+1;
395   - HGLOBAL hClipboardData = GlobalAlloc(GMEM_MOVEABLE , size);
396   -
397   - strcpy((char *) GlobalLock(hClipboardData), text);
398   -
399   - if(!SetClipboardData(CF_TEXT, hClipboardData))
400   - {
401   - GlobalUnlock(hClipboardData);
402   - CloseClipboard();
403   - throw exception(GetLastError(),"%s","Can´t set system clipboard");
404   - }
405   -
406   - GlobalUnlock(hClipboardData);
407   - CloseClipboard();
408   -
409   - return 0;
410   -#else
411   -
412   - return EINVAL;
413   -
414   -#endif // _WIN32
415   - }
416   -
417   -
418   - int session::popup_dialog(LIB3270_NOTIFY id , const char *title, const char *message, const char *fmt, ...)
419   - {
420   - return -1;
421   - }
422   -
423   - string session::file_chooser_dialog(int action, const char *title, const char *extension, const char *filename)
424   - {
425   - return string("");
426   - }
427   -
428   - string session::get_3270_text(const char *str)
429   - {
430   - string rc;
431   -
432   -#ifdef HAVE_ICONV
433   - size_t in = strlen(str);
434   -
435   - if(in && conv2Host != (iconv_t)(-1))
436   - {
437   - size_t out = (in << 1);
438   - char * ptr;
439   - char * outBuffer = (char *) malloc(out);
440   - ICONV_CONST char * inBuffer = (ICONV_CONST char *) str;
441   -
442   - memset(ptr=outBuffer,0,out);
443   -
444   - iconv(conv2Host,NULL,NULL,NULL,NULL); // Reset state
445   -
446   - if(iconv(conv2Host,&inBuffer,&in,&ptr,&out) == ((size_t) -1)) {
447   - rc.assign(str);
448   - } else {
449   - rc.assign(outBuffer);
450   - }
451   -
452   - free(outBuffer);
453   - } else {
454   - rc.assign(str);
455   - }
456   -#else
457   - rc.assign(str);
458   -#endif // HAVE_ICONV
459   -
460   - trace("%s(\"%s\")=\"%s\"",__FUNCTION__,str,rc.c_str());
461   -
462   - return rc;
463   - }
464   -
465   - string session::get_local_text(const char *str)
466   - {
467   - string rc;
468   -
469   -#ifdef HAVE_ICONV
470   - size_t in = strlen(str);
471   -
472   - if(in && conv2Local != (iconv_t)(-1))
473   - {
474   - size_t out = (in << 1);
475   - char * ptr;
476   - char * outBuffer = (char *) malloc(out);
477   - ICONV_CONST char * inBuffer = (ICONV_CONST char *) str;
478   -
479   - memset(ptr=outBuffer,0,out);
480   -
481   - iconv(conv2Local,NULL,NULL,NULL,NULL); // Reset state
482   -
483   - if(iconv(conv2Local,&inBuffer,&in,&ptr,&out) != ((size_t) -1))
484   - rc.assign(outBuffer);
485   -
486   - free(outBuffer);
487   - }
488   - else
489   - {
490   - char * text = strdup(str);
491   - for(char *ptr = text;*ptr;ptr++)
492   - {
493   - if(*ptr < ' ' || *ptr > 128)
494   - {
495   - *ptr = '?';
496   - }
497   - }
498   - rc = text;
499   - free(text);
500   - }
501   -#else
502   - char * text = strdup(str);
503   - for(char *ptr = text;*ptr;ptr++)
504   - {
505   - if(*ptr < ' ' || *ptr > 128)
506   - {
507   - *ptr = '?';
508   - }
509   - }
510   - rc = text;
511   - free(text);
512   -#endif // HAVE_ICONV
513   -
514   - return rc;
515   - }
516   -
517   - string session::get_string_at(int row, int col, size_t sz, bool lf)
518   - {
519   - return this->get_local_text(this->get_text_at(row,col,sz,lf).c_str());
520   - }
521   -
522   - int session::set_string_at(int row, int col, const char *str)
523   - {
524   - if(!str)
525   - return -1;
526   -
527   -#ifdef HAVE_ICONV
528   - if(conv2Host != (iconv_t)(-1))
529   - {
530   - size_t in = strlen(str);
531   - size_t out = (in << 1);
532   - char * ptr;
533   - char * outBuffer = (char *) malloc(out);
534   - ICONV_CONST char * inBuffer = (ICONV_CONST char *) str;
535   -
536   - memset(ptr=outBuffer,0,out);
537   -
538   - iconv(conv2Host,NULL,NULL,NULL,NULL); // Reset state
539   -
540   - if(iconv(conv2Host,&inBuffer,&in,&ptr,&out) != ((size_t) -1))
541   - {
542   - int rc = this->set_text_at(row,col,outBuffer);
543   - free(outBuffer);
544   - return rc;
545   - }
546   -
547   - free(outBuffer);
548   - }
549   -#endif // HAVE_ICONV
550   -
551   - return this->set_text_at(row,col,str);
552   -
553   - }
554   -
555   - int session::input_string(const char *str)
556   - {
557   - if(!str)
558   - return -1;
559   -
560   -#ifdef HAVE_ICONV
561   - if(conv2Host != (iconv_t)(-1))
562   - {
563   - size_t in = strlen(str);
564   - size_t out = (in << 1);
565   - char * ptr;
566   - char * outBuffer = (char *) malloc(out);
567   - ICONV_CONST char * inBuffer = (ICONV_CONST char *) str;
568   -
569   - memset(ptr=outBuffer,0,out);
570   -
571   - iconv(conv2Host,NULL,NULL,NULL,NULL); // Reset state
572   -
573   - if(iconv(conv2Host,&inBuffer,&in,&ptr,&out) != ((size_t) -1))
574   - {
575   - int rc = this->emulate_input(outBuffer);
576   - free(outBuffer);
577   - return rc;
578   - }
579   -
580   - free(outBuffer);
581   - }
582   -#endif // HAVE_ICONV
583   -
584   - return this->emulate_input(str);
585   -
586   - }
587   -
588   - int session::cmp_string_at(int row, int col, const char *text, bool lf)
589   - {
590   - return cmp_text_at(row,col,get_3270_text(text).c_str(),lf);
591   - }
592   -
593   - int session::wait_for_string_at(int row, int col, const char *key, int timeout)
594   - {
595   - return wait_for_text_at(row,col,get_3270_text(key).c_str(),timeout);
596   - }
597   -
598   - string session::get_string(int baddr, size_t len, bool lf)
599   - {
600   - return get_local_text(get_text(baddr,len,lf).c_str());
601   - }
602   -
603   - string session::asc2ebc(string &str)
604   - {
605   - size_t sz = str.size();
606   - unsigned char buffer[sz+1];
607   -
608   - memcpy(buffer,str.c_str(),sz);
609   - return string(asc2ebc(buffer,sz));
610   - }
611   -
612   - string session::ebc2asc(string &str)
613   - {
614   - size_t sz = str.size();
615   - unsigned char buffer[sz+1];
616   - memcpy(buffer,str.c_str(),sz);
617   - return string(ebc2asc(buffer,sz));
618   - }
619   -
620   - int session::file_transfer(LIB3270_FT_OPTION options, const char *local, const char *remote, int lrecl, int blksize, int primspace, int secspace, int dft)
621   - {
622   - log("Can't transfer %s: File transfer is unavailable", local ? local : "file");
623   - return EINVAL;
624   - }
625   -
626   - int session::set_host(const char *host)
627   - {
628   - return set_url(host);
629   - }
630   -
631   - int session::connect(const char *url, time_t wait)
632   - {
633   - int rc = 0;
634   -
635   - if(url && *url)
636   - {
637   - set_url(url);
638   - }
639   -
640   - rc = connect();
641   - trace("%s: connect=%d wait=%u",__FUNCTION__,rc,(unsigned int) wait);
642   -
643   - if(!rc && wait)
644   - {
645   - rc = wait_for_ready(wait);
646   - }
647   -
648   - return rc;
649   - }
650   -
651   -#ifdef _WIN32
652   - string session::win32_strerror(int e)
653   - {
654   - static char buffer[4096];
655   -
656   - memset(buffer,0,sizeof(buffer));
657   -
658   - if(FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,NULL,e,MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),buffer,sizeof(buffer),NULL) == 0)
659   - {
660   - snprintf(buffer,4095,"Windows error %d", e);
661   - }
662   -
663   - for(size_t f=0;f<sizeof(buffer);f++)
664   - {
665   - if(buffer[f] < ' ')
666   - {
667   - buffer[f] = 0;
668   - break;
669   - }
670   - }
671   -
672   - return string(buffer);
673   - }
674   -#endif // _WIN32
675   -
676   - int session::erase(int mode) {
677   -
678   - switch(mode) {
679   - case 0:
680   - return erase();
681   -
682   - case 1:
683   - return erase_eof();
684   -
685   - case 2:
686   - return erase_eol();
687   -
688   - case 3:
689   - return erase_input();
690   -
691   - }
692   -
693   - return -1;
694   - }
695   -
696   - string session::get_contents(bool lf)
697   - {
698   - string rc = "";
699   - int rows = get_height();
700   - int cols = get_width();
701   -
702   - for(int r = 0; r < rows; r++)
703   - {
704   - rc += get_string_at(r+1,1,cols).c_str();
705   - if(lf) {
706   - rc += "\n";
707   - }
708   - }
709   -
710   - return rc;
711   - }
712   -
713   - size_t session::find_string(const char *str, bool lf) {
714   -
715   - int rc = 0;
716   -
717   - try
718   - {
719   - size_t pos = get_contents(lf).find(str);
720   -
721   - if(pos != string::npos) {
722   - rc = ((int) pos) + 1;
723   - }
724   -
725   - }
726   - catch(std::exception &e)
727   - {
728   - rc = 0;
729   - }
730   -
731   - return rc;
732   -
733   - }
734   -
735   -
736   - string session::get_session_name(void) const
737   - {
738   - return string();
739   - }
740   -
741   - int session::close(void) {
742   - return 0;
743   - }
744   -
745   - /**
746   - * @brief Define após quantos segundos uma sessão IDLE será cancelada.
747   - *
748   - * @param timeout Nº de segundos a esperar em sessão inativa.
749   - *
750   - */
751   - void session::set_timeout(time_t timeout) {
752   - }
753   -
754   - /**
755   - * @brief Define após quantos segundos uma sessão offline será cancelada.
756   - *
757   - * @param timeout Nº de segundos a esperar em sessão offline.
758   - *
759   - */
760   - void session::set_autoclose(time_t timeout) {
761   - }
762   -
763   - }
764   -
765   -
src/libpw3270cpp/testprogram.cc
... ... @@ -1,119 +0,0 @@
1   -/*
2   - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
3   - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
4   - * aplicativos mainframe. Registro no INPI sob o nome G3270.
5   - *
6   - * Copyright (C) <2008> <Banco do Brasil S.A.>
7   - *
8   - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
9   - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
10   - * Free Software Foundation.
11   - *
12   - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
13   - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
14   - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
15   - * obter mais detalhes.
16   - *
17   - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
18   - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin
19   - * St, Fifth Floor, Boston, MA 02110-1301 USA
20   - *
21   - * Este programa está nomeado como testprogram.cc e possui - linhas de código.
22   - *
23   - * Contatos:
24   - *
25   - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
26   - * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)
27   - *
28   - */
29   -
30   - #include <pw3270cpp.h>
31   - #include <unistd.h>
32   - #include <iostream>
33   -
34   - using namespace std;
35   - using namespace PW3270_NAMESPACE;
36   -
37   -/*--[ Implement ]------------------------------------------------------------------------------------*/
38   -
39   - int main(int numpar, char *param[])
40   - {
41   -
42   - try
43   - {
44   - string s;
45   - // session *session = session::start("service://?");
46   - session *session = session::start("");
47   - // session *session = session::start("pw3270:A");
48   -
49   - string name = session->get_session_name();
50   -
51   - cout << "pw3270 version: " << session->get_version() << endl;
52   - cout << "pw3270 revision: " << session->get_revision() << endl;
53   - cout << "pw3270 session: " << name << endl << endl;
54   -
55   - session->set_timeout(60);
56   - session->set_autoclose(60);
57   -
58   - if(session->is_connected())
59   - cout << "\tConnected to host" << endl;
60   - else
61   - cout << "\tDisconnected" << endl;
62   -
63   - cout << "\tSession state: " << session->get_cstate() << endl;
64   -
65   - // s = session->get_display_charset();
66   - // cout << "\tDisplay charset: " << s.c_str() << endl;
67   -
68   - // s = session->get_host_charset();
69   - // cout << "\tHost charset: " << s.c_str() << endl;
70   -
71   - cout << "Connect: " << session->connect("tn3270://fandezhi.efglobe.com:23",60) << endl << endl;
72   -
73   - cout << "\tWaitForReady: " << session->wait_for_ready(10) << endl;
74   -
75   - cout << "\tIsConnected: " << session->is_connected() << endl;
76   - cout << "\tIsReady: " << session->is_ready() << endl;
77   - cout << "\tString(1,2,26) " << session->get_string_at(1,2,26) << endl;
78   -
79   - cout << "Conteúdo:" << endl << session->get_contents() << endl;
80   -
81   - delete session;
82   -
83   - /*
84   - session = session::start(name.c_str());
85   - cout << "Restored session: " << name << endl << endl;
86   - cout << "\tIsConnected: " << session->is_connected() << endl;
87   - cout << "\tIsReady: " << session->is_ready() << endl;
88   -
89   - session->disconnect();
90   - session->close();
91   - delete session;
92   - */
93   -
94   - }
95   - catch(std::exception &e) {
96   -
97   - cerr << e.what() << endl;
98   - return -1;
99   - }
100   -
101   - // Waits
102   - sleep(2);
103   -
104   - // Create another session
105   - /*
106   - {
107   - session *session = session::start("pw3270:a");
108   -
109   - session->disconnect();
110   - delete session;
111   -
112   - }
113   - */
114   -
115   -
116   - return 0;
117   - }
118   -
119   -
src/libpw3270cpp/valgrind.suppression
src/plugins/sample/main.c
... ... @@ -1,79 +0,0 @@
1   -/*
2   - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
3   - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
4   - * aplicativos mainframe. Registro no INPI sob o nome G3270.
5   - *
6   - * Copyright (C) <2008> <Banco do Brasil S.A.>
7   - *
8   - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
9   - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
10   - * Free Software Foundation.
11   - *
12   - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
13   - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
14   - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
15   - * obter mais detalhes.
16   - *
17   - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
18   - * programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple
19   - * Place, Suite 330, Boston, MA, 02111-1307, USA
20   - *
21   - * Este programa está nomeado como main.c e possui - linhas de código.
22   - *
23   - * Contatos:
24   - *
25   - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
26   - *
27   - *
28   - */
29   -
30   - #include <pw3270.h>
31   - #include <pw3270/plugin.h>
32   -
33   -/*--[ Implement ]---------------------------------------------------------------------------------------------------------*/
34   -
35   - /**
36   - * @brief Method called when the terminal connects to host.
37   - *
38   - * @param terminal Terminal widget.
39   - * @param host Connected host.
40   - * @param window Application window.
41   - *
42   - */
43   - static void connected(GtkWidget *terminal, const gchar *host, GtkWidget * window) {
44   -
45   - g_message("%s - %s",__FUNCTION__,host);
46   -
47   - }
48   -
49   - /**
50   - * @brief Method called when the terminal loses connection with the host.
51   - *
52   - * @param terminal Terminal widget.
53   - * @param window Application window.
54   - *
55   - */
56   - static void disconnected(GtkWidget *terminal, GtkWidget * window) {
57   -
58   - g_message("%s",__FUNCTION__);
59   -
60   - }
61   -
62   - /**
63   - * @brief Plugin has started.
64   - *
65   - */
66   - LIB3270_EXPORT int pw3270_plugin_start(GtkWidget *window) {
67   -
68   - GtkWidget * terminal = pw3270_get_terminal_widget(window);
69   -
70   - g_message("%s",__FUNCTION__);
71   -
72   - g_signal_connect(terminal,"disconnected",G_CALLBACK(disconnected),window);
73   - g_signal_connect(terminal,"connected",G_CALLBACK(connected),window);
74   -
75   - return 0;
76   - }
77   -
78   -
79   -
src/plugins/sample/sample.cbp
... ... @@ -1,52 +0,0 @@
1   -<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
2   -<CodeBlocks_project_file>
3   - <FileVersion major="1" minor="6" />
4   - <Project>
5   - <Option title="PW3270 - Sample plugin" />
6   - <Option pch_mode="2" />
7   - <Option default_target="Release" />
8   - <Option compiler="gcc" />
9   - <Build>
10   - <Target title="Debug">
11   - <Option output=".bin/Debug/sample3270" imp_lib="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).a" def_file="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).def" prefix_auto="0" extension_auto="1" />
12   - <Option object_output=".obj/Debug/" />
13   - <Option type="3" />
14   - <Option compiler="gcc" />
15   - <Option parameters="--pluginpath=${PWD}/.bin/Debug" />
16   - <Option host_application="pw3270" />
17   - <Option run_host_application_in_terminal="1" />
18   - <Compiler>
19   - <Add option="-g" />
20   - </Compiler>
21   - </Target>
22   - <Target title="Release">
23   - <Option output=".bin/Release/sample3270" imp_lib="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).a" def_file="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).def" prefix_auto="0" extension_auto="1" />
24   - <Option object_output=".obj/Release/" />
25   - <Option type="3" />
26   - <Option compiler="gcc" />
27   - <Compiler>
28   - <Add option="-O2" />
29   - </Compiler>
30   - <Linker>
31   - <Add option="-s" />
32   - </Linker>
33   - </Target>
34   - </Build>
35   - <Compiler>
36   - <Add option="-Wall" />
37   - <Add option="`pkg-config gtk+-2.0 --cflags`" />
38   - <Add option="-fPIC" />
39   - </Compiler>
40   - <Linker>
41   - <Add option="`pkg-config gtk+-2.0 --libs`" />
42   - </Linker>
43   - <Unit filename="main.c">
44   - <Option compilerVar="CC" />
45   - </Unit>
46   - <Extensions>
47   - <code_completion />
48   - <envvars />
49   - <debugger />
50   - </Extensions>
51   - </Project>
52   -</CodeBlocks_project_file>
src/sample/Makefile.in
... ... @@ -1,44 +0,0 @@
1   -#
2   -# "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
3   -# (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
4   -# aplicativos mainframe. Registro no INPI sob o nome G3270.
5   -#
6   -# Copyright (C) <2008> <Banco do Brasil S.A.>
7   -#
8   -# Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
9   -# os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
10   -# Free Software Foundation.
11   -#
12   -# Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
13   -# GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
14   -# A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
15   -# obter mais detalhes.
16   -#
17   -# Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
18   -# programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin
19   -# St, Fifth Floor, Boston, MA 02110-1301 USA
20   -#
21   -# Contatos:
22   -#
23   -# perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
24   -# erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça)
25   -#
26   -
27   -LIB3270_CFLAGS=`pkg-config --cflags lib3270`
28   -LIB3270_LIBS=`pkg-config --libs lib3270`
29   -
30   -EXEEXT=@EXEEXT@
31   -MKDIR=@MKDIR_P@
32   -CC=@CC@
33   -LD=@CC@
34   -
35   -CFLAGS=-g -Wall
36   -
37   -#---[ Targets ]----------------------------------------------------------------
38   -
39   -all: connect$(EXEEXT)
40   -
41   -connect$(EXEEXT): connect.c
42   - $(CC) $(CFLAGS) $(LIB3270_CFLAGS) -o $@ $^ $(LIB3270_LIBS)
43   -
44   -
src/sample/connect.c
... ... @@ -1,87 +0,0 @@
1   -/*
2   - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
3   - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
4   - * aplicativos mainframe. Registro no INPI sob o nome G3270.
5   - *
6   - * Copyright (C) <2008> <Banco do Brasil S.A.>
7   - *
8   - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
9   - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
10   - * Free Software Foundation.
11   - *
12   - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
13   - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
14   - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
15   - * obter mais detalhes.
16   - *
17   - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
18   - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin
19   - * St, Fifth Floor, Boston, MA 02110-1301 USA
20   - *
21   - * Este programa está nomeado como connect.c e possui - linhas de código.
22   - *
23   - * Contatos:
24   - *
25   - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
26   - * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)
27   - * licinio@bb.com.br (Licínio Luis Branco)
28   - * kraucer@bb.com.br (Kraucer Fernandes Mazuco)
29   - *
30   - */
31   -
32   - #include <stdio.h>
33   - #include <stdlib.h>
34   - #include <string.h>
35   - #include <lib3270.h>
36   -
37   -/*--[ Implement ]------------------------------------------------------------------------------------*/
38   -
39   - int main(int numpar, char *param[])
40   - {
41   - H3270 *hSession;
42   - int rc;
43   -
44   - if(numpar != 2)
45   - {
46   - fprintf(stderr,"Inform host URI as argument\n");
47   - exit(-1);
48   - }
49   -
50   - /* Get session handle */
51   - hSession = lib3270_session_new("");
52   -
53   - /* Connect to the requested URI, wait for 3270 negotiation */
54   - rc = lib3270_connect(hSession,param[1],1);
55   - if(rc)
56   - {
57   - fprintf(stderr,"Can't connect to %s: %s\n",param[1],strerror(rc));
58   - return rc;
59   - }
60   -
61   - printf("Connected to LU %s\n",lib3270_get_luname(hSession));
62   -
63   - /* Wait until the host is ready for commands */
64   - rc = lib3270_wait_for_ready(hSession,60);
65   - if(rc)
66   - {
67   - fprintf(stderr,"Error waiting for session negotiation: %s\n",strerror(rc));
68   - return rc;
69   - }
70   - else
71   - {
72   - /* Host is ready, get screen contents */
73   - char *text = lib3270_get_string_at_address(hSession,0,-1);
74   -
75   - printf("\nScreen contents:\n%s\n",text);
76   -
77   - lib3270_free(text);
78   - }
79   -
80   -
81   -
82   -
83   - /* Release session handle */
84   - lib3270_session_free(hSession);
85   - return 0;
86   - }
87   -
src/sample/sample.cbp
... ... @@ -1,32 +0,0 @@
1   -<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
2   -<CodeBlocks_project_file>
3   - <FileVersion major="1" minor="6" />
4   - <Project>
5   - <Option title="pw3270 Samples" />
6   - <Option makefile_is_custom="1" />
7   - <Option pch_mode="2" />
8   - <Option compiler="gcc" />
9   - <Build>
10   - <Target title="connect">
11   - <Option output="connect" prefix_auto="1" extension_auto="1" />
12   - <Option object_output=".obj/Debug/" />
13   - <Option type="1" />
14   - <Option compiler="gcc" />
15   - <Compiler>
16   - <Add option="-g" />
17   - </Compiler>
18   - </Target>
19   - </Build>
20   - <Compiler>
21   - <Add option="-Wall" />
22   - </Compiler>
23   - <Unit filename="Makefile.in" />
24   - <Unit filename="connect.c">
25   - <Option compilerVar="CC" />
26   - </Unit>
27   - <Extensions>
28   - <code_completion />
29   - <debugger />
30   - </Extensions>
31   - </Project>
32   -</CodeBlocks_project_file>
src/tests/Makefile
... ... @@ -1,63 +0,0 @@
1   -#
2   -# "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
3   -# (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
4   -# aplicativos mainframe. Registro no INPI sob o nome G3270.
5   -#
6   -# Copyright (C) <2008> <Banco do Brasil S.A.>
7   -#
8   -# Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
9   -# os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
10   -# Free Software Foundation.
11   -#
12   -# Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
13   -# GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
14   -# A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
15   -# obter mais detalhes.
16   -#
17   -# Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
18   -# programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple
19   -# Place, Suite 330, Boston, MA, 02111-1307, USA
20   -#
21   -# Contatos:
22   -#
23   -# perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
24   -# erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça)
25   -# licinio@bb.com.br (Licínio Luis Branco)
26   -# kraucer@bb.com.br (Kraucer Fernandes Mazuco)
27   -#
28   -
29   -include ../include/rules.mak
30   -include ../lib3270/sources.mak
31   -
32   -DEBUG_CFLAGS=-DDEBUG=1 -g -Wall
33   -LIBS=-lm -lssl -lcrypto
34   -
35   -#---[ Rules ]------------------------------------------------------------------
36   -
37   -$(OBJDBG)/%.o: %.c
38   - @echo " CC `basename $@`"
39   - @$(MKDIR) `dirname $@`
40   - @$(CC) $(DEBUG_CFLAGS) $(CFLAGS) $(SSL_CFLAGS) -I../include -I../lib3270 -o $@ -c $<
41   -
42   -
43   -$(OBJDBG)/%.o: ../lib3270/%.c
44   - @echo " CC `basename $@`"
45   - @$(MKDIR) `dirname $@`
46   - @$(CC) $(DEBUG_CFLAGS) $(CFLAGS) $(SSL_CFLAGS) -I../include -I../lib3270 -o $@ -c $<
47   -
48   -#---[ Tags ]-------------------------------------------------------------------
49   -
50   -Debug: $(BINDBG)/rpqtest$(EXEEXT)
51   -
52   -$(BINDBG)/rpqtest$(EXEEXT): $(OBJDBG)/rpqtest$(OBJEXT) $(foreach SRC, $(basename $(SOURCES)), $(OBJDBG)/$(SRC)$(OBJEXT))
53   - @echo " CCLD `basename $@`"
54   - @$(MKDIR) `dirname $@`
55   - @$(LD) -o $@ $(OBJDBG)/rpqtest$(OBJEXT) $(foreach SRC, $(basename $(SOURCES)), $(OBJDBG)/$(SRC)$(OBJEXT)) $(LIBS)
56   -
57   -cleanDebug:
58   - @rm -fr $(OBJDBG)
59   - @rm -fr $(BINDBG)
60   -
61   -clean:
62   - @rm -fr $(OBJDBG)
63   - @rm -fr $(BINDBG)
src/tests/rpqtest.c
... ... @@ -1,61 +0,0 @@
1   -/*
2   - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
3   - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
4   - * aplicativos mainframe. Registro no INPI sob o nome G3270. Registro no INPI sob o nome G3270.
5   - *
6   - * Copyright (C) <2008> <Banco do Brasil S.A.>
7   - *
8   - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
9   - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
10   - * Free Software Foundation.
11   - *
12   - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
13   - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
14   - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
15   - * obter mais detalhes.
16   - *
17   - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
18   - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin
19   - * St, Fifth Floor, Boston, MA 02110-1301 USA
20   - *
21   - * Este programa está nomeado como rpqtest.c e possui - linhas de código.
22   - *
23   - * Contatos:
24   - *
25   - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
26   - * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)
27   - *
28   - */
29   -
30   -
31   -#include <stdio.h>
32   -#include <string.h>
33   -
34   -#include <stdio.h>
35   -#include <string.h>
36   -#include <pthread.h>
37   -#include <3270ds.h>
38   -
39   -#include "globals.h"
40   -#include <sf.h>
41   -#include <ctlrc.h>
42   -
43   -static int dump_buffer(H3270 *hSession, unsigned const char *buf, int len)
44   -{
45   - return 0;
46   -}
47   -
48   -int main(int numpar, char *param[])
49   -{
50   - unsigned char buffer[] = { 0xf3, 0x00, 0x05, 0x01, 0xff, 0x02 };
51   -
52   - H3270 *hSession = lib3270_session_new("");
53   - hSession->write = dump_buffer;
54   -
55   - lib3270_set_toggle(hSession,LIB3270_TOGGLE_DS_TRACE,1);
56   -
57   - write_structured_field(hSession, buffer, 6);
58   -
59   - lib3270_session_free(hSession);
60   - return 0;
61   -}
src/tests/tests.cbp
... ... @@ -1,60 +0,0 @@
1   -<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
2   -<CodeBlocks_project_file>
3   - <FileVersion major="1" minor="6" />
4   - <Project>
5   - <Option title="pw3270tests" />
6   - <Option makefile_is_custom="1" />
7   - <Option pch_mode="2" />
8   - <Option compiler="gcc" />
9   - <Build>
10   - <Target title="Debug">
11   - <Option output=".bin/Debug/rpqtest" prefix_auto="1" extension_auto="1" />
12   - <Option object_output=".obj/Debug/" />
13   - <Option type="1" />
14   - <Option compiler="gcc" />
15   - <Compiler>
16   - <Add option="-g" />
17   - </Compiler>
18   - </Target>
19   - <Target title="Release">
20   - <Option output=".bin/Release/pw3270tests" prefix_auto="1" extension_auto="1" />
21   - <Option object_output=".obj/Release/" />
22   - <Option type="1" />
23   - <Option compiler="gcc" />
24   - <Compiler>
25   - <Add option="-O2" />
26   - </Compiler>
27   - <Linker>
28   - <Add option="-s" />
29   - </Linker>
30   - </Target>
31   - </Build>
32   - <Compiler>
33   - <Add option="-Wall" />
34   - </Compiler>
35   - <Unit filename="../include/lib3270/session.h" />
36   - <Unit filename="../lib3270/ctlr.c">
37   - <Option compilerVar="CC" />
38   - </Unit>
39   - <Unit filename="../lib3270/rpq.c">
40   - <Option compilerVar="CC" />
41   - </Unit>
42   - <Unit filename="../lib3270/session.c">
43   - <Option compilerVar="CC" />
44   - </Unit>
45   - <Unit filename="../lib3270/sf.c">
46   - <Option compilerVar="CC" />
47   - </Unit>
48   - <Unit filename="../lib3270/toggles.c">
49   - <Option compilerVar="CC" />
50   - </Unit>
51   - <Unit filename="Makefile" />
52   - <Unit filename="rpqtest.c">
53   - <Option compilerVar="CC" />
54   - </Unit>
55   - <Extensions>
56   - <code_completion />
57   - <debugger />
58   - </Extensions>
59   - </Project>
60   -</CodeBlocks_project_file>
versions.in
... ... @@ -1,7 +0,0 @@
1   -PACKAGE=@PACKAGE@
2   -PACKAGE_NAME=@PACKAGE_NAME@
3   -PACKAGE_TARNAME=@PACKAGE_TARNAME@
4   -PACKAGE_VERSION=@PACKAGE_VERSION@
5   -GTK_MODVERSION=@GTK_MODVERSION@
6   -host_cpu=@host_cpu@
7   -