caps.c 13.4 KB
Newer Older
Nalin Dahyabhai's avatar
Nalin Dahyabhai committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
/*
 * Copyright (C) 2001,2002 Red Hat, Inc.
 *
 * This is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Library General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#ident "$Id$"
#include "../config.h"
#include <stdlib.h>
#include <glib.h>
#include "caps.h"

25 26 27 28 29 30
#define ESC _VTE_CAP_ESC
#define CSI _VTE_CAP_CSI
#define ST  _VTE_CAP_ST
#define OSC _VTE_CAP_OSC
#define PM  _VTE_CAP_PM
#define APC _VTE_CAP_APC
Nalin Dahyabhai's avatar
Nalin Dahyabhai committed
31

32
#define ENQ ""
Nalin Dahyabhai's avatar
Nalin Dahyabhai committed
33 34 35 36 37 38 39 40 41 42 43 44
#define BEL ""
#define BS  ""
#define TAB "	"
#define LF  "\n"
#define VT  ""
#define FF  ""
#define CR  "\r"
#define SO  ""
#define SI  ""

/* This list combined from the Linux termcap(5) man page, and
 * termcap_&_terminfo by Strang, Mui, and O'Reilly. */
45
struct _vte_capability_quark _vte_terminal_capability_strings[] = {
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 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332
	{"!1", TRUE, 0},
	{"!2", TRUE, 0},
	{"!3", TRUE, 0},

	{"#1", TRUE, 0},
	{"#2", TRUE, 0},
	{"#3", TRUE, 0},
	{"#4", TRUE, 0},

	{"%0", TRUE, 0},
	{"%1", TRUE, 0},
	{"%2", TRUE, 0},
	{"%3", TRUE, 0},
	{"%4", TRUE, 0},
	{"%5", TRUE, 0},
	{"%6", TRUE, 0},
	{"%7", TRUE, 0},
	{"%8", TRUE, 0},
	{"%9", TRUE, 0},
	{"%a", TRUE, 0},
	{"%b", TRUE, 0},
	{"%c", TRUE, 0},
	{"%d", TRUE, 0},
	{"%e", TRUE, 0},
	{"%f", TRUE, 0},
	{"%g", TRUE, 0},
	{"%h", TRUE, 0},
	{"%i", TRUE, 0},
	{"%j", TRUE, 0},

	{"&0", TRUE, 0},
	{"&1", TRUE, 0},
	{"&2", TRUE, 0},
	{"&3", TRUE, 0},
	{"&4", TRUE, 0},
	{"&5", TRUE, 0},
	{"&6", TRUE, 0},
	{"&7", TRUE, 0},
	{"&8", TRUE, 0},
	{"&9", TRUE, 0},

	{"*0", TRUE, 0},
	{"*1", TRUE, 0},
	{"*2", TRUE, 0},
	{"*3", TRUE, 0},
	{"*4", TRUE, 0},
	{"*5", TRUE, 0},
	{"*6", TRUE, 0},
	{"*7", TRUE, 0},
	{"*8", TRUE, 0},
	{"*9", TRUE, 0},

	{"@0", TRUE, 0},
	{"@1", TRUE, 0},
	{"@2", TRUE, 0},
	{"@3", TRUE, 0},
	{"@4", TRUE, 0},
	{"@5", TRUE, 0},
	{"@6", TRUE, 0},
	{"@7", TRUE, 0},
	{"@8", TRUE, 0},
	{"@9", TRUE, 0},

	{"ae", FALSE, 0},
	{"al", FALSE, 0},
	{"AL", FALSE, 0},
	{"as", FALSE, 0},

	{"bc", FALSE, 0},
	{"bl", FALSE, 0},
	{"bt", FALSE, 0},

	{"cb", FALSE, 0},
	{"cc", FALSE, 0},
	{"cd", FALSE, 0},
	{"ce", FALSE, 0},
	{"ch", FALSE, 0},
	{"cl", FALSE, 0},
	{"cm", FALSE, 0},
	{"CM", FALSE, 0},
	{"cr", FALSE, 0},
	{"cs", FALSE, 0},
	{"ct", FALSE, 0},
	{"cv", FALSE, 0},

	{"dc", FALSE, 0},
	{"DC", FALSE, 0},
	{"dl", FALSE, 0},
	{"DL", FALSE, 0},
	{"dm", FALSE, 0},
	{"do", FALSE, 0},
	{"DO", FALSE, 0},
	{"ds", FALSE, 0},

	{"eA", FALSE, 0},
	{"ec", FALSE, 0},
	{"ed", FALSE, 0},
	{"ei", FALSE, 0},

	{"F1", TRUE, 0},
	{"F2", TRUE, 0},
	{"F3", TRUE, 0},
	{"F4", TRUE, 0},
	{"F5", TRUE, 0},
	{"F6", TRUE, 0},
	{"F7", TRUE, 0},
	{"F8", TRUE, 0},
	{"F9", TRUE, 0},
	{"FA", TRUE, 0},
	{"FB", TRUE, 0},
	{"FC", TRUE, 0},
	{"FD", TRUE, 0},
	{"FE", TRUE, 0},
	{"FF", TRUE, 0},
	{"FG", TRUE, 0},
	{"FH", TRUE, 0},
	{"FI", TRUE, 0},
	{"FJ", TRUE, 0},
	{"FK", TRUE, 0},
	{"FL", TRUE, 0},
	{"FM", TRUE, 0},
	{"FN", TRUE, 0},
	{"FO", TRUE, 0},
	{"FP", TRUE, 0},
	{"FQ", TRUE, 0},
	{"FR", TRUE, 0},
	{"FS", TRUE, 0},
	{"FT", TRUE, 0},
	{"FU", TRUE, 0},
	{"FV", TRUE, 0},
	{"FW", TRUE, 0},
	{"FX", TRUE, 0},
	{"FY", TRUE, 0},
	{"FZ", TRUE, 0},

	{"Fa", TRUE, 0},
	{"Fb", TRUE, 0},
	{"Fc", TRUE, 0},
	{"Fd", TRUE, 0},
	{"Fe", TRUE, 0},
	{"Ff", TRUE, 0},
	{"Fg", TRUE, 0},
	{"Fh", TRUE, 0},
	{"Fi", TRUE, 0},
	{"Fj", TRUE, 0},
	{"Fk", TRUE, 0},
	{"Fl", TRUE, 0},
	{"Fm", TRUE, 0},
	{"Fn", TRUE, 0},
	{"Fo", TRUE, 0},
	{"Fp", TRUE, 0},
	{"Fq", TRUE, 0},
	{"Fr", TRUE, 0},

	{"ff", FALSE, 0},
	{"fs", FALSE, 0},

	{"hd", FALSE, 0},
	{"ho", FALSE, 0},
	{"hu", FALSE, 0},

	{"i1", FALSE, 0},
	{"i3", FALSE, 0},

	{"ic", FALSE, 0},
	{"IC", FALSE, 0},
	{"if", FALSE, 0},
	{"im", FALSE, 0},
	{"ip", FALSE, 0},
	{"iP", FALSE, 0},
	{"is", FALSE, 0},

	{"K1", TRUE, 0},
	{"K2", TRUE, 0},
	{"K3", TRUE, 0},
	{"K4", TRUE, 0},
	{"K5", TRUE, 0},

	{"k0", TRUE, 0},
	{"k1", TRUE, 0},
	{"k2", TRUE, 0},
	{"k3", TRUE, 0},
	{"k4", TRUE, 0},
	{"k5", TRUE, 0},
	{"k6", TRUE, 0},
	{"k7", TRUE, 0},
	{"k8", TRUE, 0},
	{"k9", TRUE, 0},
	{"k;", TRUE, 0},
	{"ka", TRUE, 0},
	{"kA", TRUE, 0},
	{"kb", TRUE, 0},
	{"kB", TRUE, 0},
	{"kC", TRUE, 0},
	{"kd", TRUE, 0},
	{"kD", TRUE, 0},
	{"ke", TRUE, 0},
	{"kE", TRUE, 0},
	{"kF", TRUE, 0},
	{"kh", TRUE, 0},
	{"kH", TRUE, 0},
	{"kI", TRUE, 0},
	{"kl", TRUE, 0},
	{"kL", TRUE, 0},
	{"kM", TRUE, 0},
	{"kN", TRUE, 0},
	{"kP", TRUE, 0},
	{"kr", TRUE, 0},
	{"kR", TRUE, 0},
	{"ks", TRUE, 0},
	{"kS", TRUE, 0},
	{"kt", TRUE, 0},
	{"kT", TRUE, 0},
	{"ku", TRUE, 0},

	{"l0", FALSE, 0},
	{"l1", FALSE, 0},
	{"l2", FALSE, 0},
	{"l3", FALSE, 0},
	{"l4", FALSE, 0},
	{"l5", FALSE, 0},
	{"l6", FALSE, 0},
	{"l7", FALSE, 0},
	{"l8", FALSE, 0},
	{"l9", FALSE, 0},

	{"la", FALSE, 0},
	{"le", FALSE, 0},
	{"LE", FALSE, 0},
	{"LF", FALSE, 0},
	{"ll", FALSE, 0},
	{"LO", FALSE, 0},

	{"mb", FALSE, 0},
	{"MC", FALSE, 0},
	{"md", FALSE, 0},
	{"me", FALSE, 0},
	{"mh", FALSE, 0},
	{"mk", FALSE, 0},
	{"ml", FALSE, 0},
	{"ML", FALSE, 0},
	{"mm", FALSE, 0},
	{"mo", FALSE, 0},
	{"mp", FALSE, 0},
	{"mr", FALSE, 0},
	{"MR", FALSE, 0},
	{"mu", FALSE, 0},

	{"nd", FALSE, 0},
	{"nl", FALSE, 0},
	{"nw", FALSE, 0},

	{"pc", FALSE, 0},
	{"pf", FALSE, 0},
	{"pk", FALSE, 0},
	{"pl", FALSE, 0},
	{"pn", FALSE, 0},
	{"po", FALSE, 0},
	{"pO", FALSE, 0},
	{"ps", FALSE, 0},
	{"px", FALSE, 0},

	{"r1", FALSE, 0},
	{"r2", FALSE, 0},
	{"r3", FALSE, 0},

	{"RA", FALSE, 0},
	{"rc", FALSE, 0},
	{"rf", FALSE, 0},
	{"RF", FALSE, 0},
	{"RI", FALSE, 0},
	{"rp", FALSE, 0},
	{"rP", FALSE, 0},
	{"rs", FALSE, 0},
	{"RX", FALSE, 0},

	{"s0", FALSE, 0},
	{"s1", FALSE, 0},
	{"s2", FALSE, 0},
	{"s3", FALSE, 0},

	{"sa", FALSE, 0},
	{"SA", FALSE, 0},
	{"sc", FALSE, 0},
	{"se", FALSE, 0},
	{"sf", FALSE, 0},
	{"SF", FALSE, 0},
Nalin Dahyabhai's avatar
Nalin Dahyabhai committed
333
	/* {"so", 0}, standout is always the same as another attribute. */
334 335 336 337
	{"sr", FALSE, 0},
	{"SR", FALSE, 0},
	{"st", FALSE, 0},
	{"SX", FALSE, 0},
Nalin Dahyabhai's avatar
Nalin Dahyabhai committed
338

339
	{"ta", FALSE, 0},
340 341
	/* {"te", 0}, terminal end-use is "logical". */
	/* {"ti", 0}, terminal init is "logical". */
342
	{"ts", FALSE, 0},
Nalin Dahyabhai's avatar
Nalin Dahyabhai committed
343

344 345 346 347 348
	{"uc", FALSE, 0},
	{"ue", FALSE, 0},
	{"up", FALSE, 0},
	{"UP", FALSE, 0},
	{"us", FALSE, 0},
Nalin Dahyabhai's avatar
Nalin Dahyabhai committed
349

350
	{"vb", FALSE, 0},
351 352 353
	/* {"ve", FALSE, 0}, */
	{"vi", FALSE, 0},
	/* {"vs", FALSE, 0}, */
Nalin Dahyabhai's avatar
Nalin Dahyabhai committed
354

355
	{"wi", FALSE, 0},
Nalin Dahyabhai's avatar
Nalin Dahyabhai committed
356

357 358
	{"XF", FALSE, 0},
	{"XN", FALSE, 0},
Nalin Dahyabhai's avatar
Nalin Dahyabhai committed
359

360
	{NULL, FALSE, 0},
Nalin Dahyabhai's avatar
Nalin Dahyabhai committed
361 362 363 364
};

/* From some really old XTerm docs we had at the office, and an updated
 * version at Moy, Gildea, and Dickey. */
365
struct _vte_capability_string _vte_xterm_capability_strings[] = {
366 367
	{ENQ, "return-terminal-status", 0},

368 369 370 371 372
	{ESC " F", "7-bit-controls", 0},
	{ESC " G", "8-bit-controls", 0},
	{ESC " L", "ansi-conformance-level-1", 0},
	{ESC " M", "ansi-conformance-level-2", 0},
	{ESC " N", "ansi-conformance-level-3", 0},
Nalin Dahyabhai's avatar
Nalin Dahyabhai committed
373 374 375 376 377 378
	{ESC "#3", "double-height-top-half", 0},
	{ESC "#4", "double-height-bottom-half", 0},
	{ESC "#5", "single-width", 0},
	{ESC "#6", "double-width", 0},
	{ESC "#8", "screen-alignment-test", 0},

379 380 381
	/* These are actually designate-other-coding-system from ECMA 35,
	 * but we don't support the full repertoire.  Actually, we don't
	 * know what the full repertoire looks like. */
382 383
	{ESC "%%@", "iso8859-1-character-set", 0},
	{ESC "%%G", "utf-8-character-set", 0},
Nalin Dahyabhai's avatar
Nalin Dahyabhai committed
384 385 386 387 388 389 390 391 392 393

	{ESC "7", "save-cursor", 0},
	{ESC "8", "restore-cursor", 0},
	{ESC "=", "application-keypad", 0},
	{ESC ">", "normal-keypad", 0},
	{ESC "D", "index", 0},
	{ESC "E", "next-line", 0},
	{ESC "F", "cursor-lower-left", 0},
	{ESC "H", "tab-set", 0},
	{ESC "M", "reverse-index", 0},
394 395
	/* {ESC "N", "single-shift-g2", 0}, */
	/* {ESC "O", "single-shift-g3", 0}, */
Nalin Dahyabhai's avatar
Nalin Dahyabhai committed
396
	{ESC "P%s" ESC "\\", "device-control-string", 0},
397 398 399
	{ESC "V", "start-of-guarded-area", 0},
	{ESC "W", "end-of-guarded-area", 0},
	{ESC "X", "start-of-string", 0},
Nalin Dahyabhai's avatar
Nalin Dahyabhai committed
400 401 402 403
	{ESC "Z", "return-terminal-id", 0},
	{ESC "c", "full-reset", 0},
	{ESC "l", "memory-lock", 0},
	{ESC "m", "memory-unlock", 0},
404 405 406 407 408
	/* {ESC "n", "invoke-g2-character-set", 0}, */
	/* {ESC "o", "invoke-g3-character-set", 0}, */
	/* {ESC "|", "invoke-g3-character-set-as-gr", 0}, */
	/* {ESC "}", "invoke-g2-character-set-as-gr", 0}, */
	/* {ESC "~", "invoke-g1-character-set-as-gr", 0}, */
Nalin Dahyabhai's avatar
Nalin Dahyabhai committed
409

410 411
	/* APC stuff omitted. */

Nalin Dahyabhai's avatar
Nalin Dahyabhai committed
412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427
	/* DCS stuff omitted. */

	{CSI "@", "insert-blank-characters", 0},
	{CSI "%d@", "insert-blank-characters", 0},
	{CSI "A", "cursor-up", 0},
	{CSI "%dA", "cursor-up", 0},
	{CSI "B", "cursor-down", 0},
	{CSI "%dB", "cursor-down", 0},
	{CSI "C", "cursor-forward", 0},
	{CSI "%dC", "cursor-forward", 0},
	{CSI "D", "cursor-backward", 0},
	{CSI "%dD", "cursor-backward", 0},
	{CSI "E", "cursor-next-line", 0},
	{CSI "%dE", "cursor-next-line", 0},
	{CSI "F", "cursor-preceding-line", 0},
	{CSI "%dF", "cursor-preceding-line", 0},
428 429
	{CSI "G", "cursor-character-absolute", 0},
	{CSI "%dG", "cursor-character-absolute", 0},
Nalin Dahyabhai's avatar
Nalin Dahyabhai committed
430 431 432 433
	{CSI ";H", "cursor-position", 0},
	{CSI "%d;H", "cursor-position", 0},
	{CSI ";%dH", "cursor-position", 0},
	{CSI "%d;%dH", "cursor-position", 0},
434
	{CSI "I", "cursor-forward-tabulation", 0},
Nalin Dahyabhai's avatar
Nalin Dahyabhai committed
435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466
	{CSI "J", "erase-in-display", 0},
	{CSI "%dJ", "erase-in-display", 0},
	{CSI "?J", "selective-erase-in-display", 0},
	{CSI "?%dJ", "selective-erase-in-display", 0},
	{CSI "K", "erase-in-line", 0},
	{CSI "%dK", "erase-in-line", 0},
	{CSI "?K", "selective-erase-in-line", 0},
	{CSI "?%dK", "selective-erase-in-line", 0},
	{CSI "L", "insert-lines", 0},
	{CSI "%dL", "insert-lines", 0},
	{CSI "M", "delete-lines", 0},
	{CSI "%dM", "delete-lines", 0},
	{CSI "P", "delete-characters", 0},
	{CSI "%dP", "delete-characters", 0},
	{CSI "S", "scroll-up", 0},
	{CSI "%dS", "scroll-up", 0},
	{CSI "T", "scroll-down", 0},
	{CSI "%dT", "scroll-down", 0},
	{CSI "%d;%d;%d;%d;%dT", "initiate-hilite-mouse-tracking", 0},
	{CSI "X", "erase-characters", 0},
	{CSI "%dX", "erase-characters", 0},
	{CSI "Z", "cursor-back-tab", 0},
	{CSI "%dZ", "cursor-back-tab", 0},

	{CSI "`", "character-position-absolute", 0},
	{CSI "%d`", "character-position-absolute", 0},
	{CSI "b", "repeat", 0},
	{CSI "%db", "repeat", 0},
	{CSI "c", "send-primary-device-attributes", 0},
	{CSI "%dc", "send-primary-device-attributes", 0},
	{CSI ">c", "send-secondary-device-attributes", 0},
	{CSI ">%dc", "send-secondary-device-attributes", 0},
467 468
	{CSI "=c", "send-tertiary-device-attributes", 0},
	{CSI "=%dc", "send-tertiary-device-attributes", 0},
Nalin Dahyabhai's avatar
Nalin Dahyabhai committed
469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498
	{CSI "d", "line-position-absolute", 0},
	{CSI "%dd", "line-position-absolute", 0},
	{CSI ";f", "horizontal-and-vertical-position", 0},
	{CSI "%d;f", "horizontal-and-vertical-position", 0},
	{CSI ";%df", "horizontal-and-vertical-position", 0},
	{CSI "%d;%df", "horizontal-and-vertical-position", 0},
	{CSI "g", "tab-clear", 0},
	{CSI "%dg", "tab-clear", 0},

	{CSI "h", "set-mode", 0},
	{CSI "%mh", "set-mode", 0},
	{CSI "?h", "decset", 0},
	{CSI "?%mh", "decset", 0},

	{CSI "i", "media-copy", 0},
	{CSI "%mi", "media-copy", 0},
	{CSI "?i", "dec-media-copy", 0},
	{CSI "?%mi", "dec-media-copy", 0},

	{CSI "l", "reset-mode", 0},
	{CSI "%ml", "reset-mode", 0},
	{CSI "?l", "decreset", 0},
	{CSI "?%ml", "decreset", 0},

	{CSI "m", "character-attributes", 0},
	{CSI "%mm", "character-attributes", 0},

	{CSI "%dn", "device-status-report", 0},
	{CSI "?%dn", "dec-device-status-report", 0},
	{CSI "!p", "soft-reset", 0},
499 500
	{CSI "%d;%d\"p", "set-conformance-level", 0},
	{CSI "%d\"q", "select-character-protection", 0},
501
	{CSI "r", "set-scrolling-region", 0},
Nalin Dahyabhai's avatar
Nalin Dahyabhai committed
502
	{CSI "%d;%dr", "set-scrolling-region", 0},
503
	{CSI "?r", "restore-mode", 0},
504
	{CSI "?%mr", "restore-mode", 0},
505
	{CSI "?s", "save-mode", 0},
506
	{CSI "?%ms", "save-mode", 0},
Nalin Dahyabhai's avatar
Nalin Dahyabhai committed
507

508
	{CSI "%mt", "window-manipulation", 0},
Nalin Dahyabhai's avatar
Nalin Dahyabhai committed
509

510
	{CSI "%d;%d;%d;%dw", "enable-filter-rectangle", 0},
Nalin Dahyabhai's avatar
Nalin Dahyabhai committed
511
	{CSI "%dx", "request-terminal-parameters", 0},
512 513 514
	{CSI "%d;%d'z", "enable-locator-reporting", 0},
	{CSI "%m'{", "select-locator-events", 0},
	{CSI "%d'|", "request-locator-position", 0},
Nalin Dahyabhai's avatar
Nalin Dahyabhai committed
515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535

	{OSC "0;%s" BEL, "set-icon-and-window-title", 0},
	{OSC "1;%s" BEL, "set-icon-title", 0},
	{OSC "2;%s" BEL, "set-window-title", 0},
	{OSC "3;%s" BEL, "set-xproperty", 0},
	{OSC "4;%s" BEL, "change-color", 0},
	{OSC "10;%s" BEL, "change-foreground-colors", 0},
	{OSC "11;%s" BEL, "change-background-colors", 0},
	{OSC "12;%s" BEL, "change-cursor-colors", 0},
	{OSC "13;%s" BEL, "change-mouse-cursor-foreground-colors", 0},
	{OSC "14;%s" BEL, "change-mouse-cursor-foreground-colors", 0},
	{OSC "15;%s" BEL, "change-tek-background-colors", 0},
	{OSC "16;%s" BEL, "change-tek-background-colors", 0},
	{OSC "17;%s" BEL, "change-highlight-colors", 0},
	{OSC "46;%s" BEL, "change-logfile", 0},
	{OSC "50;#%d" BEL, "change-font-number", 0},
	{OSC "50;%s" BEL, "change-font-name", 0},

	{NULL, NULL, 0},
};

536 537 538 539 540 541 542 543 544 545
/**
 * vte_capability_init:
 *
 * Initializes the vte_terminal_capability_strings and
 * vte_xterm_capability_strings structures used by the terminal.  Can
 * be called multiple times without ill effect.
 *
 * Returns: void
 */

Nalin Dahyabhai's avatar
Nalin Dahyabhai committed
546
void
547
_vte_capability_init(void)
Nalin Dahyabhai's avatar
Nalin Dahyabhai committed
548 549 550
{
	unsigned int i;
	GQuark quark;
551
	for (i = 0; i < G_N_ELEMENTS(_vte_terminal_capability_strings); i++) {
Nalin Dahyabhai's avatar
Nalin Dahyabhai committed
552
		const char *tmp;
553
		tmp = _vte_terminal_capability_strings[i].capability;
Nalin Dahyabhai's avatar
Nalin Dahyabhai committed
554 555
		if (tmp != NULL) {
			quark = g_quark_from_static_string(tmp);
556
			_vte_terminal_capability_strings[i].quark = quark;
Nalin Dahyabhai's avatar
Nalin Dahyabhai committed
557 558
		}
	}
559
	for (i = 0; i < G_N_ELEMENTS(_vte_xterm_capability_strings); i++) {
Nalin Dahyabhai's avatar
Nalin Dahyabhai committed
560
		const char *tmp;
561
		tmp = _vte_xterm_capability_strings[i].value;
Nalin Dahyabhai's avatar
Nalin Dahyabhai committed
562 563
		if (tmp != NULL) {
			quark = g_quark_from_static_string(tmp);
564
			_vte_xterm_capability_strings[i].quark = quark;
Nalin Dahyabhai's avatar
Nalin Dahyabhai committed
565 566 567
		}
	}
}