Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 93051
Collapse All | Expand All

(-)xterm-200/VTPrsTbl.c (-2 / +326 lines)
Lines 399-404 Link Here
399
CASE_PRINT,
399
CASE_PRINT,
400
};
400
};
401
401
402
Const PARSE_T take_table[] =		/* TAKE Base64 SELECTION DATA */
403
{
404
/*	NUL		SOH		STX		ETX	*/
405
CASE_TAKE_DONE,
406
CASE_TAKE_DONE,
407
CASE_TAKE_DONE,
408
CASE_TAKE_DONE,
409
/*	EOT		ENQ		ACK		BEL	*/
410
CASE_TAKE_DONE,
411
CASE_TAKE_DONE,
412
CASE_TAKE_DONE,
413
CASE_TAKE_DONE,
414
/*	BS		HT		NL		VT	*/
415
CASE_TAKE_DONE,
416
CASE_TAKE_DONE,
417
CASE_TAKE_DONE,
418
CASE_TAKE_DONE,
419
/*	NP		CR		SO		SI	*/
420
CASE_TAKE_DONE,
421
CASE_TAKE_DONE,
422
CASE_TAKE_DONE,
423
CASE_TAKE_DONE,
424
/*	DLE		DC1		DC2		DC3	*/
425
CASE_TAKE_DONE,
426
CASE_TAKE_DONE,
427
CASE_TAKE_DONE,
428
CASE_TAKE_DONE,
429
/*	DC4		NAK		SYN		ETB	*/
430
CASE_TAKE_DONE,
431
CASE_TAKE_DONE,
432
CASE_TAKE_DONE,
433
CASE_TAKE_DONE,
434
/*	CAN		EM		SUB		ESC	*/
435
CASE_TAKE_DONE,
436
CASE_TAKE_DONE,
437
CASE_TAKE_DONE,
438
CASE_TAKE_DONE,
439
/*	FS		GS		RS		US	*/
440
CASE_TAKE_DONE,
441
CASE_TAKE_DONE,
442
CASE_TAKE_DONE,
443
CASE_TAKE_DONE,
444
/*	SP		!		"		#	*/
445
CASE_TAKE_DONE,
446
CASE_TAKE_DONE,
447
CASE_TAKE_DONE,
448
CASE_TAKE_DONE,
449
/*	$		%		&		'	*/
450
CASE_TAKE_DONE,
451
CASE_TAKE_DONE,
452
CASE_TAKE_DONE,
453
CASE_TAKE_DONE,
454
/*	(		)		*		+	*/
455
CASE_TAKE_DONE,
456
CASE_TAKE_DONE,
457
CASE_TAKE_DONE,
458
CASE_TAKE,
459
/*	,		-		.		/	*/
460
CASE_TAKE_DONE,
461
CASE_TAKE_DONE,
462
CASE_TAKE_DONE,
463
CASE_TAKE,
464
/*	0		1		2		3	*/
465
CASE_TAKE,
466
CASE_TAKE,
467
CASE_TAKE,
468
CASE_TAKE,
469
/*	4		5		6		7	*/
470
CASE_TAKE,
471
CASE_TAKE,
472
CASE_TAKE,
473
CASE_TAKE,
474
/*	8		9		:		;	*/
475
CASE_TAKE,
476
CASE_TAKE,
477
CASE_TAKE_DONE,
478
CASE_TAKE_DONE,
479
/*	<		=		>		?	*/
480
CASE_TAKE_DONE,
481
CASE_IGNORE,
482
CASE_TAKE_DONE,
483
CASE_TAKE_DONE,
484
/*	@		A		B		C	*/
485
CASE_TAKE_DONE,
486
CASE_TAKE,
487
CASE_TAKE,
488
CASE_TAKE,
489
/*	D		E		F		G	*/
490
CASE_TAKE,
491
CASE_TAKE,
492
CASE_TAKE,
493
CASE_TAKE,
494
/*	H		I		J		K	*/
495
CASE_TAKE,
496
CASE_TAKE,
497
CASE_TAKE,
498
CASE_TAKE,
499
/*	L		M		N		O	*/
500
CASE_TAKE,
501
CASE_TAKE,
502
CASE_TAKE,
503
CASE_TAKE,
504
/*	P		Q		R		S	*/
505
CASE_TAKE,
506
CASE_TAKE,
507
CASE_TAKE,
508
CASE_TAKE,
509
/*	T		U		V		W	*/
510
CASE_TAKE,
511
CASE_TAKE,
512
CASE_TAKE,
513
CASE_TAKE,
514
/*	X		Y		Z		[	*/
515
CASE_TAKE,
516
CASE_TAKE,
517
CASE_TAKE,
518
CASE_TAKE_DONE,
519
/*	\		]		^		_	*/
520
CASE_TAKE_DONE,
521
CASE_TAKE_DONE,
522
CASE_TAKE_DONE,
523
CASE_TAKE_DONE,
524
/*	`		a		b		c	*/
525
CASE_TAKE_DONE,
526
CASE_TAKE,
527
CASE_TAKE,
528
CASE_TAKE,
529
/*	d		e		f		g	*/
530
CASE_TAKE,
531
CASE_TAKE,
532
CASE_TAKE,
533
CASE_TAKE,
534
/*	h		i		j		k	*/
535
CASE_TAKE,
536
CASE_TAKE,
537
CASE_TAKE,
538
CASE_TAKE,
539
/*	l		m		n		o	*/
540
CASE_TAKE,
541
CASE_TAKE,
542
CASE_TAKE,
543
CASE_TAKE,
544
/*	p		q		r		s	*/
545
CASE_TAKE,
546
CASE_TAKE,
547
CASE_TAKE,
548
CASE_TAKE,
549
/*	t		u		v		w	*/
550
CASE_TAKE,
551
CASE_TAKE,
552
CASE_TAKE,
553
CASE_TAKE,
554
/*	x		y		z		{	*/
555
CASE_TAKE,
556
CASE_TAKE,
557
CASE_TAKE,
558
CASE_TAKE_DONE,
559
/*	|		}		~		DEL	*/
560
CASE_TAKE_DONE,
561
CASE_TAKE_DONE,
562
CASE_TAKE_DONE,
563
CASE_TAKE_DONE,
564
/*      0x80            0x81            0x82            0x83    */
565
CASE_TAKE_DONE,
566
CASE_TAKE_DONE,
567
CASE_TAKE_DONE,
568
CASE_TAKE_DONE,
569
/*      0x84            0x85            0x86            0x87    */
570
CASE_TAKE_DONE,
571
CASE_TAKE_DONE,
572
CASE_TAKE_DONE,
573
CASE_TAKE_DONE,
574
/*      0x88            0x89            0x8a            0x8b    */
575
CASE_TAKE_DONE,
576
CASE_TAKE_DONE,
577
CASE_TAKE_DONE,
578
CASE_TAKE_DONE,
579
/*      0x8c            0x8d            0x8e            0x8f    */
580
CASE_TAKE_DONE,
581
CASE_TAKE_DONE,
582
CASE_TAKE_DONE,
583
CASE_TAKE_DONE,
584
/*      0x90            0x91            0x92            0x93    */
585
CASE_TAKE_DONE,
586
CASE_TAKE_DONE,
587
CASE_TAKE_DONE,
588
CASE_TAKE_DONE,
589
/*      0x94            0x95            0x96            0x97    */
590
CASE_TAKE_DONE,
591
CASE_TAKE_DONE,
592
CASE_TAKE_DONE,
593
CASE_TAKE_DONE,
594
/*      0x98            0x99            0x9a            0x9b    */
595
CASE_TAKE_DONE,
596
CASE_TAKE_DONE,
597
CASE_TAKE_DONE,
598
CASE_TAKE_DONE,
599
/*      0x9c            0x9d            0x9e            0x9f    */
600
CASE_TAKE_DONE,
601
CASE_TAKE_DONE,
602
CASE_TAKE_DONE,
603
CASE_TAKE_DONE,
604
/*      nobreakspace    exclamdown      cent            sterling        */
605
CASE_TAKE_DONE,
606
CASE_TAKE_DONE,
607
CASE_TAKE_DONE,
608
CASE_TAKE_DONE,
609
/*      currency        yen             brokenbar       section         */
610
CASE_TAKE_DONE,
611
CASE_TAKE_DONE,
612
CASE_TAKE_DONE,
613
CASE_TAKE_DONE,
614
/*      diaeresis       copyright       ordfeminine     guillemotleft   */
615
CASE_TAKE_DONE,
616
CASE_TAKE_DONE,
617
CASE_TAKE_DONE,
618
CASE_TAKE_DONE,
619
/*      notsign         hyphen          registered      macron          */
620
CASE_TAKE_DONE,
621
CASE_TAKE_DONE,
622
CASE_TAKE_DONE,
623
CASE_TAKE_DONE,
624
/*      degree          plusminus       twosuperior     threesuperior   */
625
CASE_TAKE_DONE,
626
CASE_TAKE_DONE,
627
CASE_TAKE_DONE,
628
CASE_TAKE_DONE,
629
/*      acute           mu              paragraph       periodcentered  */
630
CASE_TAKE_DONE,
631
CASE_TAKE_DONE,
632
CASE_TAKE_DONE,
633
CASE_TAKE_DONE,
634
/*      cedilla         onesuperior     masculine       guillemotright  */
635
CASE_TAKE_DONE,
636
CASE_TAKE_DONE,
637
CASE_TAKE_DONE,
638
CASE_TAKE_DONE,
639
/*      onequarter      onehalf         threequarters   questiondown    */
640
CASE_TAKE_DONE,
641
CASE_TAKE_DONE,
642
CASE_TAKE_DONE,
643
CASE_TAKE_DONE,
644
/*      Agrave          Aacute          Acircumflex     Atilde          */
645
CASE_TAKE_DONE,
646
CASE_TAKE_DONE,
647
CASE_TAKE_DONE,
648
CASE_TAKE_DONE,
649
/*      Adiaeresis      Aring           AE              Ccedilla        */
650
CASE_TAKE_DONE,
651
CASE_TAKE_DONE,
652
CASE_TAKE_DONE,
653
CASE_TAKE_DONE,
654
/*      Egrave          Eacute          Ecircumflex     Ediaeresis      */
655
CASE_TAKE_DONE,
656
CASE_TAKE_DONE,
657
CASE_TAKE_DONE,
658
CASE_TAKE_DONE,
659
/*      Igrave          Iacute          Icircumflex     Idiaeresis      */
660
CASE_TAKE_DONE,
661
CASE_TAKE_DONE,
662
CASE_TAKE_DONE,
663
CASE_TAKE_DONE,
664
/*      Eth             Ntilde          Ograve          Oacute          */
665
CASE_TAKE_DONE,
666
CASE_TAKE_DONE,
667
CASE_TAKE_DONE,
668
CASE_TAKE_DONE,
669
/*      Ocircumflex     Otilde          Odiaeresis      multiply        */
670
CASE_TAKE_DONE,
671
CASE_TAKE_DONE,
672
CASE_TAKE_DONE,
673
CASE_TAKE_DONE,
674
/*      Ooblique        Ugrave          Uacute          Ucircumflex     */
675
CASE_TAKE_DONE,
676
CASE_TAKE_DONE,
677
CASE_TAKE_DONE,
678
CASE_TAKE_DONE,
679
/*      Udiaeresis      Yacute          Thorn           ssharp          */
680
CASE_TAKE_DONE,
681
CASE_TAKE_DONE,
682
CASE_TAKE_DONE,
683
CASE_TAKE_DONE,
684
/*      agrave          aacute          acircumflex     atilde          */
685
CASE_TAKE_DONE,
686
CASE_TAKE_DONE,
687
CASE_TAKE_DONE,
688
CASE_TAKE_DONE,
689
/*      adiaeresis      aring           ae              ccedilla        */
690
CASE_TAKE_DONE,
691
CASE_TAKE_DONE,
692
CASE_TAKE_DONE,
693
CASE_TAKE_DONE,
694
/*      egrave          eacute          ecircumflex     ediaeresis      */
695
CASE_TAKE_DONE,
696
CASE_TAKE_DONE,
697
CASE_TAKE_DONE,
698
CASE_TAKE_DONE,
699
/*      igrave          iacute          icircumflex     idiaeresis      */
700
CASE_TAKE_DONE,
701
CASE_TAKE_DONE,
702
CASE_TAKE_DONE,
703
CASE_TAKE_DONE,
704
/*      eth             ntilde          ograve          oacute          */
705
CASE_TAKE_DONE,
706
CASE_TAKE_DONE,
707
CASE_TAKE_DONE,
708
CASE_TAKE_DONE,
709
/*      ocircumflex     otilde          odiaeresis      division        */
710
CASE_TAKE_DONE,
711
CASE_TAKE_DONE,
712
CASE_TAKE_DONE,
713
CASE_TAKE_DONE,
714
/*      oslash          ugrave          uacute          ucircumflex     */
715
CASE_TAKE_DONE,
716
CASE_TAKE_DONE,
717
CASE_TAKE_DONE,
718
CASE_TAKE_DONE,
719
/*      udiaeresis      yacute          thorn           ydiaeresis      */
720
CASE_TAKE_DONE,
721
CASE_TAKE_DONE,
722
CASE_TAKE_DONE,
723
CASE_TAKE_DONE
724
};
725
402
Const PARSE_T csi_table[] =		/* CSI */
726
Const PARSE_T csi_table[] =		/* CSI */
403
{
727
{
404
/*	NUL		SOH		STX		ETX	*/
728
/*	NUL		SOH		STX		ETX	*/
Lines 877-883 Link Here
877
CASE_GROUND_STATE,
1201
CASE_GROUND_STATE,
878
/*	x		y		z		{	*/
1202
/*	x		y		z		{	*/
879
CASE_DECREQTPARM,
1203
CASE_DECREQTPARM,
880
CASE_GROUND_STATE,
1204
CASE_PASTE,
881
CASE_GROUND_STATE,
1205
CASE_GROUND_STATE,
882
CASE_GROUND_STATE,
1206
CASE_GROUND_STATE,
883
/*	|		}		~		DEL	*/
1207
/*	|		}		~		DEL	*/
Lines 2774-2780 Link Here
2774
CASE_GROUND_STATE,
3098
CASE_GROUND_STATE,
2775
CASE_GROUND_STATE,
3099
CASE_GROUND_STATE,
2776
/*	P		Q		R		S	*/
3100
/*	P		Q		R		S	*/
2777
CASE_GROUND_STATE,
3101
CASE_PASTE,
2778
CASE_GROUND_STATE,
3102
CASE_GROUND_STATE,
2779
CASE_GROUND_STATE,
3103
CASE_GROUND_STATE,
2780
CASE_GROUND_STATE,
3104
CASE_GROUND_STATE,
(-)xterm-200/VTparse.def (+3 lines)
Lines 140-142 Link Here
140
CASE_DECCARA
140
CASE_DECCARA
141
CASE_DECRARA
141
CASE_DECRARA
142
CASE_CSI_STAR_STATE
142
CASE_CSI_STAR_STATE
143
CASE_PASTE
144
CASE_TAKE
145
CASE_TAKE_DONE
(-)xterm-200/VTparse.h (+4 lines)
Lines 82-87 Link Here
82
extern Const PARSE_T scrtable[];
82
extern Const PARSE_T scrtable[];
83
extern Const PARSE_T scstable[];
83
extern Const PARSE_T scstable[];
84
extern Const PARSE_T sos_table[];
84
extern Const PARSE_T sos_table[];
85
extern Const PARSE_T take_table[];
85
86
86
#if OPT_DEC_LOCATOR
87
#if OPT_DEC_LOCATOR
87
extern Const PARSE_T csi_tick_table[];
88
extern Const PARSE_T csi_tick_table[];
Lines 244-248 Link Here
244
#define CASE_DECCARA 128
245
#define CASE_DECCARA 128
245
#define CASE_DECRARA 129
246
#define CASE_DECRARA 129
246
#define CASE_CSI_STAR_STATE 130
247
#define CASE_CSI_STAR_STATE 130
248
#define CASE_PASTE 131
249
#define CASE_TAKE 132
250
#define CASE_TAKE_DONE 133
247
251
248
#endif /* included_VTparse_h */
252
#endif /* included_VTparse_h */
(-)xterm-200/button.c (-23 / +261 lines)
Lines 1174-1180 Link Here
1174
    return cutbuffer;
1174
    return cutbuffer;
1175
}
1175
}
1176
1176
1177
static void
1177
int base64_paste = 0;	/* Set if paste data should be sent as base64 */
1178
1179
void
1178
_GetSelection(Widget w,
1180
_GetSelection(Widget w,
1179
	      Time ev_time,
1181
	      Time ev_time,
1180
	      String * params,	/* selections in precedence order */
1182
	      String * params,	/* selections in precedence order */
Lines 1208-1226 Link Here
1208
	int fmt8 = 8;
1210
	int fmt8 = 8;
1209
	Atom type = XA_STRING;
1211
	Atom type = XA_STRING;
1210
	char *line;
1212
	char *line;
1213
	int x;
1214
1215
        /* Selection from X server */
1216
1217
#if OPT_WIDE_CHARS
1218
        /* Joe Allen - 2005-4-4: assume X's cut buffer is UTF-8 if
1219
           the xterm is UTF-8 */
1220
        if (term->screen.utf8_mode)
1221
            type = XA_UTF8_STRING(XtDisplay(w));
1222
#endif
1211
1223
1212
	/* 'line' is freed in SelectionReceived */
1224
	/* 'line' is freed in SelectionReceived */
1213
	line = XFetchBuffer(XtDisplay(w), &inbytes, cutbuffer);
1225
	line = XFetchBuffer(XtDisplay(w), &inbytes, cutbuffer);
1214
	nbytes = (unsigned long) inbytes;
1226
	nbytes = (unsigned long) inbytes;
1227
1215
	if (nbytes > 0)
1228
	if (nbytes > 0)
1216
	    SelectionReceived(w, NULL, &selection, &type, (XtPointer) line,
1229
	    SelectionReceived(w, NULL, &selection, &type, (XtPointer) line,
1217
			      &nbytes, &fmt8);
1230
			      &nbytes, &fmt8);
1218
	else if (num_params > 1)
1231
	else if (num_params > 1)
1219
	    _GetSelection(w, ev_time, params + 1, num_params - 1, NULL);
1232
	    _GetSelection(w, ev_time, params + 1, num_params - 1, NULL);
1233
        else
1234
            base64_paste = 0;
1220
	return;
1235
	return;
1221
    } else {
1236
    } else {
1222
	struct _SelectionList *list;
1237
	struct _SelectionList *list;
1223
1238
1239
	/* Selection owned by someone */
1240
1224
	if (targets == NULL || targets[0] == None) {
1241
	if (targets == NULL || targets[0] == None) {
1225
	    targets = _SelectionTargets(w);
1242
	    targets = _SelectionTargets(w);
1226
	}
1243
	}
Lines 1280-1288 Link Here
1280
#  define tty_vwrite(pty,lag,l)		v_write(pty,lag,l)
1297
#  define tty_vwrite(pty,lag,l)		v_write(pty,lag,l)
1281
#endif /* defined VMS */
1298
#endif /* defined VMS */
1282
1299
1300
/* Return base64 code character given 6-bit number */
1301
1302
char base64_code[]="\
1303
ABCDEFGHIJKLMNOPQRSTUVWXYZ\
1304
abcdefghijklmnopqrstuvwxyz\
1305
0123456789+/";
1306
1307
/* Be careful: _qWriteSelectionData expects these to be initialized
1308
   to zero.  Base64_flush() is the last step of the conversion, it
1309
   clears these variables. */
1310
1311
int base64_accu = 0;
1312
int base64_count = 0;
1313
int base64_pad = 0;
1314
1283
static void
1315
static void
1284
_qWriteSelectionData(TScreen * screen, Char * lag, unsigned length)
1316
_qWriteSelectionData(TScreen * screen, Char * lag, unsigned length)
1285
{
1317
{
1318
    if (base64_paste) {
1319
        /* Send data as base64 */
1320
        unsigned char *p = (unsigned char *)lag;
1321
        Char buf[64];
1322
        unsigned x = 0;
1323
        while (length--) {
1324
            switch (base64_count) {
1325
                case 0:
1326
                    buf[x++] = base64_code[*p >> 2];
1327
                    base64_accu = (*p & 0x3);
1328
                    base64_count = 2;
1329
                    ++p;
1330
                    break;
1331
                case 2:
1332
                    buf[x++] = base64_code[(base64_accu << 4) + (*p >> 4)];
1333
                    base64_accu = (*p & 0xF);
1334
                    base64_count = 4;
1335
                    ++p;
1336
                    break;
1337
                case 4:
1338
                    buf[x++] = base64_code[(base64_accu << 2) + (*p >> 6)];
1339
                    buf[x++] = base64_code[*p & 0x3F];
1340
                    base64_accu = 0;
1341
                    base64_count = 0;
1342
                    ++p;
1343
                    break;
1344
            }
1345
            if (x >= 63) {
1346
                /* Write 63 or 64 characters */
1347
                base64_pad += x;
1348
                tty_vwrite(screen->respond, buf, x);
1349
                x = 0;
1350
            }
1351
        }
1352
        if (x != 0) {
1353
            base64_pad += x;
1354
            tty_vwrite(screen->respond, buf, x);
1355
        }
1356
        return;
1357
    }
1358
1286
#if OPT_READLINE
1359
#if OPT_READLINE
1287
    if (SCREEN_FLAG(screen, paste_quotes)) {
1360
    if (SCREEN_FLAG(screen, paste_quotes)) {
1288
	while (length--) {
1361
	while (length--) {
Lines 1295-1300 Link Here
1295
}
1368
}
1296
1369
1297
static void
1370
static void
1371
base64_flush(TScreen *screen)
1372
{
1373
    unsigned char x;
1374
    switch (base64_count) {
1375
        case 0:
1376
            break;
1377
        case 2:
1378
            x = base64_code[base64_accu << 4];
1379
            tty_vwrite(screen->respond, &x, 1);
1380
            break;
1381
        case 4:
1382
            x = base64_code[base64_accu << 2];
1383
            tty_vwrite(screen->respond, &x, 1);
1384
            break;
1385
    }
1386
    if (base64_pad & 3)
1387
        tty_vwrite(screen->respond, "===", 4 - (base64_pad & 3));
1388
    base64_count = 0;
1389
    base64_accu = 0;
1390
    base64_pad = 0;
1391
}
1392
1393
static void
1298
_WriteSelectionData(TScreen * screen, Char * line, int length)
1394
_WriteSelectionData(TScreen * screen, Char * line, int length)
1299
{
1395
{
1300
    /* Write data to pty a line at a time. */
1396
    /* Write data to pty a line at a time. */
Lines 1325-1337 Link Here
1325
    if (lag != end) {
1421
    if (lag != end) {
1326
	_qWriteSelectionData(screen, lag, (unsigned) (end - lag));
1422
	_qWriteSelectionData(screen, lag, (unsigned) (end - lag));
1327
    }
1423
    }
1424
    if (base64_paste)
1425
        base64_flush(screen);
1328
#ifdef VMS
1426
#ifdef VMS
1329
    tt_pasting = False;
1427
    tt_pasting = False;
1330
    tt_start_read();		/* reenable reads or a character may be lost */
1428
    tt_start_read();		/* reenable reads or a character may be lost */
1331
#endif
1429
#endif
1332
}
1430
}
1333
1431
1334
#if OPT_READLINE
1335
static void
1432
static void
1336
_WriteKey(TScreen * screen, Char * in)
1433
_WriteKey(TScreen * screen, Char * in)
1337
{
1434
{
Lines 1350-1356 Link Here
1350
    line[count++] = '~';
1447
    line[count++] = '~';
1351
    tty_vwrite(screen->respond, line, count);
1448
    tty_vwrite(screen->respond, line, count);
1352
}
1449
}
1353
#endif /* OPT_READLINE */
1354
1450
1355
/* SelectionReceived: stuff received selection text into pty */
1451
/* SelectionReceived: stuff received selection text into pty */
1356
1452
Lines 1434-1451 Link Here
1434
    if (text_list != NULL && text_list_count != 0) {
1530
    if (text_list != NULL && text_list_count != 0) {
1435
	int i;
1531
	int i;
1436
1532
1437
#if OPT_READLINE
1533
	if (base64_paste)
1438
	if (SCREEN_FLAG(screen, paste_brackets))
1534
	    _WriteKey(screen, "202");
1535
	else if (screen->paste_brackets)
1439
	    _WriteKey(screen, "200");
1536
	    _WriteKey(screen, "200");
1440
#endif
1441
	for (i = 0; i < text_list_count; i++) {
1537
	for (i = 0; i < text_list_count; i++) {
1442
	    int len = strlen(text_list[i]);
1538
	    int len = strlen(text_list[i]);
1443
	    _WriteSelectionData(screen, (Char *) text_list[i], len);
1539
	    _WriteSelectionData(screen, (Char *) text_list[i], len);
1444
	}
1540
	}
1445
#if OPT_READLINE
1541
	if (base64_paste) {
1446
	if (SCREEN_FLAG(screen, paste_brackets))
1542
	    tty_vwrite(screen->respond, "\33", 1);
1543
	    base64_paste = 0;
1544
        }
1545
        else if (screen->paste_brackets)
1447
	    _WriteKey(screen, "201");
1546
	    _WriteKey(screen, "201");
1448
#endif
1449
	XFreeStringList(text_list);
1547
	XFreeStringList(text_list);
1450
    } else
1548
    } else
1451
	goto fail;
1549
	goto fail;
Lines 1461-1466 Link Here
1461
	_GetSelection(w, list->time,
1559
	_GetSelection(w, list->time,
1462
		      list->params, list->count, list->targets);
1560
		      list->params, list->count, list->targets);
1463
	XtFree((char *) client_data);
1561
	XtFree((char *) client_data);
1562
    } else {
1563
        base64_paste = 0;
1464
    }
1564
    }
1465
    return;
1565
    return;
1466
}
1566
}
Lines 2452-2457 Link Here
2452
    _OwnSelection(term, params, num_params);
2552
    _OwnSelection(term, params, num_params);
2453
}
2553
}
2454
2554
2555
void ClearSelectionBuffer()
2556
{
2557
    TScreen *screen = &term->screen;
2558
    screen->selection_length = 0;
2559
    base64_count = 0;
2560
}
2561
2562
void AppendStrToSelectionBuffer(Char *text,int len)
2563
{
2564
    TScreen *screen = &term->screen;
2565
    if (len != 0) {
2566
        int j = screen->selection_length + len; /* New length */
2567
        int k = j + (j >> 2) + 80; /* New size if we grow buffer: grow by ~50% */
2568
        if (j + 1 >= screen->selection_size) {
2569
            if (!screen->selection_length) {
2570
                /* New buffer */
2571
                Char *line;
2572
                if ((line = (Char *) malloc((unsigned) k)) == 0)
2573
                    SysError(ERROR_BMALLOC2);
2574
                XtFree((char *) screen->selection_data);
2575
                screen->selection_data = line;
2576
            } else {
2577
                /* Realloc buffer */
2578
                screen->selection_data = (Char *) realloc(screen->selection_data, (unsigned) k);
2579
                if (screen->selection_data == 0)
2580
                    SysError(ERROR_BMALLOC2);
2581
            }
2582
            screen->selection_size = k;
2583
        }
2584
        memcpy(screen->selection_data + screen->selection_length, text, len);
2585
        screen->selection_length += len;
2586
        screen->selection_data[screen->selection_length] = 0;
2587
    }
2588
}
2589
2590
void AppendToSelectionBuffer(unsigned c)
2591
{
2592
    int six;
2593
    Char ch;
2594
2595
    /* Decode base64 character */
2596
    if (c >= 'A' && c <= 'Z')
2597
        six = c - 'A';
2598
    else if (c >= 'a' && c <= 'z')
2599
        six = c - 'a' + 26;
2600
    else if (c >= '0' && c <= '9')
2601
        six = c - '0' + 52;
2602
    else if (c == '+')
2603
        six = 62;
2604
    else
2605
        six = 63;
2606
2607
    /* Accumulate bytes */
2608
    switch (base64_count) {
2609
        case 0:
2610
            base64_accu = six;
2611
            base64_count = 6;
2612
            break;
2613
2614
        case 2:
2615
            ch = (base64_accu << 6) + six;
2616
            base64_count = 0;
2617
            AppendStrToSelectionBuffer(&ch, 1);
2618
            break;
2619
2620
        case 4:
2621
            ch = (base64_accu << 4) + (six >> 2);
2622
            base64_accu = (six & 0x3);
2623
            base64_count = 2;
2624
            AppendStrToSelectionBuffer(&ch, 1);
2625
            break;
2626
2627
        case 6:
2628
            ch = (base64_accu << 2) + (six >> 4);
2629
            base64_accu = (six & 0xF);
2630
            base64_count = 4;
2631
            AppendStrToSelectionBuffer(&ch, 1);
2632
            break;
2633
    }
2634
}
2635
2636
extern char *select_args[]; /* in charproc.c */
2637
2638
void CompleteSelection()
2639
{
2640
    base64_count = 0;
2641
    base64_accu = 0;
2642
    _OwnSelection(term, select_args, 2);
2643
}
2644
2455
static Bool
2645
static Bool
2456
_ConvertSelectionHelper(Widget w,
2646
_ConvertSelectionHelper(Widget w,
2457
			Atom * type, XtPointer *value,
2647
			Atom * type, XtPointer *value,
Lines 2715-2723 Link Here
2715
		 */
2905
		 */
2716
		unsigned long length = termw->screen.selection_length;
2906
		unsigned long length = termw->screen.selection_length;
2717
		Char *data = termw->screen.selection_data;
2907
		Char *data = termw->screen.selection_data;
2908
#ifdef junk
2909
/* These days it's better to assume that X server's cut & paste buffers
2910
   are UTF-8 when the locale is UTF-8.
2911
    Joe Allen, 2005-04-04 */
2718
		if_OPT_WIDE_CHARS((&(termw->screen)), {
2912
		if_OPT_WIDE_CHARS((&(termw->screen)), {
2719
		    data = UTF8toLatin1(data, length, &length);
2913
		    data = UTF8toLatin1(data, length, &length);
2720
		});
2914
		});
2915
#endif
2721
		TRACE(("XStoreBuffer(%d)\n", cutbuffer));
2916
		TRACE(("XStoreBuffer(%d)\n", cutbuffer));
2722
		XStoreBuffer(XtDisplay((Widget) termw),
2917
		XStoreBuffer(XtDisplay((Widget) termw),
2723
			     (char *) data,
2918
			     (char *) data,
Lines 2885-2890 Link Here
2885
    return (result);
3080
    return (result);
2886
}
3081
}
2887
3082
3083
/* 32 + following 7-bit word:
3084
3085
   1:0  Button no: 0, 1, 2.  3=release.
3086
     2  shift
3087
     3  meta
3088
     4  ctrl
3089
     5  set for motion notify
3090
     6  set for wheel
3091
*/
3092
3093
/* Position: 32 - 255. */
3094
2888
static int
3095
static int
2889
BtnCode(XButtonEvent * event, int button)
3096
BtnCode(XButtonEvent * event, int button)
2890
{
3097
{
Lines 2904-2909 Link Here
2904
3111
2905
#define MOUSE_LIMIT (255 - 32)
3112
#define MOUSE_LIMIT (255 - 32)
2906
3113
3114
/* When screen->out_of_frame set, coordinates can go outside
3115
   of frame as follows:
3116
     Code            Coord     
3117
     ----            -----
3118
     33 - 240        1 - 208  (208 positive coordinates)
3119
     32, 255 - 241   0, -1 - -15  (16 negative coordinates)
3120
3121
   When range is exceeded, the maximum closest value is sent
3122
*/
3123
2907
static void
3124
static void
2908
EditorButton(XButtonEvent * event)
3125
EditorButton(XButtonEvent * event)
2909
{
3126
{
Lines 2923-2942 Link Here
2923
    row = (event->y - screen->border) / FontHeight(screen);
3140
    row = (event->y - screen->border) / FontHeight(screen);
2924
    col = (event->x - OriginX(screen)) / FontWidth(screen);
3141
    col = (event->x - OriginX(screen)) / FontWidth(screen);
2925
3142
2926
    /* Limit to screen dimensions */
3143
    if (screen->out_of_frame) {
2927
    if (row < 0)
3144
        if (row > 207)
2928
	row = 0;
3145
            row = 207;
2929
    else if (row > screen->max_row)
3146
        else if (row < -16)
2930
	row = screen->max_row;
3147
            row = 208;
2931
    else if (row > MOUSE_LIMIT)
3148
        else if (row == -1)
2932
	row = MOUSE_LIMIT;
3149
            row = -1;
2933
3150
        else if (row < 0)
2934
    if (col < 0)
3151
            row = 224 + row;
2935
	col = 0;
3152
2936
    else if (col > screen->max_col)
3153
        if (col > 207)
2937
	col = screen->max_col;
3154
            col = 207;
2938
    else if (col > MOUSE_LIMIT)
3155
        else if (col < -16)
2939
	col = MOUSE_LIMIT;
3156
            col = 208;
3157
        else if (col == -1)
3158
            col = -1;
3159
        else if (col < 0)
3160
            col = 224 + col;
3161
        
3162
    } else {
3163
        /* Limit to screen dimensions */
3164
        if (row < 0)
3165
            row = 0;
3166
        else if (row > screen->max_row)
3167
            row = screen->max_row;
3168
        else if (row > MOUSE_LIMIT)
3169
            row = MOUSE_LIMIT;
3170
3171
        if (col < 0)
3172
            col = 0;
3173
        else if (col > screen->max_col)
3174
            col = screen->max_col;
3175
        else if (col > MOUSE_LIMIT)
3176
            col = MOUSE_LIMIT;
3177
    }
2940
3178
2941
    /* Build key sequence starting with \E[M */
3179
    /* Build key sequence starting with \E[M */
2942
    if (screen->control_eight_bits) {
3180
    if (screen->control_eight_bits) {
(-)xterm-200/charproc.c (-10 / +78 lines)
Lines 1098-1103 Link Here
1098
1098
1099
static struct ParseState myState;
1099
static struct ParseState myState;
1100
1100
1101
extern Widget current_widget;
1102
extern XEvent *current_event;
1103
extern String *current_params;
1104
extern Cardinal *current_num_params;
1105
1106
char *select_args[]=
1107
{
1108
  "PRIMARY",
1109
  "CUT_BUFFER0",
1110
  0
1111
};
1112
1113
extern int base64_paste;
1114
1101
static Boolean
1115
static Boolean
1102
doparsing(unsigned c, struct ParseState *sp)
1116
doparsing(unsigned c, struct ParseState *sp)
1103
{
1117
{
Lines 1121-1127 Link Here
1121
1135
1122
    do {
1136
    do {
1123
#if OPT_WIDE_CHARS
1137
#if OPT_WIDE_CHARS
1124
	if (screen->wide_chars
1138
1139
        /* Feed wide characters into state machine when we're
1140
           reading in a selection */
1141
        if (sp->parsestate == take_table) {
1142
            if (c < 256)
1143
              sp->nextstate = sp->parsestate[E2A(c)];
1144
            else
1145
              sp->nextstate = CASE_TAKE;
1146
            goto just_take_it;
1147
        }
1148
1149
        /* Jhallen: this code was very very slow, so I put in the (c >= 0x300) */
1150
	if (c >= 0x300 && screen->wide_chars
1125
	    && my_wcwidth((int) c) == 0) {
1151
	    && my_wcwidth((int) c) == 0) {
1126
	    int prev, precomposed;
1152
	    int prev, precomposed;
1127
1153
Lines 1366-1371 Link Here
1366
	    string_used = 0;
1392
	    string_used = 0;
1367
	}
1393
	}
1368
1394
1395
	just_take_it:
1396
1369
	TRACE(("parse %04X -> %d %s\n", c, sp->nextstate, which_table(sp->parsestate)));
1397
	TRACE(("parse %04X -> %d %s\n", c, sp->nextstate, which_table(sp->parsestate)));
1370
1398
1371
	switch (sp->nextstate) {
1399
	switch (sp->nextstate) {
Lines 1654-1659 Link Here
1654
	    sp->parsestate = sp->groundtable;
1682
	    sp->parsestate = sp->groundtable;
1655
	    break;
1683
	    break;
1656
1684
1685
        case CASE_PASTE: {
1686
            int cmd = param[0];
1687
            TRACE(("CASE_PASTE - cut & paste\n"));
1688
            if (cmd < 2)
1689
                cmd = 0;
1690
            if (cmd == 0) {
1691
                TRACE(("CASE_PASTE - paste selection\n"));
1692
                /* Paste current selection */
1693
                base64_paste = 1; /* Tells _GetSelection data is base64 encoded */
1694
                _GetSelection(current_widget, 0, select_args, 2, NULL);
1695
                /* _GetSelection clears base64_paste */
1696
                sp->parsestate = sp->groundtable;
1697
            } else if (cmd == 2) {
1698
                TRACE(("CASE_PASTE - taking selection data\n"));
1699
                ClearSelectionBuffer();
1700
                sp->parsestate = take_table;
1701
            } else
1702
                sp->parsestate = sp->groundtable;
1703
            break;
1704
        }
1705
1706
        case CASE_TAKE: {
1707
            AppendToSelectionBuffer(c);
1708
            sp->parsestate = take_table;
1709
            break;
1710
        }
1711
1712
        case CASE_TAKE_DONE:
1713
            CompleteSelection();
1714
            sp->parsestate = sp->groundtable;
1715
            break;
1716
1657
	case CASE_ECH:
1717
	case CASE_ECH:
1658
	    TRACE(("CASE_ECH - erase char\n"));
1718
	    TRACE(("CASE_ECH - erase char\n"));
1659
	    /* ECH */
1719
	    /* ECH */
Lines 3877-3882 Link Here
3877
	    set_keyboard_type(keyboardIsVT220, func == bitset);
3937
	    set_keyboard_type(keyboardIsVT220, func == bitset);
3878
	    break;
3938
	    break;
3879
#endif
3939
#endif
3940
	case SET_PASTE_IN_BRACKET:
3941
	    screen->paste_brackets = (func == bitset);
3942
	    break;
3943
        case SET_OUT_OF_FRAME:
3944
            screen->out_of_frame = (func == bitset);
3945
            break;
3880
#if OPT_READLINE
3946
#if OPT_READLINE
3881
	case SET_BUTTON1_MOVE_POINT:
3947
	case SET_BUTTON1_MOVE_POINT:
3882
	    set_mouseflag(click1_moves);
3948
	    set_mouseflag(click1_moves);
Lines 3887-3895 Link Here
3887
	case SET_DBUTTON3_DELETE:
3953
	case SET_DBUTTON3_DELETE:
3888
	    set_mouseflag(dclick3_deletes);
3954
	    set_mouseflag(dclick3_deletes);
3889
	    break;
3955
	    break;
3890
	case SET_PASTE_IN_BRACKET:
3891
	    set_mouseflag(paste_brackets);
3892
	    break;
3893
	case SET_PASTE_QUOTE:
3956
	case SET_PASTE_QUOTE:
3894
	    set_mouseflag(paste_quotes);
3957
	    set_mouseflag(paste_quotes);
3895
	    break;
3958
	    break;
Lines 3993-3998 Link Here
3993
		CursorSave(termw);
4056
		CursorSave(termw);
3994
	    }
4057
	    }
3995
	    break;
4058
	    break;
4059
	case SET_PASTE_IN_BRACKET:
4060
	    DoSM(DP_PASTE_BRACKETS, screen->paste_brackets);
4061
	    break;
4062
        case SET_OUT_OF_FRAME:
4063
            DoSM(DP_OUT_OF_FRAME, screen->out_of_frame);
4064
            break;
3996
#if OPT_READLINE
4065
#if OPT_READLINE
3997
	case SET_BUTTON1_MOVE_POINT:
4066
	case SET_BUTTON1_MOVE_POINT:
3998
	    SCREEN_FLAG_save(screen, click1_moves);
4067
	    SCREEN_FLAG_save(screen, click1_moves);
Lines 4003-4011 Link Here
4003
	case SET_DBUTTON3_DELETE:
4072
	case SET_DBUTTON3_DELETE:
4004
	    SCREEN_FLAG_save(screen, dclick3_deletes);
4073
	    SCREEN_FLAG_save(screen, dclick3_deletes);
4005
	    break;
4074
	    break;
4006
	case SET_PASTE_IN_BRACKET:
4007
	    SCREEN_FLAG_save(screen, paste_brackets);
4008
	    break;
4009
	case SET_PASTE_QUOTE:
4075
	case SET_PASTE_QUOTE:
4010
	    SCREEN_FLAG_save(screen, paste_quotes);
4076
	    SCREEN_FLAG_save(screen, paste_quotes);
4011
	    break;
4077
	    break;
Lines 4156-4161 Link Here
4156
		CursorRestore(termw);
4222
		CursorRestore(termw);
4157
	    }
4223
	    }
4158
	    break;
4224
	    break;
4225
	case SET_PASTE_IN_BRACKET:
4226
	    DoRM(DP_PASTE_BRACKETS, screen->paste_brackets);
4227
	    break;
4228
        case SET_OUT_OF_FRAME:
4229
            DoRM(DP_OUT_OF_FRAME, screen->out_of_frame);
4159
#if OPT_READLINE
4230
#if OPT_READLINE
4160
	case SET_BUTTON1_MOVE_POINT:
4231
	case SET_BUTTON1_MOVE_POINT:
4161
	    SCREEN_FLAG_restore(screen, click1_moves);
4232
	    SCREEN_FLAG_restore(screen, click1_moves);
Lines 4166-4174 Link Here
4166
	case SET_DBUTTON3_DELETE:
4237
	case SET_DBUTTON3_DELETE:
4167
	    SCREEN_FLAG_restore(screen, dclick3_deletes);
4238
	    SCREEN_FLAG_restore(screen, dclick3_deletes);
4168
	    break;
4239
	    break;
4169
	case SET_PASTE_IN_BRACKET:
4170
	    SCREEN_FLAG_restore(screen, paste_brackets);
4171
	    break;
4172
	case SET_PASTE_QUOTE:
4240
	case SET_PASTE_QUOTE:
4173
	    SCREEN_FLAG_restore(screen, paste_quotes);
4241
	    SCREEN_FLAG_restore(screen, paste_quotes);
4174
	    break;
4242
	    break;
(-)xterm-200/ctlseqs.ms (+29 lines)
Lines 792-797 Link Here
792
  \*(Ps = \*1\*0\*5\*3 \(-> Set SCO function-key mode.
792
  \*(Ps = \*1\*0\*5\*3 \(-> Set SCO function-key mode.
793
  \*(Ps = \*1\*0\*6\*0 \(-> Set legacy keyboard emulation (X11R6).
793
  \*(Ps = \*1\*0\*6\*0 \(-> Set legacy keyboard emulation (X11R6).
794
  \*(Ps = \*1\*0\*6\*1 \(-> Set Sun/PC keyboard emulation of VT220 keyboard.
794
  \*(Ps = \*1\*0\*6\*1 \(-> Set Sun/PC keyboard emulation of VT220 keyboard.
795
  \*(Ps = \*2\*0\*0\*4 \(-> Set bracketed paste mode.
796
  \*(Ps = \*2\*0\*0\*7 \(-> Allow mouse coordinates beyond frame.
795
.
797
.
796
.IP \\*(Cs\\*(Pm\\*s\\*i
798
.IP \\*(Cs\\*(Pm\\*s\\*i
797
Media Copy (MC)
799
Media Copy (MC)
Lines 869-874 Link Here
869
  \*(Ps = \*1\*0\*5\*3 \(-> Reset SCO function-key mode.
871
  \*(Ps = \*1\*0\*5\*3 \(-> Reset SCO function-key mode.
870
  \*(Ps = \*1\*0\*6\*0 \(-> Reset legacy keyboard emulation (X11R6).
872
  \*(Ps = \*1\*0\*6\*0 \(-> Reset legacy keyboard emulation (X11R6).
871
  \*(Ps = \*1\*0\*6\*1 \(-> Reset Sun/PC keyboard emulation of VT220 keyboard.
873
  \*(Ps = \*1\*0\*6\*1 \(-> Reset Sun/PC keyboard emulation of VT220 keyboard.
874
  \*(Ps = \*2\*0\*0\*4 \(-> Reset bracketed paste mode.
875
  \*(Ps = \*2\*0\*0\*7 \(-> Mouse coordinates constrained within frame.
872
.
876
.
873
.IP \\*(Cs\\*(Pm\\*s\\*m
877
.IP \\*(Cs\\*(Pm\\*s\\*m
874
Character Attributes (SGR)
878
Character Attributes (SGR)
Lines 1086-1091 Link Here
1086
  \*(Pc is the character to use.
1090
  \*(Pc is the character to use.
1087
  \*(Pt\*;\*(Pl\*;\*(Pb\*;\*(Pr denotes the rectangle.
1091
  \*(Pt\*;\*(Pl\*;\*(Pb\*;\*(Pr denotes the rectangle.
1088
.
1092
.
1093
.IP \\*(Cs\\*?\\*(Ps\\*s\\*P
1094
Cut and Paste.
1095
  \*(Ps = \*1 \(-> Paste (default).  The current selection is sent to the program in Base64:
1096
ESC [ ? 202 ~ <base64-data> ESC.
1097
  \*(Ps = \*2 \(-> Select.  Give Base64 encoded selection
1098
data to Xterm.  Base64 encoded data is sent to the XTerm following this command.  The Data
1099
is terminated with a single ESC.  This data becomes the new selection, which is then
1100
available for pasting by other applications.
1101
.
1089
.IP \\*(Cs\\*(Ps\\*s\\*;\\*(Pu\\*s\\*(qu\\*z
1102
.IP \\*(Cs\\*(Ps\\*s\\*;\\*(Pu\\*s\\*(qu\\*z
1090
Enable Locator Reporting (DECELR)
1103
Enable Locator Reporting (DECELR)
1091
.br
1104
.br
Lines 1563-1568 Link Here
1563
to make the details of switching independent of the application that
1576
to make the details of switching independent of the application that
1564
requests the switch.
1577
requests the switch.
1565
.SH
1578
.SH
1579
Bracketed Paste Mode
1580
.ds RH Bracketed Paste Mode
1581
.LP
1582
When bracketed paste mode is set, pasted text is bracketed with control
1583
sequences so that the program can differentiate pasted text from typed-in
1584
text.  When bracketed paste mode is set, the program will receive: ESC [ 200 ~,
1585
followed by the pasted text, followed by ESC [ 201 ~.
1586
.SH
1566
Mouse Tracking
1587
Mouse Tracking
1567
.ds RH Mouse Tracking
1588
.ds RH Mouse Tracking
1568
.LP
1589
.LP
Lines 1592-1597 Link Here
1592
#define SET_VT200_HIGHLIGHT_MOUSE   1001
1613
#define SET_VT200_HIGHLIGHT_MOUSE   1001
1593
#define SET_BTN_EVENT_MOUSE         1002
1614
#define SET_BTN_EVENT_MOUSE         1002
1594
#define SET_ANY_EVENT_MOUSE         1003
1615
#define SET_ANY_EVENT_MOUSE         1003
1616
#define SET_OUT_OF_FRAME            2007
1595
.DE
1617
.DE
1596
.LP
1618
.LP
1597
The motion reporting modes are strictly \fIxterm\fP extensions, and are not
1619
The motion reporting modes are strictly \fIxterm\fP extensions, and are not
Lines 1605-1610 Link Here
1605
For example, \*! specifies the value 1.
1627
For example, \*! specifies the value 1.
1606
The upper left character position on the terminal is denoted as 1,1.
1628
The upper left character position on the terminal is denoted as 1,1.
1607
1629
1630
If OUT_OF_FRAME mode is enabled, and the mouse goes beyond the window frame,
1631
coordinates beyond the frame are sent to the program.  Coordinate values 1 -
1632
208 are sent as usual, as byte values between 33 and 240.  The coordinate
1633
value 0 (the first cell above or to the left of the frame) is sent as SPACE
1634
(32).  The coordinate values -15 through -1 are sent as byte values 241
1635
through 255.
1636
1608
X10 compatibility mode sends an escape sequence only on button press,
1637
X10 compatibility mode sends an escape sequence only on button press,
1609
encoding the location and the mouse button pressed.
1638
encoding the location and the mouse button pressed.
1610
It is enabled by specifying parameter 9 to DECSET.
1639
It is enabled by specifying parameter 9 to DECSET.
(-)xterm-200/misc.c (+10 lines)
Lines 228-233 Link Here
228
    return (c);
228
    return (c);
229
}
229
}
230
230
231
Widget current_widget;
232
XEvent *current_event;
233
String *current_params;
234
Cardinal *current_num_params;
235
231
/* ARGSUSED */
236
/* ARGSUSED */
232
void
237
void
233
HandleKeyPressed(Widget w GCC_UNUSED,
238
HandleKeyPressed(Widget w GCC_UNUSED,
Lines 238-246 Link Here
238
    TScreen *screen = &term->screen;
243
    TScreen *screen = &term->screen;
239
244
240
    TRACE(("Handle 7bit-key\n"));
245
    TRACE(("Handle 7bit-key\n"));
246
    current_widget = w;
247
    current_event = event;
248
    current_params = params;
249
    current_num_params = nparams;
241
#ifdef ACTIVEWINDOWINPUTONLY
250
#ifdef ACTIVEWINDOWINPUTONLY
242
    if (w == CURRENT_EMU(screen))
251
    if (w == CURRENT_EMU(screen))
243
#endif
252
#endif
253
244
	Input(&term->keyboard, screen, &event->xkey, False);
254
	Input(&term->keyboard, screen, &event->xkey, False);
245
}
255
}
246
256
(-)xterm-200/paste (+1 lines)
Line 0 Link Here
1
[?P
(-)xterm-200/ptyx.h (-1 / +4 lines)
Lines 1108-1113 Link Here
1108
#if OPT_TOOLBAR
1108
#if OPT_TOOLBAR
1109
	DP_TOOLBAR,
1109
	DP_TOOLBAR,
1110
#endif
1110
#endif
1111
	DP_PASTE_BRACKETS,
1112
	DP_OUT_OF_FRAME,
1111
	DP_LAST
1113
	DP_LAST
1112
} SaveModes;
1114
} SaveModes;
1113
1115
Lines 1269-1279 Link Here
1269
	unsigned long	event_mask;
1271
	unsigned long	event_mask;
1270
	unsigned short	send_mouse_pos;	/* user wants mouse transition  */
1272
	unsigned short	send_mouse_pos;	/* user wants mouse transition  */
1271
					/* and position information	*/
1273
					/* and position information	*/
1274
	unsigned	paste_brackets;
1275
	unsigned	out_of_frame;
1272
#if OPT_READLINE
1276
#if OPT_READLINE
1273
	unsigned	click1_moves;
1277
	unsigned	click1_moves;
1274
	unsigned	paste_moves;
1278
	unsigned	paste_moves;
1275
	unsigned	dclick3_deletes;
1279
	unsigned	dclick3_deletes;
1276
	unsigned	paste_brackets;
1277
	unsigned	paste_quotes;
1280
	unsigned	paste_quotes;
1278
	unsigned	paste_literal_nl;
1281
	unsigned	paste_literal_nl;
1279
#endif	/* OPT_READLINE */
1282
#endif	/* OPT_READLINE */
(-)xterm-200/select (+2 lines)
Line 0 Link Here
1
[?2PSGVsbG8sIHdvcmxkIQo=
2
(-)xterm-200/xcharmouse.h (+2 lines)
Lines 50-55 Link Here
50
#define SET_PASTE_IN_BRACKET        2004 /* Surround paste by escapes */
50
#define SET_PASTE_IN_BRACKET        2004 /* Surround paste by escapes */
51
#define SET_PASTE_QUOTE             2005 /* Quote each char during paste */
51
#define SET_PASTE_QUOTE             2005 /* Quote each char during paste */
52
#define SET_PASTE_LITERAL_NL        2006 /* Paste "\n" as C-j */
52
#define SET_PASTE_LITERAL_NL        2006 /* Paste "\n" as C-j */
53
#define SET_OUT_OF_FRAME            2007 /* Give mouse coords even when cursor
54
                                            is outside of frame */
53
55
54
#if OPT_DEC_LOCATOR
56
#if OPT_DEC_LOCATOR
55
57
(-)xterm-200/xterm.h (+9 lines)
Lines 603-608 Link Here
603
extern void DisownSelection (XtermWidget termw);
603
extern void DisownSelection (XtermWidget termw);
604
extern void HandleGINInput            PROTO_XT_ACTIONS_ARGS;
604
extern void HandleGINInput            PROTO_XT_ACTIONS_ARGS;
605
extern void HandleInsertSelection     PROTO_XT_ACTIONS_ARGS;
605
extern void HandleInsertSelection     PROTO_XT_ACTIONS_ARGS;
606
607
extern void _GetSelection (Widget w, Time ev_time, String *params, Cardinal num_params, Atom *targets);
608
606
extern void HandleKeyboardSelectEnd   PROTO_XT_ACTIONS_ARGS;
609
extern void HandleKeyboardSelectEnd   PROTO_XT_ACTIONS_ARGS;
607
extern void HandleKeyboardSelectStart PROTO_XT_ACTIONS_ARGS;
610
extern void HandleKeyboardSelectStart PROTO_XT_ACTIONS_ARGS;
608
extern void HandleKeyboardStartExtend PROTO_XT_ACTIONS_ARGS;
611
extern void HandleKeyboardStartExtend PROTO_XT_ACTIONS_ARGS;
Lines 630-635 Link Here
630
extern Bool iswide(int i);
633
extern Bool iswide(int i);
631
#endif
634
#endif
632
635
636
extern void ClearSelectionBuffer ();
637
extern void AppendToSelectionBuffer (unsigned c);
638
extern void CompleteSelection ();
639
633
/* charproc.c */
640
/* charproc.c */
634
extern int VTInit (void);
641
extern int VTInit (void);
635
extern int v_write (int f, Char *d, unsigned len);
642
extern int v_write (int f, Char *d, unsigned len);
Lines 1052-1055 Link Here
1052
	}
1059
	}
1053
#endif
1060
#endif
1054
1061
1062
1063
1055
#endif	/* included_xterm_h */
1064
#endif	/* included_xterm_h */

Return to bug 93051