File: relinkc.h

package info (click to toggle)
ibm-3270 4.0ga12-3
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 17,740 kB
  • sloc: ansic: 120,111; sh: 4,284; makefile: 822; pascal: 798; perl: 344; exp: 184; tcl: 94
file content (100 lines) | stat: -rw-r--r-- 4,054 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/*
 * Copyright (c) 2006-2012, 2014, 2016, 2019-2020 Paul Mattes.
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of Paul Mattes nor his contributors may be used
 *       to endorse or promote products derived from this software without
 *       specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY PAUL MATTES "AS IS" AND ANY EXPRESS
 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL PAUL MATTES BE LIABLE FOR ANY DIRECT,
 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

/*
 *	relinkc.h
 *		A Windows console-based 3270 Terminal Emulator
 *		Utility functions to read a session file and create a
 *		compatible shortcut.
 */

#define STR_SIZE	256

#define WIZARD_VER	3

typedef struct {
    	/* Fields for wc3270 3.3.9 (Wizard version 1) */
	char  session[STR_SIZE];	/* session name */
	char  host[STR_SIZE];		/* host name */
	DWORD port;			/* TCP port */
	char  luname[STR_SIZE];		/* LU name */
	DWORD tls;			/* TKS tunnel flag */
	char  proxy_type[STR_SIZE];	/* proxy type */
	char  proxy_host[STR_SIZE];	/*  proxy host */
	char  proxy_port[STR_SIZE];	/*  proxy port */
	DWORD model;			/* model number */
	char  codepage[STR_SIZE];	/* code page name */
	DWORD is_dbcs;
	DWORD wpr3287;			/* pr3287 flag */
	char  printerlu[STR_SIZE];	/*  printer LU */
	char  printer[STR_SIZE];	/*  Windows printer name */
	char  printercp[STR_SIZE];	/*  pr3287 code page */
	char  keymaps[STR_SIZE];	/* keymap names */

	/* Fields added for wc3270 3.3.10 (Wizard version 2) */
	unsigned char flags;		/* miscellaneous flags */
	unsigned char ov_rows;		/* oversize rows */
	unsigned char ov_cols;		/* oversize columns */
	unsigned char point_size;	/* font point size */
	unsigned char flags2;		/* more flags */

	/* Fields added for wc3270 4.0ga10 (Wizard version 3) */
	char  proxy_user[STR_SIZE];	/* proxy username */
	char  proxy_password[STR_SIZE];	/* proxy password */
} session_t;

#define WF_EMBED_KEYMAPS	0x01	/* embed keymaps in session */
#define WF_AUTO_SHORTCUT	0x02	/* 'auto-shortcut' mode */
#define WF_WHITE_BG		0x04	/* white background */
#define WF_NO_MENUBAR		0x08	/* don't leave room for menu bar */
#define WF_VERIFY_HOST_CERTS	0x10	/* verify host certificate
					   (deprecated) */
#define WF_TRACE		0x20	/* trace at start-up */
#define WF_CROSSHAIR		0x40	/* crosshair cursor */
#define WF_ALTCURSOR		0x80	/* underscore cursor */

#define WF2_NEW_VHC_DEFAULT	0x01	/* has new verify-host-cert default */
#define WF2_NO_VERIFY_HOST_CERT	0x02	/* do not verify host certificate */
#define WF2_ALWAYS_INSERT	0x04	/* always use insert mode */

typedef struct {
	char *name;
	char *hostcp;
	int is_dbcs;
	wchar_t *codepage;
} codepages_t;
extern codepages_t codepages[];
extern size_t num_codepages;
extern int wrows[6];
extern int wcols[6];

extern int read_user_settings(FILE *f, char **usp);
extern int read_session(FILE *f, session_t *s, char **usp);
extern HRESULT create_shortcut(session_t *session, char *exepath,
	char *linkpath, char *args, char *workingdir);