2
* Copyright 1993, 1994, 1995, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
4
* Parts Copyright 1990 by Jeff Sparkes.
5
* Permission to use, copy, modify, and distribute this software and its
6
* documentation for any purpose and without fee is hereby granted,
7
* provided that the above copyright notice appear in all copies and that
8
* both that copyright notice and this permission notice appear in
9
* supporting documentation.
11
* x3270, c3270, s3270 and tcl3270 are distributed in the hope that they will
12
* be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the file LICENSE
2
* Copyright (c) 1993-2009, Paul Mattes.
3
* Copyright (c) 1990, Jeff Sparkes.
6
* Redistribution and use in source and binary forms, with or without
7
* modification, are permitted provided that the following conditions are met:
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 names of Paul Mattes, Jeff Sparkes nor the names of their
14
* contributors may be used to endorse or promote products derived from
15
* this software without specific prior written permission.
17
* THIS SOFTWARE IS PROVIDED BY PAUL MATTES AND JEFF SPARKES "AS IS" AND
18
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20
* ARE DISCLAIMED. IN NO EVENT SHALL PAUL MATTES OR JEFF SPARKES BE LIABLE FOR
21
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
959
975
return XStringToKeysym(s);
979
/* Return configuration options. */
983
return "Build options:"
984
#if defined(X3270_ANSI) /*[*/
989
#if defined(X3270_APL) /*[*/
994
#if defined(X3270_DBCS) /*[*/
999
#if defined(X3270_FT) /*[*/
1004
#if defined(X3270_DISPLAY) /*[*/
1005
# if defined(X3270_KEYPAD) /*[*/
1011
#if defined(X3270_LOCAL_PROCESS) /*[*/
1012
" --enable-local-process"
1014
" --disable-local-process"
1016
#if defined(X3270_DISPLAY) /*[*/
1017
# if defined(X3270_MENUS) /*[*/
1023
#if defined(X3270_DISPLAY) || defined(C3270) /*[*/
1024
# if defined(X3270_PRINTER) /*[*/
1027
" --disable-printer"
1030
#if defined(X3270_DISPLAY) || defined(C3270) /*[*/
1031
# if defined(X3270_SCRIPT) /*[*/
1037
#if defined(X3270_TN3270E) /*[*/
1040
" --disable-tn3270e"
1042
#if defined(X3270_TRACE) /*[*/
1047
#if defined(HAVE_LIBSSL) /*[*/
1052
#if defined(C3270) /*[*/
1053
# if defined(HAVE_LIBREADLINE) /*[*/
1056
" --without-readline"
1058
# if !defined(_WIN32) /*[*/
1059
# if defined(CURSES_WIDE) /*[*/
1060
" --with-curses-wide"
1062
" --without-curses-wide"
1066
#if defined(USE_ICONV) /*[*/
1075
printf("%s\n%s\n", build, build_options());
1078
"Copyright 1989-2009, Paul Mattes, GTRC and others.\n"
1079
"See the source code or documentation for licensing details.\n"
1080
"Distributed WITHOUT ANY WARRANTY; without even the implied warranty of\n"
1081
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n");
1085
/* Scale a number for display. */
1087
display_scale(double d, char *buf, size_t buflen)
1090
snprintf(buf, buflen, "%.3g M", d / 1000000.0);
1091
else if (d >= 1000.0)
1092
snprintf(buf, buflen, "%.3g K", d / 1000.0);
1094
snprintf(buf, buflen, "%.3g ", d);
1096
/* Don't trust snprintf. */
1097
buf[buflen - 1] = '\0';