Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 47675 | Differences between
and this patch

Collapse All | Expand All

(-)slang-1.4.5/src/slang.h.acs (-22 / +79 lines)
Lines 1255-1260 Link Here
1255
1255
1256
#ifdef UTF8
1256
#ifdef UTF8
1257
typedef int SLsmg_Char_Type;
1257
typedef int SLsmg_Char_Type;
1258
extern SLtt_Char_Type SLcurses_Acs_Map [128];
1259
#define acs_map SLcurses_Acs_Map
1258
#define SLSMG_EXTRACT_CHAR(x) ((x) & 0xFFFFFF)
1260
#define SLSMG_EXTRACT_CHAR(x) ((x) & 0xFFFFFF)
1259
#define SLSMG_EXTRACT_COLOR(x) (((x)>>24)&0xFF)
1261
#define SLSMG_EXTRACT_COLOR(x) (((x)>>24)&0xFF)
1260
#define SLSMG_BUILD_CHAR(ch,color) (((SLsmg_Char_Type)(wchar_t)(ch))|((color)<<24))
1262
#define SLSMG_BUILD_CHAR(ch,color) (((SLsmg_Char_Type)(wchar_t)(ch))|((color)<<24))
Lines 1396-1402 Link Here
1396
extern void SLsmg_set_screen_start (int *, int *);
1398
extern void SLsmg_set_screen_start (int *, int *);
1397
extern void SLsmg_draw_hline (unsigned int);
1399
extern void SLsmg_draw_hline (unsigned int);
1398
extern void SLsmg_draw_vline (int);
1400
extern void SLsmg_draw_vline (int);
1401
#ifdef UTF8
1402
extern void SLsmg_draw_object (int, int, SLsmg_Char_Type);
1403
#else
1399
extern void SLsmg_draw_object (int, int, unsigned char);
1404
extern void SLsmg_draw_object (int, int, unsigned char);
1405
#endif
1400
extern void SLsmg_draw_box (int, int, unsigned int, unsigned int);
1406
extern void SLsmg_draw_box (int, int, unsigned int, unsigned int);
1401
extern int SLsmg_get_column(void);
1407
extern int SLsmg_get_column(void);
1402
extern int SLsmg_get_row(void);
1408
extern int SLsmg_get_row(void);
Lines 1408-1413 Link Here
1408
extern int SLsmg_Display_Eight_Bit;
1414
extern int SLsmg_Display_Eight_Bit;
1409
extern int SLsmg_Tab_Width;
1415
extern int SLsmg_Tab_Width;
1410
1416
1417
extern int SLsmg_Is_Unicode;
1418
extern int SLsmg_Setlocale;
1419
1411
#define SLSMG_NEWLINE_IGNORED	0      /* default */
1420
#define SLSMG_NEWLINE_IGNORED	0      /* default */
1412
#define SLSMG_NEWLINE_MOVES	1      /* moves to next line, column 0 */
1421
#define SLSMG_NEWLINE_MOVES	1      /* moves to next line, column 0 */
1413
#define SLSMG_NEWLINE_SCROLLS	2      /* moves but scrolls at bottom of screen */
1422
#define SLSMG_NEWLINE_SCROLLS	2      /* moves but scrolls at bottom of screen */
Lines 1465-1495 Link Here
1465
#  define SLSMG_BOARD_CHAR	'#'
1474
#  define SLSMG_BOARD_CHAR	'#'
1466
#  define SLSMG_BLOCK_CHAR	'#'
1475
#  define SLSMG_BLOCK_CHAR	'#'
1467
# else
1476
# else
1468
#  define SLSMG_HLINE_CHAR	'q'
1477
#  define SLSMG_HLINE_CHAR	(acs_map['q'])
1469
#  define SLSMG_VLINE_CHAR	'x'
1478
#  define SLSMG_VLINE_CHAR	(acs_map['x'])
1470
#  define SLSMG_ULCORN_CHAR	'l'
1479
#  define SLSMG_ULCORN_CHAR	(acs_map['l'])
1471
#  define SLSMG_URCORN_CHAR	'k'
1480
#  define SLSMG_URCORN_CHAR	(acs_map['k'])
1472
#  define SLSMG_LLCORN_CHAR	'm'
1481
#  define SLSMG_LLCORN_CHAR	(acs_map['m'])
1473
#  define SLSMG_LRCORN_CHAR	'j'
1482
#  define SLSMG_LRCORN_CHAR	(acs_map['j'])
1474
#  define SLSMG_CKBRD_CHAR	'a'
1483
#  define SLSMG_CKBRD_CHAR	(acs_map['a'])
1475
#  define SLSMG_RTEE_CHAR	'u'
1484
#  define SLSMG_RTEE_CHAR	(acs_map['u'])
1476
#  define SLSMG_LTEE_CHAR	't'
1485
#  define SLSMG_LTEE_CHAR	(acs_map['t'])
1477
#  define SLSMG_UTEE_CHAR	'w'
1486
#  define SLSMG_UTEE_CHAR	(acs_map['v'])
1478
#  define SLSMG_DTEE_CHAR	'v'
1487
#  define SLSMG_DTEE_CHAR	(acs_map['w'])
1479
#  define SLSMG_PLUS_CHAR	'n'
1488
#  define SLSMG_PLUS_CHAR	(acs_map['n'])
1480
#  define SLSMG_DIAMOND_CHAR	'`'
1489
#  define SLSMG_DIAMOND_CHAR	(acs_map['`'])
1481
#  define SLSMG_DEGREE_CHAR	'f'
1490
#  define SLSMG_DEGREE_CHAR	(acs_map['f'])
1482
#  define SLSMG_PLMINUS_CHAR	'g'
1491
#  define SLSMG_PLMINUS_CHAR	(acs_map['g'])
1483
#  define SLSMG_BULLET_CHAR	'~'
1492
#  define SLSMG_BULLET_CHAR	(acs_map['~'])
1484
#  define SLSMG_LARROW_CHAR	','
1493
#  define SLSMG_LARROW_CHAR	(acs_map[','])
1485
#  define SLSMG_RARROW_CHAR	'+'
1494
#  define SLSMG_RARROW_CHAR	(acs_map['+'])
1486
#  define SLSMG_DARROW_CHAR	'.'
1495
#  define SLSMG_DARROW_CHAR	(acs_map['.'])
1487
#  define SLSMG_UARROW_CHAR	'-'
1496
#  define SLSMG_UARROW_CHAR	(acs_map['-'])
1488
#  define SLSMG_BOARD_CHAR	'h'
1497
#  define SLSMG_BOARD_CHAR	(acs_map['h'])
1489
#  define SLSMG_BLOCK_CHAR	'0'
1498
#  define SLSMG_BLOCK_CHAR	(acs_map['0'])
1499
#
1500
#  define SLSMG_HLINE_CHAR_TERM	'q'
1501
#  define SLSMG_VLINE_CHAR_TERM	'x'
1502
#  define SLSMG_ULCORN_CHAR_TERM	'l'
1503
#  define SLSMG_URCORN_CHAR_TERM	'k'
1504
#  define SLSMG_LLCORN_CHAR_TERM	'm'
1505
#  define SLSMG_LRCORN_CHAR_TERM	'j'
1506
#  define SLSMG_CKBRD_CHAR_TERM	'a'
1507
#  define SLSMG_RTEE_CHAR_TERM	'u'
1508
#  define SLSMG_LTEE_CHAR_TERM	't'
1509
#  define SLSMG_UTEE_CHAR_TERM	'v'
1510
#  define SLSMG_DTEE_CHAR_TERM	'w'
1511
#  define SLSMG_PLUS_CHAR_TERM	'n'
1512
#  define SLSMG_DIAMOND_CHAR_TERM	'`'
1513
#  define SLSMG_DEGREE_CHAR_TERM	'f'
1514
#  define SLSMG_PLMINUS_CHAR_TERM	'g'
1515
#  define SLSMG_BULLET_CHAR_TERM	'~'
1516
#  define SLSMG_LARROW_CHAR_TERM	','
1517
#  define SLSMG_RARROW_CHAR_TERM	'+'
1518
#  define SLSMG_DARROW_CHAR_TERM	'.'
1519
#  define SLSMG_UARROW_CHAR_TERM	'-'
1520
#  define SLSMG_BOARD_CHAR_TERM	'h'
1521
#  define SLSMG_BLOCK_CHAR_TERM	'0'
1490
# endif				       /* AMIGA */
1522
# endif				       /* AMIGA */
1491
#endif				       /* IBMPC_SYSTEM */
1523
#endif				       /* IBMPC_SYSTEM */
1492
1524
1525
#ifdef UTF8
1526
# define SLSMG_HLINE_CHAR_UNICODE	0x2500
1527
# define SLSMG_VLINE_CHAR_UNICODE	0x2502
1528
# define SLSMG_ULCORN_CHAR_UNICODE	0x250c
1529
# define SLSMG_URCORN_CHAR_UNICODE	0x2510
1530
# define SLSMG_LLCORN_CHAR_UNICODE	0x2514
1531
# define SLSMG_LRCORN_CHAR_UNICODE	0x2518
1532
# define SLSMG_RTEE_CHAR_UNICODE	0x2524
1533
# define SLSMG_LTEE_CHAR_UNICODE	0x251c
1534
# define SLSMG_UTEE_CHAR_UNICODE	0x2534
1535
# define SLSMG_DTEE_CHAR_UNICODE	0x252c
1536
# define SLSMG_PLUS_CHAR_UNICODE	0x253c
1537
# define SLSMG_CKBRD_CHAR_UNICODE	0x2592
1538
# define SLSMG_DIAMOND_CHAR_UNICODE	0x25c6
1539
# define SLSMG_DEGREE_CHAR_UNICODE	0x00b0
1540
# define SLSMG_PLMINUS_CHAR_UNICODE	0x00b1
1541
# define SLSMG_BULLET_CHAR_UNICODE	0x00b7
1542
# define SLSMG_LARROW_CHAR_UNICODE	0x2190
1543
# define SLSMG_RARROW_CHAR_UNICODE	0x2192
1544
# define SLSMG_DARROW_CHAR_UNICODE	0x2193
1545
# define SLSMG_UARROW_CHAR_UNICODE	0x2191
1546
# define SLSMG_BOARD_CHAR_UNICODE	0x2592
1547
# define SLSMG_BLOCK_CHAR_UNICODE	0x25ae
1548
#endif
1549
1493
#ifndef IBMPC_SYSTEM
1550
#ifndef IBMPC_SYSTEM
1494
# define SLSMG_COLOR_BLACK		0x000000
1551
# define SLSMG_COLOR_BLACK		0x000000
1495
# define SLSMG_COLOR_RED		0x000001
1552
# define SLSMG_COLOR_RED		0x000001
(-)slang-1.4.5/src/slcurses.c.acs (-26 / +49 lines)
Lines 331-370 Link Here
331
   /* SLtt_set_mono (A_BLINK >> 8, NULL, SLTT_BLINK_MASK); */
331
   /* SLtt_set_mono (A_BLINK >> 8, NULL, SLTT_BLINK_MASK); */
332
   SLtt_set_mono ((A_BOLD|A_UNDERLINE) >> 8, NULL, SLTT_ULINE_MASK|SLTT_BOLD_MASK);
332
   SLtt_set_mono ((A_BOLD|A_UNDERLINE) >> 8, NULL, SLTT_ULINE_MASK|SLTT_BOLD_MASK);
333
   SLtt_set_mono ((A_REVERSE|A_UNDERLINE) >> 8, NULL, SLTT_ULINE_MASK|SLTT_REV_MASK);
333
   SLtt_set_mono ((A_REVERSE|A_UNDERLINE) >> 8, NULL, SLTT_ULINE_MASK|SLTT_REV_MASK);
334
   
335
   SLcurses_init_acs_map();
336
337
   return SLcurses_Stdscr;
338
}
334
339
340
void SLcurses_init_acs_map()
341
{
335
   if (SLtt_Has_Alt_Charset)
342
   if (SLtt_Has_Alt_Charset)
336
     {
343
     {
337
       SLcurses_Acs_Map[SLSMG_ULCORN_CHAR] = SLSMG_ULCORN_CHAR | A_ALTCHARSET;
344
       if (SLsmg_Is_Unicode)
338
       SLcurses_Acs_Map[SLSMG_URCORN_CHAR] = SLSMG_URCORN_CHAR | A_ALTCHARSET;
345
         {
339
       SLcurses_Acs_Map[SLSMG_LLCORN_CHAR] = SLSMG_LLCORN_CHAR | A_ALTCHARSET;
346
           SLcurses_Acs_Map['l'] = SLSMG_ULCORN_CHAR_UNICODE;
340
       SLcurses_Acs_Map[SLSMG_LRCORN_CHAR] = SLSMG_LRCORN_CHAR | A_ALTCHARSET;
347
           SLcurses_Acs_Map['k'] = SLSMG_URCORN_CHAR_UNICODE;
341
       SLcurses_Acs_Map[SLSMG_UTEE_CHAR] = SLSMG_UTEE_CHAR | A_ALTCHARSET;
348
           SLcurses_Acs_Map['m'] = SLSMG_LLCORN_CHAR_UNICODE;
342
       SLcurses_Acs_Map[SLSMG_DTEE_CHAR] = SLSMG_DTEE_CHAR | A_ALTCHARSET;
349
           SLcurses_Acs_Map['j'] = SLSMG_LRCORN_CHAR_UNICODE;
343
       SLcurses_Acs_Map[SLSMG_LTEE_CHAR] = SLSMG_LTEE_CHAR | A_ALTCHARSET;
350
           SLcurses_Acs_Map['v'] = SLSMG_UTEE_CHAR_UNICODE;
344
       SLcurses_Acs_Map[SLSMG_RTEE_CHAR] = SLSMG_RTEE_CHAR | A_ALTCHARSET;
351
           SLcurses_Acs_Map['w'] = SLSMG_DTEE_CHAR_UNICODE;
345
       SLcurses_Acs_Map[SLSMG_VLINE_CHAR] = SLSMG_VLINE_CHAR | A_ALTCHARSET;
352
           SLcurses_Acs_Map['t'] = SLSMG_LTEE_CHAR_UNICODE;
346
       SLcurses_Acs_Map[SLSMG_HLINE_CHAR] = SLSMG_HLINE_CHAR | A_ALTCHARSET;
353
           SLcurses_Acs_Map['u'] = SLSMG_RTEE_CHAR_UNICODE;
347
       SLcurses_Acs_Map[SLSMG_PLUS_CHAR] = SLSMG_PLUS_CHAR | A_ALTCHARSET;
354
           SLcurses_Acs_Map['x'] = SLSMG_VLINE_CHAR_UNICODE;
348
       SLcurses_Acs_Map[SLSMG_CKBRD_CHAR] = SLSMG_CKBRD_CHAR | A_ALTCHARSET;
355
           SLcurses_Acs_Map['q'] = SLSMG_HLINE_CHAR_UNICODE;
356
           SLcurses_Acs_Map['n'] = SLSMG_PLUS_CHAR_UNICODE;
357
           SLcurses_Acs_Map['a'] = SLSMG_CKBRD_CHAR_UNICODE;
358
         }
359
       else
360
	 {
361
           SLcurses_Acs_Map['l'] = SLSMG_ULCORN_CHAR_TERM | A_ALTCHARSET;
362
           SLcurses_Acs_Map['k'] = SLSMG_URCORN_CHAR_TERM | A_ALTCHARSET;
363
           SLcurses_Acs_Map['m'] = SLSMG_LLCORN_CHAR_TERM | A_ALTCHARSET;
364
           SLcurses_Acs_Map['j'] = SLSMG_LRCORN_CHAR_TERM | A_ALTCHARSET;
365
           SLcurses_Acs_Map['v'] = SLSMG_UTEE_CHAR_TERM | A_ALTCHARSET;
366
           SLcurses_Acs_Map['w'] = SLSMG_DTEE_CHAR_TERM | A_ALTCHARSET;
367
           SLcurses_Acs_Map['t'] = SLSMG_LTEE_CHAR_TERM | A_ALTCHARSET;
368
           SLcurses_Acs_Map['u'] = SLSMG_RTEE_CHAR_TERM | A_ALTCHARSET;
369
           SLcurses_Acs_Map['x'] = SLSMG_VLINE_CHAR_TERM | A_ALTCHARSET;
370
           SLcurses_Acs_Map['q'] = SLSMG_HLINE_CHAR_TERM | A_ALTCHARSET;
371
           SLcurses_Acs_Map['n'] = SLSMG_PLUS_CHAR_TERM | A_ALTCHARSET;
372
           SLcurses_Acs_Map['a'] = SLSMG_CKBRD_CHAR_TERM | A_ALTCHARSET;
373
         }
349
     }
374
     }
350
   else
375
   else
351
     {
376
     {
352
       /* ugly defaults to use on terminals which don't support graphics */
377
       /* ugly defaults to use on terminals which don't support graphics */
353
       SLcurses_Acs_Map[SLSMG_ULCORN_CHAR] = '+';
378
       SLcurses_Acs_Map['l'] = '+';
354
       SLcurses_Acs_Map[SLSMG_URCORN_CHAR] = '+';
379
       SLcurses_Acs_Map['k'] = '+';
355
       SLcurses_Acs_Map[SLSMG_LLCORN_CHAR] = '+';
380
       SLcurses_Acs_Map['m'] = '+';
356
       SLcurses_Acs_Map[SLSMG_LRCORN_CHAR] = '+';
381
       SLcurses_Acs_Map['j'] = '+';
357
       SLcurses_Acs_Map[SLSMG_UTEE_CHAR] = '+';
382
       SLcurses_Acs_Map['v'] = '+';
358
       SLcurses_Acs_Map[SLSMG_DTEE_CHAR] = '+';
383
       SLcurses_Acs_Map['w'] = '+';
359
       SLcurses_Acs_Map[SLSMG_LTEE_CHAR] = '+';
384
       SLcurses_Acs_Map['t'] = '+';
360
       SLcurses_Acs_Map[SLSMG_RTEE_CHAR] = '+';
385
       SLcurses_Acs_Map['u'] = '+';
361
       SLcurses_Acs_Map[SLSMG_VLINE_CHAR] = '|';
386
       SLcurses_Acs_Map['x'] = '|';
362
       SLcurses_Acs_Map[SLSMG_HLINE_CHAR] = '-';
387
       SLcurses_Acs_Map['q'] = '-';
363
       SLcurses_Acs_Map[SLSMG_PLUS_CHAR] = '+';
388
       SLcurses_Acs_Map['n'] = '+';
364
       SLcurses_Acs_Map[SLSMG_CKBRD_CHAR] = '#';
389
       SLcurses_Acs_Map['a'] = '#';
365
     }
390
     }
366
367
   return SLcurses_Stdscr;
368
}
391
}
369
392
370
int SLcurses_wattrset (SLcurses_Window_Type *w, SLtt_Char_Type ch)
393
int SLcurses_wattrset (SLcurses_Window_Type *w, SLtt_Char_Type ch)
(-)slang-1.4.5/src/slcurses.h.acs (-12 / +13 lines)
Lines 141-146 Link Here
141
141
142
extern int SLcurses_nodelay (SLcurses_Window_Type *, int);
142
extern int SLcurses_nodelay (SLcurses_Window_Type *, int);
143
extern SLcurses_Window_Type *SLcurses_initscr (void);
143
extern SLcurses_Window_Type *SLcurses_initscr (void);
144
extern void SLcurses_init_acs_map (void);
144
#define initscr SLcurses_initscr
145
#define initscr SLcurses_initscr
145
146
146
extern int SLcurses_cbreak (void);
147
extern int SLcurses_cbreak (void);
Lines 222-242 Link Here
222
extern SLtt_Char_Type SLcurses_Acs_Map [128];
222
extern SLtt_Char_Type SLcurses_Acs_Map [128];
223
#define acs_map SLcurses_Acs_Map
223
#define acs_map SLcurses_Acs_Map
224
224
225
#define ACS_ULCORNER (acs_map[SLSMG_ULCORN_CHAR])
225
#define ACS_ULCORNER SLSMG_ULCORN_CHAR
226
#define ACS_URCORNER (acs_map[SLSMG_URCORN_CHAR])
226
#define ACS_URCORNER SLSMG_URCORN_CHAR
227
#define ACS_LRCORNER (acs_map[SLSMG_LRCORN_CHAR])
227
#define ACS_LRCORNER SLSMG_LRCORN_CHAR
228
#define ACS_LLCORNER (acs_map[SLSMG_LLCORN_CHAR])
228
#define ACS_LLCORNER SLSMG_LLCORN_CHAR
229
#define ACS_TTEE (acs_map[SLSMG_UTEE_CHAR])
229
#define ACS_TTEE SLSMG_UTEE_CHAR
230
#define ACS_LTEE (acs_map[SLSMG_LTEE_CHAR])
230
#define ACS_LTEE SLSMG_LTEE_CHAR
231
#define ACS_RTEE (acs_map[SLSMG_RTEE_CHAR])
231
#define ACS_RTEE SLSMG_RTEE_CHAR
232
#define ACS_BTEE (acs_map[SLSMG_DTEE_CHAR])
232
#define ACS_BTEE SLSMG_DTEE_CHAR
233
#define ACS_PLUS (acs_map[SLSMG_PLUS_CHAR])
233
#define ACS_PLUS SLSMG_PLUS_CHAR
234
#define ACS_VLINE (acs_map[SLSMG_VLINE_CHAR])
234
#define ACS_VLINE SLSMG_VLINE_CHAR
235
#define ACS_HLINE (acs_map[SLSMG_HLINE_CHAR])
235
#define ACS_HLINE SLSMG_HLINE_CHAR
236
#define ACS_S1		'-'
236
#define ACS_S1		'-'
237
#define ACS_S9		'-'
237
#define ACS_S9		'-'
238
#define ACS_DIAMOND		'&'
238
#define ACS_DIAMOND		'&'
239
#define ACS_CKBOARD		(acs_map[SLSMG_CKBRD_CHAR])
239
#define ACS_CKBOARD		SLSMG_CKBRD_CHAR
240
#define ACS_DEGREE		'o'
240
#define ACS_DEGREE		'o'
241
#define ACS_PLMINUS		'+'
241
#define ACS_PLMINUS		'+'
242
#define ACS_BULLET		'*'
242
#define ACS_BULLET		'*'
(-)slang-1.4.5/src/slsmg.c.acs (-13 / +37 lines)
Lines 10-15 Link Here
10
10
11
#include "slang.h"
11
#include "slang.h"
12
#include "_slang.h"
12
#include "_slang.h"
13
#include "slcurses.h"
14
15
#include <locale.h>
13
16
14
typedef struct Screen_Type
17
typedef struct Screen_Type
15
  {
18
  {
Lines 44-52 Link Here
44
					*/
47
					*/
45
48
46
#ifndef IBMPC_SYSTEM
49
#ifndef IBMPC_SYSTEM
47
#define ALT_CHAR_FLAG 0x80
50
static int ALT_CHAR_FLAG=0x80;
48
#else
51
#else
49
#define ALT_CHAR_FLAG 0x00
52
static int ALT_CHAR_FLAG=0x00;
50
#endif
53
#endif
51
54
52
#if SLTT_HAS_NON_BCE_SUPPORT && !defined(IBMPC_SYSTEM)
55
#if SLTT_HAS_NON_BCE_SUPPORT && !defined(IBMPC_SYSTEM)
Lines 54-59 Link Here
54
static int Bce_Color_Offset;
57
static int Bce_Color_Offset;
55
#endif
58
#endif
56
59
60
int SLsmg_Is_Unicode = 0;
61
int SLsmg_Setlocale = 1;
57
int SLsmg_Newline_Behavior = 0;
62
int SLsmg_Newline_Behavior = 0;
58
int SLsmg_Backspace_Moves = 0;
63
int SLsmg_Backspace_Moves = 0;
59
/* Backward compatibility. Not used. */
64
/* Backward compatibility. Not used. */
Lines 184-189 Link Here
184
     return;/* alt chars not used and the alt bit
189
     return;/* alt chars not used and the alt bit
185
	     * is used to indicate a blink.
190
	     * is used to indicate a blink.
186
	     */
191
	     */
192
   if (SLsmg_Is_Unicode)
193
       ALT_CHAR_FLAG=0x00;
187
194
188
   if (i) This_Alt_Char = ALT_CHAR_FLAG;
195
   if (i) This_Alt_Char = ALT_CHAR_FLAG;
189
   else This_Alt_Char = 0;
196
   else This_Alt_Char = 0;
Lines 348-353 Link Here
348
#ifndef IBMPC_SYSTEM
355
#ifndef IBMPC_SYSTEM
349
   int alt_char_set_flag;
356
   int alt_char_set_flag;
350
357
358
   if (SLsmg_Is_Unicode)
359
     ALT_CHAR_FLAG = 0x00;
351
   alt_char_set_flag = ((This_Color & ALT_CHAR_FLAG)
360
   alt_char_set_flag = ((This_Color & ALT_CHAR_FLAG)
352
			&& ((tt_Use_Blink_For_ACS == NULL)
361
			&& ((tt_Use_Blink_For_ACS == NULL)
353
			    || (*tt_Use_Blink_For_ACS == 0)));
362
			    || (*tt_Use_Blink_For_ACS == 0)));
Lines 1221-1226 Link Here
1221
   Smg_Inited = 0;
1230
   Smg_Inited = 0;
1222
}
1231
}
1223
1232
1233
static void SLsmg_check_unicode(void)
1234
{
1235
    char *s,*t;
1236
    
1237
    if (SLsmg_Setlocale)
1238
		s = setlocale(LC_ALL, "");
1239
    else
1240
		s = setlocale(LC_ALL, NULL);
1241
    if (s && (strstr(s,"UTF-8") || strstr(s,"utf8"))) {
1242
	    SLsmg_Is_Unicode = 1;
1243
	    return;
1244
    }
1245
    SLsmg_Is_Unicode = 0;
1246
}
1224
1247
1225
static int init_smg (void)
1248
static int init_smg (void)
1226
{
1249
{
Lines 1242-1247 Link Here
1242
   This_Col = This_Row = Start_Col = Start_Row = 0;
1265
   This_Col = This_Row = Start_Col = Start_Row = 0;
1243
1266
1244
   This_Alt_Char = 0;
1267
   This_Alt_Char = 0;
1268
   SLsmg_check_unicode ();
1269
   SLcurses_init_acs_map ();
1245
   SLsmg_set_color (0);
1270
   SLsmg_set_color (0);
1246
   Cls_Flag = 1;
1271
   Cls_Flag = 1;
1247
#ifndef IBMPC_SYSTEM
1272
#ifndef IBMPC_SYSTEM
Lines 1386-1392 Link Here
1386
     }
1411
     }
1387
}
1412
}
1388
1413
1414
#ifdef UTF8
1415
void SLsmg_draw_object (int r, int c, SLsmg_Char_Type object)
1416
#else
1389
void SLsmg_draw_object (int r, int c, unsigned char object)
1417
void SLsmg_draw_object (int r, int c, unsigned char object)
1418
#endif
1390
{
1419
{
1391
   This_Row = r;  This_Col = c;
1420
   This_Row = r;  This_Col = c;
1392
1421
Lines 1405-1411 Link Here
1405
1434
1406
void SLsmg_draw_hline (unsigned int n)
1435
void SLsmg_draw_hline (unsigned int n)
1407
{
1436
{
1408
   static unsigned char hbuf[16];
1437
   SLsmg_Char_Type ch = SLSMG_HLINE_CHAR;
1409
   int count;
1438
   int count;
1410
   int cmin, cmax;
1439
   int cmin, cmax;
1411
   int final_col = This_Col + (int) n;
1440
   int final_col = This_Col + (int) n;
Lines 1421-1431 Link Here
1421
	return;
1450
	return;
1422
     }
1451
     }
1423
1452
1424
   if (hbuf[0] == 0)
1425
     {
1426
	SLMEMSET ((char *) hbuf, SLSMG_HLINE_CHAR, 16);
1427
     }
1428
1429
   n = (unsigned int)(cmax - cmin);
1453
   n = (unsigned int)(cmax - cmin);
1430
   count = n / 16;
1454
   count = n / 16;
1431
1455
Lines 1433-1442 Link Here
1433
   This_Color |= ALT_CHAR_FLAG;
1457
   This_Color |= ALT_CHAR_FLAG;
1434
   This_Col = cmin;
1458
   This_Col = cmin;
1435
1459
1436
   SLsmg_write_nchars ((char *) hbuf, n % 16);
1460
   SLsmg_draw_object(This_Row, This_Col, ch);
1437
   while (count-- > 0)
1461
   while (n-- > 0)
1438
     {
1462
     {
1439
	SLsmg_write_nchars ((char *) hbuf, 16);
1463
	SLsmg_draw_object(This_Row, This_Col, ch);
1440
     }
1464
     }
1441
1465
1442
   This_Color = save_color;
1466
   This_Color = save_color;
Lines 1445-1451 Link Here
1445
1469
1446
void SLsmg_draw_vline (int n)
1470
void SLsmg_draw_vline (int n)
1447
{
1471
{
1448
   unsigned char ch = SLSMG_VLINE_CHAR;
1472
   SLsmg_Char_Type ch = SLSMG_VLINE_CHAR;
1449
   int c = This_Col, rmin, rmax;
1473
   int c = This_Col, rmin, rmax;
1450
   int final_row = This_Row + n;
1474
   int final_row = This_Row + n;
1451
   int save_color;
1475
   int save_color;
Lines 1466-1472 Link Here
1466
   for (This_Row = rmin; This_Row < rmax; This_Row++)
1490
   for (This_Row = rmin; This_Row < rmax; This_Row++)
1467
     {
1491
     {
1468
	This_Col = c;
1492
	This_Col = c;
1469
	SLsmg_write_nchars ((char *) &ch, 1);
1493
	SLsmg_draw_object (This_Row, This_Col, ch);
1470
     }
1494
     }
1471
1495
1472
   This_Col = c;  This_Row = final_row;
1496
   This_Col = c;  This_Row = final_row;

Return to bug 47675