#include <spice/macros.h>
#include <spice/qxl_dev.h>
-#include <gdk/gdkkeysyms.h>
-
#include "event_loop.h"
#include "translations.h"
vt->utf_char = (vt->utf_char << 6) | (c & 0x3f);
vt->utf_count--;
if (vt->utf_count == 0) {
- tc = vt->utf_char;
+ if (vt->utf_char <= G_MAXUINT16) {
+ tc = vt->utf_char;
+ } else {
+ tc = 0;
+ }
} else {
continue;
}
fprintf(stderr, " --addr <addr> Bind to address <addr>\n");
fprintf(stderr, " --sasl Enable SASL based authentication\n");
fprintf(stderr, " --noauth Disable authentication\n");
+ fprintf(stderr, " --keymap Spefify keymap (uses kvm keymap files)\n");
}
int
.sasl = FALSE,
};
- g_thread_init(NULL);
-
- static struct option long_options[] = {
+ static struct option long_options[] = {
{ "timeout", required_argument, 0, 't' },
{ "authpath", required_argument, 0, 'A' },
{ "permissions", required_argument, 0, 'P' },
{ "port", required_argument, 0, 'p' },
{ "addr", required_argument, 0, 'a' },
+ { "keymap", required_argument, 0, 'k' },
{ "noauth", no_argument, 0, 'n' },
{ "sasl", no_argument, 0, 's' },
{ NULL, 0, 0, 0 },
};
- while ((c = getopt_long(argc, argv, "nst:a:p:P:", long_options, NULL)) != -1) {
+ while ((c = getopt_long(argc, argv, "nkst:a:p:P:", long_options, NULL)) != -1) {
switch (c) {
case 'n':
case 's':
opts.sasl = TRUE;
break;
+ case 'k':
+ opts.keymap = optarg;
+ break;
case 'A':
pve_auth_set_path(optarg);
break;
}
if (optind < argc) {
- command = argv[optind+1];
- cmdargv = &argv[optind+1];
+ command = argv[optind];
+ cmdargv = &argv[optind];
}
-
+
spiceTerm *vt = spiceterm_create(744, 400, &opts);
+ if (!vt)
+ exit(-1);
setlocale(LC_ALL, ""); // set from environment