2
* Copyright 1993, 1994, 1995, 1999, 2000, 2001, 2002, 2004, 2005 by Paul
4
* RPQNAMES modifications copyright 2004 by Don Russell.
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, tcl3270 and pr3287 are distributed in the hope that
12
* they will be useful, but WITHOUT ANY WARRANTY; without even the implied
13
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* file LICENSE for more details.
2
* Copyright (c) 1993-2009, Paul Mattes.
3
* Copyright (c) 2004, Don Russell.
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, Don Russell, Jeff Sparkes, GTRC nor
14
* the names of their contributors may be used to endorse or promote
15
* products derived from this software without specific prior written
18
* THIS SOFTWARE IS PROVIDED BY PAUL MATTES AND DON RUSSELL "AS IS" AND ANY
19
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
* DISCLAIMED. IN NO EVENT SHALL PAUL MATTES OR DON RUSSELL BE LIABLE FOR ANY
22
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
79
if (e && (e != ' ' || ch == 0x40))
81
#if !defined(PR3287) /*[*/
91
if (ebcdic_to_multibyte_x(ch, CS_BASE, mb, sizeof(mb), EUO_NONE, &uc)
92
&& (mb[0] != ' ' || ch == 0x40))
88
(void) sprintf(buf, "X'%02X'", ch);
95
(void) sprintf(buf, "X'%02X'", ch);