Commit 325c9fc2a5ecb8bb0443f2b0a6dc2bd5964c8591
1 parent
4873aa8c
Exists in
master
and in
5 other branches
Ajustes para compilar em android
Showing
13 changed files
with
398 additions
and
320 deletions
Show diff stats
pw3270.cbp
| ... | ... | @@ -9,8 +9,8 @@ |
| 9 | 9 | <Option compiler="mingw_64_compiler" /> |
| 10 | 10 | <Build> |
| 11 | 11 | <Target title="Debug"> |
| 12 | - <Option output=".bin\Debug\pw3270" prefix_auto="1" extension_auto="1" /> | |
| 13 | - <Option object_output=".obj\Debug\" /> | |
| 12 | + <Option output=".bin/Debug/pw3270" prefix_auto="1" extension_auto="1" /> | |
| 13 | + <Option object_output=".obj/Debug/" /> | |
| 14 | 14 | <Option type="1" /> |
| 15 | 15 | <Option compiler="mingw_64_compiler" /> |
| 16 | 16 | <Option use_console_runner="0" /> |
| ... | ... | @@ -20,8 +20,8 @@ |
| 20 | 20 | </Compiler> |
| 21 | 21 | </Target> |
| 22 | 22 | <Target title="Release"> |
| 23 | - <Option output=".bin\Release\pw3270" prefix_auto="1" extension_auto="1" /> | |
| 24 | - <Option object_output=".obj\Release\" /> | |
| 23 | + <Option output=".bin/Release/pw3270" prefix_auto="1" extension_auto="1" /> | |
| 24 | + <Option object_output=".obj/Release/" /> | |
| 25 | 25 | <Option type="0" /> |
| 26 | 26 | <Option compiler="mingw_64_compiler" /> |
| 27 | 27 | <Compiler> |
| ... | ... | @@ -35,7 +35,7 @@ |
| 35 | 35 | <Compiler> |
| 36 | 36 | <Add option="-Wall" /> |
| 37 | 37 | <Add option="`pkg-config gtk+-3.0 lib3270 --cflags`" /> |
| 38 | - <Add directory="src\include" /> | |
| 38 | + <Add directory="src/include" /> | |
| 39 | 39 | </Compiler> |
| 40 | 40 | <Linker> |
| 41 | 41 | <Add option="`pkg-config gtk+-3.0 lib3270 --libs`" /> |
| ... | ... | @@ -45,285 +45,286 @@ |
| 45 | 45 | <Unit filename="colors.conf" /> |
| 46 | 46 | <Unit filename="configure.ac" /> |
| 47 | 47 | <Unit filename="pw3270.spec.in" /> |
| 48 | - <Unit filename="src\include\lib3270.h" /> | |
| 49 | - <Unit filename="src\include\lib3270\action_table.h" /> | |
| 50 | - <Unit filename="src\include\lib3270\actions.h" /> | |
| 51 | - <Unit filename="src\include\lib3270\config.h.in" /> | |
| 52 | - <Unit filename="src\include\lib3270\filetransfer.h" /> | |
| 53 | - <Unit filename="src\include\lib3270\log.h" /> | |
| 54 | - <Unit filename="src\include\lib3270\popup.h" /> | |
| 55 | - <Unit filename="src\include\lib3270\selection.h" /> | |
| 56 | - <Unit filename="src\include\lib3270\session.h" /> | |
| 57 | - <Unit filename="src\include\lib3270\trace.h" /> | |
| 58 | - <Unit filename="src\include\pw3270.h" /> | |
| 59 | - <Unit filename="src\include\rules.mak.in" /> | |
| 60 | - <Unit filename="src\lib3270\3270ds.h" /> | |
| 61 | - <Unit filename="src\lib3270\Makefile.in" /> | |
| 62 | - <Unit filename="src\lib3270\X11keysym.h" /> | |
| 63 | - <Unit filename="src\lib3270\XtGlue.c"> | |
| 48 | + <Unit filename="src/include/lib3270.h" /> | |
| 49 | + <Unit filename="src/include/lib3270/action_table.h" /> | |
| 50 | + <Unit filename="src/include/lib3270/actions.h" /> | |
| 51 | + <Unit filename="src/include/lib3270/config.h.in" /> | |
| 52 | + <Unit filename="src/include/lib3270/filetransfer.h" /> | |
| 53 | + <Unit filename="src/include/lib3270/log.h" /> | |
| 54 | + <Unit filename="src/include/lib3270/popup.h" /> | |
| 55 | + <Unit filename="src/include/lib3270/selection.h" /> | |
| 56 | + <Unit filename="src/include/lib3270/session.h" /> | |
| 57 | + <Unit filename="src/include/lib3270/trace.h" /> | |
| 58 | + <Unit filename="src/include/pw3270.h" /> | |
| 59 | + <Unit filename="src/include/rules.mak.in" /> | |
| 60 | + <Unit filename="src/lib3270/3270ds.h" /> | |
| 61 | + <Unit filename="src/lib3270/Makefile.in" /> | |
| 62 | + <Unit filename="src/lib3270/X11keysym.h" /> | |
| 63 | + <Unit filename="src/lib3270/XtGlue.c"> | |
| 64 | 64 | <Option compilerVar="CC" /> |
| 65 | 65 | </Unit> |
| 66 | - <Unit filename="src\lib3270\actions.c"> | |
| 66 | + <Unit filename="src/lib3270/actions.c"> | |
| 67 | 67 | <Option compilerVar="CC" /> |
| 68 | 68 | </Unit> |
| 69 | - <Unit filename="src\lib3270\actionsc.h" /> | |
| 70 | - <Unit filename="src\lib3270\ansi.c"> | |
| 69 | + <Unit filename="src/lib3270/actionsc.h" /> | |
| 70 | + <Unit filename="src/lib3270/ansi.c"> | |
| 71 | 71 | <Option compilerVar="CC" /> |
| 72 | 72 | </Unit> |
| 73 | - <Unit filename="src\lib3270\ansic.h" /> | |
| 74 | - <Unit filename="src\lib3270\api.h" /> | |
| 75 | - <Unit filename="src\lib3270\apl.c"> | |
| 73 | + <Unit filename="src/lib3270/ansic.h" /> | |
| 74 | + <Unit filename="src/lib3270/api.h" /> | |
| 75 | + <Unit filename="src/lib3270/apl.c"> | |
| 76 | 76 | <Option compilerVar="CC" /> |
| 77 | 77 | </Unit> |
| 78 | - <Unit filename="src\lib3270\aplc.h" /> | |
| 79 | - <Unit filename="src\lib3270\appres.h" /> | |
| 80 | - <Unit filename="src\lib3270\arpa_telnet.h" /> | |
| 81 | - <Unit filename="src\lib3270\bounds.c"> | |
| 78 | + <Unit filename="src/lib3270/aplc.h" /> | |
| 79 | + <Unit filename="src/lib3270/appres.h" /> | |
| 80 | + <Unit filename="src/lib3270/arpa_telnet.h" /> | |
| 81 | + <Unit filename="src/lib3270/bounds.c"> | |
| 82 | 82 | <Option compilerVar="CC" /> |
| 83 | 83 | </Unit> |
| 84 | - <Unit filename="src\lib3270\cg.h" /> | |
| 85 | - <Unit filename="src\lib3270\charset.c"> | |
| 84 | + <Unit filename="src/lib3270/cg.h" /> | |
| 85 | + <Unit filename="src/lib3270/charset.c"> | |
| 86 | 86 | <Option compilerVar="CC" /> |
| 87 | 87 | </Unit> |
| 88 | - <Unit filename="src\lib3270\charsetc.h" /> | |
| 89 | - <Unit filename="src\lib3270\childc.h" /> | |
| 90 | - <Unit filename="src\lib3270\ctlr.c"> | |
| 88 | + <Unit filename="src/lib3270/charsetc.h" /> | |
| 89 | + <Unit filename="src/lib3270/childc.h" /> | |
| 90 | + <Unit filename="src/lib3270/ctlr.c"> | |
| 91 | 91 | <Option compilerVar="CC" /> |
| 92 | 92 | </Unit> |
| 93 | - <Unit filename="src\lib3270\ctlr.h" /> | |
| 94 | - <Unit filename="src\lib3270\ctlrc.h" /> | |
| 95 | - <Unit filename="src\lib3270\dialogc.h" /> | |
| 96 | - <Unit filename="src\lib3270\ft.c"> | |
| 93 | + <Unit filename="src/lib3270/ctlr.h" /> | |
| 94 | + <Unit filename="src/lib3270/ctlrc.h" /> | |
| 95 | + <Unit filename="src/lib3270/dialogc.h" /> | |
| 96 | + <Unit filename="src/lib3270/ft.c"> | |
| 97 | 97 | <Option compilerVar="CC" /> |
| 98 | 98 | </Unit> |
| 99 | - <Unit filename="src\lib3270\ft_cut.c"> | |
| 99 | + <Unit filename="src/lib3270/ft_cut.c"> | |
| 100 | 100 | <Option compilerVar="CC" /> |
| 101 | 101 | </Unit> |
| 102 | - <Unit filename="src\lib3270\ft_cut_ds.h" /> | |
| 103 | - <Unit filename="src\lib3270\ft_cutc.h" /> | |
| 104 | - <Unit filename="src\lib3270\ft_dft.c"> | |
| 102 | + <Unit filename="src/lib3270/ft_cut_ds.h" /> | |
| 103 | + <Unit filename="src/lib3270/ft_cutc.h" /> | |
| 104 | + <Unit filename="src/lib3270/ft_dft.c"> | |
| 105 | 105 | <Option compilerVar="CC" /> |
| 106 | 106 | </Unit> |
| 107 | - <Unit filename="src\lib3270\ft_dft_ds.h" /> | |
| 108 | - <Unit filename="src\lib3270\ft_dftc.h" /> | |
| 109 | - <Unit filename="src\lib3270\ftc.h" /> | |
| 110 | - <Unit filename="src\lib3270\globals.h" /> | |
| 111 | - <Unit filename="src\lib3270\glue.c"> | |
| 107 | + <Unit filename="src/lib3270/ft_dft_ds.h" /> | |
| 108 | + <Unit filename="src/lib3270/ft_dftc.h" /> | |
| 109 | + <Unit filename="src/lib3270/ftc.h" /> | |
| 110 | + <Unit filename="src/lib3270/globals.h" /> | |
| 111 | + <Unit filename="src/lib3270/glue.c"> | |
| 112 | 112 | <Option compilerVar="CC" /> |
| 113 | 113 | </Unit> |
| 114 | - <Unit filename="src\lib3270\gluec.h" /> | |
| 115 | - <Unit filename="src\lib3270\host.c"> | |
| 114 | + <Unit filename="src/lib3270/gluec.h" /> | |
| 115 | + <Unit filename="src/lib3270/host.c"> | |
| 116 | 116 | <Option compilerVar="CC" /> |
| 117 | 117 | </Unit> |
| 118 | - <Unit filename="src\lib3270\hostc.h" /> | |
| 119 | - <Unit filename="src\lib3270\icmdc.h" /> | |
| 120 | - <Unit filename="src\lib3270\init.c"> | |
| 118 | + <Unit filename="src/lib3270/hostc.h" /> | |
| 119 | + <Unit filename="src/lib3270/icmdc.h" /> | |
| 120 | + <Unit filename="src/lib3270/init.c"> | |
| 121 | 121 | <Option compilerVar="CC" /> |
| 122 | 122 | </Unit> |
| 123 | - <Unit filename="src\lib3270\keypadc.h" /> | |
| 124 | - <Unit filename="src\lib3270\kybd.c"> | |
| 123 | + <Unit filename="src/lib3270/keypadc.h" /> | |
| 124 | + <Unit filename="src/lib3270/kybd.c"> | |
| 125 | 125 | <Option compilerVar="CC" /> |
| 126 | 126 | </Unit> |
| 127 | - <Unit filename="src\lib3270\kybdc.h" /> | |
| 128 | - <Unit filename="src\lib3270\localdefs.h" /> | |
| 129 | - <Unit filename="src\lib3270\log.c"> | |
| 127 | + <Unit filename="src/lib3270/kybdc.h" /> | |
| 128 | + <Unit filename="src/lib3270/localdefs.h" /> | |
| 129 | + <Unit filename="src/lib3270/log.c"> | |
| 130 | 130 | <Option compilerVar="CC" /> |
| 131 | 131 | </Unit> |
| 132 | - <Unit filename="src\lib3270\macros.c"> | |
| 132 | + <Unit filename="src/lib3270/macros.c"> | |
| 133 | 133 | <Option compilerVar="CC" /> |
| 134 | 134 | </Unit> |
| 135 | - <Unit filename="src\lib3270\mkfb.c"> | |
| 135 | + <Unit filename="src/lib3270/mkfb.c"> | |
| 136 | 136 | <Option compilerVar="CC" /> |
| 137 | 137 | </Unit> |
| 138 | - <Unit filename="src\lib3270\objects.h" /> | |
| 139 | - <Unit filename="src\lib3270\paste.c"> | |
| 138 | + <Unit filename="src/lib3270/objects.h" /> | |
| 139 | + <Unit filename="src/lib3270/paste.c"> | |
| 140 | 140 | <Option compilerVar="CC" /> |
| 141 | 141 | </Unit> |
| 142 | - <Unit filename="src\lib3270\popupsc.h" /> | |
| 143 | - <Unit filename="src\lib3270\printc.h" /> | |
| 144 | - <Unit filename="src\lib3270\printerc.h" /> | |
| 145 | - <Unit filename="src\lib3270\proxy.c"> | |
| 142 | + <Unit filename="src/lib3270/popupsc.h" /> | |
| 143 | + <Unit filename="src/lib3270/printc.h" /> | |
| 144 | + <Unit filename="src/lib3270/printerc.h" /> | |
| 145 | + <Unit filename="src/lib3270/proxy.c"> | |
| 146 | 146 | <Option compilerVar="CC" /> |
| 147 | 147 | </Unit> |
| 148 | - <Unit filename="src\lib3270\proxyc.h" /> | |
| 149 | - <Unit filename="src\lib3270\resolver.c"> | |
| 148 | + <Unit filename="src/lib3270/proxyc.h" /> | |
| 149 | + <Unit filename="src/lib3270/resolver.c"> | |
| 150 | 150 | <Option compilerVar="CC" /> |
| 151 | 151 | </Unit> |
| 152 | - <Unit filename="src\lib3270\resolverc.h" /> | |
| 153 | - <Unit filename="src\lib3270\resources.c"> | |
| 152 | + <Unit filename="src/lib3270/resolverc.h" /> | |
| 153 | + <Unit filename="src/lib3270/resources.c"> | |
| 154 | 154 | <Option compilerVar="CC" /> |
| 155 | 155 | </Unit> |
| 156 | - <Unit filename="src\lib3270\resources.h" /> | |
| 157 | - <Unit filename="src\lib3270\rpq.c"> | |
| 156 | + <Unit filename="src/lib3270/resources.h" /> | |
| 157 | + <Unit filename="src/lib3270/rpq.c"> | |
| 158 | 158 | <Option compilerVar="CC" /> |
| 159 | 159 | </Unit> |
| 160 | - <Unit filename="src\lib3270\savec.h" /> | |
| 161 | - <Unit filename="src\lib3270\screen.c"> | |
| 160 | + <Unit filename="src/lib3270/rpq.h" /> | |
| 161 | + <Unit filename="src/lib3270/savec.h" /> | |
| 162 | + <Unit filename="src/lib3270/screen.c"> | |
| 162 | 163 | <Option compilerVar="CC" /> |
| 163 | 164 | </Unit> |
| 164 | - <Unit filename="src\lib3270\screen.h" /> | |
| 165 | - <Unit filename="src\lib3270\screenc.h" /> | |
| 166 | - <Unit filename="src\lib3270\scrollc.h" /> | |
| 167 | - <Unit filename="src\lib3270\see.c"> | |
| 165 | + <Unit filename="src/lib3270/screen.h" /> | |
| 166 | + <Unit filename="src/lib3270/screenc.h" /> | |
| 167 | + <Unit filename="src/lib3270/scrollc.h" /> | |
| 168 | + <Unit filename="src/lib3270/see.c"> | |
| 168 | 169 | <Option compilerVar="CC" /> |
| 169 | 170 | </Unit> |
| 170 | - <Unit filename="src\lib3270\seec.h" /> | |
| 171 | - <Unit filename="src\lib3270\selection.c"> | |
| 171 | + <Unit filename="src/lib3270/seec.h" /> | |
| 172 | + <Unit filename="src/lib3270/selection.c"> | |
| 172 | 173 | <Option compilerVar="CC" /> |
| 173 | 174 | </Unit> |
| 174 | - <Unit filename="src\lib3270\sf.c"> | |
| 175 | + <Unit filename="src/lib3270/sf.c"> | |
| 175 | 176 | <Option compilerVar="CC" /> |
| 176 | 177 | </Unit> |
| 177 | - <Unit filename="src\lib3270\sfc.h" /> | |
| 178 | - <Unit filename="src\lib3270\shlobj_missing.h" /> | |
| 179 | - <Unit filename="src\lib3270\statusc.h" /> | |
| 180 | - <Unit filename="src\lib3270\tables.c"> | |
| 178 | + <Unit filename="src/lib3270/sf.h" /> | |
| 179 | + <Unit filename="src/lib3270/shlobj_missing.h" /> | |
| 180 | + <Unit filename="src/lib3270/statusc.h" /> | |
| 181 | + <Unit filename="src/lib3270/tables.c"> | |
| 181 | 182 | <Option compilerVar="CC" /> |
| 182 | 183 | </Unit> |
| 183 | - <Unit filename="src\lib3270\tablesc.h" /> | |
| 184 | - <Unit filename="src\lib3270\telnet.c"> | |
| 184 | + <Unit filename="src/lib3270/tablesc.h" /> | |
| 185 | + <Unit filename="src/lib3270/telnet.c"> | |
| 185 | 186 | <Option compilerVar="CC" /> |
| 186 | 187 | </Unit> |
| 187 | - <Unit filename="src\lib3270\telnetc.h" /> | |
| 188 | - <Unit filename="src\lib3270\testprogram.c"> | |
| 188 | + <Unit filename="src/lib3270/telnetc.h" /> | |
| 189 | + <Unit filename="src/lib3270/testprogram.c"> | |
| 189 | 190 | <Option compilerVar="CC" /> |
| 190 | 191 | </Unit> |
| 191 | - <Unit filename="src\lib3270\tn3270e.h" /> | |
| 192 | - <Unit filename="src\lib3270\toggle.h" /> | |
| 193 | - <Unit filename="src\lib3270\toggles.c"> | |
| 192 | + <Unit filename="src/lib3270/tn3270e.h" /> | |
| 193 | + <Unit filename="src/lib3270/toggle.h" /> | |
| 194 | + <Unit filename="src/lib3270/toggles.c"> | |
| 194 | 195 | <Option compilerVar="CC" /> |
| 195 | 196 | </Unit> |
| 196 | - <Unit filename="src\lib3270\togglesc.h" /> | |
| 197 | - <Unit filename="src\lib3270\trace_ds.c"> | |
| 197 | + <Unit filename="src/lib3270/togglesc.h" /> | |
| 198 | + <Unit filename="src/lib3270/trace_ds.c"> | |
| 198 | 199 | <Option compilerVar="CC" /> |
| 199 | 200 | </Unit> |
| 200 | - <Unit filename="src\lib3270\trace_dsc.h" /> | |
| 201 | - <Unit filename="src\lib3270\utf8.c"> | |
| 201 | + <Unit filename="src/lib3270/trace_dsc.h" /> | |
| 202 | + <Unit filename="src/lib3270/utf8.c"> | |
| 202 | 203 | <Option compilerVar="CC" /> |
| 203 | 204 | </Unit> |
| 204 | - <Unit filename="src\lib3270\utf8c.h" /> | |
| 205 | - <Unit filename="src\lib3270\util.c"> | |
| 205 | + <Unit filename="src/lib3270/utf8c.h" /> | |
| 206 | + <Unit filename="src/lib3270/util.c"> | |
| 206 | 207 | <Option compilerVar="CC" /> |
| 207 | 208 | </Unit> |
| 208 | - <Unit filename="src\lib3270\utilc.h" /> | |
| 209 | - <Unit filename="src\lib3270\w3misc.c"> | |
| 209 | + <Unit filename="src/lib3270/utilc.h" /> | |
| 210 | + <Unit filename="src/lib3270/w3misc.c"> | |
| 210 | 211 | <Option compilerVar="CC" /> |
| 211 | 212 | </Unit> |
| 212 | - <Unit filename="src\lib3270\w3miscc.h" /> | |
| 213 | - <Unit filename="src\lib3270\widec.h" /> | |
| 214 | - <Unit filename="src\lib3270\winvers.c"> | |
| 213 | + <Unit filename="src/lib3270/w3miscc.h" /> | |
| 214 | + <Unit filename="src/lib3270/widec.h" /> | |
| 215 | + <Unit filename="src/lib3270/winvers.c"> | |
| 215 | 216 | <Option compilerVar="CC" /> |
| 216 | 217 | </Unit> |
| 217 | - <Unit filename="src\lib3270\winversc.h" /> | |
| 218 | - <Unit filename="src\lib3270\xio.c"> | |
| 218 | + <Unit filename="src/lib3270/winversc.h" /> | |
| 219 | + <Unit filename="src/lib3270/xio.c"> | |
| 219 | 220 | <Option compilerVar="CC" /> |
| 220 | 221 | </Unit> |
| 221 | - <Unit filename="src\lib3270\xioc.h" /> | |
| 222 | - <Unit filename="src\lib3270\xl.h" /> | |
| 223 | - <Unit filename="src\pw3270\Makefile.in" /> | |
| 224 | - <Unit filename="src\pw3270\actions.c"> | |
| 222 | + <Unit filename="src/lib3270/xioc.h" /> | |
| 223 | + <Unit filename="src/lib3270/xl.h" /> | |
| 224 | + <Unit filename="src/pw3270/Makefile.in" /> | |
| 225 | + <Unit filename="src/pw3270/actions.c"> | |
| 225 | 226 | <Option compilerVar="CC" /> |
| 226 | 227 | </Unit> |
| 227 | - <Unit filename="src\pw3270\colors.c"> | |
| 228 | + <Unit filename="src/pw3270/colors.c"> | |
| 228 | 229 | <Option compilerVar="CC" /> |
| 229 | 230 | </Unit> |
| 230 | - <Unit filename="src\pw3270\common\common.h.in" /> | |
| 231 | - <Unit filename="src\pw3270\common\config.c"> | |
| 231 | + <Unit filename="src/pw3270/common/common.h.in" /> | |
| 232 | + <Unit filename="src/pw3270/common/config.c"> | |
| 232 | 233 | <Option compilerVar="CC" /> |
| 233 | 234 | </Unit> |
| 234 | - <Unit filename="src\pw3270\common\sources.mak" /> | |
| 235 | - <Unit filename="src\pw3270\dialog.c"> | |
| 235 | + <Unit filename="src/pw3270/common/sources.mak" /> | |
| 236 | + <Unit filename="src/pw3270/dialog.c"> | |
| 236 | 237 | <Option compilerVar="CC" /> |
| 237 | 238 | </Unit> |
| 238 | - <Unit filename="src\pw3270\filetransfer.c"> | |
| 239 | + <Unit filename="src/pw3270/filetransfer.c"> | |
| 239 | 240 | <Option compilerVar="CC" /> |
| 240 | 241 | </Unit> |
| 241 | - <Unit filename="src\pw3270\filetransfer.h" /> | |
| 242 | - <Unit filename="src\pw3270\fonts.c"> | |
| 242 | + <Unit filename="src/pw3270/filetransfer.h" /> | |
| 243 | + <Unit filename="src/pw3270/fonts.c"> | |
| 243 | 244 | <Option compilerVar="CC" /> |
| 244 | 245 | </Unit> |
| 245 | - <Unit filename="src\pw3270\globals.h" /> | |
| 246 | - <Unit filename="src\pw3270\main.c"> | |
| 246 | + <Unit filename="src/pw3270/globals.h" /> | |
| 247 | + <Unit filename="src/pw3270/main.c"> | |
| 247 | 248 | <Option compilerVar="CC" /> |
| 248 | 249 | </Unit> |
| 249 | - <Unit filename="src\pw3270\print.c"> | |
| 250 | + <Unit filename="src/pw3270/print.c"> | |
| 250 | 251 | <Option compilerVar="CC" /> |
| 251 | 252 | </Unit> |
| 252 | - <Unit filename="src\pw3270\uiparser\Makefile.in" /> | |
| 253 | - <Unit filename="src\pw3270\uiparser\accelerator.c"> | |
| 253 | + <Unit filename="src/pw3270/uiparser/Makefile.in" /> | |
| 254 | + <Unit filename="src/pw3270/uiparser/accelerator.c"> | |
| 254 | 255 | <Option compilerVar="CC" /> |
| 255 | 256 | </Unit> |
| 256 | - <Unit filename="src\pw3270\uiparser\action.c"> | |
| 257 | + <Unit filename="src/pw3270/uiparser/action.c"> | |
| 257 | 258 | <Option compilerVar="CC" /> |
| 258 | 259 | </Unit> |
| 259 | - <Unit filename="src\pw3270\uiparser\menu.c"> | |
| 260 | + <Unit filename="src/pw3270/uiparser/menu.c"> | |
| 260 | 261 | <Option compilerVar="CC" /> |
| 261 | 262 | </Unit> |
| 262 | - <Unit filename="src\pw3270\uiparser\menubar.c"> | |
| 263 | + <Unit filename="src/pw3270/uiparser/menubar.c"> | |
| 263 | 264 | <Option compilerVar="CC" /> |
| 264 | 265 | </Unit> |
| 265 | - <Unit filename="src\pw3270\uiparser\menuitem.c"> | |
| 266 | + <Unit filename="src/pw3270/uiparser/menuitem.c"> | |
| 266 | 267 | <Option compilerVar="CC" /> |
| 267 | 268 | </Unit> |
| 268 | - <Unit filename="src\pw3270\uiparser\parsefile.c"> | |
| 269 | + <Unit filename="src/pw3270/uiparser/parsefile.c"> | |
| 269 | 270 | <Option compilerVar="CC" /> |
| 270 | 271 | </Unit> |
| 271 | - <Unit filename="src\pw3270\uiparser\parser.c"> | |
| 272 | + <Unit filename="src/pw3270/uiparser/parser.c"> | |
| 272 | 273 | <Option compilerVar="CC" /> |
| 273 | 274 | </Unit> |
| 274 | - <Unit filename="src\pw3270\uiparser\parser.h" /> | |
| 275 | - <Unit filename="src\pw3270\uiparser\popup.c"> | |
| 275 | + <Unit filename="src/pw3270/uiparser/parser.h" /> | |
| 276 | + <Unit filename="src/pw3270/uiparser/popup.c"> | |
| 276 | 277 | <Option compilerVar="CC" /> |
| 277 | 278 | </Unit> |
| 278 | - <Unit filename="src\pw3270\uiparser\private.h" /> | |
| 279 | - <Unit filename="src\pw3270\uiparser\script.c"> | |
| 279 | + <Unit filename="src/pw3270/uiparser/private.h" /> | |
| 280 | + <Unit filename="src/pw3270/uiparser/script.c"> | |
| 280 | 281 | <Option compilerVar="CC" /> |
| 281 | 282 | </Unit> |
| 282 | - <Unit filename="src\pw3270\uiparser\separator.c"> | |
| 283 | + <Unit filename="src/pw3270/uiparser/separator.c"> | |
| 283 | 284 | <Option compilerVar="CC" /> |
| 284 | 285 | </Unit> |
| 285 | - <Unit filename="src\pw3270\uiparser\sources.mak" /> | |
| 286 | - <Unit filename="src\pw3270\uiparser\toolbar.c"> | |
| 286 | + <Unit filename="src/pw3270/uiparser/sources.mak" /> | |
| 287 | + <Unit filename="src/pw3270/uiparser/toolbar.c"> | |
| 287 | 288 | <Option compilerVar="CC" /> |
| 288 | 289 | </Unit> |
| 289 | - <Unit filename="src\pw3270\uiparser\toolitem.c"> | |
| 290 | + <Unit filename="src/pw3270/uiparser/toolitem.c"> | |
| 290 | 291 | <Option compilerVar="CC" /> |
| 291 | 292 | </Unit> |
| 292 | - <Unit filename="src\pw3270\v3270\accessible.c"> | |
| 293 | + <Unit filename="src/pw3270/v3270/accessible.c"> | |
| 293 | 294 | <Option compilerVar="CC" /> |
| 294 | 295 | </Unit> |
| 295 | - <Unit filename="src\pw3270\v3270\accessible.h" /> | |
| 296 | - <Unit filename="src\pw3270\v3270\draw.c"> | |
| 296 | + <Unit filename="src/pw3270/v3270/accessible.h" /> | |
| 297 | + <Unit filename="src/pw3270/v3270/draw.c"> | |
| 297 | 298 | <Option compilerVar="CC" /> |
| 298 | 299 | </Unit> |
| 299 | - <Unit filename="src\pw3270\v3270\genmarshal" /> | |
| 300 | - <Unit filename="src\pw3270\v3270\iocallback.c"> | |
| 300 | + <Unit filename="src/pw3270/v3270/genmarshal" /> | |
| 301 | + <Unit filename="src/pw3270/v3270/iocallback.c"> | |
| 301 | 302 | <Option compilerVar="CC" /> |
| 302 | 303 | </Unit> |
| 303 | - <Unit filename="src\pw3270\v3270\keyboard.c"> | |
| 304 | + <Unit filename="src/pw3270/v3270/keyboard.c"> | |
| 304 | 305 | <Option compilerVar="CC" /> |
| 305 | 306 | </Unit> |
| 306 | - <Unit filename="src\pw3270\v3270\mouse.c"> | |
| 307 | + <Unit filename="src/pw3270/v3270/mouse.c"> | |
| 307 | 308 | <Option compilerVar="CC" /> |
| 308 | 309 | </Unit> |
| 309 | - <Unit filename="src\pw3270\v3270\oia.c"> | |
| 310 | + <Unit filename="src/pw3270/v3270/oia.c"> | |
| 310 | 311 | <Option compilerVar="CC" /> |
| 311 | 312 | </Unit> |
| 312 | - <Unit filename="src\pw3270\v3270\private.h" /> | |
| 313 | - <Unit filename="src\pw3270\v3270\selection.c"> | |
| 313 | + <Unit filename="src/pw3270/v3270/private.h" /> | |
| 314 | + <Unit filename="src/pw3270/v3270/selection.c"> | |
| 314 | 315 | <Option compilerVar="CC" /> |
| 315 | 316 | </Unit> |
| 316 | - <Unit filename="src\pw3270\v3270\sources.mak" /> | |
| 317 | - <Unit filename="src\pw3270\v3270\v3270.h" /> | |
| 318 | - <Unit filename="src\pw3270\v3270\widget.c"> | |
| 317 | + <Unit filename="src/pw3270/v3270/sources.mak" /> | |
| 318 | + <Unit filename="src/pw3270/v3270/v3270.h" /> | |
| 319 | + <Unit filename="src/pw3270/v3270/widget.c"> | |
| 319 | 320 | <Option compilerVar="CC" /> |
| 320 | 321 | </Unit> |
| 321 | - <Unit filename="src\pw3270\window.c"> | |
| 322 | + <Unit filename="src/pw3270/window.c"> | |
| 322 | 323 | <Option compilerVar="CC" /> |
| 323 | 324 | </Unit> |
| 324 | - <Unit filename="src\tools\Makefile.in" /> | |
| 325 | - <Unit filename="ui\00default.xml" /> | |
| 326 | - <Unit filename="ui\99debug.xml" /> | |
| 325 | + <Unit filename="src/tools/Makefile.in" /> | |
| 326 | + <Unit filename="ui/00default.xml" /> | |
| 327 | + <Unit filename="ui/99debug.xml" /> | |
| 327 | 328 | <Extensions> |
| 328 | 329 | <code_completion /> |
| 329 | 330 | <debugger /> | ... | ... |
src/android/jni/Android.mk
| ... | ... | @@ -29,7 +29,7 @@ include $(CLEAR_VARS) |
| 29 | 29 | |
| 30 | 30 | # include ../lib3270/sources.mak |
| 31 | 31 | TERMINAL_SOURCES= bounds.c XtGlue.c ctlr.c util.c toggles.c screen.c selection.c kybd.c telnet.c \ |
| 32 | - host.c sf.c ansi.c log.c resolver.c xio.c tables.c proxy.c | |
| 32 | + host.c sf.c ansi.c log.c resolver.c xio.c tables.c proxy.c utf8.c charset.c | |
| 33 | 33 | |
| 34 | 34 | LOCAL_CFLAGS=-I../include |
| 35 | 35 | LOCAL_MODULE := lib3270 | ... | ... |
src/include/lib3270.h
| ... | ... | @@ -749,6 +749,43 @@ |
| 749 | 749 | |
| 750 | 750 | LIB3270_EXPORT int lib3270_is_protected(H3270 *h, unsigned int baddr); |
| 751 | 751 | |
| 752 | + /** | |
| 753 | + * Alloc/Realloc memory buffer. | |
| 754 | + * | |
| 755 | + * Allocate/reallocate an array. | |
| 756 | + * | |
| 757 | + * @param elsize Element size. | |
| 758 | + * @param nelem Number of elements in the array. | |
| 759 | + * @param ptr Pointer to the actual array. | |
| 760 | + * | |
| 761 | + * @return Clean buffer with size for the number of elements. | |
| 762 | + * | |
| 763 | + */ | |
| 764 | + LIB3270_EXPORT void * lib3270_calloc(int elsize, int nelem, void *ptr); | |
| 765 | + | |
| 766 | + LIB3270_EXPORT void * lib3270_malloc(int len); | |
| 767 | + LIB3270_EXPORT void * lib3270_realloc(void *p, int len); | |
| 768 | + | |
| 769 | + /** | |
| 770 | + * Release allocated memory. | |
| 771 | + * | |
| 772 | + * @param p Memory block to release (can be NULL) | |
| 773 | + * | |
| 774 | + */ | |
| 775 | + LIB3270_EXPORT void lib3270_free(void *p); | |
| 776 | + | |
| 777 | + | |
| 778 | + /** | |
| 779 | + * Get resource string. | |
| 780 | + * | |
| 781 | + * @param first_element First element of resource path | |
| 782 | + * @param ... Resource path (ends with NULL) | |
| 783 | + * | |
| 784 | + * @return Resource string (Release with lib3270_free()) | |
| 785 | + * | |
| 786 | + */ | |
| 787 | + LIB3270_EXPORT char * lib3270_get_resource_string(const char *first_element, ...); | |
| 788 | + | |
| 752 | 789 | |
| 753 | 790 | #ifdef __cplusplus |
| 754 | 791 | } | ... | ... |
src/lib3270/XtGlue.c
| ... | ... | @@ -566,60 +566,6 @@ static int DefaultProcessEvents(int block) |
| 566 | 566 | |
| 567 | 567 | /*---[ Implement external calls ]---------------------------------------------------------------------------*/ |
| 568 | 568 | |
| 569 | -void * Malloc(size_t len) | |
| 570 | -{ | |
| 571 | - char *r; | |
| 572 | - | |
| 573 | - r = malloc(len); | |
| 574 | - if (r == (char *)NULL) | |
| 575 | - Error(NULL,"Out of memory"); | |
| 576 | - return r; | |
| 577 | -} | |
| 578 | - | |
| 579 | -void * Calloc(size_t nelem, size_t elsize) | |
| 580 | -{ | |
| 581 | - int sz = nelem * elsize; | |
| 582 | - char * r = malloc(sz); | |
| 583 | - | |
| 584 | - if(!r) | |
| 585 | - Error(NULL,"Out of memory"); | |
| 586 | - | |
| 587 | - memset(r, 0, sz); | |
| 588 | - return r; | |
| 589 | -} | |
| 590 | - | |
| 591 | -void * Realloc(void *p, size_t len) | |
| 592 | -{ | |
| 593 | - p = realloc(p, len); | |
| 594 | - if (p == NULL) | |
| 595 | - Error(NULL,"Out of memory"); | |
| 596 | - return p; | |
| 597 | -} | |
| 598 | - | |
| 599 | -void Free(void *p) | |
| 600 | -{ | |
| 601 | - if(p) | |
| 602 | - free(p); | |
| 603 | -} | |
| 604 | - | |
| 605 | -void * lib3270_calloc(size_t elsize, size_t nelem, void *ptr) | |
| 606 | -{ | |
| 607 | - size_t sz = nelem * elsize; | |
| 608 | - | |
| 609 | - if(ptr) | |
| 610 | - ptr = realloc(ptr,sz); | |
| 611 | - else | |
| 612 | - ptr = malloc(sz); | |
| 613 | - | |
| 614 | - if(ptr) | |
| 615 | - memset(ptr,0,sz); | |
| 616 | - else | |
| 617 | - Error(NULL,"Out of memory"); | |
| 618 | - | |
| 619 | - return ptr; | |
| 620 | -} | |
| 621 | - | |
| 622 | - | |
| 623 | 569 | static struct { |
| 624 | 570 | const char *name; |
| 625 | 571 | KeySym keysym; | ... | ... |
src/lib3270/charset.c
| ... | ... | @@ -159,25 +159,28 @@ restore_charset(void) |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | /* Get a character set definition. */ |
| 162 | -static const char * get_charset_def(const char *csname) | |
| 162 | +/* | |
| 163 | +static char * get_charset_def(const char *csname) | |
| 163 | 164 | { |
| 164 | - return get_fresource("%s.%s", ResCharset, csname); | |
| 165 | + return get_fresource("%s.%s", "charset", csname); | |
| 165 | 166 | } |
| 167 | +*/ | |
| 166 | 168 | |
| 167 | -#if defined(X3270_DBCS) /*[*/ | |
| 168 | 169 | /* |
| 169 | - * Initialize the DBCS conversion functions, based on resource values. | |
| 170 | - */ | |
| 170 | +#if defined(X3270_DBCS) | |
| 171 | +// | |
| 172 | +// Initialize the DBCS conversion functions, based on resource values. | |
| 173 | +// | |
| 171 | 174 | static int |
| 172 | 175 | wide_resource_init(char *csname) |
| 173 | 176 | { |
| 174 | 177 | char *cn, *en; |
| 175 | 178 | |
| 176 | - cn = get_fresource("%s.%s", ResDbcsConverters, csname); | |
| 179 | + cn = get_fresource("%s.%s", "dbcsConverters", csname); | |
| 177 | 180 | if (cn == CN) |
| 178 | 181 | return 0; |
| 179 | 182 | |
| 180 | - en = get_fresource("%s.%s", ResLocalEncoding, csname); | |
| 183 | + en = get_fresource("%s.%s", "localEncoding", csname); | |
| 181 | 184 | if (en == CN) |
| 182 | 185 | en = appres.local_encoding; |
| 183 | 186 | Replace(converter_names, cn); |
| ... | ... | @@ -186,78 +189,60 @@ wide_resource_init(char *csname) |
| 186 | 189 | return wide_init(cn, en); |
| 187 | 190 | |
| 188 | 191 | } |
| 189 | -#endif /*]*/ | |
| 192 | +#endif | |
| 193 | +*/ | |
| 190 | 194 | |
| 191 | 195 | /* |
| 192 | 196 | * Change character sets. |
| 193 | 197 | */ |
| 194 | 198 | enum cs_result charset_init(H3270 *session, char *csname) |
| 195 | 199 | { |
| 196 | - const char *cs; | |
| 200 | + char *cs; | |
| 197 | 201 | const char *ftcs; |
| 198 | 202 | enum cs_result rc; |
| 199 | 203 | char *ccs, *cftcs; |
| 200 | -/* | |
| 201 | -#if defined(X3270_DISPLAY) | |
| 202 | - char *xks; | |
| 203 | -#endif | |
| 204 | -*/ | |
| 205 | 204 | const char *ak; |
| 206 | 205 | |
| 207 | -/* | |
| 208 | -#if !defined(_WIN32) | |
| 209 | - char *codeset_name; | |
| 210 | -#endif | |
| 211 | - | |
| 212 | -#if !defined(_WIN32) | |
| 213 | - // Get all of the locale stuff right. | |
| 214 | - | |
| 215 | - // Figure out the locale code set (character set encoding). | |
| 216 | - codeset_name = nl_langinfo(CODESET); | |
| 217 | - Trace("codeset_name: %s",codeset_name); | |
| 218 | - set_codeset(codeset_name); | |
| 219 | -#endif | |
| 220 | -*/ | |
| 221 | - | |
| 222 | 206 | |
| 223 | 207 | /* Do nothing, successfully. */ |
| 224 | 208 | if (csname == CN || !strcasecmp(csname, "us")) |
| 225 | 209 | { |
| 226 | 210 | charset_defaults(); |
| 227 | 211 | set_cgcsgids(CN); |
| 228 | -// set_charset_name(CN); | |
| 229 | 212 | set_display_charset(session, "ISO-8859-1"); |
| 230 | 213 | return CS_OKAY; |
| 231 | 214 | } |
| 232 | 215 | |
| 233 | 216 | /* Figure out if it's already in a resource or in a file. */ |
| 234 | - cs = get_charset_def(csname); | |
| 235 | - if (cs == CN && | |
| 236 | - strlen(csname) > ES_SIZE && | |
| 237 | - !strcasecmp(csname + strlen(csname) - ES_SIZE, EURO_SUFFIX)) { | |
| 238 | - char *basename; | |
| 217 | +#ifdef ANDROID | |
| 218 | + ccs = strdup("0xad: [ \n 0xba: Yacute \n0xbd: ] \n 0xbb: diaeresis \n"); | |
| 219 | +#else | |
| 220 | + ccs = lib3270_get_resource_string("charset", csname, NULL); | |
| 221 | +#endif | |
| 222 | +/* | |
| 223 | + if (cs == CN && strlen(csname) > ES_SIZE && !strcasecmp(csname + strlen(csname) - ES_SIZE, EURO_SUFFIX)) | |
| 224 | + { | |
| 225 | + char *basename = | |
| 226 | + lib3270_free(cs); | |
| 239 | 227 | |
| 240 | - /* Grab the non-Euro definition. */ | |
| 228 | + // Grab the non-Euro definition. | |
| 241 | 229 | basename = xs_buffer("%.*s", (int) (strlen(csname) - ES_SIZE), csname); |
| 242 | 230 | cs = get_charset_def(basename); |
| 243 | 231 | Free(basename); |
| 244 | 232 | } |
| 245 | - if (cs == CN) | |
| 233 | +*/ | |
| 234 | + if (!ccs) | |
| 246 | 235 | return CS_NOTFOUND; |
| 247 | 236 | |
| 248 | 237 | /* Grab the File Transfer character set. */ |
| 249 | - ftcs = get_fresource("%s.%s", ResFtCharset, csname); | |
| 250 | - | |
| 251 | - /* Copy strings. */ | |
| 252 | - ccs = NewString(cs); | |
| 253 | - cftcs = (ftcs == NULL)? NULL: NewString(ftcs); | |
| 238 | + cftcs = lib3270_get_resource_string("ftCharset",csname,NULL); | |
| 254 | 239 | |
| 255 | 240 | /* Save the current definitions, and start over with the defaults. */ |
| 256 | 241 | save_charset(); |
| 257 | 242 | charset_defaults(); |
| 258 | 243 | |
| 259 | 244 | /* Check for auto-keymap. */ |
| 260 | - ak = get_fresource("%s.%s", ResAutoKeymap, csname); | |
| 245 | + ak = lib3270_get_resource_string("autoKeymap", csname, NULL); | |
| 261 | 246 | if (ak != NULL) |
| 262 | 247 | auto_keymap = !strcasecmp(ak, "true"); |
| 263 | 248 | else |
| ... | ... | @@ -277,12 +262,15 @@ enum cs_result charset_init(H3270 *session, char *csname) |
| 277 | 262 | |
| 278 | 263 | if (rc != CS_OKAY) |
| 279 | 264 | restore_charset(); |
| 280 | -#if defined(X3270_DBCS) /*[*/ | |
| 265 | + | |
| 266 | +/* | |
| 267 | +#if defined(X3270_DBCS) | |
| 281 | 268 | else if (wide_resource_init(csname) < 0) { |
| 282 | 269 | restore_charset(); |
| 283 | 270 | return CS_NOTFOUND; |
| 284 | 271 | } |
| 285 | -#endif /*]*/ | |
| 272 | +#endif | |
| 273 | +*/ | |
| 286 | 274 | |
| 287 | 275 | /* |
| 288 | 276 | #if defined(X3270_DISPLAY) |
| ... | ... | @@ -384,11 +372,11 @@ set_charset_name(char *csname) |
| 384 | 372 | /* Define a charset from resources. */ |
| 385 | 373 | static enum cs_result resource_charset(char *csname, char *cs, char *ftcs) |
| 386 | 374 | { |
| 387 | - enum cs_result rc; | |
| 388 | - int ne = 0; | |
| 389 | - const char *rcs = CN; | |
| 390 | - int n_rcs = 0; | |
| 391 | - const char *dcs; | |
| 375 | + enum cs_result rc; | |
| 376 | + int ne = 0; | |
| 377 | + char * rcs = CN; | |
| 378 | + int n_rcs = 0; | |
| 379 | + char * dcs; | |
| 392 | 380 | |
| 393 | 381 | /* Interpret the spec. */ |
| 394 | 382 | rc = remap_chars(csname, cs, (ftcs == NULL)? BOTH: CS_ONLY, &ne); |
| ... | ... | @@ -400,37 +388,44 @@ static enum cs_result resource_charset(char *csname, char *cs, char *ftcs) |
| 400 | 388 | return rc; |
| 401 | 389 | } |
| 402 | 390 | |
| 403 | - rcs = get_fresource("%s.%s", ResDisplayCharset, csname); | |
| 391 | +// rcs = get_fresource("%s.%s", "displayCharset", csname); | |
| 392 | + rcs = lib3270_get_resource_string("displayCharset", csname, NULL); | |
| 404 | 393 | |
| 405 | 394 | /* Isolate the pieces. */ |
| 406 | - if (rcs != CN) { | |
| 407 | - char *rcs_copy, *buf, *token; | |
| 395 | + if (rcs != CN) | |
| 396 | + { | |
| 397 | + char *buf, *token; | |
| 408 | 398 | |
| 409 | - buf = rcs_copy = NewString(rcs); | |
| 410 | - while ((token = strtok(buf, "+")) != CN) { | |
| 399 | + buf = rcs; | |
| 400 | + while ((token = strtok(buf, "+")) != CN) | |
| 401 | + { | |
| 411 | 402 | buf = CN; |
| 412 | - switch (n_rcs) { | |
| 403 | + switch (n_rcs) | |
| 404 | + { | |
| 413 | 405 | case 0: |
| 414 | -#if defined(X3270_DBCS) /*[*/ | |
| 406 | +#if defined(X3270_DBCS) | |
| 415 | 407 | case 1: |
| 416 | -#endif /*]*/ | |
| 408 | +#endif | |
| 417 | 409 | break; |
| 418 | 410 | default: |
| 419 | - popup_an_error(NULL,"Extra %s value(s), ignoring", | |
| 420 | - ResDisplayCharset); | |
| 411 | + popup_an_error(NULL,"Extra value(s) in displayCharset.%s, ignoring", csname); | |
| 421 | 412 | break; |
| 422 | 413 | } |
| 423 | 414 | n_rcs++; |
| 424 | 415 | } |
| 425 | 416 | } |
| 426 | 417 | |
| 427 | -#if defined(X3270_DBCS) /*[*/ | |
| 428 | - /* Can't swap DBCS modes while connected. */ | |
| 418 | + lib3270_free(rcs); | |
| 419 | + | |
| 420 | +/* | |
| 421 | +#if defined(X3270_DBCS) | |
| 422 | + // Can't swap DBCS modes while connected. | |
| 429 | 423 | if (IN_3270 && (n_rcs == 2) != dbcs) { |
| 430 | 424 | popup_an_error(NULL,"Can't change DBCS modes while connected"); |
| 431 | 425 | return CS_ILLEGAL; |
| 432 | 426 | } |
| 433 | -#endif /*]*/ | |
| 427 | +#endif | |
| 428 | +*/ | |
| 434 | 429 | |
| 435 | 430 | /* |
| 436 | 431 | #if !defined(_WIN32) |
| ... | ... | @@ -445,15 +440,23 @@ static enum cs_result resource_charset(char *csname, char *cs, char *ftcs) |
| 445 | 440 | */ |
| 446 | 441 | |
| 447 | 442 | /* Set up the cgcsgid. */ |
| 448 | - set_cgcsgids(get_fresource("%s.%s", ResCodepage, csname)); | |
| 443 | +// set_cgcsgids(get_fresource("%s.%s", "codepage", csname)); | |
| 444 | + { | |
| 445 | + char *ptr = lib3270_get_resource_string("codepage", csname, NULL); | |
| 446 | + set_cgcsgids(ptr); | |
| 447 | + lib3270_free(ptr); | |
| 448 | + } | |
| 449 | 449 | |
| 450 | - dcs = get_fresource("%s.%s", ResDisplayCharset, csname); | |
| 450 | +// dcs = get_fresource("%s.%s", "displayCharset", csname); | |
| 451 | + dcs = lib3270_get_resource_string("displayCharset", csname, NULL); | |
| 451 | 452 | |
| 452 | 453 | if (dcs != NULL) |
| 453 | 454 | set_display_charset(&h3270,dcs); |
| 454 | 455 | else |
| 455 | 456 | set_display_charset(&h3270,"ISO-8859-1"); |
| 456 | 457 | |
| 458 | + lib3270_free(dcs); | |
| 459 | + | |
| 457 | 460 | /* Set up the character set name. */ |
| 458 | 461 | // set_charset_name(csname); |
| 459 | 462 | ... | ... |
src/lib3270/ctlr.c
| ... | ... | @@ -56,7 +56,7 @@ |
| 56 | 56 | #include "screenc.h" |
| 57 | 57 | #include "scrollc.h" |
| 58 | 58 | #include "seec.h" |
| 59 | -#include "sfc.h" | |
| 59 | +#include "sf.h" | |
| 60 | 60 | #include "statusc.h" |
| 61 | 61 | #include "tablesc.h" |
| 62 | 62 | #include "telnetc.h" |
| ... | ... | @@ -167,8 +167,7 @@ void ctlr_reinit(H3270 *session, unsigned cmask) |
| 167 | 167 | struct ea *tmp; |
| 168 | 168 | size_t sz = (session->maxROWS * session->maxCOLS); |
| 169 | 169 | |
| 170 | - | |
| 171 | - session->buffer[0] = tmp = lib3270_calloc(sizeof(struct ea),sz+1, session->buffer[0]); | |
| 170 | + session->buffer[0] = tmp = lib3270_calloc(sizeof(struct ea), sz+1, session->buffer[0]); | |
| 172 | 171 | session->ea_buf = tmp + 1; |
| 173 | 172 | |
| 174 | 173 | session->buffer[1] = tmp = lib3270_calloc(sizeof(struct ea),sz+1,session->buffer[1]); | ... | ... |
src/lib3270/kybd.c
| ... | ... | @@ -3461,7 +3461,7 @@ add_xk(KeySym key, KeySym assoc) |
| 3461 | 3461 | xk[i].assoc = assoc; |
| 3462 | 3462 | return; |
| 3463 | 3463 | } |
| 3464 | - xk = (struct xks *)Realloc(xk, (nxk + 1) * sizeof(struct xks)); | |
| 3464 | + xk = (struct xks *) Realloc(xk, (nxk + 1) * sizeof(struct xks)); | |
| 3465 | 3465 | xk[nxk].key = key; |
| 3466 | 3466 | xk[nxk].assoc = assoc; |
| 3467 | 3467 | nxk++; | ... | ... |
src/lib3270/localdefs.h
| ... | ... | @@ -63,24 +63,15 @@ typedef struct _XtActionsRec{ |
| 63 | 63 | |
| 64 | 64 | /* These are local functions with similar semantics to X functions. */ |
| 65 | 65 | |
| 66 | -void * Malloc(size_t); | |
| 67 | -void Free(void *); | |
| 68 | -void * Calloc(size_t, size_t); | |
| 69 | -void * Realloc(void *, size_t); | |
| 66 | +// void * Malloc(size_t); | |
| 67 | +// void Free(void *); | |
| 68 | +// void * Calloc(size_t, size_t); | |
| 69 | +// void * Realloc(void *, size_t); | |
| 70 | 70 | |
| 71 | -/** | |
| 72 | - * Alloc/Realloc memory buffer. | |
| 73 | - * | |
| 74 | - * Allocate/reallocate an array. | |
| 75 | - * | |
| 76 | - * @param elsize Element size. | |
| 77 | - * @param nelem Number of elements in the array. | |
| 78 | - * @param ptr Pointer to the actual array. | |
| 79 | - * | |
| 80 | - * @return ptr allocated with the new array size. | |
| 81 | - * | |
| 82 | - */ | |
| 83 | -void * lib3270_calloc(size_t elsize, size_t nelem, void *ptr); | |
| 71 | +#define Malloc(x) lib3270_malloc(x) | |
| 72 | +#define Free(x) lib3270_free(x) | |
| 73 | +#define Calloc(e,n) lib3270_calloc(e,n,NULL) | |
| 74 | +#define Realloc(x,n) lib3270_realloc(x,n) | |
| 84 | 75 | |
| 85 | 76 | #define NewString(x) strdup(x) |
| 86 | 77 | //extern char *NewString(const char *); | ... | ... |
src/lib3270/rpq.c
| ... | ... | @@ -64,6 +64,7 @@ |
| 64 | 64 | #include "telnetc.h" |
| 65 | 65 | #include "trace_dsc.h" |
| 66 | 66 | #include "utilc.h" |
| 67 | +#include "sf.h" | |
| 67 | 68 | |
| 68 | 69 | /* Statics */ |
| 69 | 70 | static Boolean select_rpq_terms(void); |
| ... | ... | @@ -121,8 +122,7 @@ static char *x3270rpq; |
| 121 | 122 | /* |
| 122 | 123 | * RPQNAMES query reply. |
| 123 | 124 | */ |
| 124 | -void | |
| 125 | -do_qr_rpqnames(void) | |
| 125 | +void do_qr_rpqnames(void) | |
| 126 | 126 | { |
| 127 | 127 | #define TERM_PREFIX_SIZE 2 /* Each term has 1 byte length and 1 |
| 128 | 128 | byte id */ | ... | ... |
src/lib3270/sf.c
| ... | ... | @@ -56,7 +56,7 @@ |
| 56 | 56 | #include "kybdc.h" |
| 57 | 57 | #include "screenc.h" |
| 58 | 58 | #include "seec.h" |
| 59 | -#include "sfc.h" | |
| 59 | +#include "sf.h" | |
| 60 | 60 | #include "tablesc.h" |
| 61 | 61 | #include "telnetc.h" |
| 62 | 62 | #include "trace_dsc.h" |
| ... | ... | @@ -92,13 +92,13 @@ static void query_reply_start(void); |
| 92 | 92 | static void do_query_reply(unsigned char code); |
| 93 | 93 | static void query_reply_end(void); |
| 94 | 94 | |
| 95 | -typedef void qr_single_fn_t(void); | |
| 96 | 95 | typedef Boolean qr_multi_fn_t(unsigned *subindex, Boolean *more); |
| 97 | 96 | |
| 98 | 97 | static qr_single_fn_t do_qr_summary, do_qr_usable_area, do_qr_alpha_part, |
| 99 | 98 | do_qr_charsets, do_qr_color, do_qr_highlighting, do_qr_reply_modes, |
| 100 | 99 | do_qr_imp_part, do_qr_null; |
| 101 | -extern qr_single_fn_t do_qr_rpqnames; | |
| 100 | + | |
| 101 | + | |
| 102 | 102 | #if defined(X3270_DBCS) /*[*/ |
| 103 | 103 | static qr_single_fn_t do_qr_dbcs_asia; |
| 104 | 104 | #endif /*]*/ |
| ... | ... | @@ -121,10 +121,15 @@ static struct reply { |
| 121 | 121 | #if defined(X3270_DBCS) /*[*/ |
| 122 | 122 | { QR_DBCS_ASIA, do_qr_dbcs_asia, NULL }, /* 0x91 */ |
| 123 | 123 | #endif /*]*/ |
| 124 | + | |
| 124 | 125 | #if defined(X3270_FT) /*[*/ |
| 125 | 126 | { QR_DDM, do_qr_ddm, NULL }, /* 0x95 */ |
| 126 | 127 | #endif /*]*/ |
| 128 | + | |
| 129 | +#ifndef ANDROID | |
| 127 | 130 | { QR_RPQNAMES, do_qr_rpqnames, NULL }, /* 0xa1 */ |
| 131 | +#endif // !ANDROID | |
| 132 | + | |
| 128 | 133 | { QR_IMP_PART, do_qr_imp_part, NULL }, /* 0xa6 */ |
| 129 | 134 | |
| 130 | 135 | /* QR_NULL must be last in the table */ | ... | ... |
| ... | ... | @@ -0,0 +1,19 @@ |
| 1 | +/* | |
| 2 | + * Copyright 1995, 1999, 2000 by Paul Mattes. | |
| 3 | + * Permission to use, copy, modify, and distribute this software and its | |
| 4 | + * documentation for any purpose and without fee is hereby granted, | |
| 5 | + * provided that the above copyright notice appear in all copies and that | |
| 6 | + * both that copyright notice and this permission notice appear in | |
| 7 | + * supporting documentation. | |
| 8 | + * | |
| 9 | + * x3270, c3270, s3270, tcl3270 and pr3287 are distributed in the hope that | |
| 10 | + * they will be useful, but WITHOUT ANY WARRANTY; without even the implied | |
| 11 | + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 12 | + * file LICENSE for more details. | |
| 13 | + */ | |
| 14 | + | |
| 15 | +typedef void qr_single_fn_t(void); | |
| 16 | + | |
| 17 | +LIB3270_INTERNAL qr_single_fn_t do_qr_rpqnames; | |
| 18 | + | |
| 19 | +LIB3270_INTERNAL enum pds write_structured_field(unsigned char buf[], int buflen); | ... | ... |
src/lib3270/sfc.h
| ... | ... | @@ -1,20 +0,0 @@ |
| 1 | -/* | |
| 2 | - * Copyright 1995, 1999, 2000 by Paul Mattes. | |
| 3 | - * Permission to use, copy, modify, and distribute this software and its | |
| 4 | - * documentation for any purpose and without fee is hereby granted, | |
| 5 | - * provided that the above copyright notice appear in all copies and that | |
| 6 | - * both that copyright notice and this permission notice appear in | |
| 7 | - * supporting documentation. | |
| 8 | - * | |
| 9 | - * x3270, c3270, s3270, tcl3270 and pr3287 are distributed in the hope that | |
| 10 | - * they will be useful, but WITHOUT ANY WARRANTY; without even the implied | |
| 11 | - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 12 | - * file LICENSE for more details. | |
| 13 | - */ | |
| 14 | - | |
| 15 | -/* | |
| 16 | - * sfc.h | |
| 17 | - * Global declarations for sf.c. | |
| 18 | - */ | |
| 19 | - | |
| 20 | -LIB3270_INTERNAL enum pds write_structured_field(unsigned char buf[], int buflen); |
src/lib3270/util.c
| ... | ... | @@ -1087,3 +1087,100 @@ StringToKeysym(char *s) |
| 1087 | 1087 | } |
| 1088 | 1088 | #endif |
| 1089 | 1089 | */ |
| 1090 | + | |
| 1091 | +LIB3270_EXPORT void lib3270_free(void *p) | |
| 1092 | +{ | |
| 1093 | + if(p) | |
| 1094 | + free(p); | |
| 1095 | +} | |
| 1096 | + | |
| 1097 | +LIB3270_EXPORT void * lib3270_realloc(void *p, int len) | |
| 1098 | +{ | |
| 1099 | + p = realloc(p, len); | |
| 1100 | + if(!p) | |
| 1101 | + Error(NULL,"Out of memory"); | |
| 1102 | + return p; | |
| 1103 | +} | |
| 1104 | + | |
| 1105 | +LIB3270_EXPORT void * lib3270_calloc(int elsize, int nelem, void *ptr) | |
| 1106 | +{ | |
| 1107 | + size_t sz = nelem * elsize; | |
| 1108 | + | |
| 1109 | + if(ptr) | |
| 1110 | + ptr = realloc(ptr,sz); | |
| 1111 | + else | |
| 1112 | + ptr = malloc(sz); | |
| 1113 | + | |
| 1114 | + if(ptr) | |
| 1115 | + memset(ptr,0,sz); | |
| 1116 | + else | |
| 1117 | + Error(NULL,"Out of memory"); | |
| 1118 | + | |
| 1119 | + return ptr; | |
| 1120 | +} | |
| 1121 | + | |
| 1122 | + | |
| 1123 | +LIB3270_EXPORT void * lib3270_malloc(int len) | |
| 1124 | +{ | |
| 1125 | + char *r; | |
| 1126 | + | |
| 1127 | + r = malloc(len); | |
| 1128 | + if (r == (char *)NULL) | |
| 1129 | + { | |
| 1130 | + Error(NULL,"Out of memory"); | |
| 1131 | + return 0; | |
| 1132 | + } | |
| 1133 | + | |
| 1134 | + memset(r,0,len); | |
| 1135 | + return r; | |
| 1136 | +} | |
| 1137 | + | |
| 1138 | +/* | |
| 1139 | +void * Calloc(size_t nelem, size_t elsize) | |
| 1140 | +{ | |
| 1141 | + int sz = nelem * elsize; | |
| 1142 | + char * r = malloc(sz); | |
| 1143 | + | |
| 1144 | + if(!r) | |
| 1145 | + Error(NULL,"Out of memory"); | |
| 1146 | + | |
| 1147 | + memset(r, 0, sz); | |
| 1148 | + return r; | |
| 1149 | +} | |
| 1150 | +*/ | |
| 1151 | + | |
| 1152 | +LIB3270_EXPORT char * lib3270_get_resource_string(const char *first_element, ...) | |
| 1153 | +{ | |
| 1154 | +#ifndef ANDROID | |
| 1155 | + | |
| 1156 | + #warning Work in progress | |
| 1157 | + | |
| 1158 | + char buffer[4096]; | |
| 1159 | + char * ptr = buffer; | |
| 1160 | + const char * element; | |
| 1161 | + va_list args; | |
| 1162 | + const char * res; | |
| 1163 | + | |
| 1164 | + va_start(args, first_element); | |
| 1165 | + | |
| 1166 | + for(element = first_element;element;element = va_arg(args, const char *)) | |
| 1167 | + { | |
| 1168 | + if(ptr != buffer) | |
| 1169 | + *(ptr++) = '.'; | |
| 1170 | + | |
| 1171 | + strncpy(ptr,element,4096-strlen(buffer)); | |
| 1172 | + ptr += strlen(ptr); | |
| 1173 | + } | |
| 1174 | + | |
| 1175 | + va_end(args); | |
| 1176 | + | |
| 1177 | + *ptr = 0; | |
| 1178 | + | |
| 1179 | + trace("%s: %s",__FUNCTION__,buffer); | |
| 1180 | + | |
| 1181 | + res = get_resource(buffer); | |
| 1182 | + if(res) | |
| 1183 | + return strdup(res); | |
| 1184 | +#endif | |
| 1185 | + return NULL; | |
| 1186 | +} | ... | ... |