2
* Copyright (c) 2006-2009, Paul Mattes.
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions
8
* * Redistributions of source code must retain the above copyright
9
* notice, this list of conditions and the following disclaimer.
10
* * Redistributions in binary form must reproduce the above copyright
11
* notice, this list of conditions and the following disclaimer in the
12
* documentation and/or other materials provided with the distribution.
13
* * Neither the name of Paul Mattes nor his contributors may be used
14
* to endorse or promote products derived from this software without
15
* specific prior written permission.
17
* THIS SOFTWARE IS PROVIDED BY PAUL MATTES "AS IS" AND ANY EXPRESS
18
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20
* DISCLAIMED. IN NO EVENT SHALL PAUL MATTES BE LIABLE FOR ANY DIRECT,
21
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
25
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
26
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27
* POSSIBILITY OF SUCH DAMAGE.
32
* A Windows console-based 3270 Terminal Emulator
33
* Utility functions to read a session file and create a
34
* compatible shortcut.
42
/* Fields for wc3270 3.3.9 (Wizard version 1) */
43
char session[STR_SIZE]; /* session name */
44
char host[STR_SIZE]; /* host name */
45
DWORD port; /* TCP port */
46
char luname[STR_SIZE]; /* LU name */
47
DWORD ssl; /* SSL tunnel flag */
48
char proxy_type[STR_SIZE]; /* proxy type */
49
char proxy_host[STR_SIZE]; /* proxy host */
50
char proxy_port[STR_SIZE]; /* proxy port */
51
DWORD model; /* model number */
52
char charset[STR_SIZE]; /* character set name */
54
DWORD wpr3287; /* wpr3287 flag */
55
char printerlu[STR_SIZE]; /* printer LU */
56
char printer[STR_SIZE]; /* Windows printer name */
57
char printercp[STR_SIZE]; /* wpr3287 code page */
58
char keymaps[STR_SIZE]; /* keymap names */
60
/* Field added for wc3270 3.3.10 (Wizard version 2) */
61
unsigned char flags; /* miscellaneous flags */
62
unsigned char ov_rows; /* oversize rows */
63
unsigned char ov_cols; /* oversize columns */
64
unsigned char point_size; /* font point size */
67
#define WF_EMBED_KEYMAPS 0x01 /* embed keymaps in session */
68
#define WF_AUTO_SHORTCUT 0x02 /* 'auto-shortcut' mode */
69
#define WF_WHITE_BG 0x04 /* white background */
77
extern charsets_t charsets[];
78
extern size_t num_charsets;
79
extern char *user_settings;
81
extern int read_session(FILE *f, session_t *s);
82
extern HRESULT create_shortcut(session_t *session, char *exepath,
83
char *linkpath, char *args, char *workingdir);