summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--[email protected]_master/0.html1208
-rw-r--r--[email protected]_master/index.html101
-rw-r--r--[email protected]_master/stats.html89
-rw-r--r--[email protected]_master/style.css149
-rw-r--r--[email protected]_travis/0.html1208
-rw-r--r--[email protected]_travis/index.html101
-rw-r--r--[email protected]_travis/stats.html89
-rw-r--r--[email protected]_travis/style.css149
-rw-r--r--[email protected]_master/0.html1208
-rw-r--r--[email protected]_master/index.html101
-rw-r--r--[email protected]_master/stats.html89
-rw-r--r--[email protected]_master/style.css149
-rw-r--r--[email protected]_travis-ci/0.html1208
-rw-r--r--[email protected]_travis-ci/index.html101
-rw-r--r--[email protected]_travis-ci/stats.html89
-rw-r--r--[email protected]12823070d_travis-ci/style.css149
-rw-r--r--[email protected]_master/0.html1208
-rw-r--r--[email protected]_master/index.html101
-rw-r--r--[email protected]_master/stats.html89
-rw-r--r--[email protected]_master/style.css149
-rw-r--r--[email protected]_master/0.html1208
-rw-r--r--[email protected]_master/index.html101
-rw-r--r--[email protected]_master/stats.html89
-rw-r--r--[email protected]_master/style.css149
-rw-r--r--[email protected]_master/0.html1224
-rw-r--r--[email protected]_master/index.html117
-rw-r--r--[email protected]_master/stats.html105
-rw-r--r--[email protected]_master/style.css137
-rw-r--r--[email protected]_v1.25.0/0.html1224
-rw-r--r--[email protected]_v1.25.0/index.html117
-rw-r--r--[email protected]_v1.25.0/stats.html105
-rw-r--r--[email protected]_v1.25.0/style.css137
-rw-r--r--[email protected]_USE_MATE2_MACROS/0.html1224
-rw-r--r--[email protected]_USE_MATE2_MACROS/index.html117
-rw-r--r--[email protected]_USE_MATE2_MACROS/stats.html105
-rw-r--r--[email protected]_USE_MATE2_MACROS/style.css137
-rw-r--r--[email protected]_master/0.html1224
-rw-r--r--[email protected]_master/index.html117
-rw-r--r--[email protected]_master/stats.html105
-rw-r--r--[email protected]_master/style.css137
-rw-r--r--[email protected]_master/0.html1224
-rw-r--r--[email protected]_master/index.html117
-rw-r--r--[email protected]_master/stats.html105
-rw-r--r--[email protected]_master/style.css137
-rw-r--r--[email protected]_master/0.html1224
-rw-r--r--[email protected]_master/index.html117
-rw-r--r--[email protected]_master/stats.html105
-rw-r--r--[email protected]_master/style.css137
-rw-r--r--[email protected]_stock-icon/0.html1224
-rw-r--r--[email protected]_stock-icon/index.html117
-rw-r--r--2021-01-20-212148-4058-cppche[email protected]_stock-icon/stats.html105
-rw-r--r--[email protected]_stock-icon/style.css137
-rw-r--r--[email protected]_debian-ci-fix/0.html1224
-rw-r--r--[email protected]_debian-ci-fix/index.html117
-rw-r--r--[email protected]_debian-ci-fix/stats.html105
-rw-r--r--[email protected]_debian-ci-fix/style.css137
-rw-r--r--[email protected]_PACKAGE_URL/0.html1224
-rw-r--r--[email protected]_PACKAGE_URL/index.html117
-rw-r--r--[email protected]_PACKAGE_URL/stats.html105
-rw-r--r--[email protected]_PACKAGE_URL/style.css137
-rw-r--r--[email protected]_master/0.html1224
-rw-r--r--[email protected]_master/index.html117
-rw-r--r--[email protected]_master/stats.html105
-rw-r--r--[email protected]_master/style.css137
-rw-r--r--[email protected]_master/0.html1224
-rw-r--r--[email protected]_master/index.html117
-rw-r--r--[email protected]_master/stats.html105
-rw-r--r--[email protected]_master/style.css137
-rw-r--r--[email protected]_secondary-activate/0.html1224
-rw-r--r--[email protected]_secondary-activate/index.html117
-rw-r--r--[email protected]_secondary-activate/stats.html105
-rw-r--r--[email protected]_secondary-activate/style.css137
-rw-r--r--[email protected]_master/0.html1224
-rw-r--r--[email protected]_master/index.html117
-rw-r--r--[email protected]_master/stats.html105
-rw-r--r--[email protected]_master/style.css137
-rw-r--r--2021-03-08-213753-[email protected]_master/0.html1224
-rw-r--r--[email protected]_master/index.html117
-rw-r--r--[email protected]_master/stats.html105
-rw-r--r--[email protected]_master/style.css137
-rw-r--r--CNAME1
-rw-r--r--index.html46
82 files changed, 31491 insertions, 0 deletions
diff --git a/[email protected]_master/0.html b/[email protected]_master/0.html
new file mode 100644
index 0000000..dfb584a
--- /dev/null
+++ b/[email protected]_master/0.html
@@ -0,0 +1,1208 @@
+
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Cppcheck - HTML report - mate-indicator-applet</title>
+ <link rel="stylesheet" href="style.css">
+ <style>
+.highlight .hll { background-color: #ffffcc }
+.highlight { background: #ffffff; }
+.highlight .c { color: #888888 } /* Comment */
+.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */
+.highlight .k { color: #008800; font-weight: bold } /* Keyword */
+.highlight .o { color: #333333 } /* Operator */
+.highlight .ch { color: #888888 } /* Comment.Hashbang */
+.highlight .cm { color: #888888 } /* Comment.Multiline */
+.highlight .cp { color: #557799 } /* Comment.Preproc */
+.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
+.highlight .c1 { color: #888888 } /* Comment.Single */
+.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */
+.highlight .gd { color: #A00000 } /* Generic.Deleted */
+.highlight .ge { font-style: italic } /* Generic.Emph */
+.highlight .gr { color: #FF0000 } /* Generic.Error */
+.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.highlight .gi { color: #00A000 } /* Generic.Inserted */
+.highlight .go { color: #888888 } /* Generic.Output */
+.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
+.highlight .gs { font-weight: bold } /* Generic.Strong */
+.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.highlight .gt { color: #0044DD } /* Generic.Traceback */
+.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
+.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
+.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
+.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */
+.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
+.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */
+.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */
+.highlight .s { background-color: #fff0f0 } /* Literal.String */
+.highlight .na { color: #0000CC } /* Name.Attribute */
+.highlight .nb { color: #007020 } /* Name.Builtin */
+.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */
+.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
+.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
+.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */
+.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */
+.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */
+.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */
+.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
+.highlight .nt { color: #007700 } /* Name.Tag */
+.highlight .nv { color: #996633 } /* Name.Variable */
+.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */
+.highlight .w { color: #bbbbbb } /* Text.Whitespace */
+.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */
+.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */
+.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */
+.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
+.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */
+.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */
+.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */
+.highlight .sc { color: #0044DD } /* Literal.String.Char */
+.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */
+.highlight .sd { color: #DD4422 } /* Literal.String.Doc */
+.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */
+.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */
+.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */
+.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */
+.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */
+.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */
+.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */
+.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */
+.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
+.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */
+.highlight .vc { color: #336699 } /* Name.Variable.Class */
+.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */
+.highlight .vi { color: #3333BB } /* Name.Variable.Instance */
+.highlight .vm { color: #996633 } /* Name.Variable.Magic */
+.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
+ </style>
+ <script language="javascript">
+ function getStyle(el,styleProp) {
+ if (el.currentStyle)
+ var y = el.currentStyle[styleProp];
+ else if (window.getComputedStyle)
+ var y = document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);
+ return y;
+ }
+ function toggle() {
+ var el = this.expandable_content;
+ var mark = this.expandable_marker;
+ if (el.style.display == "block") {
+ el.style.display = "none";
+ mark.innerHTML = "[+]";
+ } else {
+ el.style.display = "block";
+ mark.innerHTML = "[-]";
+ }
+ }
+ function init_expandables() {
+ var elts = document.getElementsByClassName("expandable");
+ for (var i = 0; i < elts.length; i++) {
+ var el = elts[i];
+ var clickable = el.getElementsByTagName("span")[0];
+ var marker = clickable.getElementsByClassName("marker")[0];
+ var content = el.getElementsByClassName("content")[0];
+ var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right"));
+ content.style.width = width + "px";
+ clickable.expandable_content = content;
+ clickable.expandable_marker = marker;
+ clickable.onclick = toggle;
+ }
+ }
+ function set_class_display(c, st) {
+ var elements = document.querySelectorAll('.' + c),
+ len = elements.length;
+ for (i = 0; i < len; i++) {
+ elements[i].style.display = st;
+ }
+ }
+ function toggle_class_visibility(id) {
+ var box = document.getElementById(id);
+ set_class_display(id, box.checked ? '' : 'none');
+ }
+ function toggle_all(){
+ var elts = document.getElementsByTagName("input");
+ for (var i = 1; i < elts.length; i++) {
+ var el = elts[i];
+ el.checked ? el.checked=false : el.checked=true;
+ toggle_class_visibility(el.id);
+ }
+ }
+
+ </script>
+ </head>
+ <body onload="init_expandables()">
+ <div id="header">
+ <h1>Cppcheck report - mate-indicator-applet: src/eggaccelerators.c </h1>
+ </div>
+ <div id="menu" dir="rtl">
+ <p id="filename"><a href="index.html">Defects:</a> eggaccelerators.c</p>
+<a href='0.html#line-321'> duplicateExpression 321</a>
+ </div>
+ <div id="content">
+<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 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
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+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
+467
+468
+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
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527</pre></div></td><td class="code"><div class="highlight"><pre><span></span><a name="line-1"></a><span class="cm">/* eggaccelerators.c</span>
+<a name="line-2"></a><span class="cm"> * Copyright (C) 2002 Red Hat, Inc.; Copyright 1998, 2001 Tim Janik</span>
+<a name="line-3"></a><span class="cm"> * Developed by Havoc Pennington, Tim Janik</span>
+<a name="line-4"></a><span class="cm"> *</span>
+<a name="line-5"></a><span class="cm"> * This library is free software; you can redistribute it and/or</span>
+<a name="line-6"></a><span class="cm"> * modify it under the terms of the GNU Library General Public</span>
+<a name="line-7"></a><span class="cm"> * License as published by the Free Software Foundation; either</span>
+<a name="line-8"></a><span class="cm"> * version 2 of the License, or (at your option) any later version.</span>
+<a name="line-9"></a><span class="cm"> *</span>
+<a name="line-10"></a><span class="cm"> * This library is distributed in the hope that it will be useful,</span>
+<a name="line-11"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
+<a name="line-12"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span>
+<a name="line-13"></a><span class="cm"> * Library General Public License for more details.</span>
+<a name="line-14"></a><span class="cm"> *</span>
+<a name="line-15"></a><span class="cm"> * You should have received a copy of the GNU Library General Public</span>
+<a name="line-16"></a><span class="cm"> * License along with this library; if not, write to the</span>
+<a name="line-17"></a><span class="cm"> * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA</span>
+<a name="line-18"></a><span class="cm"> */</span>
+<a name="line-19"></a>
+<a name="line-20"></a><span class="cp">#include</span> <span class="cpf">&quot;eggaccelerators.h&quot;</span><span class="cp"></span>
+<a name="line-21"></a>
+<a name="line-22"></a><span class="cp">#include</span> <span class="cpf">&lt;string.h&gt;</span><span class="cp"></span>
+<a name="line-23"></a><span class="cp">#include</span> <span class="cpf">&lt;gdk/gdkx.h&gt;</span><span class="cp"></span>
+<a name="line-24"></a><span class="cp">#include</span> <span class="cpf">&lt;gdk/gdkkeysyms.h&gt;</span><span class="cp"></span>
+<a name="line-25"></a>
+<a name="line-26"></a><span class="k">enum</span>
+<a name="line-27"></a><span class="p">{</span>
+<a name="line-28"></a> <span class="n">EGG_MODMAP_ENTRY_SHIFT</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span>
+<a name="line-29"></a> <span class="n">EGG_MODMAP_ENTRY_LOCK</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span>
+<a name="line-30"></a> <span class="n">EGG_MODMAP_ENTRY_CONTROL</span> <span class="o">=</span> <span class="mi">2</span><span class="p">,</span>
+<a name="line-31"></a> <span class="n">EGG_MODMAP_ENTRY_MOD1</span> <span class="o">=</span> <span class="mi">3</span><span class="p">,</span>
+<a name="line-32"></a> <span class="n">EGG_MODMAP_ENTRY_MOD2</span> <span class="o">=</span> <span class="mi">4</span><span class="p">,</span>
+<a name="line-33"></a> <span class="n">EGG_MODMAP_ENTRY_MOD3</span> <span class="o">=</span> <span class="mi">5</span><span class="p">,</span>
+<a name="line-34"></a> <span class="n">EGG_MODMAP_ENTRY_MOD4</span> <span class="o">=</span> <span class="mi">6</span><span class="p">,</span>
+<a name="line-35"></a> <span class="n">EGG_MODMAP_ENTRY_MOD5</span> <span class="o">=</span> <span class="mi">7</span><span class="p">,</span>
+<a name="line-36"></a> <span class="n">EGG_MODMAP_ENTRY_LAST</span> <span class="o">=</span> <span class="mi">8</span>
+<a name="line-37"></a><span class="p">};</span>
+<a name="line-38"></a>
+<a name="line-39"></a><span class="cp">#define MODMAP_ENTRY_TO_MODIFIER(x) (1 &lt;&lt; (x))</span>
+<a name="line-40"></a>
+<a name="line-41"></a><span class="k">typedef</span> <span class="k">struct</span>
+<a name="line-42"></a><span class="p">{</span>
+<a name="line-43"></a> <span class="n">EggVirtualModifierType</span> <span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_LAST</span><span class="p">];</span>
+<a name="line-44"></a>
+<a name="line-45"></a><span class="p">}</span> <span class="n">EggModmap</span><span class="p">;</span>
+<a name="line-46"></a>
+<a name="line-47"></a><span class="k">const</span> <span class="n">EggModmap</span><span class="o">*</span> <span class="nf">egg_keymap_get_modmap</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">);</span>
+<a name="line-48"></a>
+<a name="line-49"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-50"></a><span class="nf">is_alt</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-51"></a><span class="p">{</span>
+<a name="line-52"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-53"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;a&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;A&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-54"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-55"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-56"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-57"></a><span class="p">}</span>
+<a name="line-58"></a>
+<a name="line-59"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-60"></a><span class="nf">is_ctl</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-61"></a><span class="p">{</span>
+<a name="line-62"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-63"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;c&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;C&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-64"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-65"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-66"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-67"></a><span class="p">}</span>
+<a name="line-68"></a>
+<a name="line-69"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-70"></a><span class="nf">is_modx</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-71"></a><span class="p">{</span>
+<a name="line-72"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-73"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;m&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;M&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-74"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;o&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;O&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-75"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;d&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;D&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-76"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">&gt;=</span> <span class="sc">&#39;1&#39;</span> <span class="o">&amp;&amp;</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">&lt;=</span> <span class="sc">&#39;5&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-77"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-78"></a><span class="p">}</span>
+<a name="line-79"></a>
+<a name="line-80"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-81"></a><span class="nf">is_ctrl</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-82"></a><span class="p">{</span>
+<a name="line-83"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-84"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;c&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;C&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-85"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-86"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-87"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-88"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-89"></a><span class="p">}</span>
+<a name="line-90"></a>
+<a name="line-91"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-92"></a><span class="nf">is_shft</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-93"></a><span class="p">{</span>
+<a name="line-94"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-95"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-96"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;h&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;H&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-97"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;f&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;F&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-98"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-99"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-100"></a><span class="p">}</span>
+<a name="line-101"></a>
+<a name="line-102"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-103"></a><span class="nf">is_shift</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-104"></a><span class="p">{</span>
+<a name="line-105"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-106"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-107"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;h&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;H&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-108"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;i&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;I&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-109"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;f&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;F&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-110"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-111"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-112"></a><span class="p">}</span>
+<a name="line-113"></a>
+<a name="line-114"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-115"></a><span class="nf">is_control</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-116"></a><span class="p">{</span>
+<a name="line-117"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-118"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;c&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;C&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-119"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;o&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;O&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-120"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;n&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;N&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-121"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-122"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-123"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;o&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;O&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-124"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-125"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">8</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-126"></a><span class="p">}</span>
+<a name="line-127"></a>
+<a name="line-128"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-129"></a><span class="nf">is_release</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-130"></a><span class="p">{</span>
+<a name="line-131"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-132"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-133"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-134"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-135"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-136"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;a&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;A&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-137"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-138"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-139"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">8</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-140"></a><span class="p">}</span>
+<a name="line-141"></a>
+<a name="line-142"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-143"></a><span class="nf">is_meta</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-144"></a><span class="p">{</span>
+<a name="line-145"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-146"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;m&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;M&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-147"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-148"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-149"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;a&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;A&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-150"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-151"></a><span class="p">}</span>
+<a name="line-152"></a>
+<a name="line-153"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-154"></a><span class="nf">is_super</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-155"></a><span class="p">{</span>
+<a name="line-156"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-157"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-158"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;u&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;U&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-159"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;p&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;P&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-160"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-161"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-162"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-163"></a><span class="p">}</span>
+<a name="line-164"></a>
+<a name="line-165"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-166"></a><span class="nf">is_hyper</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-167"></a><span class="p">{</span>
+<a name="line-168"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-169"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;h&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;H&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-170"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;y&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;Y&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-171"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;p&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;P&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-172"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-173"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-174"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-175"></a><span class="p">}</span>
+<a name="line-176"></a>
+<a name="line-177"></a><span class="cm">/**</span>
+<a name="line-178"></a><span class="cm"> * egg_accelerator_parse_virtual:</span>
+<a name="line-179"></a><span class="cm"> * @accelerator: string representing an accelerator</span>
+<a name="line-180"></a><span class="cm"> * @accelerator_key: return location for accelerator keyval</span>
+<a name="line-181"></a><span class="cm"> * @accelerator_mods: return location for accelerator modifier mask</span>
+<a name="line-182"></a><span class="cm"> *</span>
+<a name="line-183"></a><span class="cm"> * Parses a string representing a virtual accelerator. The format</span>
+<a name="line-184"></a><span class="cm"> * looks like &quot;&amp;lt;Control&amp;gt;a&quot; or &quot;&amp;lt;Shift&amp;gt;&amp;lt;Alt&amp;gt;F1&quot; or</span>
+<a name="line-185"></a><span class="cm"> * &quot;&amp;lt;Release&amp;gt;z&quot; (the last one is for key release). The parser</span>
+<a name="line-186"></a><span class="cm"> * is fairly liberal and allows lower or upper case, and also</span>
+<a name="line-187"></a><span class="cm"> * abbreviations such as &quot;&amp;lt;Ctl&amp;gt;&quot; and &quot;&amp;lt;Ctrl&amp;gt;&quot;.</span>
+<a name="line-188"></a><span class="cm"> *</span>
+<a name="line-189"></a><span class="cm"> * If the parse fails, @accelerator_key and @accelerator_mods will</span>
+<a name="line-190"></a><span class="cm"> * be set to 0 (zero) and %FALSE will be returned. If the string contains</span>
+<a name="line-191"></a><span class="cm"> * only modifiers, @accelerator_key will be set to 0 but %TRUE will be</span>
+<a name="line-192"></a><span class="cm"> * returned.</span>
+<a name="line-193"></a><span class="cm"> *</span>
+<a name="line-194"></a><span class="cm"> * The virtual vs. concrete accelerator distinction is a relic of</span>
+<a name="line-195"></a><span class="cm"> * how the X Window System works; there are modifiers Mod2-Mod5 that</span>
+<a name="line-196"></a><span class="cm"> * can represent various keyboard keys (numlock, meta, hyper, etc.),</span>
+<a name="line-197"></a><span class="cm"> * the virtual modifier represents the keyboard key, the concrete</span>
+<a name="line-198"></a><span class="cm"> * modifier the actual Mod2-Mod5 bits in the key press event.</span>
+<a name="line-199"></a><span class="cm"> *</span>
+<a name="line-200"></a><span class="cm"> * Returns: %TRUE on success.</span>
+<a name="line-201"></a><span class="cm"> */</span>
+<a name="line-202"></a><span class="n">gboolean</span>
+<a name="line-203"></a><span class="nf">egg_accelerator_parse_virtual</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">accelerator</span><span class="p">,</span>
+<a name="line-204"></a> <span class="n">guint</span> <span class="o">*</span><span class="n">accelerator_key</span><span class="p">,</span>
+<a name="line-205"></a> <span class="n">EggVirtualModifierType</span> <span class="o">*</span><span class="n">accelerator_mods</span><span class="p">)</span>
+<a name="line-206"></a><span class="p">{</span>
+<a name="line-207"></a> <span class="n">guint</span> <span class="n">keyval</span><span class="p">;</span>
+<a name="line-208"></a> <span class="n">GdkModifierType</span> <span class="n">mods</span><span class="p">;</span>
+<a name="line-209"></a> <span class="n">gint</span> <span class="n">len</span><span class="p">;</span>
+<a name="line-210"></a> <span class="n">gboolean</span> <span class="n">bad_keyval</span><span class="p">;</span>
+<a name="line-211"></a>
+<a name="line-212"></a> <span class="k">if</span> <span class="p">(</span><span class="n">accelerator_key</span><span class="p">)</span>
+<a name="line-213"></a> <span class="o">*</span><span class="n">accelerator_key</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-214"></a> <span class="k">if</span> <span class="p">(</span><span class="n">accelerator_mods</span><span class="p">)</span>
+<a name="line-215"></a> <span class="o">*</span><span class="n">accelerator_mods</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-216"></a>
+<a name="line-217"></a> <span class="n">g_return_val_if_fail</span> <span class="p">(</span><span class="n">accelerator</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">,</span> <span class="n">FALSE</span><span class="p">);</span>
+<a name="line-218"></a>
+<a name="line-219"></a> <span class="n">bad_keyval</span> <span class="o">=</span> <span class="n">FALSE</span><span class="p">;</span>
+<a name="line-220"></a>
+<a name="line-221"></a> <span class="n">keyval</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-222"></a> <span class="n">mods</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-223"></a> <span class="n">len</span> <span class="o">=</span> <span class="n">strlen</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">);</span>
+<a name="line-224"></a> <span class="k">while</span> <span class="p">(</span><span class="n">len</span><span class="p">)</span>
+<a name="line-225"></a> <span class="p">{</span>
+<a name="line-226"></a> <span class="k">if</span> <span class="p">(</span><span class="o">*</span><span class="n">accelerator</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span>
+<a name="line-227"></a> <span class="p">{</span>
+<a name="line-228"></a> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">9</span> <span class="o">&amp;&amp;</span> <span class="n">is_release</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-229"></a> <span class="p">{</span>
+<a name="line-230"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">9</span><span class="p">;</span>
+<a name="line-231"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">9</span><span class="p">;</span>
+<a name="line-232"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_RELEASE_MASK</span><span class="p">;</span>
+<a name="line-233"></a> <span class="p">}</span>
+<a name="line-234"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">9</span> <span class="o">&amp;&amp;</span> <span class="n">is_control</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-235"></a> <span class="p">{</span>
+<a name="line-236"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">9</span><span class="p">;</span>
+<a name="line-237"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">9</span><span class="p">;</span>
+<a name="line-238"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_CONTROL_MASK</span><span class="p">;</span>
+<a name="line-239"></a> <span class="p">}</span>
+<a name="line-240"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">7</span> <span class="o">&amp;&amp;</span> <span class="n">is_shift</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-241"></a> <span class="p">{</span>
+<a name="line-242"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-243"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-244"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SHIFT_MASK</span><span class="p">;</span>
+<a name="line-245"></a> <span class="p">}</span>
+<a name="line-246"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">6</span> <span class="o">&amp;&amp;</span> <span class="n">is_shft</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-247"></a> <span class="p">{</span>
+<a name="line-248"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-249"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-250"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SHIFT_MASK</span><span class="p">;</span>
+<a name="line-251"></a> <span class="p">}</span>
+<a name="line-252"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">6</span> <span class="o">&amp;&amp;</span> <span class="n">is_ctrl</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-253"></a> <span class="p">{</span>
+<a name="line-254"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-255"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-256"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_CONTROL_MASK</span><span class="p">;</span>
+<a name="line-257"></a> <span class="p">}</span>
+<a name="line-258"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">6</span> <span class="o">&amp;&amp;</span> <span class="n">is_modx</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-259"></a> <span class="p">{</span>
+<a name="line-260"></a> <span class="k">static</span> <span class="k">const</span> <span class="n">guint</span> <span class="n">mod_vals</span><span class="p">[]</span> <span class="o">=</span> <span class="p">{</span>
+<a name="line-261"></a> <span class="n">EGG_VIRTUAL_ALT_MASK</span><span class="p">,</span> <span class="n">EGG_VIRTUAL_MOD2_MASK</span><span class="p">,</span> <span class="n">EGG_VIRTUAL_MOD3_MASK</span><span class="p">,</span>
+<a name="line-262"></a> <span class="n">EGG_VIRTUAL_MOD4_MASK</span><span class="p">,</span> <span class="n">EGG_VIRTUAL_MOD5_MASK</span>
+<a name="line-263"></a> <span class="p">};</span>
+<a name="line-264"></a>
+<a name="line-265"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-266"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">4</span><span class="p">;</span>
+<a name="line-267"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">mod_vals</span><span class="p">[</span><span class="o">*</span><span class="n">accelerator</span> <span class="o">-</span> <span class="sc">&#39;1&#39;</span><span class="p">];</span>
+<a name="line-268"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">2</span><span class="p">;</span>
+<a name="line-269"></a> <span class="p">}</span>
+<a name="line-270"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">5</span> <span class="o">&amp;&amp;</span> <span class="n">is_ctl</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-271"></a> <span class="p">{</span>
+<a name="line-272"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">5</span><span class="p">;</span>
+<a name="line-273"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">5</span><span class="p">;</span>
+<a name="line-274"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_CONTROL_MASK</span><span class="p">;</span>
+<a name="line-275"></a> <span class="p">}</span>
+<a name="line-276"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">5</span> <span class="o">&amp;&amp;</span> <span class="n">is_alt</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-277"></a> <span class="p">{</span>
+<a name="line-278"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">5</span><span class="p">;</span>
+<a name="line-279"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">5</span><span class="p">;</span>
+<a name="line-280"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_ALT_MASK</span><span class="p">;</span>
+<a name="line-281"></a> <span class="p">}</span>
+<a name="line-282"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">6</span> <span class="o">&amp;&amp;</span> <span class="n">is_meta</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-283"></a> <span class="p">{</span>
+<a name="line-284"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-285"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-286"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_META_MASK</span><span class="p">;</span>
+<a name="line-287"></a> <span class="p">}</span>
+<a name="line-288"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">7</span> <span class="o">&amp;&amp;</span> <span class="n">is_hyper</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-289"></a> <span class="p">{</span>
+<a name="line-290"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-291"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-292"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_HYPER_MASK</span><span class="p">;</span>
+<a name="line-293"></a> <span class="p">}</span>
+<a name="line-294"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">7</span> <span class="o">&amp;&amp;</span> <span class="n">is_super</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-295"></a> <span class="p">{</span>
+<a name="line-296"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-297"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-298"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SUPER_MASK</span><span class="p">;</span>
+<a name="line-299"></a> <span class="p">}</span>
+<a name="line-300"></a> <span class="k">else</span>
+<a name="line-301"></a> <span class="p">{</span>
+<a name="line-302"></a> <span class="n">gchar</span> <span class="n">last_ch</span><span class="p">;</span>
+<a name="line-303"></a>
+<a name="line-304"></a> <span class="n">last_ch</span> <span class="o">=</span> <span class="o">*</span><span class="n">accelerator</span><span class="p">;</span>
+<a name="line-305"></a> <span class="k">while</span> <span class="p">(</span><span class="n">last_ch</span> <span class="o">&amp;&amp;</span> <span class="n">last_ch</span> <span class="o">!=</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">)</span>
+<a name="line-306"></a> <span class="p">{</span>
+<a name="line-307"></a> <span class="n">last_ch</span> <span class="o">=</span> <span class="o">*</span><span class="n">accelerator</span><span class="p">;</span>
+<a name="line-308"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">1</span><span class="p">;</span>
+<a name="line-309"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">1</span><span class="p">;</span>
+<a name="line-310"></a> <span class="p">}</span>
+<a name="line-311"></a> <span class="p">}</span>
+<a name="line-312"></a> <span class="p">}</span>
+<a name="line-313"></a> <span class="k">else</span>
+<a name="line-314"></a> <span class="p">{</span>
+<a name="line-315"></a> <span class="n">keyval</span> <span class="o">=</span> <span class="n">gdk_keyval_from_name</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">);</span>
+<a name="line-316"></a>
+<a name="line-317"></a> <span class="k">if</span> <span class="p">(</span><span class="n">keyval</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span>
+<a name="line-318"></a> <span class="n">bad_keyval</span> <span class="o">=</span> <span class="n">TRUE</span><span class="p">;</span>
+<a name="line-319"></a>
+<a name="line-320"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="n">len</span><span class="p">;</span>
+<a name="line-321"></a><span class="hll"> <span class="n">len</span> <span class="o">-=</span> <span class="n">len</span><span class="p">;</span><div class='verbose expandable'><span class='error2'>&lt;--- Same expression on both sides of '-='. <span class='marker'>[+]</span></span><div class='content'>Finding the same expression on both sides of an operator is suspicious and might indicate a cut and paste or logic error. Please examine this code carefully to determine if it is correct.</div></div>
+</span><a name="line-322"></a> <span class="p">}</span>
+<a name="line-323"></a> <span class="p">}</span>
+<a name="line-324"></a>
+<a name="line-325"></a> <span class="k">if</span> <span class="p">(</span><span class="n">accelerator_key</span><span class="p">)</span>
+<a name="line-326"></a> <span class="o">*</span><span class="n">accelerator_key</span> <span class="o">=</span> <span class="n">gdk_keyval_to_lower</span> <span class="p">(</span><span class="n">keyval</span><span class="p">);</span>
+<a name="line-327"></a> <span class="k">if</span> <span class="p">(</span><span class="n">accelerator_mods</span><span class="p">)</span>
+<a name="line-328"></a> <span class="o">*</span><span class="n">accelerator_mods</span> <span class="o">=</span> <span class="n">mods</span><span class="p">;</span>
+<a name="line-329"></a>
+<a name="line-330"></a> <span class="k">return</span> <span class="o">!</span><span class="n">bad_keyval</span><span class="p">;</span>
+<a name="line-331"></a><span class="p">}</span>
+<a name="line-332"></a>
+<a name="line-333"></a><span class="kt">void</span>
+<a name="line-334"></a><span class="nf">egg_keymap_resolve_virtual_modifiers</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">,</span>
+<a name="line-335"></a> <span class="n">EggVirtualModifierType</span> <span class="n">virtual_mods</span><span class="p">,</span>
+<a name="line-336"></a> <span class="n">GdkModifierType</span> <span class="o">*</span><span class="n">concrete_mods</span><span class="p">)</span>
+<a name="line-337"></a><span class="p">{</span>
+<a name="line-338"></a> <span class="n">GdkModifierType</span> <span class="n">concrete</span><span class="p">;</span>
+<a name="line-339"></a> <span class="kt">int</span> <span class="n">i</span><span class="p">;</span>
+<a name="line-340"></a> <span class="k">const</span> <span class="n">EggModmap</span> <span class="o">*</span><span class="n">modmap</span><span class="p">;</span>
+<a name="line-341"></a>
+<a name="line-342"></a> <span class="n">g_return_if_fail</span> <span class="p">(</span><span class="n">GDK_IS_KEYMAP</span> <span class="p">(</span><span class="n">keymap</span><span class="p">));</span>
+<a name="line-343"></a> <span class="n">g_return_if_fail</span> <span class="p">(</span><span class="n">concrete_mods</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-344"></a>
+<a name="line-345"></a> <span class="n">modmap</span> <span class="o">=</span> <span class="n">egg_keymap_get_modmap</span> <span class="p">(</span><span class="n">keymap</span><span class="p">);</span>
+<a name="line-346"></a>
+<a name="line-347"></a> <span class="cm">/* Not so sure about this algorithm. */</span>
+<a name="line-348"></a>
+<a name="line-349"></a> <span class="n">concrete</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-350"></a> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-351"></a> <span class="k">while</span> <span class="p">(</span><span class="n">i</span> <span class="o">&lt;</span> <span class="n">EGG_MODMAP_ENTRY_LAST</span><span class="p">)</span>
+<a name="line-352"></a> <span class="p">{</span>
+<a name="line-353"></a> <span class="k">if</span> <span class="p">(</span><span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">&amp;</span> <span class="n">virtual_mods</span><span class="p">)</span>
+<a name="line-354"></a> <span class="n">concrete</span> <span class="o">|=</span> <span class="p">(</span><span class="mi">1</span> <span class="o">&lt;&lt;</span> <span class="n">i</span><span class="p">);</span>
+<a name="line-355"></a>
+<a name="line-356"></a> <span class="o">++</span><span class="n">i</span><span class="p">;</span>
+<a name="line-357"></a> <span class="p">}</span>
+<a name="line-358"></a>
+<a name="line-359"></a> <span class="o">*</span><span class="n">concrete_mods</span> <span class="o">=</span> <span class="n">concrete</span><span class="p">;</span>
+<a name="line-360"></a><span class="p">}</span>
+<a name="line-361"></a>
+<a name="line-362"></a><span class="kt">void</span>
+<a name="line-363"></a><span class="nf">egg_keymap_virtualize_modifiers</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">,</span>
+<a name="line-364"></a> <span class="n">GdkModifierType</span> <span class="n">concrete_mods</span><span class="p">,</span>
+<a name="line-365"></a> <span class="n">EggVirtualModifierType</span> <span class="o">*</span><span class="n">virtual_mods</span><span class="p">)</span>
+<a name="line-366"></a><span class="p">{</span>
+<a name="line-367"></a> <span class="n">GdkModifierType</span> <span class="n">virtual</span><span class="p">;</span>
+<a name="line-368"></a> <span class="kt">int</span> <span class="n">i</span><span class="p">;</span>
+<a name="line-369"></a> <span class="k">const</span> <span class="n">EggModmap</span> <span class="o">*</span><span class="n">modmap</span><span class="p">;</span>
+<a name="line-370"></a>
+<a name="line-371"></a> <span class="n">g_return_if_fail</span> <span class="p">(</span><span class="n">GDK_IS_KEYMAP</span> <span class="p">(</span><span class="n">keymap</span><span class="p">));</span>
+<a name="line-372"></a> <span class="n">g_return_if_fail</span> <span class="p">(</span><span class="n">virtual_mods</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-373"></a>
+<a name="line-374"></a> <span class="n">modmap</span> <span class="o">=</span> <span class="n">egg_keymap_get_modmap</span> <span class="p">(</span><span class="n">keymap</span><span class="p">);</span>
+<a name="line-375"></a>
+<a name="line-376"></a> <span class="cm">/* Not so sure about this algorithm. */</span>
+<a name="line-377"></a>
+<a name="line-378"></a> <span class="n">virtual</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-379"></a> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-380"></a> <span class="k">while</span> <span class="p">(</span><span class="n">i</span> <span class="o">&lt;</span> <span class="n">EGG_MODMAP_ENTRY_LAST</span><span class="p">)</span>
+<a name="line-381"></a> <span class="p">{</span>
+<a name="line-382"></a> <span class="k">if</span> <span class="p">((</span><span class="mi">1</span> <span class="o">&lt;&lt;</span> <span class="n">i</span><span class="p">)</span> <span class="o">&amp;</span> <span class="n">concrete_mods</span><span class="p">)</span>
+<a name="line-383"></a> <span class="p">{</span>
+<a name="line-384"></a> <span class="n">EggVirtualModifierType</span> <span class="n">cleaned</span><span class="p">;</span>
+<a name="line-385"></a>
+<a name="line-386"></a> <span class="n">cleaned</span> <span class="o">=</span> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">&amp;</span> <span class="o">~</span><span class="p">(</span><span class="n">EGG_VIRTUAL_MOD2_MASK</span> <span class="o">|</span>
+<a name="line-387"></a> <span class="n">EGG_VIRTUAL_MOD3_MASK</span> <span class="o">|</span>
+<a name="line-388"></a> <span class="n">EGG_VIRTUAL_MOD4_MASK</span> <span class="o">|</span>
+<a name="line-389"></a> <span class="n">EGG_VIRTUAL_MOD5_MASK</span><span class="p">);</span>
+<a name="line-390"></a>
+<a name="line-391"></a> <span class="k">if</span> <span class="p">(</span><span class="n">cleaned</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">)</span>
+<a name="line-392"></a> <span class="p">{</span>
+<a name="line-393"></a> <span class="n">virtual</span> <span class="o">|=</span> <span class="n">cleaned</span><span class="p">;</span>
+<a name="line-394"></a> <span class="p">}</span>
+<a name="line-395"></a> <span class="k">else</span>
+<a name="line-396"></a> <span class="p">{</span>
+<a name="line-397"></a> <span class="cm">/* Rather than dropping mod2-&gt;mod5 if not bound,</span>
+<a name="line-398"></a><span class="cm"> * go ahead and use the concrete names</span>
+<a name="line-399"></a><span class="cm"> */</span>
+<a name="line-400"></a> <span class="n">virtual</span> <span class="o">|=</span> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">i</span><span class="p">];</span>
+<a name="line-401"></a> <span class="p">}</span>
+<a name="line-402"></a> <span class="p">}</span>
+<a name="line-403"></a>
+<a name="line-404"></a> <span class="o">++</span><span class="n">i</span><span class="p">;</span>
+<a name="line-405"></a> <span class="p">}</span>
+<a name="line-406"></a>
+<a name="line-407"></a> <span class="o">*</span><span class="n">virtual_mods</span> <span class="o">=</span> <span class="n">virtual</span><span class="p">;</span>
+<a name="line-408"></a><span class="p">}</span>
+<a name="line-409"></a>
+<a name="line-410"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-411"></a><span class="nf">reload_modmap</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">,</span>
+<a name="line-412"></a> <span class="n">EggModmap</span> <span class="o">*</span><span class="n">modmap</span><span class="p">)</span>
+<a name="line-413"></a><span class="p">{</span>
+<a name="line-414"></a> <span class="n">XModifierKeymap</span> <span class="o">*</span><span class="n">xmodmap</span><span class="p">;</span>
+<a name="line-415"></a> <span class="kt">int</span> <span class="n">map_size</span><span class="p">;</span>
+<a name="line-416"></a> <span class="kt">int</span> <span class="n">i</span><span class="p">;</span>
+<a name="line-417"></a>
+<a name="line-418"></a> <span class="cm">/* FIXME multihead */</span>
+<a name="line-419"></a> <span class="n">xmodmap</span> <span class="o">=</span> <span class="n">XGetModifierMapping</span> <span class="p">(</span><span class="n">gdk_x11_get_default_xdisplay</span> <span class="p">());</span>
+<a name="line-420"></a>
+<a name="line-421"></a> <span class="n">memset</span> <span class="p">(</span><span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="k">sizeof</span> <span class="p">(</span><span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">));</span>
+<a name="line-422"></a>
+<a name="line-423"></a> <span class="cm">/* there are 8 modifiers, and the first 3 are shift, shift lock,</span>
+<a name="line-424"></a><span class="cm"> * and control</span>
+<a name="line-425"></a><span class="cm"> */</span>
+<a name="line-426"></a> <span class="n">map_size</span> <span class="o">=</span> <span class="mi">8</span> <span class="o">*</span> <span class="n">xmodmap</span><span class="o">-&gt;</span><span class="n">max_keypermod</span><span class="p">;</span>
+<a name="line-427"></a> <span class="n">i</span> <span class="o">=</span> <span class="mi">3</span> <span class="o">*</span> <span class="n">xmodmap</span><span class="o">-&gt;</span><span class="n">max_keypermod</span><span class="p">;</span>
+<a name="line-428"></a> <span class="k">while</span> <span class="p">(</span><span class="n">i</span> <span class="o">&lt;</span> <span class="n">map_size</span><span class="p">)</span>
+<a name="line-429"></a> <span class="p">{</span>
+<a name="line-430"></a> <span class="cm">/* get the key code at this point in the map,</span>
+<a name="line-431"></a><span class="cm"> * see if its keysym is one we&#39;re interested in</span>
+<a name="line-432"></a><span class="cm"> */</span>
+<a name="line-433"></a> <span class="kt">int</span> <span class="n">keycode</span> <span class="o">=</span> <span class="n">xmodmap</span><span class="o">-&gt;</span><span class="n">modifiermap</span><span class="p">[</span><span class="n">i</span><span class="p">];</span>
+<a name="line-434"></a> <span class="n">GdkKeymapKey</span> <span class="o">*</span><span class="n">keys</span><span class="p">;</span>
+<a name="line-435"></a> <span class="n">guint</span> <span class="o">*</span><span class="n">keyvals</span><span class="p">;</span>
+<a name="line-436"></a> <span class="kt">int</span> <span class="n">n_entries</span><span class="p">;</span>
+<a name="line-437"></a> <span class="kt">int</span> <span class="n">j</span><span class="p">;</span>
+<a name="line-438"></a> <span class="n">EggVirtualModifierType</span> <span class="n">mask</span><span class="p">;</span>
+<a name="line-439"></a>
+<a name="line-440"></a> <span class="n">keys</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span>
+<a name="line-441"></a> <span class="n">keyvals</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span>
+<a name="line-442"></a> <span class="n">n_entries</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-443"></a>
+<a name="line-444"></a> <span class="n">gdk_keymap_get_entries_for_keycode</span> <span class="p">(</span><span class="n">keymap</span><span class="p">,</span>
+<a name="line-445"></a> <span class="n">keycode</span><span class="p">,</span>
+<a name="line-446"></a> <span class="o">&amp;</span><span class="n">keys</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">keyvals</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">n_entries</span><span class="p">);</span>
+<a name="line-447"></a>
+<a name="line-448"></a> <span class="n">mask</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-449"></a> <span class="n">j</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-450"></a> <span class="k">while</span> <span class="p">(</span><span class="n">j</span> <span class="o">&lt;</span> <span class="n">n_entries</span><span class="p">)</span>
+<a name="line-451"></a> <span class="p">{</span>
+<a name="line-452"></a> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Num_Lock</span><span class="p">)</span>
+<a name="line-453"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_NUM_LOCK_MASK</span><span class="p">;</span>
+<a name="line-454"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Scroll_Lock</span><span class="p">)</span>
+<a name="line-455"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SCROLL_LOCK_MASK</span><span class="p">;</span>
+<a name="line-456"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Meta_L</span> <span class="o">||</span>
+<a name="line-457"></a> <span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Meta_R</span><span class="p">)</span>
+<a name="line-458"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_META_MASK</span><span class="p">;</span>
+<a name="line-459"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Hyper_L</span> <span class="o">||</span>
+<a name="line-460"></a> <span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Hyper_R</span><span class="p">)</span>
+<a name="line-461"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_HYPER_MASK</span><span class="p">;</span>
+<a name="line-462"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Super_L</span> <span class="o">||</span>
+<a name="line-463"></a> <span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Super_R</span><span class="p">)</span>
+<a name="line-464"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SUPER_MASK</span><span class="p">;</span>
+<a name="line-465"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Mode_switch</span><span class="p">)</span>
+<a name="line-466"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MODE_SWITCH_MASK</span><span class="p">;</span>
+<a name="line-467"></a>
+<a name="line-468"></a> <span class="o">++</span><span class="n">j</span><span class="p">;</span>
+<a name="line-469"></a> <span class="p">}</span>
+<a name="line-470"></a>
+<a name="line-471"></a> <span class="cm">/* Mod1Mask is 1 &lt;&lt; 3 for example, i.e. the</span>
+<a name="line-472"></a><span class="cm"> * fourth modifier, i / keyspermod is the modifier</span>
+<a name="line-473"></a><span class="cm"> * index</span>
+<a name="line-474"></a><span class="cm"> */</span>
+<a name="line-475"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">i</span><span class="o">/</span><span class="n">xmodmap</span><span class="o">-&gt;</span><span class="n">max_keypermod</span><span class="p">]</span> <span class="o">|=</span> <span class="n">mask</span><span class="p">;</span>
+<a name="line-476"></a>
+<a name="line-477"></a> <span class="n">g_free</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">);</span>
+<a name="line-478"></a> <span class="n">g_free</span> <span class="p">(</span><span class="n">keys</span><span class="p">);</span>
+<a name="line-479"></a>
+<a name="line-480"></a> <span class="o">++</span><span class="n">i</span><span class="p">;</span>
+<a name="line-481"></a> <span class="p">}</span>
+<a name="line-482"></a>
+<a name="line-483"></a> <span class="cm">/* Add in the not-really-virtual fixed entries */</span>
+<a name="line-484"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_SHIFT</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SHIFT_MASK</span><span class="p">;</span>
+<a name="line-485"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_CONTROL</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_CONTROL_MASK</span><span class="p">;</span>
+<a name="line-486"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_LOCK</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_LOCK_MASK</span><span class="p">;</span>
+<a name="line-487"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD1</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_ALT_MASK</span><span class="p">;</span>
+<a name="line-488"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD2</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MOD2_MASK</span><span class="p">;</span>
+<a name="line-489"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD3</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MOD3_MASK</span><span class="p">;</span>
+<a name="line-490"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD4</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MOD4_MASK</span><span class="p">;</span>
+<a name="line-491"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD5</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MOD5_MASK</span><span class="p">;</span>
+<a name="line-492"></a>
+<a name="line-493"></a> <span class="n">XFreeModifiermap</span> <span class="p">(</span><span class="n">xmodmap</span><span class="p">);</span>
+<a name="line-494"></a><span class="p">}</span>
+<a name="line-495"></a>
+<a name="line-496"></a><span class="k">const</span> <span class="n">EggModmap</span><span class="o">*</span>
+<a name="line-497"></a><span class="nf">egg_keymap_get_modmap</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">)</span>
+<a name="line-498"></a><span class="p">{</span>
+<a name="line-499"></a> <span class="n">EggModmap</span> <span class="o">*</span><span class="n">modmap</span><span class="p">;</span>
+<a name="line-500"></a>
+<a name="line-501"></a> <span class="cm">/* This is all a hack, much simpler when we can just</span>
+<a name="line-502"></a><span class="cm"> * modify GDK directly.</span>
+<a name="line-503"></a><span class="cm"> */</span>
+<a name="line-504"></a>
+<a name="line-505"></a> <span class="n">modmap</span> <span class="o">=</span> <span class="n">g_object_get_data</span> <span class="p">(</span><span class="n">G_OBJECT</span> <span class="p">(</span><span class="n">keymap</span><span class="p">),</span>
+<a name="line-506"></a> <span class="s">&quot;egg-modmap&quot;</span><span class="p">);</span>
+<a name="line-507"></a>
+<a name="line-508"></a> <span class="k">if</span> <span class="p">(</span><span class="n">modmap</span> <span class="o">==</span> <span class="nb">NULL</span><span class="p">)</span>
+<a name="line-509"></a> <span class="p">{</span>
+<a name="line-510"></a> <span class="n">modmap</span> <span class="o">=</span> <span class="n">g_new0</span> <span class="p">(</span><span class="n">EggModmap</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
+<a name="line-511"></a>
+<a name="line-512"></a> <span class="cm">/* FIXME modify keymap change events with an event filter</span>
+<a name="line-513"></a><span class="cm"> * and force a reload if we get one</span>
+<a name="line-514"></a><span class="cm"> */</span>
+<a name="line-515"></a>
+<a name="line-516"></a> <span class="n">reload_modmap</span> <span class="p">(</span><span class="n">keymap</span><span class="p">,</span> <span class="n">modmap</span><span class="p">);</span>
+<a name="line-517"></a>
+<a name="line-518"></a> <span class="n">g_object_set_data_full</span> <span class="p">(</span><span class="n">G_OBJECT</span> <span class="p">(</span><span class="n">keymap</span><span class="p">),</span>
+<a name="line-519"></a> <span class="s">&quot;egg-modmap&quot;</span><span class="p">,</span>
+<a name="line-520"></a> <span class="n">modmap</span><span class="p">,</span>
+<a name="line-521"></a> <span class="n">g_free</span><span class="p">);</span>
+<a name="line-522"></a> <span class="p">}</span>
+<a name="line-523"></a>
+<a name="line-524"></a> <span class="n">g_assert</span> <span class="p">(</span><span class="n">modmap</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-525"></a>
+<a name="line-526"></a> <span class="k">return</span> <span class="n">modmap</span><span class="p">;</span>
+<a name="line-527"></a><span class="p">}</span>
+</pre></div>
+</td></tr></table>
+ </div>
+ <div id="footer">
+ <p>
+ Cppcheck 1.90 - a tool for static C/C++ code analysis</br>
+ </br>
+ Internet: <a href="http://cppcheck.net">http://cppcheck.net</a></br>
+ IRC: <a href="irc://irc.freenode.net/cppcheck">irc://irc.freenode.net/cppcheck</a></br>
+ </p>
+ </div>
+ </body>
+</html>
diff --git a/[email protected]_master/index.html b/[email protected]_master/index.html
new file mode 100644
index 0000000..812f8b5
--- /dev/null
+++ b/[email protected]_master/index.html
@@ -0,0 +1,101 @@
+
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Cppcheck - HTML report - mate-indicator-applet</title>
+ <link rel="stylesheet" href="style.css">
+ <style>
+
+ </style>
+ <script language="javascript">
+ function getStyle(el,styleProp) {
+ if (el.currentStyle)
+ var y = el.currentStyle[styleProp];
+ else if (window.getComputedStyle)
+ var y = document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);
+ return y;
+ }
+ function toggle() {
+ var el = this.expandable_content;
+ var mark = this.expandable_marker;
+ if (el.style.display == "block") {
+ el.style.display = "none";
+ mark.innerHTML = "[+]";
+ } else {
+ el.style.display = "block";
+ mark.innerHTML = "[-]";
+ }
+ }
+ function init_expandables() {
+ var elts = document.getElementsByClassName("expandable");
+ for (var i = 0; i < elts.length; i++) {
+ var el = elts[i];
+ var clickable = el.getElementsByTagName("span")[0];
+ var marker = clickable.getElementsByClassName("marker")[0];
+ var content = el.getElementsByClassName("content")[0];
+ var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right"));
+ content.style.width = width + "px";
+ clickable.expandable_content = content;
+ clickable.expandable_marker = marker;
+ clickable.onclick = toggle;
+ }
+ }
+ function set_class_display(c, st) {
+ var elements = document.querySelectorAll('.' + c),
+ len = elements.length;
+ for (i = 0; i < len; i++) {
+ elements[i].style.display = st;
+ }
+ }
+ function toggle_class_visibility(id) {
+ var box = document.getElementById(id);
+ set_class_display(id, box.checked ? '' : 'none');
+ }
+ function toggle_all(){
+ var elts = document.getElementsByTagName("input");
+ for (var i = 1; i < elts.length; i++) {
+ var el = elts[i];
+ el.checked ? el.checked=false : el.checked=true;
+ toggle_class_visibility(el.id);
+ }
+ }
+
+ </script>
+ </head>
+ <body onload="init_expandables()">
+ <div id="header">
+ <h1>Cppcheck report - mate-indicator-applet: </h1>
+ </div>
+ <div id="menu_index">
+ <p id="filename"><a href="index.html">Defect summary;</a> </p>
+
+ <label><input type="checkbox" onclick="toggle_all()" checked> Toggle all</label>
+ <table>
+ <tr><th>Show</th><th>#</th><th>Defect ID</th></tr>
+ <tr><td><input type='checkbox' onclick='toggle_class_visibility(this.id)' id='duplicateExpression' name='duplicateExpression' checked></td><td>1</td><td>duplicateExpression</td></tr>
+ <tr><td><input type='checkbox' onclick='toggle_class_visibility(this.id)' id='missingIncludeSystem' name='missingIncludeSystem' checked></td><td>1</td><td>missingIncludeSystem</td></tr>
+ <tr><td></td><td>2</td><td>total</td></tr>
+ </table>
+ <p><a href="stats.html">Statistics</a></p>
+ </div>
+ <div id="content_index">
+
+ <table>
+ <tr><th>Line</th><th>Id</th><th>CWE</th><th>Severity</th><th>Message</th></tr>
+ <tr><td colspan='5'><a href='1.html'></a></td></tr>
+ <tr class="missingIncludeSystem"><td><a href="1.html#line-0">0</a></td><td>missingIncludeSystem</td><td></td><td>information</td><td >Cppcheck cannot find all the include files (use --check-config for details)</td></tr>
+ <tr><td colspan='5'><a href='0.html'>src/eggaccelerators.c</a></td></tr>
+ <tr class="duplicateExpression"><td><a href="0.html#line-321">321</a></td><td>duplicateExpression</td><td><a href='https://cwe.mitre.org/data/definitions/398.html'>398</a></td><td>style</td><td >Same expression on both sides of &apos;-=&apos;.</td></tr>
+ </table>
+ </div>
+ <div id="footer">
+ <p>
+ Cppcheck 1.90 - a tool for static C/C++ code analysis</br>
+ </br>
+ Internet: <a href="http://cppcheck.net">http://cppcheck.net</a></br>
+ IRC: <a href="irc://irc.freenode.net/cppcheck">irc://irc.freenode.net/cppcheck</a></br>
+ </p>
+ </div>
+ </body>
+</html>
diff --git a/[email protected]_master/stats.html b/[email protected]_master/stats.html
new file mode 100644
index 0000000..14ae0d4
--- /dev/null
+++ b/[email protected]_master/stats.html
@@ -0,0 +1,89 @@
+
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Cppcheck - HTML report - mate-indicator-applet</title>
+ <link rel="stylesheet" href="style.css">
+ <style>
+
+ </style>
+ <script language="javascript">
+ function getStyle(el,styleProp) {
+ if (el.currentStyle)
+ var y = el.currentStyle[styleProp];
+ else if (window.getComputedStyle)
+ var y = document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);
+ return y;
+ }
+ function toggle() {
+ var el = this.expandable_content;
+ var mark = this.expandable_marker;
+ if (el.style.display == "block") {
+ el.style.display = "none";
+ mark.innerHTML = "[+]";
+ } else {
+ el.style.display = "block";
+ mark.innerHTML = "[-]";
+ }
+ }
+ function init_expandables() {
+ var elts = document.getElementsByClassName("expandable");
+ for (var i = 0; i < elts.length; i++) {
+ var el = elts[i];
+ var clickable = el.getElementsByTagName("span")[0];
+ var marker = clickable.getElementsByClassName("marker")[0];
+ var content = el.getElementsByClassName("content")[0];
+ var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right"));
+ content.style.width = width + "px";
+ clickable.expandable_content = content;
+ clickable.expandable_marker = marker;
+ clickable.onclick = toggle;
+ }
+ }
+ function set_class_display(c, st) {
+ var elements = document.querySelectorAll('.' + c),
+ len = elements.length;
+ for (i = 0; i < len; i++) {
+ elements[i].style.display = st;
+ }
+ }
+ function toggle_class_visibility(id) {
+ var box = document.getElementById(id);
+ set_class_display(id, box.checked ? '' : 'none');
+ }
+ function toggle_all(){
+ var elts = document.getElementsByTagName("input");
+ for (var i = 1; i < elts.length; i++) {
+ var el = elts[i];
+ el.checked ? el.checked=false : el.checked=true;
+ toggle_class_visibility(el.id);
+ }
+ }
+
+ </script>
+ </head>
+ <body onload="init_expandables()">
+ <div id="header">
+ <h1>Cppcheck report - mate-indicator-applet: Statistics </h1>
+ </div>
+ <div id="menu_index">
+ <p id="filename"><a href="index.html">Back to summary</a> </p>
+
+ </div>
+ <div id="content_index">
+<p>Top 10 files for style severity, total findings: 1</br>
+&#160;&#160;&#160;1&#160;<a href="0.html"> src/eggaccelerators.c</a></br>
+</p>
+
+ </div>
+ <div id="footer">
+ <p>
+ Cppcheck 1.90 - a tool for static C/C++ code analysis</br>
+ </br>
+ Internet: <a href="http://cppcheck.net">http://cppcheck.net</a></br>
+ IRC: <a href="irc://irc.freenode.net/cppcheck">irc://irc.freenode.net/cppcheck</a></br>
+ </p>
+ </div>
+ </body>
+</html>
diff --git a/[email protected]_master/style.css b/[email protected]_master/style.css
new file mode 100644
index 0000000..c39571c
--- /dev/null
+++ b/[email protected]_master/style.css
@@ -0,0 +1,149 @@
+
+body {
+ font: 13px Arial, Verdana, Sans-Serif;
+ margin: 0;
+ width: auto;
+}
+
+h1 {
+ margin: 10px;
+}
+
+#footer > p {
+ margin: 4px;
+}
+
+.error {
+ background-color: #ffb7b7;
+}
+
+.error2 {
+ background-color: #faa;
+ border: 1px dotted black;
+ display: inline-block;
+ margin-left: 4px;
+}
+
+.inconclusive {
+ background-color: #B6B6B4;
+}
+
+.inconclusive2 {
+ background-color: #B6B6B4;
+ border: 1px dotted black;
+ display: inline-block;
+ margin-left: 4px;
+}
+
+div.verbose {
+ display: inline-block;
+ vertical-align: top;
+ cursor: help;
+}
+
+div.verbose div.content {
+ display: none;
+ position: absolute;
+ padding: 10px;
+ margin: 4px;
+ max-width: 40%;
+ white-space: pre-wrap;
+ border: 1px solid black;
+ background-color: #FFFFCC;
+ cursor: auto;
+}
+
+.highlight .hll {
+ padding: 1px;
+}
+
+#header {
+ border-bottom: thin solid #aaa;
+}
+
+#menu {
+ float: left;
+ margin-top: 5px;
+ text-align: left;
+ width: 150px;
+ /*height: 75%;*/
+ position: fixed;
+ overflow: auto;
+ z-index: 1;
+}
+
+#menu_index {
+ float: left;
+ margin-top: 5px;
+ padding-left: 5px;
+ text-align: left;
+ width: 300px;
+ /*height: 75%;*/
+ position: fixed;
+ overflow: auto;
+ z-index: 1;
+}
+
+#menu > a {
+ display: block;
+ margin-left: 10px;
+ font: 12px;
+ z-index: 1;
+}
+
+#filename {
+ margin-left: 10px;
+ font: 12px;
+ z-index: 1;
+}
+
+.highlighttable {
+ background-color:white;
+ z-index: 10;
+ position: relative;
+ margin: -10 px;
+}
+
+#content {
+ background-color: white;
+ -webkit-box-sizing: content-box;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+ float: left;
+ margin: 5px;
+ margin-left: 10px;
+ padding: 0 10px 10px 10px;
+ width: 80%;
+ padding-left: 150px;
+}
+
+#content_index {
+ background-color: white;
+ -webkit-box-sizing: content-box;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+ float: left;
+ margin: 5px;
+ margin-left: 10px;
+ padding: 0 10px 10px 10px;
+ width: 80%;
+ padding-left: 300px;
+}
+
+.linenos {
+ border-right: thin solid #aaa;
+ color: lightgray;
+ padding-right: 6px;
+}
+
+#footer {
+ border-top: thin solid #aaa;
+ clear: both;
+ font-size: 90%;
+ margin-top: 5px;
+}
+
+#footer ul {
+ list-style-type: none;
+ padding-left: 0;
+}
diff --git a/[email protected]_travis/0.html b/[email protected]_travis/0.html
new file mode 100644
index 0000000..dfb584a
--- /dev/null
+++ b/[email protected]_travis/0.html
@@ -0,0 +1,1208 @@
+
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Cppcheck - HTML report - mate-indicator-applet</title>
+ <link rel="stylesheet" href="style.css">
+ <style>
+.highlight .hll { background-color: #ffffcc }
+.highlight { background: #ffffff; }
+.highlight .c { color: #888888 } /* Comment */
+.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */
+.highlight .k { color: #008800; font-weight: bold } /* Keyword */
+.highlight .o { color: #333333 } /* Operator */
+.highlight .ch { color: #888888 } /* Comment.Hashbang */
+.highlight .cm { color: #888888 } /* Comment.Multiline */
+.highlight .cp { color: #557799 } /* Comment.Preproc */
+.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
+.highlight .c1 { color: #888888 } /* Comment.Single */
+.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */
+.highlight .gd { color: #A00000 } /* Generic.Deleted */
+.highlight .ge { font-style: italic } /* Generic.Emph */
+.highlight .gr { color: #FF0000 } /* Generic.Error */
+.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.highlight .gi { color: #00A000 } /* Generic.Inserted */
+.highlight .go { color: #888888 } /* Generic.Output */
+.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
+.highlight .gs { font-weight: bold } /* Generic.Strong */
+.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.highlight .gt { color: #0044DD } /* Generic.Traceback */
+.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
+.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
+.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
+.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */
+.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
+.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */
+.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */
+.highlight .s { background-color: #fff0f0 } /* Literal.String */
+.highlight .na { color: #0000CC } /* Name.Attribute */
+.highlight .nb { color: #007020 } /* Name.Builtin */
+.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */
+.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
+.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
+.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */
+.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */
+.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */
+.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */
+.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
+.highlight .nt { color: #007700 } /* Name.Tag */
+.highlight .nv { color: #996633 } /* Name.Variable */
+.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */
+.highlight .w { color: #bbbbbb } /* Text.Whitespace */
+.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */
+.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */
+.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */
+.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
+.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */
+.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */
+.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */
+.highlight .sc { color: #0044DD } /* Literal.String.Char */
+.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */
+.highlight .sd { color: #DD4422 } /* Literal.String.Doc */
+.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */
+.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */
+.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */
+.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */
+.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */
+.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */
+.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */
+.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */
+.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
+.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */
+.highlight .vc { color: #336699 } /* Name.Variable.Class */
+.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */
+.highlight .vi { color: #3333BB } /* Name.Variable.Instance */
+.highlight .vm { color: #996633 } /* Name.Variable.Magic */
+.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
+ </style>
+ <script language="javascript">
+ function getStyle(el,styleProp) {
+ if (el.currentStyle)
+ var y = el.currentStyle[styleProp];
+ else if (window.getComputedStyle)
+ var y = document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);
+ return y;
+ }
+ function toggle() {
+ var el = this.expandable_content;
+ var mark = this.expandable_marker;
+ if (el.style.display == "block") {
+ el.style.display = "none";
+ mark.innerHTML = "[+]";
+ } else {
+ el.style.display = "block";
+ mark.innerHTML = "[-]";
+ }
+ }
+ function init_expandables() {
+ var elts = document.getElementsByClassName("expandable");
+ for (var i = 0; i < elts.length; i++) {
+ var el = elts[i];
+ var clickable = el.getElementsByTagName("span")[0];
+ var marker = clickable.getElementsByClassName("marker")[0];
+ var content = el.getElementsByClassName("content")[0];
+ var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right"));
+ content.style.width = width + "px";
+ clickable.expandable_content = content;
+ clickable.expandable_marker = marker;
+ clickable.onclick = toggle;
+ }
+ }
+ function set_class_display(c, st) {
+ var elements = document.querySelectorAll('.' + c),
+ len = elements.length;
+ for (i = 0; i < len; i++) {
+ elements[i].style.display = st;
+ }
+ }
+ function toggle_class_visibility(id) {
+ var box = document.getElementById(id);
+ set_class_display(id, box.checked ? '' : 'none');
+ }
+ function toggle_all(){
+ var elts = document.getElementsByTagName("input");
+ for (var i = 1; i < elts.length; i++) {
+ var el = elts[i];
+ el.checked ? el.checked=false : el.checked=true;
+ toggle_class_visibility(el.id);
+ }
+ }
+
+ </script>
+ </head>
+ <body onload="init_expandables()">
+ <div id="header">
+ <h1>Cppcheck report - mate-indicator-applet: src/eggaccelerators.c </h1>
+ </div>
+ <div id="menu" dir="rtl">
+ <p id="filename"><a href="index.html">Defects:</a> eggaccelerators.c</p>
+<a href='0.html#line-321'> duplicateExpression 321</a>
+ </div>
+ <div id="content">
+<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 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
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+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
+467
+468
+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
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527</pre></div></td><td class="code"><div class="highlight"><pre><span></span><a name="line-1"></a><span class="cm">/* eggaccelerators.c</span>
+<a name="line-2"></a><span class="cm"> * Copyright (C) 2002 Red Hat, Inc.; Copyright 1998, 2001 Tim Janik</span>
+<a name="line-3"></a><span class="cm"> * Developed by Havoc Pennington, Tim Janik</span>
+<a name="line-4"></a><span class="cm"> *</span>
+<a name="line-5"></a><span class="cm"> * This library is free software; you can redistribute it and/or</span>
+<a name="line-6"></a><span class="cm"> * modify it under the terms of the GNU Library General Public</span>
+<a name="line-7"></a><span class="cm"> * License as published by the Free Software Foundation; either</span>
+<a name="line-8"></a><span class="cm"> * version 2 of the License, or (at your option) any later version.</span>
+<a name="line-9"></a><span class="cm"> *</span>
+<a name="line-10"></a><span class="cm"> * This library is distributed in the hope that it will be useful,</span>
+<a name="line-11"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
+<a name="line-12"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span>
+<a name="line-13"></a><span class="cm"> * Library General Public License for more details.</span>
+<a name="line-14"></a><span class="cm"> *</span>
+<a name="line-15"></a><span class="cm"> * You should have received a copy of the GNU Library General Public</span>
+<a name="line-16"></a><span class="cm"> * License along with this library; if not, write to the</span>
+<a name="line-17"></a><span class="cm"> * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA</span>
+<a name="line-18"></a><span class="cm"> */</span>
+<a name="line-19"></a>
+<a name="line-20"></a><span class="cp">#include</span> <span class="cpf">&quot;eggaccelerators.h&quot;</span><span class="cp"></span>
+<a name="line-21"></a>
+<a name="line-22"></a><span class="cp">#include</span> <span class="cpf">&lt;string.h&gt;</span><span class="cp"></span>
+<a name="line-23"></a><span class="cp">#include</span> <span class="cpf">&lt;gdk/gdkx.h&gt;</span><span class="cp"></span>
+<a name="line-24"></a><span class="cp">#include</span> <span class="cpf">&lt;gdk/gdkkeysyms.h&gt;</span><span class="cp"></span>
+<a name="line-25"></a>
+<a name="line-26"></a><span class="k">enum</span>
+<a name="line-27"></a><span class="p">{</span>
+<a name="line-28"></a> <span class="n">EGG_MODMAP_ENTRY_SHIFT</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span>
+<a name="line-29"></a> <span class="n">EGG_MODMAP_ENTRY_LOCK</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span>
+<a name="line-30"></a> <span class="n">EGG_MODMAP_ENTRY_CONTROL</span> <span class="o">=</span> <span class="mi">2</span><span class="p">,</span>
+<a name="line-31"></a> <span class="n">EGG_MODMAP_ENTRY_MOD1</span> <span class="o">=</span> <span class="mi">3</span><span class="p">,</span>
+<a name="line-32"></a> <span class="n">EGG_MODMAP_ENTRY_MOD2</span> <span class="o">=</span> <span class="mi">4</span><span class="p">,</span>
+<a name="line-33"></a> <span class="n">EGG_MODMAP_ENTRY_MOD3</span> <span class="o">=</span> <span class="mi">5</span><span class="p">,</span>
+<a name="line-34"></a> <span class="n">EGG_MODMAP_ENTRY_MOD4</span> <span class="o">=</span> <span class="mi">6</span><span class="p">,</span>
+<a name="line-35"></a> <span class="n">EGG_MODMAP_ENTRY_MOD5</span> <span class="o">=</span> <span class="mi">7</span><span class="p">,</span>
+<a name="line-36"></a> <span class="n">EGG_MODMAP_ENTRY_LAST</span> <span class="o">=</span> <span class="mi">8</span>
+<a name="line-37"></a><span class="p">};</span>
+<a name="line-38"></a>
+<a name="line-39"></a><span class="cp">#define MODMAP_ENTRY_TO_MODIFIER(x) (1 &lt;&lt; (x))</span>
+<a name="line-40"></a>
+<a name="line-41"></a><span class="k">typedef</span> <span class="k">struct</span>
+<a name="line-42"></a><span class="p">{</span>
+<a name="line-43"></a> <span class="n">EggVirtualModifierType</span> <span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_LAST</span><span class="p">];</span>
+<a name="line-44"></a>
+<a name="line-45"></a><span class="p">}</span> <span class="n">EggModmap</span><span class="p">;</span>
+<a name="line-46"></a>
+<a name="line-47"></a><span class="k">const</span> <span class="n">EggModmap</span><span class="o">*</span> <span class="nf">egg_keymap_get_modmap</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">);</span>
+<a name="line-48"></a>
+<a name="line-49"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-50"></a><span class="nf">is_alt</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-51"></a><span class="p">{</span>
+<a name="line-52"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-53"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;a&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;A&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-54"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-55"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-56"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-57"></a><span class="p">}</span>
+<a name="line-58"></a>
+<a name="line-59"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-60"></a><span class="nf">is_ctl</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-61"></a><span class="p">{</span>
+<a name="line-62"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-63"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;c&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;C&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-64"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-65"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-66"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-67"></a><span class="p">}</span>
+<a name="line-68"></a>
+<a name="line-69"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-70"></a><span class="nf">is_modx</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-71"></a><span class="p">{</span>
+<a name="line-72"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-73"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;m&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;M&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-74"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;o&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;O&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-75"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;d&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;D&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-76"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">&gt;=</span> <span class="sc">&#39;1&#39;</span> <span class="o">&amp;&amp;</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">&lt;=</span> <span class="sc">&#39;5&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-77"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-78"></a><span class="p">}</span>
+<a name="line-79"></a>
+<a name="line-80"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-81"></a><span class="nf">is_ctrl</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-82"></a><span class="p">{</span>
+<a name="line-83"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-84"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;c&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;C&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-85"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-86"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-87"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-88"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-89"></a><span class="p">}</span>
+<a name="line-90"></a>
+<a name="line-91"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-92"></a><span class="nf">is_shft</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-93"></a><span class="p">{</span>
+<a name="line-94"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-95"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-96"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;h&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;H&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-97"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;f&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;F&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-98"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-99"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-100"></a><span class="p">}</span>
+<a name="line-101"></a>
+<a name="line-102"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-103"></a><span class="nf">is_shift</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-104"></a><span class="p">{</span>
+<a name="line-105"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-106"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-107"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;h&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;H&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-108"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;i&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;I&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-109"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;f&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;F&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-110"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-111"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-112"></a><span class="p">}</span>
+<a name="line-113"></a>
+<a name="line-114"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-115"></a><span class="nf">is_control</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-116"></a><span class="p">{</span>
+<a name="line-117"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-118"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;c&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;C&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-119"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;o&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;O&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-120"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;n&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;N&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-121"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-122"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-123"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;o&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;O&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-124"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-125"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">8</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-126"></a><span class="p">}</span>
+<a name="line-127"></a>
+<a name="line-128"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-129"></a><span class="nf">is_release</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-130"></a><span class="p">{</span>
+<a name="line-131"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-132"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-133"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-134"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-135"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-136"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;a&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;A&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-137"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-138"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-139"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">8</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-140"></a><span class="p">}</span>
+<a name="line-141"></a>
+<a name="line-142"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-143"></a><span class="nf">is_meta</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-144"></a><span class="p">{</span>
+<a name="line-145"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-146"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;m&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;M&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-147"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-148"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-149"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;a&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;A&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-150"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-151"></a><span class="p">}</span>
+<a name="line-152"></a>
+<a name="line-153"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-154"></a><span class="nf">is_super</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-155"></a><span class="p">{</span>
+<a name="line-156"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-157"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-158"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;u&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;U&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-159"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;p&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;P&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-160"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-161"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-162"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-163"></a><span class="p">}</span>
+<a name="line-164"></a>
+<a name="line-165"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-166"></a><span class="nf">is_hyper</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-167"></a><span class="p">{</span>
+<a name="line-168"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-169"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;h&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;H&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-170"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;y&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;Y&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-171"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;p&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;P&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-172"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-173"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-174"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-175"></a><span class="p">}</span>
+<a name="line-176"></a>
+<a name="line-177"></a><span class="cm">/**</span>
+<a name="line-178"></a><span class="cm"> * egg_accelerator_parse_virtual:</span>
+<a name="line-179"></a><span class="cm"> * @accelerator: string representing an accelerator</span>
+<a name="line-180"></a><span class="cm"> * @accelerator_key: return location for accelerator keyval</span>
+<a name="line-181"></a><span class="cm"> * @accelerator_mods: return location for accelerator modifier mask</span>
+<a name="line-182"></a><span class="cm"> *</span>
+<a name="line-183"></a><span class="cm"> * Parses a string representing a virtual accelerator. The format</span>
+<a name="line-184"></a><span class="cm"> * looks like &quot;&amp;lt;Control&amp;gt;a&quot; or &quot;&amp;lt;Shift&amp;gt;&amp;lt;Alt&amp;gt;F1&quot; or</span>
+<a name="line-185"></a><span class="cm"> * &quot;&amp;lt;Release&amp;gt;z&quot; (the last one is for key release). The parser</span>
+<a name="line-186"></a><span class="cm"> * is fairly liberal and allows lower or upper case, and also</span>
+<a name="line-187"></a><span class="cm"> * abbreviations such as &quot;&amp;lt;Ctl&amp;gt;&quot; and &quot;&amp;lt;Ctrl&amp;gt;&quot;.</span>
+<a name="line-188"></a><span class="cm"> *</span>
+<a name="line-189"></a><span class="cm"> * If the parse fails, @accelerator_key and @accelerator_mods will</span>
+<a name="line-190"></a><span class="cm"> * be set to 0 (zero) and %FALSE will be returned. If the string contains</span>
+<a name="line-191"></a><span class="cm"> * only modifiers, @accelerator_key will be set to 0 but %TRUE will be</span>
+<a name="line-192"></a><span class="cm"> * returned.</span>
+<a name="line-193"></a><span class="cm"> *</span>
+<a name="line-194"></a><span class="cm"> * The virtual vs. concrete accelerator distinction is a relic of</span>
+<a name="line-195"></a><span class="cm"> * how the X Window System works; there are modifiers Mod2-Mod5 that</span>
+<a name="line-196"></a><span class="cm"> * can represent various keyboard keys (numlock, meta, hyper, etc.),</span>
+<a name="line-197"></a><span class="cm"> * the virtual modifier represents the keyboard key, the concrete</span>
+<a name="line-198"></a><span class="cm"> * modifier the actual Mod2-Mod5 bits in the key press event.</span>
+<a name="line-199"></a><span class="cm"> *</span>
+<a name="line-200"></a><span class="cm"> * Returns: %TRUE on success.</span>
+<a name="line-201"></a><span class="cm"> */</span>
+<a name="line-202"></a><span class="n">gboolean</span>
+<a name="line-203"></a><span class="nf">egg_accelerator_parse_virtual</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">accelerator</span><span class="p">,</span>
+<a name="line-204"></a> <span class="n">guint</span> <span class="o">*</span><span class="n">accelerator_key</span><span class="p">,</span>
+<a name="line-205"></a> <span class="n">EggVirtualModifierType</span> <span class="o">*</span><span class="n">accelerator_mods</span><span class="p">)</span>
+<a name="line-206"></a><span class="p">{</span>
+<a name="line-207"></a> <span class="n">guint</span> <span class="n">keyval</span><span class="p">;</span>
+<a name="line-208"></a> <span class="n">GdkModifierType</span> <span class="n">mods</span><span class="p">;</span>
+<a name="line-209"></a> <span class="n">gint</span> <span class="n">len</span><span class="p">;</span>
+<a name="line-210"></a> <span class="n">gboolean</span> <span class="n">bad_keyval</span><span class="p">;</span>
+<a name="line-211"></a>
+<a name="line-212"></a> <span class="k">if</span> <span class="p">(</span><span class="n">accelerator_key</span><span class="p">)</span>
+<a name="line-213"></a> <span class="o">*</span><span class="n">accelerator_key</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-214"></a> <span class="k">if</span> <span class="p">(</span><span class="n">accelerator_mods</span><span class="p">)</span>
+<a name="line-215"></a> <span class="o">*</span><span class="n">accelerator_mods</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-216"></a>
+<a name="line-217"></a> <span class="n">g_return_val_if_fail</span> <span class="p">(</span><span class="n">accelerator</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">,</span> <span class="n">FALSE</span><span class="p">);</span>
+<a name="line-218"></a>
+<a name="line-219"></a> <span class="n">bad_keyval</span> <span class="o">=</span> <span class="n">FALSE</span><span class="p">;</span>
+<a name="line-220"></a>
+<a name="line-221"></a> <span class="n">keyval</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-222"></a> <span class="n">mods</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-223"></a> <span class="n">len</span> <span class="o">=</span> <span class="n">strlen</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">);</span>
+<a name="line-224"></a> <span class="k">while</span> <span class="p">(</span><span class="n">len</span><span class="p">)</span>
+<a name="line-225"></a> <span class="p">{</span>
+<a name="line-226"></a> <span class="k">if</span> <span class="p">(</span><span class="o">*</span><span class="n">accelerator</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span>
+<a name="line-227"></a> <span class="p">{</span>
+<a name="line-228"></a> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">9</span> <span class="o">&amp;&amp;</span> <span class="n">is_release</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-229"></a> <span class="p">{</span>
+<a name="line-230"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">9</span><span class="p">;</span>
+<a name="line-231"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">9</span><span class="p">;</span>
+<a name="line-232"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_RELEASE_MASK</span><span class="p">;</span>
+<a name="line-233"></a> <span class="p">}</span>
+<a name="line-234"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">9</span> <span class="o">&amp;&amp;</span> <span class="n">is_control</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-235"></a> <span class="p">{</span>
+<a name="line-236"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">9</span><span class="p">;</span>
+<a name="line-237"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">9</span><span class="p">;</span>
+<a name="line-238"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_CONTROL_MASK</span><span class="p">;</span>
+<a name="line-239"></a> <span class="p">}</span>
+<a name="line-240"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">7</span> <span class="o">&amp;&amp;</span> <span class="n">is_shift</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-241"></a> <span class="p">{</span>
+<a name="line-242"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-243"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-244"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SHIFT_MASK</span><span class="p">;</span>
+<a name="line-245"></a> <span class="p">}</span>
+<a name="line-246"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">6</span> <span class="o">&amp;&amp;</span> <span class="n">is_shft</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-247"></a> <span class="p">{</span>
+<a name="line-248"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-249"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-250"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SHIFT_MASK</span><span class="p">;</span>
+<a name="line-251"></a> <span class="p">}</span>
+<a name="line-252"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">6</span> <span class="o">&amp;&amp;</span> <span class="n">is_ctrl</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-253"></a> <span class="p">{</span>
+<a name="line-254"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-255"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-256"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_CONTROL_MASK</span><span class="p">;</span>
+<a name="line-257"></a> <span class="p">}</span>
+<a name="line-258"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">6</span> <span class="o">&amp;&amp;</span> <span class="n">is_modx</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-259"></a> <span class="p">{</span>
+<a name="line-260"></a> <span class="k">static</span> <span class="k">const</span> <span class="n">guint</span> <span class="n">mod_vals</span><span class="p">[]</span> <span class="o">=</span> <span class="p">{</span>
+<a name="line-261"></a> <span class="n">EGG_VIRTUAL_ALT_MASK</span><span class="p">,</span> <span class="n">EGG_VIRTUAL_MOD2_MASK</span><span class="p">,</span> <span class="n">EGG_VIRTUAL_MOD3_MASK</span><span class="p">,</span>
+<a name="line-262"></a> <span class="n">EGG_VIRTUAL_MOD4_MASK</span><span class="p">,</span> <span class="n">EGG_VIRTUAL_MOD5_MASK</span>
+<a name="line-263"></a> <span class="p">};</span>
+<a name="line-264"></a>
+<a name="line-265"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-266"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">4</span><span class="p">;</span>
+<a name="line-267"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">mod_vals</span><span class="p">[</span><span class="o">*</span><span class="n">accelerator</span> <span class="o">-</span> <span class="sc">&#39;1&#39;</span><span class="p">];</span>
+<a name="line-268"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">2</span><span class="p">;</span>
+<a name="line-269"></a> <span class="p">}</span>
+<a name="line-270"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">5</span> <span class="o">&amp;&amp;</span> <span class="n">is_ctl</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-271"></a> <span class="p">{</span>
+<a name="line-272"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">5</span><span class="p">;</span>
+<a name="line-273"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">5</span><span class="p">;</span>
+<a name="line-274"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_CONTROL_MASK</span><span class="p">;</span>
+<a name="line-275"></a> <span class="p">}</span>
+<a name="line-276"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">5</span> <span class="o">&amp;&amp;</span> <span class="n">is_alt</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-277"></a> <span class="p">{</span>
+<a name="line-278"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">5</span><span class="p">;</span>
+<a name="line-279"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">5</span><span class="p">;</span>
+<a name="line-280"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_ALT_MASK</span><span class="p">;</span>
+<a name="line-281"></a> <span class="p">}</span>
+<a name="line-282"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">6</span> <span class="o">&amp;&amp;</span> <span class="n">is_meta</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-283"></a> <span class="p">{</span>
+<a name="line-284"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-285"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-286"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_META_MASK</span><span class="p">;</span>
+<a name="line-287"></a> <span class="p">}</span>
+<a name="line-288"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">7</span> <span class="o">&amp;&amp;</span> <span class="n">is_hyper</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-289"></a> <span class="p">{</span>
+<a name="line-290"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-291"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-292"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_HYPER_MASK</span><span class="p">;</span>
+<a name="line-293"></a> <span class="p">}</span>
+<a name="line-294"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">7</span> <span class="o">&amp;&amp;</span> <span class="n">is_super</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-295"></a> <span class="p">{</span>
+<a name="line-296"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-297"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-298"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SUPER_MASK</span><span class="p">;</span>
+<a name="line-299"></a> <span class="p">}</span>
+<a name="line-300"></a> <span class="k">else</span>
+<a name="line-301"></a> <span class="p">{</span>
+<a name="line-302"></a> <span class="n">gchar</span> <span class="n">last_ch</span><span class="p">;</span>
+<a name="line-303"></a>
+<a name="line-304"></a> <span class="n">last_ch</span> <span class="o">=</span> <span class="o">*</span><span class="n">accelerator</span><span class="p">;</span>
+<a name="line-305"></a> <span class="k">while</span> <span class="p">(</span><span class="n">last_ch</span> <span class="o">&amp;&amp;</span> <span class="n">last_ch</span> <span class="o">!=</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">)</span>
+<a name="line-306"></a> <span class="p">{</span>
+<a name="line-307"></a> <span class="n">last_ch</span> <span class="o">=</span> <span class="o">*</span><span class="n">accelerator</span><span class="p">;</span>
+<a name="line-308"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">1</span><span class="p">;</span>
+<a name="line-309"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">1</span><span class="p">;</span>
+<a name="line-310"></a> <span class="p">}</span>
+<a name="line-311"></a> <span class="p">}</span>
+<a name="line-312"></a> <span class="p">}</span>
+<a name="line-313"></a> <span class="k">else</span>
+<a name="line-314"></a> <span class="p">{</span>
+<a name="line-315"></a> <span class="n">keyval</span> <span class="o">=</span> <span class="n">gdk_keyval_from_name</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">);</span>
+<a name="line-316"></a>
+<a name="line-317"></a> <span class="k">if</span> <span class="p">(</span><span class="n">keyval</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span>
+<a name="line-318"></a> <span class="n">bad_keyval</span> <span class="o">=</span> <span class="n">TRUE</span><span class="p">;</span>
+<a name="line-319"></a>
+<a name="line-320"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="n">len</span><span class="p">;</span>
+<a name="line-321"></a><span class="hll"> <span class="n">len</span> <span class="o">-=</span> <span class="n">len</span><span class="p">;</span><div class='verbose expandable'><span class='error2'>&lt;--- Same expression on both sides of '-='. <span class='marker'>[+]</span></span><div class='content'>Finding the same expression on both sides of an operator is suspicious and might indicate a cut and paste or logic error. Please examine this code carefully to determine if it is correct.</div></div>
+</span><a name="line-322"></a> <span class="p">}</span>
+<a name="line-323"></a> <span class="p">}</span>
+<a name="line-324"></a>
+<a name="line-325"></a> <span class="k">if</span> <span class="p">(</span><span class="n">accelerator_key</span><span class="p">)</span>
+<a name="line-326"></a> <span class="o">*</span><span class="n">accelerator_key</span> <span class="o">=</span> <span class="n">gdk_keyval_to_lower</span> <span class="p">(</span><span class="n">keyval</span><span class="p">);</span>
+<a name="line-327"></a> <span class="k">if</span> <span class="p">(</span><span class="n">accelerator_mods</span><span class="p">)</span>
+<a name="line-328"></a> <span class="o">*</span><span class="n">accelerator_mods</span> <span class="o">=</span> <span class="n">mods</span><span class="p">;</span>
+<a name="line-329"></a>
+<a name="line-330"></a> <span class="k">return</span> <span class="o">!</span><span class="n">bad_keyval</span><span class="p">;</span>
+<a name="line-331"></a><span class="p">}</span>
+<a name="line-332"></a>
+<a name="line-333"></a><span class="kt">void</span>
+<a name="line-334"></a><span class="nf">egg_keymap_resolve_virtual_modifiers</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">,</span>
+<a name="line-335"></a> <span class="n">EggVirtualModifierType</span> <span class="n">virtual_mods</span><span class="p">,</span>
+<a name="line-336"></a> <span class="n">GdkModifierType</span> <span class="o">*</span><span class="n">concrete_mods</span><span class="p">)</span>
+<a name="line-337"></a><span class="p">{</span>
+<a name="line-338"></a> <span class="n">GdkModifierType</span> <span class="n">concrete</span><span class="p">;</span>
+<a name="line-339"></a> <span class="kt">int</span> <span class="n">i</span><span class="p">;</span>
+<a name="line-340"></a> <span class="k">const</span> <span class="n">EggModmap</span> <span class="o">*</span><span class="n">modmap</span><span class="p">;</span>
+<a name="line-341"></a>
+<a name="line-342"></a> <span class="n">g_return_if_fail</span> <span class="p">(</span><span class="n">GDK_IS_KEYMAP</span> <span class="p">(</span><span class="n">keymap</span><span class="p">));</span>
+<a name="line-343"></a> <span class="n">g_return_if_fail</span> <span class="p">(</span><span class="n">concrete_mods</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-344"></a>
+<a name="line-345"></a> <span class="n">modmap</span> <span class="o">=</span> <span class="n">egg_keymap_get_modmap</span> <span class="p">(</span><span class="n">keymap</span><span class="p">);</span>
+<a name="line-346"></a>
+<a name="line-347"></a> <span class="cm">/* Not so sure about this algorithm. */</span>
+<a name="line-348"></a>
+<a name="line-349"></a> <span class="n">concrete</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-350"></a> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-351"></a> <span class="k">while</span> <span class="p">(</span><span class="n">i</span> <span class="o">&lt;</span> <span class="n">EGG_MODMAP_ENTRY_LAST</span><span class="p">)</span>
+<a name="line-352"></a> <span class="p">{</span>
+<a name="line-353"></a> <span class="k">if</span> <span class="p">(</span><span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">&amp;</span> <span class="n">virtual_mods</span><span class="p">)</span>
+<a name="line-354"></a> <span class="n">concrete</span> <span class="o">|=</span> <span class="p">(</span><span class="mi">1</span> <span class="o">&lt;&lt;</span> <span class="n">i</span><span class="p">);</span>
+<a name="line-355"></a>
+<a name="line-356"></a> <span class="o">++</span><span class="n">i</span><span class="p">;</span>
+<a name="line-357"></a> <span class="p">}</span>
+<a name="line-358"></a>
+<a name="line-359"></a> <span class="o">*</span><span class="n">concrete_mods</span> <span class="o">=</span> <span class="n">concrete</span><span class="p">;</span>
+<a name="line-360"></a><span class="p">}</span>
+<a name="line-361"></a>
+<a name="line-362"></a><span class="kt">void</span>
+<a name="line-363"></a><span class="nf">egg_keymap_virtualize_modifiers</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">,</span>
+<a name="line-364"></a> <span class="n">GdkModifierType</span> <span class="n">concrete_mods</span><span class="p">,</span>
+<a name="line-365"></a> <span class="n">EggVirtualModifierType</span> <span class="o">*</span><span class="n">virtual_mods</span><span class="p">)</span>
+<a name="line-366"></a><span class="p">{</span>
+<a name="line-367"></a> <span class="n">GdkModifierType</span> <span class="n">virtual</span><span class="p">;</span>
+<a name="line-368"></a> <span class="kt">int</span> <span class="n">i</span><span class="p">;</span>
+<a name="line-369"></a> <span class="k">const</span> <span class="n">EggModmap</span> <span class="o">*</span><span class="n">modmap</span><span class="p">;</span>
+<a name="line-370"></a>
+<a name="line-371"></a> <span class="n">g_return_if_fail</span> <span class="p">(</span><span class="n">GDK_IS_KEYMAP</span> <span class="p">(</span><span class="n">keymap</span><span class="p">));</span>
+<a name="line-372"></a> <span class="n">g_return_if_fail</span> <span class="p">(</span><span class="n">virtual_mods</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-373"></a>
+<a name="line-374"></a> <span class="n">modmap</span> <span class="o">=</span> <span class="n">egg_keymap_get_modmap</span> <span class="p">(</span><span class="n">keymap</span><span class="p">);</span>
+<a name="line-375"></a>
+<a name="line-376"></a> <span class="cm">/* Not so sure about this algorithm. */</span>
+<a name="line-377"></a>
+<a name="line-378"></a> <span class="n">virtual</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-379"></a> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-380"></a> <span class="k">while</span> <span class="p">(</span><span class="n">i</span> <span class="o">&lt;</span> <span class="n">EGG_MODMAP_ENTRY_LAST</span><span class="p">)</span>
+<a name="line-381"></a> <span class="p">{</span>
+<a name="line-382"></a> <span class="k">if</span> <span class="p">((</span><span class="mi">1</span> <span class="o">&lt;&lt;</span> <span class="n">i</span><span class="p">)</span> <span class="o">&amp;</span> <span class="n">concrete_mods</span><span class="p">)</span>
+<a name="line-383"></a> <span class="p">{</span>
+<a name="line-384"></a> <span class="n">EggVirtualModifierType</span> <span class="n">cleaned</span><span class="p">;</span>
+<a name="line-385"></a>
+<a name="line-386"></a> <span class="n">cleaned</span> <span class="o">=</span> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">&amp;</span> <span class="o">~</span><span class="p">(</span><span class="n">EGG_VIRTUAL_MOD2_MASK</span> <span class="o">|</span>
+<a name="line-387"></a> <span class="n">EGG_VIRTUAL_MOD3_MASK</span> <span class="o">|</span>
+<a name="line-388"></a> <span class="n">EGG_VIRTUAL_MOD4_MASK</span> <span class="o">|</span>
+<a name="line-389"></a> <span class="n">EGG_VIRTUAL_MOD5_MASK</span><span class="p">);</span>
+<a name="line-390"></a>
+<a name="line-391"></a> <span class="k">if</span> <span class="p">(</span><span class="n">cleaned</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">)</span>
+<a name="line-392"></a> <span class="p">{</span>
+<a name="line-393"></a> <span class="n">virtual</span> <span class="o">|=</span> <span class="n">cleaned</span><span class="p">;</span>
+<a name="line-394"></a> <span class="p">}</span>
+<a name="line-395"></a> <span class="k">else</span>
+<a name="line-396"></a> <span class="p">{</span>
+<a name="line-397"></a> <span class="cm">/* Rather than dropping mod2-&gt;mod5 if not bound,</span>
+<a name="line-398"></a><span class="cm"> * go ahead and use the concrete names</span>
+<a name="line-399"></a><span class="cm"> */</span>
+<a name="line-400"></a> <span class="n">virtual</span> <span class="o">|=</span> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">i</span><span class="p">];</span>
+<a name="line-401"></a> <span class="p">}</span>
+<a name="line-402"></a> <span class="p">}</span>
+<a name="line-403"></a>
+<a name="line-404"></a> <span class="o">++</span><span class="n">i</span><span class="p">;</span>
+<a name="line-405"></a> <span class="p">}</span>
+<a name="line-406"></a>
+<a name="line-407"></a> <span class="o">*</span><span class="n">virtual_mods</span> <span class="o">=</span> <span class="n">virtual</span><span class="p">;</span>
+<a name="line-408"></a><span class="p">}</span>
+<a name="line-409"></a>
+<a name="line-410"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-411"></a><span class="nf">reload_modmap</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">,</span>
+<a name="line-412"></a> <span class="n">EggModmap</span> <span class="o">*</span><span class="n">modmap</span><span class="p">)</span>
+<a name="line-413"></a><span class="p">{</span>
+<a name="line-414"></a> <span class="n">XModifierKeymap</span> <span class="o">*</span><span class="n">xmodmap</span><span class="p">;</span>
+<a name="line-415"></a> <span class="kt">int</span> <span class="n">map_size</span><span class="p">;</span>
+<a name="line-416"></a> <span class="kt">int</span> <span class="n">i</span><span class="p">;</span>
+<a name="line-417"></a>
+<a name="line-418"></a> <span class="cm">/* FIXME multihead */</span>
+<a name="line-419"></a> <span class="n">xmodmap</span> <span class="o">=</span> <span class="n">XGetModifierMapping</span> <span class="p">(</span><span class="n">gdk_x11_get_default_xdisplay</span> <span class="p">());</span>
+<a name="line-420"></a>
+<a name="line-421"></a> <span class="n">memset</span> <span class="p">(</span><span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="k">sizeof</span> <span class="p">(</span><span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">));</span>
+<a name="line-422"></a>
+<a name="line-423"></a> <span class="cm">/* there are 8 modifiers, and the first 3 are shift, shift lock,</span>
+<a name="line-424"></a><span class="cm"> * and control</span>
+<a name="line-425"></a><span class="cm"> */</span>
+<a name="line-426"></a> <span class="n">map_size</span> <span class="o">=</span> <span class="mi">8</span> <span class="o">*</span> <span class="n">xmodmap</span><span class="o">-&gt;</span><span class="n">max_keypermod</span><span class="p">;</span>
+<a name="line-427"></a> <span class="n">i</span> <span class="o">=</span> <span class="mi">3</span> <span class="o">*</span> <span class="n">xmodmap</span><span class="o">-&gt;</span><span class="n">max_keypermod</span><span class="p">;</span>
+<a name="line-428"></a> <span class="k">while</span> <span class="p">(</span><span class="n">i</span> <span class="o">&lt;</span> <span class="n">map_size</span><span class="p">)</span>
+<a name="line-429"></a> <span class="p">{</span>
+<a name="line-430"></a> <span class="cm">/* get the key code at this point in the map,</span>
+<a name="line-431"></a><span class="cm"> * see if its keysym is one we&#39;re interested in</span>
+<a name="line-432"></a><span class="cm"> */</span>
+<a name="line-433"></a> <span class="kt">int</span> <span class="n">keycode</span> <span class="o">=</span> <span class="n">xmodmap</span><span class="o">-&gt;</span><span class="n">modifiermap</span><span class="p">[</span><span class="n">i</span><span class="p">];</span>
+<a name="line-434"></a> <span class="n">GdkKeymapKey</span> <span class="o">*</span><span class="n">keys</span><span class="p">;</span>
+<a name="line-435"></a> <span class="n">guint</span> <span class="o">*</span><span class="n">keyvals</span><span class="p">;</span>
+<a name="line-436"></a> <span class="kt">int</span> <span class="n">n_entries</span><span class="p">;</span>
+<a name="line-437"></a> <span class="kt">int</span> <span class="n">j</span><span class="p">;</span>
+<a name="line-438"></a> <span class="n">EggVirtualModifierType</span> <span class="n">mask</span><span class="p">;</span>
+<a name="line-439"></a>
+<a name="line-440"></a> <span class="n">keys</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span>
+<a name="line-441"></a> <span class="n">keyvals</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span>
+<a name="line-442"></a> <span class="n">n_entries</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-443"></a>
+<a name="line-444"></a> <span class="n">gdk_keymap_get_entries_for_keycode</span> <span class="p">(</span><span class="n">keymap</span><span class="p">,</span>
+<a name="line-445"></a> <span class="n">keycode</span><span class="p">,</span>
+<a name="line-446"></a> <span class="o">&amp;</span><span class="n">keys</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">keyvals</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">n_entries</span><span class="p">);</span>
+<a name="line-447"></a>
+<a name="line-448"></a> <span class="n">mask</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-449"></a> <span class="n">j</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-450"></a> <span class="k">while</span> <span class="p">(</span><span class="n">j</span> <span class="o">&lt;</span> <span class="n">n_entries</span><span class="p">)</span>
+<a name="line-451"></a> <span class="p">{</span>
+<a name="line-452"></a> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Num_Lock</span><span class="p">)</span>
+<a name="line-453"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_NUM_LOCK_MASK</span><span class="p">;</span>
+<a name="line-454"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Scroll_Lock</span><span class="p">)</span>
+<a name="line-455"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SCROLL_LOCK_MASK</span><span class="p">;</span>
+<a name="line-456"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Meta_L</span> <span class="o">||</span>
+<a name="line-457"></a> <span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Meta_R</span><span class="p">)</span>
+<a name="line-458"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_META_MASK</span><span class="p">;</span>
+<a name="line-459"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Hyper_L</span> <span class="o">||</span>
+<a name="line-460"></a> <span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Hyper_R</span><span class="p">)</span>
+<a name="line-461"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_HYPER_MASK</span><span class="p">;</span>
+<a name="line-462"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Super_L</span> <span class="o">||</span>
+<a name="line-463"></a> <span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Super_R</span><span class="p">)</span>
+<a name="line-464"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SUPER_MASK</span><span class="p">;</span>
+<a name="line-465"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Mode_switch</span><span class="p">)</span>
+<a name="line-466"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MODE_SWITCH_MASK</span><span class="p">;</span>
+<a name="line-467"></a>
+<a name="line-468"></a> <span class="o">++</span><span class="n">j</span><span class="p">;</span>
+<a name="line-469"></a> <span class="p">}</span>
+<a name="line-470"></a>
+<a name="line-471"></a> <span class="cm">/* Mod1Mask is 1 &lt;&lt; 3 for example, i.e. the</span>
+<a name="line-472"></a><span class="cm"> * fourth modifier, i / keyspermod is the modifier</span>
+<a name="line-473"></a><span class="cm"> * index</span>
+<a name="line-474"></a><span class="cm"> */</span>
+<a name="line-475"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">i</span><span class="o">/</span><span class="n">xmodmap</span><span class="o">-&gt;</span><span class="n">max_keypermod</span><span class="p">]</span> <span class="o">|=</span> <span class="n">mask</span><span class="p">;</span>
+<a name="line-476"></a>
+<a name="line-477"></a> <span class="n">g_free</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">);</span>
+<a name="line-478"></a> <span class="n">g_free</span> <span class="p">(</span><span class="n">keys</span><span class="p">);</span>
+<a name="line-479"></a>
+<a name="line-480"></a> <span class="o">++</span><span class="n">i</span><span class="p">;</span>
+<a name="line-481"></a> <span class="p">}</span>
+<a name="line-482"></a>
+<a name="line-483"></a> <span class="cm">/* Add in the not-really-virtual fixed entries */</span>
+<a name="line-484"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_SHIFT</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SHIFT_MASK</span><span class="p">;</span>
+<a name="line-485"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_CONTROL</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_CONTROL_MASK</span><span class="p">;</span>
+<a name="line-486"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_LOCK</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_LOCK_MASK</span><span class="p">;</span>
+<a name="line-487"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD1</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_ALT_MASK</span><span class="p">;</span>
+<a name="line-488"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD2</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MOD2_MASK</span><span class="p">;</span>
+<a name="line-489"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD3</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MOD3_MASK</span><span class="p">;</span>
+<a name="line-490"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD4</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MOD4_MASK</span><span class="p">;</span>
+<a name="line-491"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD5</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MOD5_MASK</span><span class="p">;</span>
+<a name="line-492"></a>
+<a name="line-493"></a> <span class="n">XFreeModifiermap</span> <span class="p">(</span><span class="n">xmodmap</span><span class="p">);</span>
+<a name="line-494"></a><span class="p">}</span>
+<a name="line-495"></a>
+<a name="line-496"></a><span class="k">const</span> <span class="n">EggModmap</span><span class="o">*</span>
+<a name="line-497"></a><span class="nf">egg_keymap_get_modmap</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">)</span>
+<a name="line-498"></a><span class="p">{</span>
+<a name="line-499"></a> <span class="n">EggModmap</span> <span class="o">*</span><span class="n">modmap</span><span class="p">;</span>
+<a name="line-500"></a>
+<a name="line-501"></a> <span class="cm">/* This is all a hack, much simpler when we can just</span>
+<a name="line-502"></a><span class="cm"> * modify GDK directly.</span>
+<a name="line-503"></a><span class="cm"> */</span>
+<a name="line-504"></a>
+<a name="line-505"></a> <span class="n">modmap</span> <span class="o">=</span> <span class="n">g_object_get_data</span> <span class="p">(</span><span class="n">G_OBJECT</span> <span class="p">(</span><span class="n">keymap</span><span class="p">),</span>
+<a name="line-506"></a> <span class="s">&quot;egg-modmap&quot;</span><span class="p">);</span>
+<a name="line-507"></a>
+<a name="line-508"></a> <span class="k">if</span> <span class="p">(</span><span class="n">modmap</span> <span class="o">==</span> <span class="nb">NULL</span><span class="p">)</span>
+<a name="line-509"></a> <span class="p">{</span>
+<a name="line-510"></a> <span class="n">modmap</span> <span class="o">=</span> <span class="n">g_new0</span> <span class="p">(</span><span class="n">EggModmap</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
+<a name="line-511"></a>
+<a name="line-512"></a> <span class="cm">/* FIXME modify keymap change events with an event filter</span>
+<a name="line-513"></a><span class="cm"> * and force a reload if we get one</span>
+<a name="line-514"></a><span class="cm"> */</span>
+<a name="line-515"></a>
+<a name="line-516"></a> <span class="n">reload_modmap</span> <span class="p">(</span><span class="n">keymap</span><span class="p">,</span> <span class="n">modmap</span><span class="p">);</span>
+<a name="line-517"></a>
+<a name="line-518"></a> <span class="n">g_object_set_data_full</span> <span class="p">(</span><span class="n">G_OBJECT</span> <span class="p">(</span><span class="n">keymap</span><span class="p">),</span>
+<a name="line-519"></a> <span class="s">&quot;egg-modmap&quot;</span><span class="p">,</span>
+<a name="line-520"></a> <span class="n">modmap</span><span class="p">,</span>
+<a name="line-521"></a> <span class="n">g_free</span><span class="p">);</span>
+<a name="line-522"></a> <span class="p">}</span>
+<a name="line-523"></a>
+<a name="line-524"></a> <span class="n">g_assert</span> <span class="p">(</span><span class="n">modmap</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-525"></a>
+<a name="line-526"></a> <span class="k">return</span> <span class="n">modmap</span><span class="p">;</span>
+<a name="line-527"></a><span class="p">}</span>
+</pre></div>
+</td></tr></table>
+ </div>
+ <div id="footer">
+ <p>
+ Cppcheck 1.90 - a tool for static C/C++ code analysis</br>
+ </br>
+ Internet: <a href="http://cppcheck.net">http://cppcheck.net</a></br>
+ IRC: <a href="irc://irc.freenode.net/cppcheck">irc://irc.freenode.net/cppcheck</a></br>
+ </p>
+ </div>
+ </body>
+</html>
diff --git a/[email protected]_travis/index.html b/[email protected]_travis/index.html
new file mode 100644
index 0000000..812f8b5
--- /dev/null
+++ b/[email protected]_travis/index.html
@@ -0,0 +1,101 @@
+
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Cppcheck - HTML report - mate-indicator-applet</title>
+ <link rel="stylesheet" href="style.css">
+ <style>
+
+ </style>
+ <script language="javascript">
+ function getStyle(el,styleProp) {
+ if (el.currentStyle)
+ var y = el.currentStyle[styleProp];
+ else if (window.getComputedStyle)
+ var y = document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);
+ return y;
+ }
+ function toggle() {
+ var el = this.expandable_content;
+ var mark = this.expandable_marker;
+ if (el.style.display == "block") {
+ el.style.display = "none";
+ mark.innerHTML = "[+]";
+ } else {
+ el.style.display = "block";
+ mark.innerHTML = "[-]";
+ }
+ }
+ function init_expandables() {
+ var elts = document.getElementsByClassName("expandable");
+ for (var i = 0; i < elts.length; i++) {
+ var el = elts[i];
+ var clickable = el.getElementsByTagName("span")[0];
+ var marker = clickable.getElementsByClassName("marker")[0];
+ var content = el.getElementsByClassName("content")[0];
+ var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right"));
+ content.style.width = width + "px";
+ clickable.expandable_content = content;
+ clickable.expandable_marker = marker;
+ clickable.onclick = toggle;
+ }
+ }
+ function set_class_display(c, st) {
+ var elements = document.querySelectorAll('.' + c),
+ len = elements.length;
+ for (i = 0; i < len; i++) {
+ elements[i].style.display = st;
+ }
+ }
+ function toggle_class_visibility(id) {
+ var box = document.getElementById(id);
+ set_class_display(id, box.checked ? '' : 'none');
+ }
+ function toggle_all(){
+ var elts = document.getElementsByTagName("input");
+ for (var i = 1; i < elts.length; i++) {
+ var el = elts[i];
+ el.checked ? el.checked=false : el.checked=true;
+ toggle_class_visibility(el.id);
+ }
+ }
+
+ </script>
+ </head>
+ <body onload="init_expandables()">
+ <div id="header">
+ <h1>Cppcheck report - mate-indicator-applet: </h1>
+ </div>
+ <div id="menu_index">
+ <p id="filename"><a href="index.html">Defect summary;</a> </p>
+
+ <label><input type="checkbox" onclick="toggle_all()" checked> Toggle all</label>
+ <table>
+ <tr><th>Show</th><th>#</th><th>Defect ID</th></tr>
+ <tr><td><input type='checkbox' onclick='toggle_class_visibility(this.id)' id='duplicateExpression' name='duplicateExpression' checked></td><td>1</td><td>duplicateExpression</td></tr>
+ <tr><td><input type='checkbox' onclick='toggle_class_visibility(this.id)' id='missingIncludeSystem' name='missingIncludeSystem' checked></td><td>1</td><td>missingIncludeSystem</td></tr>
+ <tr><td></td><td>2</td><td>total</td></tr>
+ </table>
+ <p><a href="stats.html">Statistics</a></p>
+ </div>
+ <div id="content_index">
+
+ <table>
+ <tr><th>Line</th><th>Id</th><th>CWE</th><th>Severity</th><th>Message</th></tr>
+ <tr><td colspan='5'><a href='1.html'></a></td></tr>
+ <tr class="missingIncludeSystem"><td><a href="1.html#line-0">0</a></td><td>missingIncludeSystem</td><td></td><td>information</td><td >Cppcheck cannot find all the include files (use --check-config for details)</td></tr>
+ <tr><td colspan='5'><a href='0.html'>src/eggaccelerators.c</a></td></tr>
+ <tr class="duplicateExpression"><td><a href="0.html#line-321">321</a></td><td>duplicateExpression</td><td><a href='https://cwe.mitre.org/data/definitions/398.html'>398</a></td><td>style</td><td >Same expression on both sides of &apos;-=&apos;.</td></tr>
+ </table>
+ </div>
+ <div id="footer">
+ <p>
+ Cppcheck 1.90 - a tool for static C/C++ code analysis</br>
+ </br>
+ Internet: <a href="http://cppcheck.net">http://cppcheck.net</a></br>
+ IRC: <a href="irc://irc.freenode.net/cppcheck">irc://irc.freenode.net/cppcheck</a></br>
+ </p>
+ </div>
+ </body>
+</html>
diff --git a/[email protected]_travis/stats.html b/[email protected]_travis/stats.html
new file mode 100644
index 0000000..14ae0d4
--- /dev/null
+++ b/[email protected]_travis/stats.html
@@ -0,0 +1,89 @@
+
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Cppcheck - HTML report - mate-indicator-applet</title>
+ <link rel="stylesheet" href="style.css">
+ <style>
+
+ </style>
+ <script language="javascript">
+ function getStyle(el,styleProp) {
+ if (el.currentStyle)
+ var y = el.currentStyle[styleProp];
+ else if (window.getComputedStyle)
+ var y = document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);
+ return y;
+ }
+ function toggle() {
+ var el = this.expandable_content;
+ var mark = this.expandable_marker;
+ if (el.style.display == "block") {
+ el.style.display = "none";
+ mark.innerHTML = "[+]";
+ } else {
+ el.style.display = "block";
+ mark.innerHTML = "[-]";
+ }
+ }
+ function init_expandables() {
+ var elts = document.getElementsByClassName("expandable");
+ for (var i = 0; i < elts.length; i++) {
+ var el = elts[i];
+ var clickable = el.getElementsByTagName("span")[0];
+ var marker = clickable.getElementsByClassName("marker")[0];
+ var content = el.getElementsByClassName("content")[0];
+ var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right"));
+ content.style.width = width + "px";
+ clickable.expandable_content = content;
+ clickable.expandable_marker = marker;
+ clickable.onclick = toggle;
+ }
+ }
+ function set_class_display(c, st) {
+ var elements = document.querySelectorAll('.' + c),
+ len = elements.length;
+ for (i = 0; i < len; i++) {
+ elements[i].style.display = st;
+ }
+ }
+ function toggle_class_visibility(id) {
+ var box = document.getElementById(id);
+ set_class_display(id, box.checked ? '' : 'none');
+ }
+ function toggle_all(){
+ var elts = document.getElementsByTagName("input");
+ for (var i = 1; i < elts.length; i++) {
+ var el = elts[i];
+ el.checked ? el.checked=false : el.checked=true;
+ toggle_class_visibility(el.id);
+ }
+ }
+
+ </script>
+ </head>
+ <body onload="init_expandables()">
+ <div id="header">
+ <h1>Cppcheck report - mate-indicator-applet: Statistics </h1>
+ </div>
+ <div id="menu_index">
+ <p id="filename"><a href="index.html">Back to summary</a> </p>
+
+ </div>
+ <div id="content_index">
+<p>Top 10 files for style severity, total findings: 1</br>
+&#160;&#160;&#160;1&#160;<a href="0.html"> src/eggaccelerators.c</a></br>
+</p>
+
+ </div>
+ <div id="footer">
+ <p>
+ Cppcheck 1.90 - a tool for static C/C++ code analysis</br>
+ </br>
+ Internet: <a href="http://cppcheck.net">http://cppcheck.net</a></br>
+ IRC: <a href="irc://irc.freenode.net/cppcheck">irc://irc.freenode.net/cppcheck</a></br>
+ </p>
+ </div>
+ </body>
+</html>
diff --git a/[email protected]_travis/style.css b/[email protected]_travis/style.css
new file mode 100644
index 0000000..c39571c
--- /dev/null
+++ b/[email protected]_travis/style.css
@@ -0,0 +1,149 @@
+
+body {
+ font: 13px Arial, Verdana, Sans-Serif;
+ margin: 0;
+ width: auto;
+}
+
+h1 {
+ margin: 10px;
+}
+
+#footer > p {
+ margin: 4px;
+}
+
+.error {
+ background-color: #ffb7b7;
+}
+
+.error2 {
+ background-color: #faa;
+ border: 1px dotted black;
+ display: inline-block;
+ margin-left: 4px;
+}
+
+.inconclusive {
+ background-color: #B6B6B4;
+}
+
+.inconclusive2 {
+ background-color: #B6B6B4;
+ border: 1px dotted black;
+ display: inline-block;
+ margin-left: 4px;
+}
+
+div.verbose {
+ display: inline-block;
+ vertical-align: top;
+ cursor: help;
+}
+
+div.verbose div.content {
+ display: none;
+ position: absolute;
+ padding: 10px;
+ margin: 4px;
+ max-width: 40%;
+ white-space: pre-wrap;
+ border: 1px solid black;
+ background-color: #FFFFCC;
+ cursor: auto;
+}
+
+.highlight .hll {
+ padding: 1px;
+}
+
+#header {
+ border-bottom: thin solid #aaa;
+}
+
+#menu {
+ float: left;
+ margin-top: 5px;
+ text-align: left;
+ width: 150px;
+ /*height: 75%;*/
+ position: fixed;
+ overflow: auto;
+ z-index: 1;
+}
+
+#menu_index {
+ float: left;
+ margin-top: 5px;
+ padding-left: 5px;
+ text-align: left;
+ width: 300px;
+ /*height: 75%;*/
+ position: fixed;
+ overflow: auto;
+ z-index: 1;
+}
+
+#menu > a {
+ display: block;
+ margin-left: 10px;
+ font: 12px;
+ z-index: 1;
+}
+
+#filename {
+ margin-left: 10px;
+ font: 12px;
+ z-index: 1;
+}
+
+.highlighttable {
+ background-color:white;
+ z-index: 10;
+ position: relative;
+ margin: -10 px;
+}
+
+#content {
+ background-color: white;
+ -webkit-box-sizing: content-box;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+ float: left;
+ margin: 5px;
+ margin-left: 10px;
+ padding: 0 10px 10px 10px;
+ width: 80%;
+ padding-left: 150px;
+}
+
+#content_index {
+ background-color: white;
+ -webkit-box-sizing: content-box;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+ float: left;
+ margin: 5px;
+ margin-left: 10px;
+ padding: 0 10px 10px 10px;
+ width: 80%;
+ padding-left: 300px;
+}
+
+.linenos {
+ border-right: thin solid #aaa;
+ color: lightgray;
+ padding-right: 6px;
+}
+
+#footer {
+ border-top: thin solid #aaa;
+ clear: both;
+ font-size: 90%;
+ margin-top: 5px;
+}
+
+#footer ul {
+ list-style-type: none;
+ padding-left: 0;
+}
diff --git a/[email protected]_master/0.html b/[email protected]_master/0.html
new file mode 100644
index 0000000..dfb584a
--- /dev/null
+++ b/[email protected]_master/0.html
@@ -0,0 +1,1208 @@
+
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Cppcheck - HTML report - mate-indicator-applet</title>
+ <link rel="stylesheet" href="style.css">
+ <style>
+.highlight .hll { background-color: #ffffcc }
+.highlight { background: #ffffff; }
+.highlight .c { color: #888888 } /* Comment */
+.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */
+.highlight .k { color: #008800; font-weight: bold } /* Keyword */
+.highlight .o { color: #333333 } /* Operator */
+.highlight .ch { color: #888888 } /* Comment.Hashbang */
+.highlight .cm { color: #888888 } /* Comment.Multiline */
+.highlight .cp { color: #557799 } /* Comment.Preproc */
+.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
+.highlight .c1 { color: #888888 } /* Comment.Single */
+.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */
+.highlight .gd { color: #A00000 } /* Generic.Deleted */
+.highlight .ge { font-style: italic } /* Generic.Emph */
+.highlight .gr { color: #FF0000 } /* Generic.Error */
+.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.highlight .gi { color: #00A000 } /* Generic.Inserted */
+.highlight .go { color: #888888 } /* Generic.Output */
+.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
+.highlight .gs { font-weight: bold } /* Generic.Strong */
+.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.highlight .gt { color: #0044DD } /* Generic.Traceback */
+.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
+.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
+.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
+.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */
+.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
+.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */
+.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */
+.highlight .s { background-color: #fff0f0 } /* Literal.String */
+.highlight .na { color: #0000CC } /* Name.Attribute */
+.highlight .nb { color: #007020 } /* Name.Builtin */
+.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */
+.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
+.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
+.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */
+.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */
+.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */
+.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */
+.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
+.highlight .nt { color: #007700 } /* Name.Tag */
+.highlight .nv { color: #996633 } /* Name.Variable */
+.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */
+.highlight .w { color: #bbbbbb } /* Text.Whitespace */
+.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */
+.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */
+.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */
+.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
+.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */
+.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */
+.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */
+.highlight .sc { color: #0044DD } /* Literal.String.Char */
+.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */
+.highlight .sd { color: #DD4422 } /* Literal.String.Doc */
+.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */
+.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */
+.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */
+.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */
+.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */
+.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */
+.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */
+.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */
+.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
+.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */
+.highlight .vc { color: #336699 } /* Name.Variable.Class */
+.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */
+.highlight .vi { color: #3333BB } /* Name.Variable.Instance */
+.highlight .vm { color: #996633 } /* Name.Variable.Magic */
+.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
+ </style>
+ <script language="javascript">
+ function getStyle(el,styleProp) {
+ if (el.currentStyle)
+ var y = el.currentStyle[styleProp];
+ else if (window.getComputedStyle)
+ var y = document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);
+ return y;
+ }
+ function toggle() {
+ var el = this.expandable_content;
+ var mark = this.expandable_marker;
+ if (el.style.display == "block") {
+ el.style.display = "none";
+ mark.innerHTML = "[+]";
+ } else {
+ el.style.display = "block";
+ mark.innerHTML = "[-]";
+ }
+ }
+ function init_expandables() {
+ var elts = document.getElementsByClassName("expandable");
+ for (var i = 0; i < elts.length; i++) {
+ var el = elts[i];
+ var clickable = el.getElementsByTagName("span")[0];
+ var marker = clickable.getElementsByClassName("marker")[0];
+ var content = el.getElementsByClassName("content")[0];
+ var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right"));
+ content.style.width = width + "px";
+ clickable.expandable_content = content;
+ clickable.expandable_marker = marker;
+ clickable.onclick = toggle;
+ }
+ }
+ function set_class_display(c, st) {
+ var elements = document.querySelectorAll('.' + c),
+ len = elements.length;
+ for (i = 0; i < len; i++) {
+ elements[i].style.display = st;
+ }
+ }
+ function toggle_class_visibility(id) {
+ var box = document.getElementById(id);
+ set_class_display(id, box.checked ? '' : 'none');
+ }
+ function toggle_all(){
+ var elts = document.getElementsByTagName("input");
+ for (var i = 1; i < elts.length; i++) {
+ var el = elts[i];
+ el.checked ? el.checked=false : el.checked=true;
+ toggle_class_visibility(el.id);
+ }
+ }
+
+ </script>
+ </head>
+ <body onload="init_expandables()">
+ <div id="header">
+ <h1>Cppcheck report - mate-indicator-applet: src/eggaccelerators.c </h1>
+ </div>
+ <div id="menu" dir="rtl">
+ <p id="filename"><a href="index.html">Defects:</a> eggaccelerators.c</p>
+<a href='0.html#line-321'> duplicateExpression 321</a>
+ </div>
+ <div id="content">
+<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 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
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+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
+467
+468
+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
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527</pre></div></td><td class="code"><div class="highlight"><pre><span></span><a name="line-1"></a><span class="cm">/* eggaccelerators.c</span>
+<a name="line-2"></a><span class="cm"> * Copyright (C) 2002 Red Hat, Inc.; Copyright 1998, 2001 Tim Janik</span>
+<a name="line-3"></a><span class="cm"> * Developed by Havoc Pennington, Tim Janik</span>
+<a name="line-4"></a><span class="cm"> *</span>
+<a name="line-5"></a><span class="cm"> * This library is free software; you can redistribute it and/or</span>
+<a name="line-6"></a><span class="cm"> * modify it under the terms of the GNU Library General Public</span>
+<a name="line-7"></a><span class="cm"> * License as published by the Free Software Foundation; either</span>
+<a name="line-8"></a><span class="cm"> * version 2 of the License, or (at your option) any later version.</span>
+<a name="line-9"></a><span class="cm"> *</span>
+<a name="line-10"></a><span class="cm"> * This library is distributed in the hope that it will be useful,</span>
+<a name="line-11"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
+<a name="line-12"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span>
+<a name="line-13"></a><span class="cm"> * Library General Public License for more details.</span>
+<a name="line-14"></a><span class="cm"> *</span>
+<a name="line-15"></a><span class="cm"> * You should have received a copy of the GNU Library General Public</span>
+<a name="line-16"></a><span class="cm"> * License along with this library; if not, write to the</span>
+<a name="line-17"></a><span class="cm"> * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA</span>
+<a name="line-18"></a><span class="cm"> */</span>
+<a name="line-19"></a>
+<a name="line-20"></a><span class="cp">#include</span> <span class="cpf">&quot;eggaccelerators.h&quot;</span><span class="cp"></span>
+<a name="line-21"></a>
+<a name="line-22"></a><span class="cp">#include</span> <span class="cpf">&lt;string.h&gt;</span><span class="cp"></span>
+<a name="line-23"></a><span class="cp">#include</span> <span class="cpf">&lt;gdk/gdkx.h&gt;</span><span class="cp"></span>
+<a name="line-24"></a><span class="cp">#include</span> <span class="cpf">&lt;gdk/gdkkeysyms.h&gt;</span><span class="cp"></span>
+<a name="line-25"></a>
+<a name="line-26"></a><span class="k">enum</span>
+<a name="line-27"></a><span class="p">{</span>
+<a name="line-28"></a> <span class="n">EGG_MODMAP_ENTRY_SHIFT</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span>
+<a name="line-29"></a> <span class="n">EGG_MODMAP_ENTRY_LOCK</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span>
+<a name="line-30"></a> <span class="n">EGG_MODMAP_ENTRY_CONTROL</span> <span class="o">=</span> <span class="mi">2</span><span class="p">,</span>
+<a name="line-31"></a> <span class="n">EGG_MODMAP_ENTRY_MOD1</span> <span class="o">=</span> <span class="mi">3</span><span class="p">,</span>
+<a name="line-32"></a> <span class="n">EGG_MODMAP_ENTRY_MOD2</span> <span class="o">=</span> <span class="mi">4</span><span class="p">,</span>
+<a name="line-33"></a> <span class="n">EGG_MODMAP_ENTRY_MOD3</span> <span class="o">=</span> <span class="mi">5</span><span class="p">,</span>
+<a name="line-34"></a> <span class="n">EGG_MODMAP_ENTRY_MOD4</span> <span class="o">=</span> <span class="mi">6</span><span class="p">,</span>
+<a name="line-35"></a> <span class="n">EGG_MODMAP_ENTRY_MOD5</span> <span class="o">=</span> <span class="mi">7</span><span class="p">,</span>
+<a name="line-36"></a> <span class="n">EGG_MODMAP_ENTRY_LAST</span> <span class="o">=</span> <span class="mi">8</span>
+<a name="line-37"></a><span class="p">};</span>
+<a name="line-38"></a>
+<a name="line-39"></a><span class="cp">#define MODMAP_ENTRY_TO_MODIFIER(x) (1 &lt;&lt; (x))</span>
+<a name="line-40"></a>
+<a name="line-41"></a><span class="k">typedef</span> <span class="k">struct</span>
+<a name="line-42"></a><span class="p">{</span>
+<a name="line-43"></a> <span class="n">EggVirtualModifierType</span> <span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_LAST</span><span class="p">];</span>
+<a name="line-44"></a>
+<a name="line-45"></a><span class="p">}</span> <span class="n">EggModmap</span><span class="p">;</span>
+<a name="line-46"></a>
+<a name="line-47"></a><span class="k">const</span> <span class="n">EggModmap</span><span class="o">*</span> <span class="nf">egg_keymap_get_modmap</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">);</span>
+<a name="line-48"></a>
+<a name="line-49"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-50"></a><span class="nf">is_alt</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-51"></a><span class="p">{</span>
+<a name="line-52"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-53"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;a&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;A&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-54"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-55"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-56"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-57"></a><span class="p">}</span>
+<a name="line-58"></a>
+<a name="line-59"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-60"></a><span class="nf">is_ctl</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-61"></a><span class="p">{</span>
+<a name="line-62"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-63"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;c&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;C&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-64"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-65"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-66"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-67"></a><span class="p">}</span>
+<a name="line-68"></a>
+<a name="line-69"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-70"></a><span class="nf">is_modx</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-71"></a><span class="p">{</span>
+<a name="line-72"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-73"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;m&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;M&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-74"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;o&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;O&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-75"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;d&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;D&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-76"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">&gt;=</span> <span class="sc">&#39;1&#39;</span> <span class="o">&amp;&amp;</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">&lt;=</span> <span class="sc">&#39;5&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-77"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-78"></a><span class="p">}</span>
+<a name="line-79"></a>
+<a name="line-80"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-81"></a><span class="nf">is_ctrl</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-82"></a><span class="p">{</span>
+<a name="line-83"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-84"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;c&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;C&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-85"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-86"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-87"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-88"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-89"></a><span class="p">}</span>
+<a name="line-90"></a>
+<a name="line-91"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-92"></a><span class="nf">is_shft</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-93"></a><span class="p">{</span>
+<a name="line-94"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-95"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-96"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;h&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;H&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-97"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;f&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;F&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-98"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-99"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-100"></a><span class="p">}</span>
+<a name="line-101"></a>
+<a name="line-102"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-103"></a><span class="nf">is_shift</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-104"></a><span class="p">{</span>
+<a name="line-105"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-106"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-107"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;h&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;H&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-108"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;i&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;I&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-109"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;f&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;F&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-110"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-111"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-112"></a><span class="p">}</span>
+<a name="line-113"></a>
+<a name="line-114"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-115"></a><span class="nf">is_control</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-116"></a><span class="p">{</span>
+<a name="line-117"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-118"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;c&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;C&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-119"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;o&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;O&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-120"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;n&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;N&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-121"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-122"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-123"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;o&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;O&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-124"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-125"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">8</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-126"></a><span class="p">}</span>
+<a name="line-127"></a>
+<a name="line-128"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-129"></a><span class="nf">is_release</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-130"></a><span class="p">{</span>
+<a name="line-131"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-132"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-133"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-134"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-135"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-136"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;a&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;A&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-137"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-138"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-139"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">8</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-140"></a><span class="p">}</span>
+<a name="line-141"></a>
+<a name="line-142"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-143"></a><span class="nf">is_meta</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-144"></a><span class="p">{</span>
+<a name="line-145"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-146"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;m&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;M&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-147"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-148"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-149"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;a&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;A&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-150"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-151"></a><span class="p">}</span>
+<a name="line-152"></a>
+<a name="line-153"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-154"></a><span class="nf">is_super</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-155"></a><span class="p">{</span>
+<a name="line-156"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-157"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-158"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;u&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;U&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-159"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;p&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;P&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-160"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-161"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-162"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-163"></a><span class="p">}</span>
+<a name="line-164"></a>
+<a name="line-165"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-166"></a><span class="nf">is_hyper</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-167"></a><span class="p">{</span>
+<a name="line-168"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-169"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;h&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;H&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-170"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;y&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;Y&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-171"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;p&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;P&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-172"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-173"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-174"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-175"></a><span class="p">}</span>
+<a name="line-176"></a>
+<a name="line-177"></a><span class="cm">/**</span>
+<a name="line-178"></a><span class="cm"> * egg_accelerator_parse_virtual:</span>
+<a name="line-179"></a><span class="cm"> * @accelerator: string representing an accelerator</span>
+<a name="line-180"></a><span class="cm"> * @accelerator_key: return location for accelerator keyval</span>
+<a name="line-181"></a><span class="cm"> * @accelerator_mods: return location for accelerator modifier mask</span>
+<a name="line-182"></a><span class="cm"> *</span>
+<a name="line-183"></a><span class="cm"> * Parses a string representing a virtual accelerator. The format</span>
+<a name="line-184"></a><span class="cm"> * looks like &quot;&amp;lt;Control&amp;gt;a&quot; or &quot;&amp;lt;Shift&amp;gt;&amp;lt;Alt&amp;gt;F1&quot; or</span>
+<a name="line-185"></a><span class="cm"> * &quot;&amp;lt;Release&amp;gt;z&quot; (the last one is for key release). The parser</span>
+<a name="line-186"></a><span class="cm"> * is fairly liberal and allows lower or upper case, and also</span>
+<a name="line-187"></a><span class="cm"> * abbreviations such as &quot;&amp;lt;Ctl&amp;gt;&quot; and &quot;&amp;lt;Ctrl&amp;gt;&quot;.</span>
+<a name="line-188"></a><span class="cm"> *</span>
+<a name="line-189"></a><span class="cm"> * If the parse fails, @accelerator_key and @accelerator_mods will</span>
+<a name="line-190"></a><span class="cm"> * be set to 0 (zero) and %FALSE will be returned. If the string contains</span>
+<a name="line-191"></a><span class="cm"> * only modifiers, @accelerator_key will be set to 0 but %TRUE will be</span>
+<a name="line-192"></a><span class="cm"> * returned.</span>
+<a name="line-193"></a><span class="cm"> *</span>
+<a name="line-194"></a><span class="cm"> * The virtual vs. concrete accelerator distinction is a relic of</span>
+<a name="line-195"></a><span class="cm"> * how the X Window System works; there are modifiers Mod2-Mod5 that</span>
+<a name="line-196"></a><span class="cm"> * can represent various keyboard keys (numlock, meta, hyper, etc.),</span>
+<a name="line-197"></a><span class="cm"> * the virtual modifier represents the keyboard key, the concrete</span>
+<a name="line-198"></a><span class="cm"> * modifier the actual Mod2-Mod5 bits in the key press event.</span>
+<a name="line-199"></a><span class="cm"> *</span>
+<a name="line-200"></a><span class="cm"> * Returns: %TRUE on success.</span>
+<a name="line-201"></a><span class="cm"> */</span>
+<a name="line-202"></a><span class="n">gboolean</span>
+<a name="line-203"></a><span class="nf">egg_accelerator_parse_virtual</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">accelerator</span><span class="p">,</span>
+<a name="line-204"></a> <span class="n">guint</span> <span class="o">*</span><span class="n">accelerator_key</span><span class="p">,</span>
+<a name="line-205"></a> <span class="n">EggVirtualModifierType</span> <span class="o">*</span><span class="n">accelerator_mods</span><span class="p">)</span>
+<a name="line-206"></a><span class="p">{</span>
+<a name="line-207"></a> <span class="n">guint</span> <span class="n">keyval</span><span class="p">;</span>
+<a name="line-208"></a> <span class="n">GdkModifierType</span> <span class="n">mods</span><span class="p">;</span>
+<a name="line-209"></a> <span class="n">gint</span> <span class="n">len</span><span class="p">;</span>
+<a name="line-210"></a> <span class="n">gboolean</span> <span class="n">bad_keyval</span><span class="p">;</span>
+<a name="line-211"></a>
+<a name="line-212"></a> <span class="k">if</span> <span class="p">(</span><span class="n">accelerator_key</span><span class="p">)</span>
+<a name="line-213"></a> <span class="o">*</span><span class="n">accelerator_key</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-214"></a> <span class="k">if</span> <span class="p">(</span><span class="n">accelerator_mods</span><span class="p">)</span>
+<a name="line-215"></a> <span class="o">*</span><span class="n">accelerator_mods</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-216"></a>
+<a name="line-217"></a> <span class="n">g_return_val_if_fail</span> <span class="p">(</span><span class="n">accelerator</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">,</span> <span class="n">FALSE</span><span class="p">);</span>
+<a name="line-218"></a>
+<a name="line-219"></a> <span class="n">bad_keyval</span> <span class="o">=</span> <span class="n">FALSE</span><span class="p">;</span>
+<a name="line-220"></a>
+<a name="line-221"></a> <span class="n">keyval</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-222"></a> <span class="n">mods</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-223"></a> <span class="n">len</span> <span class="o">=</span> <span class="n">strlen</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">);</span>
+<a name="line-224"></a> <span class="k">while</span> <span class="p">(</span><span class="n">len</span><span class="p">)</span>
+<a name="line-225"></a> <span class="p">{</span>
+<a name="line-226"></a> <span class="k">if</span> <span class="p">(</span><span class="o">*</span><span class="n">accelerator</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span>
+<a name="line-227"></a> <span class="p">{</span>
+<a name="line-228"></a> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">9</span> <span class="o">&amp;&amp;</span> <span class="n">is_release</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-229"></a> <span class="p">{</span>
+<a name="line-230"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">9</span><span class="p">;</span>
+<a name="line-231"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">9</span><span class="p">;</span>
+<a name="line-232"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_RELEASE_MASK</span><span class="p">;</span>
+<a name="line-233"></a> <span class="p">}</span>
+<a name="line-234"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">9</span> <span class="o">&amp;&amp;</span> <span class="n">is_control</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-235"></a> <span class="p">{</span>
+<a name="line-236"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">9</span><span class="p">;</span>
+<a name="line-237"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">9</span><span class="p">;</span>
+<a name="line-238"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_CONTROL_MASK</span><span class="p">;</span>
+<a name="line-239"></a> <span class="p">}</span>
+<a name="line-240"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">7</span> <span class="o">&amp;&amp;</span> <span class="n">is_shift</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-241"></a> <span class="p">{</span>
+<a name="line-242"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-243"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-244"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SHIFT_MASK</span><span class="p">;</span>
+<a name="line-245"></a> <span class="p">}</span>
+<a name="line-246"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">6</span> <span class="o">&amp;&amp;</span> <span class="n">is_shft</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-247"></a> <span class="p">{</span>
+<a name="line-248"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-249"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-250"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SHIFT_MASK</span><span class="p">;</span>
+<a name="line-251"></a> <span class="p">}</span>
+<a name="line-252"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">6</span> <span class="o">&amp;&amp;</span> <span class="n">is_ctrl</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-253"></a> <span class="p">{</span>
+<a name="line-254"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-255"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-256"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_CONTROL_MASK</span><span class="p">;</span>
+<a name="line-257"></a> <span class="p">}</span>
+<a name="line-258"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">6</span> <span class="o">&amp;&amp;</span> <span class="n">is_modx</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-259"></a> <span class="p">{</span>
+<a name="line-260"></a> <span class="k">static</span> <span class="k">const</span> <span class="n">guint</span> <span class="n">mod_vals</span><span class="p">[]</span> <span class="o">=</span> <span class="p">{</span>
+<a name="line-261"></a> <span class="n">EGG_VIRTUAL_ALT_MASK</span><span class="p">,</span> <span class="n">EGG_VIRTUAL_MOD2_MASK</span><span class="p">,</span> <span class="n">EGG_VIRTUAL_MOD3_MASK</span><span class="p">,</span>
+<a name="line-262"></a> <span class="n">EGG_VIRTUAL_MOD4_MASK</span><span class="p">,</span> <span class="n">EGG_VIRTUAL_MOD5_MASK</span>
+<a name="line-263"></a> <span class="p">};</span>
+<a name="line-264"></a>
+<a name="line-265"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-266"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">4</span><span class="p">;</span>
+<a name="line-267"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">mod_vals</span><span class="p">[</span><span class="o">*</span><span class="n">accelerator</span> <span class="o">-</span> <span class="sc">&#39;1&#39;</span><span class="p">];</span>
+<a name="line-268"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">2</span><span class="p">;</span>
+<a name="line-269"></a> <span class="p">}</span>
+<a name="line-270"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">5</span> <span class="o">&amp;&amp;</span> <span class="n">is_ctl</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-271"></a> <span class="p">{</span>
+<a name="line-272"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">5</span><span class="p">;</span>
+<a name="line-273"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">5</span><span class="p">;</span>
+<a name="line-274"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_CONTROL_MASK</span><span class="p">;</span>
+<a name="line-275"></a> <span class="p">}</span>
+<a name="line-276"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">5</span> <span class="o">&amp;&amp;</span> <span class="n">is_alt</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-277"></a> <span class="p">{</span>
+<a name="line-278"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">5</span><span class="p">;</span>
+<a name="line-279"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">5</span><span class="p">;</span>
+<a name="line-280"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_ALT_MASK</span><span class="p">;</span>
+<a name="line-281"></a> <span class="p">}</span>
+<a name="line-282"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">6</span> <span class="o">&amp;&amp;</span> <span class="n">is_meta</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-283"></a> <span class="p">{</span>
+<a name="line-284"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-285"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-286"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_META_MASK</span><span class="p">;</span>
+<a name="line-287"></a> <span class="p">}</span>
+<a name="line-288"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">7</span> <span class="o">&amp;&amp;</span> <span class="n">is_hyper</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-289"></a> <span class="p">{</span>
+<a name="line-290"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-291"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-292"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_HYPER_MASK</span><span class="p">;</span>
+<a name="line-293"></a> <span class="p">}</span>
+<a name="line-294"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">7</span> <span class="o">&amp;&amp;</span> <span class="n">is_super</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-295"></a> <span class="p">{</span>
+<a name="line-296"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-297"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-298"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SUPER_MASK</span><span class="p">;</span>
+<a name="line-299"></a> <span class="p">}</span>
+<a name="line-300"></a> <span class="k">else</span>
+<a name="line-301"></a> <span class="p">{</span>
+<a name="line-302"></a> <span class="n">gchar</span> <span class="n">last_ch</span><span class="p">;</span>
+<a name="line-303"></a>
+<a name="line-304"></a> <span class="n">last_ch</span> <span class="o">=</span> <span class="o">*</span><span class="n">accelerator</span><span class="p">;</span>
+<a name="line-305"></a> <span class="k">while</span> <span class="p">(</span><span class="n">last_ch</span> <span class="o">&amp;&amp;</span> <span class="n">last_ch</span> <span class="o">!=</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">)</span>
+<a name="line-306"></a> <span class="p">{</span>
+<a name="line-307"></a> <span class="n">last_ch</span> <span class="o">=</span> <span class="o">*</span><span class="n">accelerator</span><span class="p">;</span>
+<a name="line-308"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">1</span><span class="p">;</span>
+<a name="line-309"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">1</span><span class="p">;</span>
+<a name="line-310"></a> <span class="p">}</span>
+<a name="line-311"></a> <span class="p">}</span>
+<a name="line-312"></a> <span class="p">}</span>
+<a name="line-313"></a> <span class="k">else</span>
+<a name="line-314"></a> <span class="p">{</span>
+<a name="line-315"></a> <span class="n">keyval</span> <span class="o">=</span> <span class="n">gdk_keyval_from_name</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">);</span>
+<a name="line-316"></a>
+<a name="line-317"></a> <span class="k">if</span> <span class="p">(</span><span class="n">keyval</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span>
+<a name="line-318"></a> <span class="n">bad_keyval</span> <span class="o">=</span> <span class="n">TRUE</span><span class="p">;</span>
+<a name="line-319"></a>
+<a name="line-320"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="n">len</span><span class="p">;</span>
+<a name="line-321"></a><span class="hll"> <span class="n">len</span> <span class="o">-=</span> <span class="n">len</span><span class="p">;</span><div class='verbose expandable'><span class='error2'>&lt;--- Same expression on both sides of '-='. <span class='marker'>[+]</span></span><div class='content'>Finding the same expression on both sides of an operator is suspicious and might indicate a cut and paste or logic error. Please examine this code carefully to determine if it is correct.</div></div>
+</span><a name="line-322"></a> <span class="p">}</span>
+<a name="line-323"></a> <span class="p">}</span>
+<a name="line-324"></a>
+<a name="line-325"></a> <span class="k">if</span> <span class="p">(</span><span class="n">accelerator_key</span><span class="p">)</span>
+<a name="line-326"></a> <span class="o">*</span><span class="n">accelerator_key</span> <span class="o">=</span> <span class="n">gdk_keyval_to_lower</span> <span class="p">(</span><span class="n">keyval</span><span class="p">);</span>
+<a name="line-327"></a> <span class="k">if</span> <span class="p">(</span><span class="n">accelerator_mods</span><span class="p">)</span>
+<a name="line-328"></a> <span class="o">*</span><span class="n">accelerator_mods</span> <span class="o">=</span> <span class="n">mods</span><span class="p">;</span>
+<a name="line-329"></a>
+<a name="line-330"></a> <span class="k">return</span> <span class="o">!</span><span class="n">bad_keyval</span><span class="p">;</span>
+<a name="line-331"></a><span class="p">}</span>
+<a name="line-332"></a>
+<a name="line-333"></a><span class="kt">void</span>
+<a name="line-334"></a><span class="nf">egg_keymap_resolve_virtual_modifiers</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">,</span>
+<a name="line-335"></a> <span class="n">EggVirtualModifierType</span> <span class="n">virtual_mods</span><span class="p">,</span>
+<a name="line-336"></a> <span class="n">GdkModifierType</span> <span class="o">*</span><span class="n">concrete_mods</span><span class="p">)</span>
+<a name="line-337"></a><span class="p">{</span>
+<a name="line-338"></a> <span class="n">GdkModifierType</span> <span class="n">concrete</span><span class="p">;</span>
+<a name="line-339"></a> <span class="kt">int</span> <span class="n">i</span><span class="p">;</span>
+<a name="line-340"></a> <span class="k">const</span> <span class="n">EggModmap</span> <span class="o">*</span><span class="n">modmap</span><span class="p">;</span>
+<a name="line-341"></a>
+<a name="line-342"></a> <span class="n">g_return_if_fail</span> <span class="p">(</span><span class="n">GDK_IS_KEYMAP</span> <span class="p">(</span><span class="n">keymap</span><span class="p">));</span>
+<a name="line-343"></a> <span class="n">g_return_if_fail</span> <span class="p">(</span><span class="n">concrete_mods</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-344"></a>
+<a name="line-345"></a> <span class="n">modmap</span> <span class="o">=</span> <span class="n">egg_keymap_get_modmap</span> <span class="p">(</span><span class="n">keymap</span><span class="p">);</span>
+<a name="line-346"></a>
+<a name="line-347"></a> <span class="cm">/* Not so sure about this algorithm. */</span>
+<a name="line-348"></a>
+<a name="line-349"></a> <span class="n">concrete</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-350"></a> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-351"></a> <span class="k">while</span> <span class="p">(</span><span class="n">i</span> <span class="o">&lt;</span> <span class="n">EGG_MODMAP_ENTRY_LAST</span><span class="p">)</span>
+<a name="line-352"></a> <span class="p">{</span>
+<a name="line-353"></a> <span class="k">if</span> <span class="p">(</span><span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">&amp;</span> <span class="n">virtual_mods</span><span class="p">)</span>
+<a name="line-354"></a> <span class="n">concrete</span> <span class="o">|=</span> <span class="p">(</span><span class="mi">1</span> <span class="o">&lt;&lt;</span> <span class="n">i</span><span class="p">);</span>
+<a name="line-355"></a>
+<a name="line-356"></a> <span class="o">++</span><span class="n">i</span><span class="p">;</span>
+<a name="line-357"></a> <span class="p">}</span>
+<a name="line-358"></a>
+<a name="line-359"></a> <span class="o">*</span><span class="n">concrete_mods</span> <span class="o">=</span> <span class="n">concrete</span><span class="p">;</span>
+<a name="line-360"></a><span class="p">}</span>
+<a name="line-361"></a>
+<a name="line-362"></a><span class="kt">void</span>
+<a name="line-363"></a><span class="nf">egg_keymap_virtualize_modifiers</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">,</span>
+<a name="line-364"></a> <span class="n">GdkModifierType</span> <span class="n">concrete_mods</span><span class="p">,</span>
+<a name="line-365"></a> <span class="n">EggVirtualModifierType</span> <span class="o">*</span><span class="n">virtual_mods</span><span class="p">)</span>
+<a name="line-366"></a><span class="p">{</span>
+<a name="line-367"></a> <span class="n">GdkModifierType</span> <span class="n">virtual</span><span class="p">;</span>
+<a name="line-368"></a> <span class="kt">int</span> <span class="n">i</span><span class="p">;</span>
+<a name="line-369"></a> <span class="k">const</span> <span class="n">EggModmap</span> <span class="o">*</span><span class="n">modmap</span><span class="p">;</span>
+<a name="line-370"></a>
+<a name="line-371"></a> <span class="n">g_return_if_fail</span> <span class="p">(</span><span class="n">GDK_IS_KEYMAP</span> <span class="p">(</span><span class="n">keymap</span><span class="p">));</span>
+<a name="line-372"></a> <span class="n">g_return_if_fail</span> <span class="p">(</span><span class="n">virtual_mods</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-373"></a>
+<a name="line-374"></a> <span class="n">modmap</span> <span class="o">=</span> <span class="n">egg_keymap_get_modmap</span> <span class="p">(</span><span class="n">keymap</span><span class="p">);</span>
+<a name="line-375"></a>
+<a name="line-376"></a> <span class="cm">/* Not so sure about this algorithm. */</span>
+<a name="line-377"></a>
+<a name="line-378"></a> <span class="n">virtual</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-379"></a> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-380"></a> <span class="k">while</span> <span class="p">(</span><span class="n">i</span> <span class="o">&lt;</span> <span class="n">EGG_MODMAP_ENTRY_LAST</span><span class="p">)</span>
+<a name="line-381"></a> <span class="p">{</span>
+<a name="line-382"></a> <span class="k">if</span> <span class="p">((</span><span class="mi">1</span> <span class="o">&lt;&lt;</span> <span class="n">i</span><span class="p">)</span> <span class="o">&amp;</span> <span class="n">concrete_mods</span><span class="p">)</span>
+<a name="line-383"></a> <span class="p">{</span>
+<a name="line-384"></a> <span class="n">EggVirtualModifierType</span> <span class="n">cleaned</span><span class="p">;</span>
+<a name="line-385"></a>
+<a name="line-386"></a> <span class="n">cleaned</span> <span class="o">=</span> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">&amp;</span> <span class="o">~</span><span class="p">(</span><span class="n">EGG_VIRTUAL_MOD2_MASK</span> <span class="o">|</span>
+<a name="line-387"></a> <span class="n">EGG_VIRTUAL_MOD3_MASK</span> <span class="o">|</span>
+<a name="line-388"></a> <span class="n">EGG_VIRTUAL_MOD4_MASK</span> <span class="o">|</span>
+<a name="line-389"></a> <span class="n">EGG_VIRTUAL_MOD5_MASK</span><span class="p">);</span>
+<a name="line-390"></a>
+<a name="line-391"></a> <span class="k">if</span> <span class="p">(</span><span class="n">cleaned</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">)</span>
+<a name="line-392"></a> <span class="p">{</span>
+<a name="line-393"></a> <span class="n">virtual</span> <span class="o">|=</span> <span class="n">cleaned</span><span class="p">;</span>
+<a name="line-394"></a> <span class="p">}</span>
+<a name="line-395"></a> <span class="k">else</span>
+<a name="line-396"></a> <span class="p">{</span>
+<a name="line-397"></a> <span class="cm">/* Rather than dropping mod2-&gt;mod5 if not bound,</span>
+<a name="line-398"></a><span class="cm"> * go ahead and use the concrete names</span>
+<a name="line-399"></a><span class="cm"> */</span>
+<a name="line-400"></a> <span class="n">virtual</span> <span class="o">|=</span> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">i</span><span class="p">];</span>
+<a name="line-401"></a> <span class="p">}</span>
+<a name="line-402"></a> <span class="p">}</span>
+<a name="line-403"></a>
+<a name="line-404"></a> <span class="o">++</span><span class="n">i</span><span class="p">;</span>
+<a name="line-405"></a> <span class="p">}</span>
+<a name="line-406"></a>
+<a name="line-407"></a> <span class="o">*</span><span class="n">virtual_mods</span> <span class="o">=</span> <span class="n">virtual</span><span class="p">;</span>
+<a name="line-408"></a><span class="p">}</span>
+<a name="line-409"></a>
+<a name="line-410"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-411"></a><span class="nf">reload_modmap</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">,</span>
+<a name="line-412"></a> <span class="n">EggModmap</span> <span class="o">*</span><span class="n">modmap</span><span class="p">)</span>
+<a name="line-413"></a><span class="p">{</span>
+<a name="line-414"></a> <span class="n">XModifierKeymap</span> <span class="o">*</span><span class="n">xmodmap</span><span class="p">;</span>
+<a name="line-415"></a> <span class="kt">int</span> <span class="n">map_size</span><span class="p">;</span>
+<a name="line-416"></a> <span class="kt">int</span> <span class="n">i</span><span class="p">;</span>
+<a name="line-417"></a>
+<a name="line-418"></a> <span class="cm">/* FIXME multihead */</span>
+<a name="line-419"></a> <span class="n">xmodmap</span> <span class="o">=</span> <span class="n">XGetModifierMapping</span> <span class="p">(</span><span class="n">gdk_x11_get_default_xdisplay</span> <span class="p">());</span>
+<a name="line-420"></a>
+<a name="line-421"></a> <span class="n">memset</span> <span class="p">(</span><span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="k">sizeof</span> <span class="p">(</span><span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">));</span>
+<a name="line-422"></a>
+<a name="line-423"></a> <span class="cm">/* there are 8 modifiers, and the first 3 are shift, shift lock,</span>
+<a name="line-424"></a><span class="cm"> * and control</span>
+<a name="line-425"></a><span class="cm"> */</span>
+<a name="line-426"></a> <span class="n">map_size</span> <span class="o">=</span> <span class="mi">8</span> <span class="o">*</span> <span class="n">xmodmap</span><span class="o">-&gt;</span><span class="n">max_keypermod</span><span class="p">;</span>
+<a name="line-427"></a> <span class="n">i</span> <span class="o">=</span> <span class="mi">3</span> <span class="o">*</span> <span class="n">xmodmap</span><span class="o">-&gt;</span><span class="n">max_keypermod</span><span class="p">;</span>
+<a name="line-428"></a> <span class="k">while</span> <span class="p">(</span><span class="n">i</span> <span class="o">&lt;</span> <span class="n">map_size</span><span class="p">)</span>
+<a name="line-429"></a> <span class="p">{</span>
+<a name="line-430"></a> <span class="cm">/* get the key code at this point in the map,</span>
+<a name="line-431"></a><span class="cm"> * see if its keysym is one we&#39;re interested in</span>
+<a name="line-432"></a><span class="cm"> */</span>
+<a name="line-433"></a> <span class="kt">int</span> <span class="n">keycode</span> <span class="o">=</span> <span class="n">xmodmap</span><span class="o">-&gt;</span><span class="n">modifiermap</span><span class="p">[</span><span class="n">i</span><span class="p">];</span>
+<a name="line-434"></a> <span class="n">GdkKeymapKey</span> <span class="o">*</span><span class="n">keys</span><span class="p">;</span>
+<a name="line-435"></a> <span class="n">guint</span> <span class="o">*</span><span class="n">keyvals</span><span class="p">;</span>
+<a name="line-436"></a> <span class="kt">int</span> <span class="n">n_entries</span><span class="p">;</span>
+<a name="line-437"></a> <span class="kt">int</span> <span class="n">j</span><span class="p">;</span>
+<a name="line-438"></a> <span class="n">EggVirtualModifierType</span> <span class="n">mask</span><span class="p">;</span>
+<a name="line-439"></a>
+<a name="line-440"></a> <span class="n">keys</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span>
+<a name="line-441"></a> <span class="n">keyvals</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span>
+<a name="line-442"></a> <span class="n">n_entries</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-443"></a>
+<a name="line-444"></a> <span class="n">gdk_keymap_get_entries_for_keycode</span> <span class="p">(</span><span class="n">keymap</span><span class="p">,</span>
+<a name="line-445"></a> <span class="n">keycode</span><span class="p">,</span>
+<a name="line-446"></a> <span class="o">&amp;</span><span class="n">keys</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">keyvals</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">n_entries</span><span class="p">);</span>
+<a name="line-447"></a>
+<a name="line-448"></a> <span class="n">mask</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-449"></a> <span class="n">j</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-450"></a> <span class="k">while</span> <span class="p">(</span><span class="n">j</span> <span class="o">&lt;</span> <span class="n">n_entries</span><span class="p">)</span>
+<a name="line-451"></a> <span class="p">{</span>
+<a name="line-452"></a> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Num_Lock</span><span class="p">)</span>
+<a name="line-453"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_NUM_LOCK_MASK</span><span class="p">;</span>
+<a name="line-454"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Scroll_Lock</span><span class="p">)</span>
+<a name="line-455"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SCROLL_LOCK_MASK</span><span class="p">;</span>
+<a name="line-456"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Meta_L</span> <span class="o">||</span>
+<a name="line-457"></a> <span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Meta_R</span><span class="p">)</span>
+<a name="line-458"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_META_MASK</span><span class="p">;</span>
+<a name="line-459"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Hyper_L</span> <span class="o">||</span>
+<a name="line-460"></a> <span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Hyper_R</span><span class="p">)</span>
+<a name="line-461"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_HYPER_MASK</span><span class="p">;</span>
+<a name="line-462"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Super_L</span> <span class="o">||</span>
+<a name="line-463"></a> <span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Super_R</span><span class="p">)</span>
+<a name="line-464"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SUPER_MASK</span><span class="p">;</span>
+<a name="line-465"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Mode_switch</span><span class="p">)</span>
+<a name="line-466"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MODE_SWITCH_MASK</span><span class="p">;</span>
+<a name="line-467"></a>
+<a name="line-468"></a> <span class="o">++</span><span class="n">j</span><span class="p">;</span>
+<a name="line-469"></a> <span class="p">}</span>
+<a name="line-470"></a>
+<a name="line-471"></a> <span class="cm">/* Mod1Mask is 1 &lt;&lt; 3 for example, i.e. the</span>
+<a name="line-472"></a><span class="cm"> * fourth modifier, i / keyspermod is the modifier</span>
+<a name="line-473"></a><span class="cm"> * index</span>
+<a name="line-474"></a><span class="cm"> */</span>
+<a name="line-475"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">i</span><span class="o">/</span><span class="n">xmodmap</span><span class="o">-&gt;</span><span class="n">max_keypermod</span><span class="p">]</span> <span class="o">|=</span> <span class="n">mask</span><span class="p">;</span>
+<a name="line-476"></a>
+<a name="line-477"></a> <span class="n">g_free</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">);</span>
+<a name="line-478"></a> <span class="n">g_free</span> <span class="p">(</span><span class="n">keys</span><span class="p">);</span>
+<a name="line-479"></a>
+<a name="line-480"></a> <span class="o">++</span><span class="n">i</span><span class="p">;</span>
+<a name="line-481"></a> <span class="p">}</span>
+<a name="line-482"></a>
+<a name="line-483"></a> <span class="cm">/* Add in the not-really-virtual fixed entries */</span>
+<a name="line-484"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_SHIFT</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SHIFT_MASK</span><span class="p">;</span>
+<a name="line-485"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_CONTROL</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_CONTROL_MASK</span><span class="p">;</span>
+<a name="line-486"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_LOCK</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_LOCK_MASK</span><span class="p">;</span>
+<a name="line-487"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD1</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_ALT_MASK</span><span class="p">;</span>
+<a name="line-488"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD2</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MOD2_MASK</span><span class="p">;</span>
+<a name="line-489"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD3</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MOD3_MASK</span><span class="p">;</span>
+<a name="line-490"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD4</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MOD4_MASK</span><span class="p">;</span>
+<a name="line-491"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD5</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MOD5_MASK</span><span class="p">;</span>
+<a name="line-492"></a>
+<a name="line-493"></a> <span class="n">XFreeModifiermap</span> <span class="p">(</span><span class="n">xmodmap</span><span class="p">);</span>
+<a name="line-494"></a><span class="p">}</span>
+<a name="line-495"></a>
+<a name="line-496"></a><span class="k">const</span> <span class="n">EggModmap</span><span class="o">*</span>
+<a name="line-497"></a><span class="nf">egg_keymap_get_modmap</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">)</span>
+<a name="line-498"></a><span class="p">{</span>
+<a name="line-499"></a> <span class="n">EggModmap</span> <span class="o">*</span><span class="n">modmap</span><span class="p">;</span>
+<a name="line-500"></a>
+<a name="line-501"></a> <span class="cm">/* This is all a hack, much simpler when we can just</span>
+<a name="line-502"></a><span class="cm"> * modify GDK directly.</span>
+<a name="line-503"></a><span class="cm"> */</span>
+<a name="line-504"></a>
+<a name="line-505"></a> <span class="n">modmap</span> <span class="o">=</span> <span class="n">g_object_get_data</span> <span class="p">(</span><span class="n">G_OBJECT</span> <span class="p">(</span><span class="n">keymap</span><span class="p">),</span>
+<a name="line-506"></a> <span class="s">&quot;egg-modmap&quot;</span><span class="p">);</span>
+<a name="line-507"></a>
+<a name="line-508"></a> <span class="k">if</span> <span class="p">(</span><span class="n">modmap</span> <span class="o">==</span> <span class="nb">NULL</span><span class="p">)</span>
+<a name="line-509"></a> <span class="p">{</span>
+<a name="line-510"></a> <span class="n">modmap</span> <span class="o">=</span> <span class="n">g_new0</span> <span class="p">(</span><span class="n">EggModmap</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
+<a name="line-511"></a>
+<a name="line-512"></a> <span class="cm">/* FIXME modify keymap change events with an event filter</span>
+<a name="line-513"></a><span class="cm"> * and force a reload if we get one</span>
+<a name="line-514"></a><span class="cm"> */</span>
+<a name="line-515"></a>
+<a name="line-516"></a> <span class="n">reload_modmap</span> <span class="p">(</span><span class="n">keymap</span><span class="p">,</span> <span class="n">modmap</span><span class="p">);</span>
+<a name="line-517"></a>
+<a name="line-518"></a> <span class="n">g_object_set_data_full</span> <span class="p">(</span><span class="n">G_OBJECT</span> <span class="p">(</span><span class="n">keymap</span><span class="p">),</span>
+<a name="line-519"></a> <span class="s">&quot;egg-modmap&quot;</span><span class="p">,</span>
+<a name="line-520"></a> <span class="n">modmap</span><span class="p">,</span>
+<a name="line-521"></a> <span class="n">g_free</span><span class="p">);</span>
+<a name="line-522"></a> <span class="p">}</span>
+<a name="line-523"></a>
+<a name="line-524"></a> <span class="n">g_assert</span> <span class="p">(</span><span class="n">modmap</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-525"></a>
+<a name="line-526"></a> <span class="k">return</span> <span class="n">modmap</span><span class="p">;</span>
+<a name="line-527"></a><span class="p">}</span>
+</pre></div>
+</td></tr></table>
+ </div>
+ <div id="footer">
+ <p>
+ Cppcheck 1.90 - a tool for static C/C++ code analysis</br>
+ </br>
+ Internet: <a href="http://cppcheck.net">http://cppcheck.net</a></br>
+ IRC: <a href="irc://irc.freenode.net/cppcheck">irc://irc.freenode.net/cppcheck</a></br>
+ </p>
+ </div>
+ </body>
+</html>
diff --git a/[email protected]_master/index.html b/[email protected]_master/index.html
new file mode 100644
index 0000000..812f8b5
--- /dev/null
+++ b/[email protected]_master/index.html
@@ -0,0 +1,101 @@
+
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Cppcheck - HTML report - mate-indicator-applet</title>
+ <link rel="stylesheet" href="style.css">
+ <style>
+
+ </style>
+ <script language="javascript">
+ function getStyle(el,styleProp) {
+ if (el.currentStyle)
+ var y = el.currentStyle[styleProp];
+ else if (window.getComputedStyle)
+ var y = document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);
+ return y;
+ }
+ function toggle() {
+ var el = this.expandable_content;
+ var mark = this.expandable_marker;
+ if (el.style.display == "block") {
+ el.style.display = "none";
+ mark.innerHTML = "[+]";
+ } else {
+ el.style.display = "block";
+ mark.innerHTML = "[-]";
+ }
+ }
+ function init_expandables() {
+ var elts = document.getElementsByClassName("expandable");
+ for (var i = 0; i < elts.length; i++) {
+ var el = elts[i];
+ var clickable = el.getElementsByTagName("span")[0];
+ var marker = clickable.getElementsByClassName("marker")[0];
+ var content = el.getElementsByClassName("content")[0];
+ var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right"));
+ content.style.width = width + "px";
+ clickable.expandable_content = content;
+ clickable.expandable_marker = marker;
+ clickable.onclick = toggle;
+ }
+ }
+ function set_class_display(c, st) {
+ var elements = document.querySelectorAll('.' + c),
+ len = elements.length;
+ for (i = 0; i < len; i++) {
+ elements[i].style.display = st;
+ }
+ }
+ function toggle_class_visibility(id) {
+ var box = document.getElementById(id);
+ set_class_display(id, box.checked ? '' : 'none');
+ }
+ function toggle_all(){
+ var elts = document.getElementsByTagName("input");
+ for (var i = 1; i < elts.length; i++) {
+ var el = elts[i];
+ el.checked ? el.checked=false : el.checked=true;
+ toggle_class_visibility(el.id);
+ }
+ }
+
+ </script>
+ </head>
+ <body onload="init_expandables()">
+ <div id="header">
+ <h1>Cppcheck report - mate-indicator-applet: </h1>
+ </div>
+ <div id="menu_index">
+ <p id="filename"><a href="index.html">Defect summary;</a> </p>
+
+ <label><input type="checkbox" onclick="toggle_all()" checked> Toggle all</label>
+ <table>
+ <tr><th>Show</th><th>#</th><th>Defect ID</th></tr>
+ <tr><td><input type='checkbox' onclick='toggle_class_visibility(this.id)' id='duplicateExpression' name='duplicateExpression' checked></td><td>1</td><td>duplicateExpression</td></tr>
+ <tr><td><input type='checkbox' onclick='toggle_class_visibility(this.id)' id='missingIncludeSystem' name='missingIncludeSystem' checked></td><td>1</td><td>missingIncludeSystem</td></tr>
+ <tr><td></td><td>2</td><td>total</td></tr>
+ </table>
+ <p><a href="stats.html">Statistics</a></p>
+ </div>
+ <div id="content_index">
+
+ <table>
+ <tr><th>Line</th><th>Id</th><th>CWE</th><th>Severity</th><th>Message</th></tr>
+ <tr><td colspan='5'><a href='1.html'></a></td></tr>
+ <tr class="missingIncludeSystem"><td><a href="1.html#line-0">0</a></td><td>missingIncludeSystem</td><td></td><td>information</td><td >Cppcheck cannot find all the include files (use --check-config for details)</td></tr>
+ <tr><td colspan='5'><a href='0.html'>src/eggaccelerators.c</a></td></tr>
+ <tr class="duplicateExpression"><td><a href="0.html#line-321">321</a></td><td>duplicateExpression</td><td><a href='https://cwe.mitre.org/data/definitions/398.html'>398</a></td><td>style</td><td >Same expression on both sides of &apos;-=&apos;.</td></tr>
+ </table>
+ </div>
+ <div id="footer">
+ <p>
+ Cppcheck 1.90 - a tool for static C/C++ code analysis</br>
+ </br>
+ Internet: <a href="http://cppcheck.net">http://cppcheck.net</a></br>
+ IRC: <a href="irc://irc.freenode.net/cppcheck">irc://irc.freenode.net/cppcheck</a></br>
+ </p>
+ </div>
+ </body>
+</html>
diff --git a/[email protected]_master/stats.html b/[email protected]_master/stats.html
new file mode 100644
index 0000000..14ae0d4
--- /dev/null
+++ b/[email protected]_master/stats.html
@@ -0,0 +1,89 @@
+
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Cppcheck - HTML report - mate-indicator-applet</title>
+ <link rel="stylesheet" href="style.css">
+ <style>
+
+ </style>
+ <script language="javascript">
+ function getStyle(el,styleProp) {
+ if (el.currentStyle)
+ var y = el.currentStyle[styleProp];
+ else if (window.getComputedStyle)
+ var y = document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);
+ return y;
+ }
+ function toggle() {
+ var el = this.expandable_content;
+ var mark = this.expandable_marker;
+ if (el.style.display == "block") {
+ el.style.display = "none";
+ mark.innerHTML = "[+]";
+ } else {
+ el.style.display = "block";
+ mark.innerHTML = "[-]";
+ }
+ }
+ function init_expandables() {
+ var elts = document.getElementsByClassName("expandable");
+ for (var i = 0; i < elts.length; i++) {
+ var el = elts[i];
+ var clickable = el.getElementsByTagName("span")[0];
+ var marker = clickable.getElementsByClassName("marker")[0];
+ var content = el.getElementsByClassName("content")[0];
+ var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right"));
+ content.style.width = width + "px";
+ clickable.expandable_content = content;
+ clickable.expandable_marker = marker;
+ clickable.onclick = toggle;
+ }
+ }
+ function set_class_display(c, st) {
+ var elements = document.querySelectorAll('.' + c),
+ len = elements.length;
+ for (i = 0; i < len; i++) {
+ elements[i].style.display = st;
+ }
+ }
+ function toggle_class_visibility(id) {
+ var box = document.getElementById(id);
+ set_class_display(id, box.checked ? '' : 'none');
+ }
+ function toggle_all(){
+ var elts = document.getElementsByTagName("input");
+ for (var i = 1; i < elts.length; i++) {
+ var el = elts[i];
+ el.checked ? el.checked=false : el.checked=true;
+ toggle_class_visibility(el.id);
+ }
+ }
+
+ </script>
+ </head>
+ <body onload="init_expandables()">
+ <div id="header">
+ <h1>Cppcheck report - mate-indicator-applet: Statistics </h1>
+ </div>
+ <div id="menu_index">
+ <p id="filename"><a href="index.html">Back to summary</a> </p>
+
+ </div>
+ <div id="content_index">
+<p>Top 10 files for style severity, total findings: 1</br>
+&#160;&#160;&#160;1&#160;<a href="0.html"> src/eggaccelerators.c</a></br>
+</p>
+
+ </div>
+ <div id="footer">
+ <p>
+ Cppcheck 1.90 - a tool for static C/C++ code analysis</br>
+ </br>
+ Internet: <a href="http://cppcheck.net">http://cppcheck.net</a></br>
+ IRC: <a href="irc://irc.freenode.net/cppcheck">irc://irc.freenode.net/cppcheck</a></br>
+ </p>
+ </div>
+ </body>
+</html>
diff --git a/[email protected]_master/style.css b/[email protected]_master/style.css
new file mode 100644
index 0000000..c39571c
--- /dev/null
+++ b/[email protected]_master/style.css
@@ -0,0 +1,149 @@
+
+body {
+ font: 13px Arial, Verdana, Sans-Serif;
+ margin: 0;
+ width: auto;
+}
+
+h1 {
+ margin: 10px;
+}
+
+#footer > p {
+ margin: 4px;
+}
+
+.error {
+ background-color: #ffb7b7;
+}
+
+.error2 {
+ background-color: #faa;
+ border: 1px dotted black;
+ display: inline-block;
+ margin-left: 4px;
+}
+
+.inconclusive {
+ background-color: #B6B6B4;
+}
+
+.inconclusive2 {
+ background-color: #B6B6B4;
+ border: 1px dotted black;
+ display: inline-block;
+ margin-left: 4px;
+}
+
+div.verbose {
+ display: inline-block;
+ vertical-align: top;
+ cursor: help;
+}
+
+div.verbose div.content {
+ display: none;
+ position: absolute;
+ padding: 10px;
+ margin: 4px;
+ max-width: 40%;
+ white-space: pre-wrap;
+ border: 1px solid black;
+ background-color: #FFFFCC;
+ cursor: auto;
+}
+
+.highlight .hll {
+ padding: 1px;
+}
+
+#header {
+ border-bottom: thin solid #aaa;
+}
+
+#menu {
+ float: left;
+ margin-top: 5px;
+ text-align: left;
+ width: 150px;
+ /*height: 75%;*/
+ position: fixed;
+ overflow: auto;
+ z-index: 1;
+}
+
+#menu_index {
+ float: left;
+ margin-top: 5px;
+ padding-left: 5px;
+ text-align: left;
+ width: 300px;
+ /*height: 75%;*/
+ position: fixed;
+ overflow: auto;
+ z-index: 1;
+}
+
+#menu > a {
+ display: block;
+ margin-left: 10px;
+ font: 12px;
+ z-index: 1;
+}
+
+#filename {
+ margin-left: 10px;
+ font: 12px;
+ z-index: 1;
+}
+
+.highlighttable {
+ background-color:white;
+ z-index: 10;
+ position: relative;
+ margin: -10 px;
+}
+
+#content {
+ background-color: white;
+ -webkit-box-sizing: content-box;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+ float: left;
+ margin: 5px;
+ margin-left: 10px;
+ padding: 0 10px 10px 10px;
+ width: 80%;
+ padding-left: 150px;
+}
+
+#content_index {
+ background-color: white;
+ -webkit-box-sizing: content-box;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+ float: left;
+ margin: 5px;
+ margin-left: 10px;
+ padding: 0 10px 10px 10px;
+ width: 80%;
+ padding-left: 300px;
+}
+
+.linenos {
+ border-right: thin solid #aaa;
+ color: lightgray;
+ padding-right: 6px;
+}
+
+#footer {
+ border-top: thin solid #aaa;
+ clear: both;
+ font-size: 90%;
+ margin-top: 5px;
+}
+
+#footer ul {
+ list-style-type: none;
+ padding-left: 0;
+}
diff --git a/[email protected]_travis-ci/0.html b/[email protected]_travis-ci/0.html
new file mode 100644
index 0000000..dfb584a
--- /dev/null
+++ b/[email protected]_travis-ci/0.html
@@ -0,0 +1,1208 @@
+
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Cppcheck - HTML report - mate-indicator-applet</title>
+ <link rel="stylesheet" href="style.css">
+ <style>
+.highlight .hll { background-color: #ffffcc }
+.highlight { background: #ffffff; }
+.highlight .c { color: #888888 } /* Comment */
+.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */
+.highlight .k { color: #008800; font-weight: bold } /* Keyword */
+.highlight .o { color: #333333 } /* Operator */
+.highlight .ch { color: #888888 } /* Comment.Hashbang */
+.highlight .cm { color: #888888 } /* Comment.Multiline */
+.highlight .cp { color: #557799 } /* Comment.Preproc */
+.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
+.highlight .c1 { color: #888888 } /* Comment.Single */
+.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */
+.highlight .gd { color: #A00000 } /* Generic.Deleted */
+.highlight .ge { font-style: italic } /* Generic.Emph */
+.highlight .gr { color: #FF0000 } /* Generic.Error */
+.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.highlight .gi { color: #00A000 } /* Generic.Inserted */
+.highlight .go { color: #888888 } /* Generic.Output */
+.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
+.highlight .gs { font-weight: bold } /* Generic.Strong */
+.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.highlight .gt { color: #0044DD } /* Generic.Traceback */
+.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
+.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
+.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
+.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */
+.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
+.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */
+.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */
+.highlight .s { background-color: #fff0f0 } /* Literal.String */
+.highlight .na { color: #0000CC } /* Name.Attribute */
+.highlight .nb { color: #007020 } /* Name.Builtin */
+.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */
+.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
+.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
+.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */
+.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */
+.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */
+.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */
+.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
+.highlight .nt { color: #007700 } /* Name.Tag */
+.highlight .nv { color: #996633 } /* Name.Variable */
+.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */
+.highlight .w { color: #bbbbbb } /* Text.Whitespace */
+.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */
+.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */
+.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */
+.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
+.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */
+.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */
+.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */
+.highlight .sc { color: #0044DD } /* Literal.String.Char */
+.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */
+.highlight .sd { color: #DD4422 } /* Literal.String.Doc */
+.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */
+.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */
+.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */
+.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */
+.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */
+.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */
+.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */
+.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */
+.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
+.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */
+.highlight .vc { color: #336699 } /* Name.Variable.Class */
+.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */
+.highlight .vi { color: #3333BB } /* Name.Variable.Instance */
+.highlight .vm { color: #996633 } /* Name.Variable.Magic */
+.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
+ </style>
+ <script language="javascript">
+ function getStyle(el,styleProp) {
+ if (el.currentStyle)
+ var y = el.currentStyle[styleProp];
+ else if (window.getComputedStyle)
+ var y = document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);
+ return y;
+ }
+ function toggle() {
+ var el = this.expandable_content;
+ var mark = this.expandable_marker;
+ if (el.style.display == "block") {
+ el.style.display = "none";
+ mark.innerHTML = "[+]";
+ } else {
+ el.style.display = "block";
+ mark.innerHTML = "[-]";
+ }
+ }
+ function init_expandables() {
+ var elts = document.getElementsByClassName("expandable");
+ for (var i = 0; i < elts.length; i++) {
+ var el = elts[i];
+ var clickable = el.getElementsByTagName("span")[0];
+ var marker = clickable.getElementsByClassName("marker")[0];
+ var content = el.getElementsByClassName("content")[0];
+ var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right"));
+ content.style.width = width + "px";
+ clickable.expandable_content = content;
+ clickable.expandable_marker = marker;
+ clickable.onclick = toggle;
+ }
+ }
+ function set_class_display(c, st) {
+ var elements = document.querySelectorAll('.' + c),
+ len = elements.length;
+ for (i = 0; i < len; i++) {
+ elements[i].style.display = st;
+ }
+ }
+ function toggle_class_visibility(id) {
+ var box = document.getElementById(id);
+ set_class_display(id, box.checked ? '' : 'none');
+ }
+ function toggle_all(){
+ var elts = document.getElementsByTagName("input");
+ for (var i = 1; i < elts.length; i++) {
+ var el = elts[i];
+ el.checked ? el.checked=false : el.checked=true;
+ toggle_class_visibility(el.id);
+ }
+ }
+
+ </script>
+ </head>
+ <body onload="init_expandables()">
+ <div id="header">
+ <h1>Cppcheck report - mate-indicator-applet: src/eggaccelerators.c </h1>
+ </div>
+ <div id="menu" dir="rtl">
+ <p id="filename"><a href="index.html">Defects:</a> eggaccelerators.c</p>
+<a href='0.html#line-321'> duplicateExpression 321</a>
+ </div>
+ <div id="content">
+<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 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
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+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
+467
+468
+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
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527</pre></div></td><td class="code"><div class="highlight"><pre><span></span><a name="line-1"></a><span class="cm">/* eggaccelerators.c</span>
+<a name="line-2"></a><span class="cm"> * Copyright (C) 2002 Red Hat, Inc.; Copyright 1998, 2001 Tim Janik</span>
+<a name="line-3"></a><span class="cm"> * Developed by Havoc Pennington, Tim Janik</span>
+<a name="line-4"></a><span class="cm"> *</span>
+<a name="line-5"></a><span class="cm"> * This library is free software; you can redistribute it and/or</span>
+<a name="line-6"></a><span class="cm"> * modify it under the terms of the GNU Library General Public</span>
+<a name="line-7"></a><span class="cm"> * License as published by the Free Software Foundation; either</span>
+<a name="line-8"></a><span class="cm"> * version 2 of the License, or (at your option) any later version.</span>
+<a name="line-9"></a><span class="cm"> *</span>
+<a name="line-10"></a><span class="cm"> * This library is distributed in the hope that it will be useful,</span>
+<a name="line-11"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
+<a name="line-12"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span>
+<a name="line-13"></a><span class="cm"> * Library General Public License for more details.</span>
+<a name="line-14"></a><span class="cm"> *</span>
+<a name="line-15"></a><span class="cm"> * You should have received a copy of the GNU Library General Public</span>
+<a name="line-16"></a><span class="cm"> * License along with this library; if not, write to the</span>
+<a name="line-17"></a><span class="cm"> * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA</span>
+<a name="line-18"></a><span class="cm"> */</span>
+<a name="line-19"></a>
+<a name="line-20"></a><span class="cp">#include</span> <span class="cpf">&quot;eggaccelerators.h&quot;</span><span class="cp"></span>
+<a name="line-21"></a>
+<a name="line-22"></a><span class="cp">#include</span> <span class="cpf">&lt;string.h&gt;</span><span class="cp"></span>
+<a name="line-23"></a><span class="cp">#include</span> <span class="cpf">&lt;gdk/gdkx.h&gt;</span><span class="cp"></span>
+<a name="line-24"></a><span class="cp">#include</span> <span class="cpf">&lt;gdk/gdkkeysyms.h&gt;</span><span class="cp"></span>
+<a name="line-25"></a>
+<a name="line-26"></a><span class="k">enum</span>
+<a name="line-27"></a><span class="p">{</span>
+<a name="line-28"></a> <span class="n">EGG_MODMAP_ENTRY_SHIFT</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span>
+<a name="line-29"></a> <span class="n">EGG_MODMAP_ENTRY_LOCK</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span>
+<a name="line-30"></a> <span class="n">EGG_MODMAP_ENTRY_CONTROL</span> <span class="o">=</span> <span class="mi">2</span><span class="p">,</span>
+<a name="line-31"></a> <span class="n">EGG_MODMAP_ENTRY_MOD1</span> <span class="o">=</span> <span class="mi">3</span><span class="p">,</span>
+<a name="line-32"></a> <span class="n">EGG_MODMAP_ENTRY_MOD2</span> <span class="o">=</span> <span class="mi">4</span><span class="p">,</span>
+<a name="line-33"></a> <span class="n">EGG_MODMAP_ENTRY_MOD3</span> <span class="o">=</span> <span class="mi">5</span><span class="p">,</span>
+<a name="line-34"></a> <span class="n">EGG_MODMAP_ENTRY_MOD4</span> <span class="o">=</span> <span class="mi">6</span><span class="p">,</span>
+<a name="line-35"></a> <span class="n">EGG_MODMAP_ENTRY_MOD5</span> <span class="o">=</span> <span class="mi">7</span><span class="p">,</span>
+<a name="line-36"></a> <span class="n">EGG_MODMAP_ENTRY_LAST</span> <span class="o">=</span> <span class="mi">8</span>
+<a name="line-37"></a><span class="p">};</span>
+<a name="line-38"></a>
+<a name="line-39"></a><span class="cp">#define MODMAP_ENTRY_TO_MODIFIER(x) (1 &lt;&lt; (x))</span>
+<a name="line-40"></a>
+<a name="line-41"></a><span class="k">typedef</span> <span class="k">struct</span>
+<a name="line-42"></a><span class="p">{</span>
+<a name="line-43"></a> <span class="n">EggVirtualModifierType</span> <span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_LAST</span><span class="p">];</span>
+<a name="line-44"></a>
+<a name="line-45"></a><span class="p">}</span> <span class="n">EggModmap</span><span class="p">;</span>
+<a name="line-46"></a>
+<a name="line-47"></a><span class="k">const</span> <span class="n">EggModmap</span><span class="o">*</span> <span class="nf">egg_keymap_get_modmap</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">);</span>
+<a name="line-48"></a>
+<a name="line-49"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-50"></a><span class="nf">is_alt</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-51"></a><span class="p">{</span>
+<a name="line-52"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-53"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;a&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;A&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-54"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-55"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-56"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-57"></a><span class="p">}</span>
+<a name="line-58"></a>
+<a name="line-59"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-60"></a><span class="nf">is_ctl</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-61"></a><span class="p">{</span>
+<a name="line-62"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-63"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;c&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;C&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-64"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-65"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-66"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-67"></a><span class="p">}</span>
+<a name="line-68"></a>
+<a name="line-69"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-70"></a><span class="nf">is_modx</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-71"></a><span class="p">{</span>
+<a name="line-72"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-73"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;m&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;M&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-74"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;o&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;O&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-75"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;d&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;D&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-76"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">&gt;=</span> <span class="sc">&#39;1&#39;</span> <span class="o">&amp;&amp;</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">&lt;=</span> <span class="sc">&#39;5&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-77"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-78"></a><span class="p">}</span>
+<a name="line-79"></a>
+<a name="line-80"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-81"></a><span class="nf">is_ctrl</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-82"></a><span class="p">{</span>
+<a name="line-83"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-84"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;c&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;C&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-85"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-86"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-87"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-88"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-89"></a><span class="p">}</span>
+<a name="line-90"></a>
+<a name="line-91"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-92"></a><span class="nf">is_shft</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-93"></a><span class="p">{</span>
+<a name="line-94"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-95"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-96"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;h&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;H&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-97"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;f&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;F&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-98"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-99"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-100"></a><span class="p">}</span>
+<a name="line-101"></a>
+<a name="line-102"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-103"></a><span class="nf">is_shift</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-104"></a><span class="p">{</span>
+<a name="line-105"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-106"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-107"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;h&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;H&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-108"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;i&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;I&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-109"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;f&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;F&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-110"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-111"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-112"></a><span class="p">}</span>
+<a name="line-113"></a>
+<a name="line-114"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-115"></a><span class="nf">is_control</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-116"></a><span class="p">{</span>
+<a name="line-117"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-118"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;c&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;C&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-119"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;o&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;O&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-120"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;n&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;N&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-121"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-122"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-123"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;o&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;O&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-124"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-125"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">8</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-126"></a><span class="p">}</span>
+<a name="line-127"></a>
+<a name="line-128"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-129"></a><span class="nf">is_release</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-130"></a><span class="p">{</span>
+<a name="line-131"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-132"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-133"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-134"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-135"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-136"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;a&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;A&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-137"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-138"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-139"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">8</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-140"></a><span class="p">}</span>
+<a name="line-141"></a>
+<a name="line-142"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-143"></a><span class="nf">is_meta</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-144"></a><span class="p">{</span>
+<a name="line-145"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-146"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;m&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;M&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-147"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-148"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-149"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;a&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;A&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-150"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-151"></a><span class="p">}</span>
+<a name="line-152"></a>
+<a name="line-153"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-154"></a><span class="nf">is_super</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-155"></a><span class="p">{</span>
+<a name="line-156"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-157"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-158"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;u&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;U&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-159"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;p&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;P&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-160"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-161"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-162"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-163"></a><span class="p">}</span>
+<a name="line-164"></a>
+<a name="line-165"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-166"></a><span class="nf">is_hyper</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-167"></a><span class="p">{</span>
+<a name="line-168"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-169"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;h&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;H&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-170"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;y&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;Y&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-171"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;p&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;P&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-172"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-173"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-174"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-175"></a><span class="p">}</span>
+<a name="line-176"></a>
+<a name="line-177"></a><span class="cm">/**</span>
+<a name="line-178"></a><span class="cm"> * egg_accelerator_parse_virtual:</span>
+<a name="line-179"></a><span class="cm"> * @accelerator: string representing an accelerator</span>
+<a name="line-180"></a><span class="cm"> * @accelerator_key: return location for accelerator keyval</span>
+<a name="line-181"></a><span class="cm"> * @accelerator_mods: return location for accelerator modifier mask</span>
+<a name="line-182"></a><span class="cm"> *</span>
+<a name="line-183"></a><span class="cm"> * Parses a string representing a virtual accelerator. The format</span>
+<a name="line-184"></a><span class="cm"> * looks like &quot;&amp;lt;Control&amp;gt;a&quot; or &quot;&amp;lt;Shift&amp;gt;&amp;lt;Alt&amp;gt;F1&quot; or</span>
+<a name="line-185"></a><span class="cm"> * &quot;&amp;lt;Release&amp;gt;z&quot; (the last one is for key release). The parser</span>
+<a name="line-186"></a><span class="cm"> * is fairly liberal and allows lower or upper case, and also</span>
+<a name="line-187"></a><span class="cm"> * abbreviations such as &quot;&amp;lt;Ctl&amp;gt;&quot; and &quot;&amp;lt;Ctrl&amp;gt;&quot;.</span>
+<a name="line-188"></a><span class="cm"> *</span>
+<a name="line-189"></a><span class="cm"> * If the parse fails, @accelerator_key and @accelerator_mods will</span>
+<a name="line-190"></a><span class="cm"> * be set to 0 (zero) and %FALSE will be returned. If the string contains</span>
+<a name="line-191"></a><span class="cm"> * only modifiers, @accelerator_key will be set to 0 but %TRUE will be</span>
+<a name="line-192"></a><span class="cm"> * returned.</span>
+<a name="line-193"></a><span class="cm"> *</span>
+<a name="line-194"></a><span class="cm"> * The virtual vs. concrete accelerator distinction is a relic of</span>
+<a name="line-195"></a><span class="cm"> * how the X Window System works; there are modifiers Mod2-Mod5 that</span>
+<a name="line-196"></a><span class="cm"> * can represent various keyboard keys (numlock, meta, hyper, etc.),</span>
+<a name="line-197"></a><span class="cm"> * the virtual modifier represents the keyboard key, the concrete</span>
+<a name="line-198"></a><span class="cm"> * modifier the actual Mod2-Mod5 bits in the key press event.</span>
+<a name="line-199"></a><span class="cm"> *</span>
+<a name="line-200"></a><span class="cm"> * Returns: %TRUE on success.</span>
+<a name="line-201"></a><span class="cm"> */</span>
+<a name="line-202"></a><span class="n">gboolean</span>
+<a name="line-203"></a><span class="nf">egg_accelerator_parse_virtual</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">accelerator</span><span class="p">,</span>
+<a name="line-204"></a> <span class="n">guint</span> <span class="o">*</span><span class="n">accelerator_key</span><span class="p">,</span>
+<a name="line-205"></a> <span class="n">EggVirtualModifierType</span> <span class="o">*</span><span class="n">accelerator_mods</span><span class="p">)</span>
+<a name="line-206"></a><span class="p">{</span>
+<a name="line-207"></a> <span class="n">guint</span> <span class="n">keyval</span><span class="p">;</span>
+<a name="line-208"></a> <span class="n">GdkModifierType</span> <span class="n">mods</span><span class="p">;</span>
+<a name="line-209"></a> <span class="n">gint</span> <span class="n">len</span><span class="p">;</span>
+<a name="line-210"></a> <span class="n">gboolean</span> <span class="n">bad_keyval</span><span class="p">;</span>
+<a name="line-211"></a>
+<a name="line-212"></a> <span class="k">if</span> <span class="p">(</span><span class="n">accelerator_key</span><span class="p">)</span>
+<a name="line-213"></a> <span class="o">*</span><span class="n">accelerator_key</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-214"></a> <span class="k">if</span> <span class="p">(</span><span class="n">accelerator_mods</span><span class="p">)</span>
+<a name="line-215"></a> <span class="o">*</span><span class="n">accelerator_mods</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-216"></a>
+<a name="line-217"></a> <span class="n">g_return_val_if_fail</span> <span class="p">(</span><span class="n">accelerator</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">,</span> <span class="n">FALSE</span><span class="p">);</span>
+<a name="line-218"></a>
+<a name="line-219"></a> <span class="n">bad_keyval</span> <span class="o">=</span> <span class="n">FALSE</span><span class="p">;</span>
+<a name="line-220"></a>
+<a name="line-221"></a> <span class="n">keyval</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-222"></a> <span class="n">mods</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-223"></a> <span class="n">len</span> <span class="o">=</span> <span class="n">strlen</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">);</span>
+<a name="line-224"></a> <span class="k">while</span> <span class="p">(</span><span class="n">len</span><span class="p">)</span>
+<a name="line-225"></a> <span class="p">{</span>
+<a name="line-226"></a> <span class="k">if</span> <span class="p">(</span><span class="o">*</span><span class="n">accelerator</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span>
+<a name="line-227"></a> <span class="p">{</span>
+<a name="line-228"></a> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">9</span> <span class="o">&amp;&amp;</span> <span class="n">is_release</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-229"></a> <span class="p">{</span>
+<a name="line-230"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">9</span><span class="p">;</span>
+<a name="line-231"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">9</span><span class="p">;</span>
+<a name="line-232"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_RELEASE_MASK</span><span class="p">;</span>
+<a name="line-233"></a> <span class="p">}</span>
+<a name="line-234"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">9</span> <span class="o">&amp;&amp;</span> <span class="n">is_control</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-235"></a> <span class="p">{</span>
+<a name="line-236"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">9</span><span class="p">;</span>
+<a name="line-237"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">9</span><span class="p">;</span>
+<a name="line-238"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_CONTROL_MASK</span><span class="p">;</span>
+<a name="line-239"></a> <span class="p">}</span>
+<a name="line-240"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">7</span> <span class="o">&amp;&amp;</span> <span class="n">is_shift</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-241"></a> <span class="p">{</span>
+<a name="line-242"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-243"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-244"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SHIFT_MASK</span><span class="p">;</span>
+<a name="line-245"></a> <span class="p">}</span>
+<a name="line-246"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">6</span> <span class="o">&amp;&amp;</span> <span class="n">is_shft</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-247"></a> <span class="p">{</span>
+<a name="line-248"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-249"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-250"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SHIFT_MASK</span><span class="p">;</span>
+<a name="line-251"></a> <span class="p">}</span>
+<a name="line-252"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">6</span> <span class="o">&amp;&amp;</span> <span class="n">is_ctrl</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-253"></a> <span class="p">{</span>
+<a name="line-254"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-255"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-256"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_CONTROL_MASK</span><span class="p">;</span>
+<a name="line-257"></a> <span class="p">}</span>
+<a name="line-258"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">6</span> <span class="o">&amp;&amp;</span> <span class="n">is_modx</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-259"></a> <span class="p">{</span>
+<a name="line-260"></a> <span class="k">static</span> <span class="k">const</span> <span class="n">guint</span> <span class="n">mod_vals</span><span class="p">[]</span> <span class="o">=</span> <span class="p">{</span>
+<a name="line-261"></a> <span class="n">EGG_VIRTUAL_ALT_MASK</span><span class="p">,</span> <span class="n">EGG_VIRTUAL_MOD2_MASK</span><span class="p">,</span> <span class="n">EGG_VIRTUAL_MOD3_MASK</span><span class="p">,</span>
+<a name="line-262"></a> <span class="n">EGG_VIRTUAL_MOD4_MASK</span><span class="p">,</span> <span class="n">EGG_VIRTUAL_MOD5_MASK</span>
+<a name="line-263"></a> <span class="p">};</span>
+<a name="line-264"></a>
+<a name="line-265"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-266"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">4</span><span class="p">;</span>
+<a name="line-267"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">mod_vals</span><span class="p">[</span><span class="o">*</span><span class="n">accelerator</span> <span class="o">-</span> <span class="sc">&#39;1&#39;</span><span class="p">];</span>
+<a name="line-268"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">2</span><span class="p">;</span>
+<a name="line-269"></a> <span class="p">}</span>
+<a name="line-270"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">5</span> <span class="o">&amp;&amp;</span> <span class="n">is_ctl</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-271"></a> <span class="p">{</span>
+<a name="line-272"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">5</span><span class="p">;</span>
+<a name="line-273"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">5</span><span class="p">;</span>
+<a name="line-274"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_CONTROL_MASK</span><span class="p">;</span>
+<a name="line-275"></a> <span class="p">}</span>
+<a name="line-276"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">5</span> <span class="o">&amp;&amp;</span> <span class="n">is_alt</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-277"></a> <span class="p">{</span>
+<a name="line-278"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">5</span><span class="p">;</span>
+<a name="line-279"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">5</span><span class="p">;</span>
+<a name="line-280"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_ALT_MASK</span><span class="p">;</span>
+<a name="line-281"></a> <span class="p">}</span>
+<a name="line-282"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">6</span> <span class="o">&amp;&amp;</span> <span class="n">is_meta</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-283"></a> <span class="p">{</span>
+<a name="line-284"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-285"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-286"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_META_MASK</span><span class="p">;</span>
+<a name="line-287"></a> <span class="p">}</span>
+<a name="line-288"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">7</span> <span class="o">&amp;&amp;</span> <span class="n">is_hyper</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-289"></a> <span class="p">{</span>
+<a name="line-290"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-291"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-292"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_HYPER_MASK</span><span class="p">;</span>
+<a name="line-293"></a> <span class="p">}</span>
+<a name="line-294"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">7</span> <span class="o">&amp;&amp;</span> <span class="n">is_super</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-295"></a> <span class="p">{</span>
+<a name="line-296"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-297"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-298"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SUPER_MASK</span><span class="p">;</span>
+<a name="line-299"></a> <span class="p">}</span>
+<a name="line-300"></a> <span class="k">else</span>
+<a name="line-301"></a> <span class="p">{</span>
+<a name="line-302"></a> <span class="n">gchar</span> <span class="n">last_ch</span><span class="p">;</span>
+<a name="line-303"></a>
+<a name="line-304"></a> <span class="n">last_ch</span> <span class="o">=</span> <span class="o">*</span><span class="n">accelerator</span><span class="p">;</span>
+<a name="line-305"></a> <span class="k">while</span> <span class="p">(</span><span class="n">last_ch</span> <span class="o">&amp;&amp;</span> <span class="n">last_ch</span> <span class="o">!=</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">)</span>
+<a name="line-306"></a> <span class="p">{</span>
+<a name="line-307"></a> <span class="n">last_ch</span> <span class="o">=</span> <span class="o">*</span><span class="n">accelerator</span><span class="p">;</span>
+<a name="line-308"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">1</span><span class="p">;</span>
+<a name="line-309"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">1</span><span class="p">;</span>
+<a name="line-310"></a> <span class="p">}</span>
+<a name="line-311"></a> <span class="p">}</span>
+<a name="line-312"></a> <span class="p">}</span>
+<a name="line-313"></a> <span class="k">else</span>
+<a name="line-314"></a> <span class="p">{</span>
+<a name="line-315"></a> <span class="n">keyval</span> <span class="o">=</span> <span class="n">gdk_keyval_from_name</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">);</span>
+<a name="line-316"></a>
+<a name="line-317"></a> <span class="k">if</span> <span class="p">(</span><span class="n">keyval</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span>
+<a name="line-318"></a> <span class="n">bad_keyval</span> <span class="o">=</span> <span class="n">TRUE</span><span class="p">;</span>
+<a name="line-319"></a>
+<a name="line-320"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="n">len</span><span class="p">;</span>
+<a name="line-321"></a><span class="hll"> <span class="n">len</span> <span class="o">-=</span> <span class="n">len</span><span class="p">;</span><div class='verbose expandable'><span class='error2'>&lt;--- Same expression on both sides of '-='. <span class='marker'>[+]</span></span><div class='content'>Finding the same expression on both sides of an operator is suspicious and might indicate a cut and paste or logic error. Please examine this code carefully to determine if it is correct.</div></div>
+</span><a name="line-322"></a> <span class="p">}</span>
+<a name="line-323"></a> <span class="p">}</span>
+<a name="line-324"></a>
+<a name="line-325"></a> <span class="k">if</span> <span class="p">(</span><span class="n">accelerator_key</span><span class="p">)</span>
+<a name="line-326"></a> <span class="o">*</span><span class="n">accelerator_key</span> <span class="o">=</span> <span class="n">gdk_keyval_to_lower</span> <span class="p">(</span><span class="n">keyval</span><span class="p">);</span>
+<a name="line-327"></a> <span class="k">if</span> <span class="p">(</span><span class="n">accelerator_mods</span><span class="p">)</span>
+<a name="line-328"></a> <span class="o">*</span><span class="n">accelerator_mods</span> <span class="o">=</span> <span class="n">mods</span><span class="p">;</span>
+<a name="line-329"></a>
+<a name="line-330"></a> <span class="k">return</span> <span class="o">!</span><span class="n">bad_keyval</span><span class="p">;</span>
+<a name="line-331"></a><span class="p">}</span>
+<a name="line-332"></a>
+<a name="line-333"></a><span class="kt">void</span>
+<a name="line-334"></a><span class="nf">egg_keymap_resolve_virtual_modifiers</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">,</span>
+<a name="line-335"></a> <span class="n">EggVirtualModifierType</span> <span class="n">virtual_mods</span><span class="p">,</span>
+<a name="line-336"></a> <span class="n">GdkModifierType</span> <span class="o">*</span><span class="n">concrete_mods</span><span class="p">)</span>
+<a name="line-337"></a><span class="p">{</span>
+<a name="line-338"></a> <span class="n">GdkModifierType</span> <span class="n">concrete</span><span class="p">;</span>
+<a name="line-339"></a> <span class="kt">int</span> <span class="n">i</span><span class="p">;</span>
+<a name="line-340"></a> <span class="k">const</span> <span class="n">EggModmap</span> <span class="o">*</span><span class="n">modmap</span><span class="p">;</span>
+<a name="line-341"></a>
+<a name="line-342"></a> <span class="n">g_return_if_fail</span> <span class="p">(</span><span class="n">GDK_IS_KEYMAP</span> <span class="p">(</span><span class="n">keymap</span><span class="p">));</span>
+<a name="line-343"></a> <span class="n">g_return_if_fail</span> <span class="p">(</span><span class="n">concrete_mods</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-344"></a>
+<a name="line-345"></a> <span class="n">modmap</span> <span class="o">=</span> <span class="n">egg_keymap_get_modmap</span> <span class="p">(</span><span class="n">keymap</span><span class="p">);</span>
+<a name="line-346"></a>
+<a name="line-347"></a> <span class="cm">/* Not so sure about this algorithm. */</span>
+<a name="line-348"></a>
+<a name="line-349"></a> <span class="n">concrete</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-350"></a> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-351"></a> <span class="k">while</span> <span class="p">(</span><span class="n">i</span> <span class="o">&lt;</span> <span class="n">EGG_MODMAP_ENTRY_LAST</span><span class="p">)</span>
+<a name="line-352"></a> <span class="p">{</span>
+<a name="line-353"></a> <span class="k">if</span> <span class="p">(</span><span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">&amp;</span> <span class="n">virtual_mods</span><span class="p">)</span>
+<a name="line-354"></a> <span class="n">concrete</span> <span class="o">|=</span> <span class="p">(</span><span class="mi">1</span> <span class="o">&lt;&lt;</span> <span class="n">i</span><span class="p">);</span>
+<a name="line-355"></a>
+<a name="line-356"></a> <span class="o">++</span><span class="n">i</span><span class="p">;</span>
+<a name="line-357"></a> <span class="p">}</span>
+<a name="line-358"></a>
+<a name="line-359"></a> <span class="o">*</span><span class="n">concrete_mods</span> <span class="o">=</span> <span class="n">concrete</span><span class="p">;</span>
+<a name="line-360"></a><span class="p">}</span>
+<a name="line-361"></a>
+<a name="line-362"></a><span class="kt">void</span>
+<a name="line-363"></a><span class="nf">egg_keymap_virtualize_modifiers</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">,</span>
+<a name="line-364"></a> <span class="n">GdkModifierType</span> <span class="n">concrete_mods</span><span class="p">,</span>
+<a name="line-365"></a> <span class="n">EggVirtualModifierType</span> <span class="o">*</span><span class="n">virtual_mods</span><span class="p">)</span>
+<a name="line-366"></a><span class="p">{</span>
+<a name="line-367"></a> <span class="n">GdkModifierType</span> <span class="n">virtual</span><span class="p">;</span>
+<a name="line-368"></a> <span class="kt">int</span> <span class="n">i</span><span class="p">;</span>
+<a name="line-369"></a> <span class="k">const</span> <span class="n">EggModmap</span> <span class="o">*</span><span class="n">modmap</span><span class="p">;</span>
+<a name="line-370"></a>
+<a name="line-371"></a> <span class="n">g_return_if_fail</span> <span class="p">(</span><span class="n">GDK_IS_KEYMAP</span> <span class="p">(</span><span class="n">keymap</span><span class="p">));</span>
+<a name="line-372"></a> <span class="n">g_return_if_fail</span> <span class="p">(</span><span class="n">virtual_mods</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-373"></a>
+<a name="line-374"></a> <span class="n">modmap</span> <span class="o">=</span> <span class="n">egg_keymap_get_modmap</span> <span class="p">(</span><span class="n">keymap</span><span class="p">);</span>
+<a name="line-375"></a>
+<a name="line-376"></a> <span class="cm">/* Not so sure about this algorithm. */</span>
+<a name="line-377"></a>
+<a name="line-378"></a> <span class="n">virtual</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-379"></a> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-380"></a> <span class="k">while</span> <span class="p">(</span><span class="n">i</span> <span class="o">&lt;</span> <span class="n">EGG_MODMAP_ENTRY_LAST</span><span class="p">)</span>
+<a name="line-381"></a> <span class="p">{</span>
+<a name="line-382"></a> <span class="k">if</span> <span class="p">((</span><span class="mi">1</span> <span class="o">&lt;&lt;</span> <span class="n">i</span><span class="p">)</span> <span class="o">&amp;</span> <span class="n">concrete_mods</span><span class="p">)</span>
+<a name="line-383"></a> <span class="p">{</span>
+<a name="line-384"></a> <span class="n">EggVirtualModifierType</span> <span class="n">cleaned</span><span class="p">;</span>
+<a name="line-385"></a>
+<a name="line-386"></a> <span class="n">cleaned</span> <span class="o">=</span> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">&amp;</span> <span class="o">~</span><span class="p">(</span><span class="n">EGG_VIRTUAL_MOD2_MASK</span> <span class="o">|</span>
+<a name="line-387"></a> <span class="n">EGG_VIRTUAL_MOD3_MASK</span> <span class="o">|</span>
+<a name="line-388"></a> <span class="n">EGG_VIRTUAL_MOD4_MASK</span> <span class="o">|</span>
+<a name="line-389"></a> <span class="n">EGG_VIRTUAL_MOD5_MASK</span><span class="p">);</span>
+<a name="line-390"></a>
+<a name="line-391"></a> <span class="k">if</span> <span class="p">(</span><span class="n">cleaned</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">)</span>
+<a name="line-392"></a> <span class="p">{</span>
+<a name="line-393"></a> <span class="n">virtual</span> <span class="o">|=</span> <span class="n">cleaned</span><span class="p">;</span>
+<a name="line-394"></a> <span class="p">}</span>
+<a name="line-395"></a> <span class="k">else</span>
+<a name="line-396"></a> <span class="p">{</span>
+<a name="line-397"></a> <span class="cm">/* Rather than dropping mod2-&gt;mod5 if not bound,</span>
+<a name="line-398"></a><span class="cm"> * go ahead and use the concrete names</span>
+<a name="line-399"></a><span class="cm"> */</span>
+<a name="line-400"></a> <span class="n">virtual</span> <span class="o">|=</span> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">i</span><span class="p">];</span>
+<a name="line-401"></a> <span class="p">}</span>
+<a name="line-402"></a> <span class="p">}</span>
+<a name="line-403"></a>
+<a name="line-404"></a> <span class="o">++</span><span class="n">i</span><span class="p">;</span>
+<a name="line-405"></a> <span class="p">}</span>
+<a name="line-406"></a>
+<a name="line-407"></a> <span class="o">*</span><span class="n">virtual_mods</span> <span class="o">=</span> <span class="n">virtual</span><span class="p">;</span>
+<a name="line-408"></a><span class="p">}</span>
+<a name="line-409"></a>
+<a name="line-410"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-411"></a><span class="nf">reload_modmap</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">,</span>
+<a name="line-412"></a> <span class="n">EggModmap</span> <span class="o">*</span><span class="n">modmap</span><span class="p">)</span>
+<a name="line-413"></a><span class="p">{</span>
+<a name="line-414"></a> <span class="n">XModifierKeymap</span> <span class="o">*</span><span class="n">xmodmap</span><span class="p">;</span>
+<a name="line-415"></a> <span class="kt">int</span> <span class="n">map_size</span><span class="p">;</span>
+<a name="line-416"></a> <span class="kt">int</span> <span class="n">i</span><span class="p">;</span>
+<a name="line-417"></a>
+<a name="line-418"></a> <span class="cm">/* FIXME multihead */</span>
+<a name="line-419"></a> <span class="n">xmodmap</span> <span class="o">=</span> <span class="n">XGetModifierMapping</span> <span class="p">(</span><span class="n">gdk_x11_get_default_xdisplay</span> <span class="p">());</span>
+<a name="line-420"></a>
+<a name="line-421"></a> <span class="n">memset</span> <span class="p">(</span><span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="k">sizeof</span> <span class="p">(</span><span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">));</span>
+<a name="line-422"></a>
+<a name="line-423"></a> <span class="cm">/* there are 8 modifiers, and the first 3 are shift, shift lock,</span>
+<a name="line-424"></a><span class="cm"> * and control</span>
+<a name="line-425"></a><span class="cm"> */</span>
+<a name="line-426"></a> <span class="n">map_size</span> <span class="o">=</span> <span class="mi">8</span> <span class="o">*</span> <span class="n">xmodmap</span><span class="o">-&gt;</span><span class="n">max_keypermod</span><span class="p">;</span>
+<a name="line-427"></a> <span class="n">i</span> <span class="o">=</span> <span class="mi">3</span> <span class="o">*</span> <span class="n">xmodmap</span><span class="o">-&gt;</span><span class="n">max_keypermod</span><span class="p">;</span>
+<a name="line-428"></a> <span class="k">while</span> <span class="p">(</span><span class="n">i</span> <span class="o">&lt;</span> <span class="n">map_size</span><span class="p">)</span>
+<a name="line-429"></a> <span class="p">{</span>
+<a name="line-430"></a> <span class="cm">/* get the key code at this point in the map,</span>
+<a name="line-431"></a><span class="cm"> * see if its keysym is one we&#39;re interested in</span>
+<a name="line-432"></a><span class="cm"> */</span>
+<a name="line-433"></a> <span class="kt">int</span> <span class="n">keycode</span> <span class="o">=</span> <span class="n">xmodmap</span><span class="o">-&gt;</span><span class="n">modifiermap</span><span class="p">[</span><span class="n">i</span><span class="p">];</span>
+<a name="line-434"></a> <span class="n">GdkKeymapKey</span> <span class="o">*</span><span class="n">keys</span><span class="p">;</span>
+<a name="line-435"></a> <span class="n">guint</span> <span class="o">*</span><span class="n">keyvals</span><span class="p">;</span>
+<a name="line-436"></a> <span class="kt">int</span> <span class="n">n_entries</span><span class="p">;</span>
+<a name="line-437"></a> <span class="kt">int</span> <span class="n">j</span><span class="p">;</span>
+<a name="line-438"></a> <span class="n">EggVirtualModifierType</span> <span class="n">mask</span><span class="p">;</span>
+<a name="line-439"></a>
+<a name="line-440"></a> <span class="n">keys</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span>
+<a name="line-441"></a> <span class="n">keyvals</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span>
+<a name="line-442"></a> <span class="n">n_entries</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-443"></a>
+<a name="line-444"></a> <span class="n">gdk_keymap_get_entries_for_keycode</span> <span class="p">(</span><span class="n">keymap</span><span class="p">,</span>
+<a name="line-445"></a> <span class="n">keycode</span><span class="p">,</span>
+<a name="line-446"></a> <span class="o">&amp;</span><span class="n">keys</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">keyvals</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">n_entries</span><span class="p">);</span>
+<a name="line-447"></a>
+<a name="line-448"></a> <span class="n">mask</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-449"></a> <span class="n">j</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-450"></a> <span class="k">while</span> <span class="p">(</span><span class="n">j</span> <span class="o">&lt;</span> <span class="n">n_entries</span><span class="p">)</span>
+<a name="line-451"></a> <span class="p">{</span>
+<a name="line-452"></a> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Num_Lock</span><span class="p">)</span>
+<a name="line-453"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_NUM_LOCK_MASK</span><span class="p">;</span>
+<a name="line-454"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Scroll_Lock</span><span class="p">)</span>
+<a name="line-455"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SCROLL_LOCK_MASK</span><span class="p">;</span>
+<a name="line-456"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Meta_L</span> <span class="o">||</span>
+<a name="line-457"></a> <span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Meta_R</span><span class="p">)</span>
+<a name="line-458"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_META_MASK</span><span class="p">;</span>
+<a name="line-459"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Hyper_L</span> <span class="o">||</span>
+<a name="line-460"></a> <span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Hyper_R</span><span class="p">)</span>
+<a name="line-461"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_HYPER_MASK</span><span class="p">;</span>
+<a name="line-462"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Super_L</span> <span class="o">||</span>
+<a name="line-463"></a> <span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Super_R</span><span class="p">)</span>
+<a name="line-464"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SUPER_MASK</span><span class="p">;</span>
+<a name="line-465"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Mode_switch</span><span class="p">)</span>
+<a name="line-466"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MODE_SWITCH_MASK</span><span class="p">;</span>
+<a name="line-467"></a>
+<a name="line-468"></a> <span class="o">++</span><span class="n">j</span><span class="p">;</span>
+<a name="line-469"></a> <span class="p">}</span>
+<a name="line-470"></a>
+<a name="line-471"></a> <span class="cm">/* Mod1Mask is 1 &lt;&lt; 3 for example, i.e. the</span>
+<a name="line-472"></a><span class="cm"> * fourth modifier, i / keyspermod is the modifier</span>
+<a name="line-473"></a><span class="cm"> * index</span>
+<a name="line-474"></a><span class="cm"> */</span>
+<a name="line-475"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">i</span><span class="o">/</span><span class="n">xmodmap</span><span class="o">-&gt;</span><span class="n">max_keypermod</span><span class="p">]</span> <span class="o">|=</span> <span class="n">mask</span><span class="p">;</span>
+<a name="line-476"></a>
+<a name="line-477"></a> <span class="n">g_free</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">);</span>
+<a name="line-478"></a> <span class="n">g_free</span> <span class="p">(</span><span class="n">keys</span><span class="p">);</span>
+<a name="line-479"></a>
+<a name="line-480"></a> <span class="o">++</span><span class="n">i</span><span class="p">;</span>
+<a name="line-481"></a> <span class="p">}</span>
+<a name="line-482"></a>
+<a name="line-483"></a> <span class="cm">/* Add in the not-really-virtual fixed entries */</span>
+<a name="line-484"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_SHIFT</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SHIFT_MASK</span><span class="p">;</span>
+<a name="line-485"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_CONTROL</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_CONTROL_MASK</span><span class="p">;</span>
+<a name="line-486"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_LOCK</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_LOCK_MASK</span><span class="p">;</span>
+<a name="line-487"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD1</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_ALT_MASK</span><span class="p">;</span>
+<a name="line-488"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD2</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MOD2_MASK</span><span class="p">;</span>
+<a name="line-489"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD3</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MOD3_MASK</span><span class="p">;</span>
+<a name="line-490"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD4</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MOD4_MASK</span><span class="p">;</span>
+<a name="line-491"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD5</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MOD5_MASK</span><span class="p">;</span>
+<a name="line-492"></a>
+<a name="line-493"></a> <span class="n">XFreeModifiermap</span> <span class="p">(</span><span class="n">xmodmap</span><span class="p">);</span>
+<a name="line-494"></a><span class="p">}</span>
+<a name="line-495"></a>
+<a name="line-496"></a><span class="k">const</span> <span class="n">EggModmap</span><span class="o">*</span>
+<a name="line-497"></a><span class="nf">egg_keymap_get_modmap</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">)</span>
+<a name="line-498"></a><span class="p">{</span>
+<a name="line-499"></a> <span class="n">EggModmap</span> <span class="o">*</span><span class="n">modmap</span><span class="p">;</span>
+<a name="line-500"></a>
+<a name="line-501"></a> <span class="cm">/* This is all a hack, much simpler when we can just</span>
+<a name="line-502"></a><span class="cm"> * modify GDK directly.</span>
+<a name="line-503"></a><span class="cm"> */</span>
+<a name="line-504"></a>
+<a name="line-505"></a> <span class="n">modmap</span> <span class="o">=</span> <span class="n">g_object_get_data</span> <span class="p">(</span><span class="n">G_OBJECT</span> <span class="p">(</span><span class="n">keymap</span><span class="p">),</span>
+<a name="line-506"></a> <span class="s">&quot;egg-modmap&quot;</span><span class="p">);</span>
+<a name="line-507"></a>
+<a name="line-508"></a> <span class="k">if</span> <span class="p">(</span><span class="n">modmap</span> <span class="o">==</span> <span class="nb">NULL</span><span class="p">)</span>
+<a name="line-509"></a> <span class="p">{</span>
+<a name="line-510"></a> <span class="n">modmap</span> <span class="o">=</span> <span class="n">g_new0</span> <span class="p">(</span><span class="n">EggModmap</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
+<a name="line-511"></a>
+<a name="line-512"></a> <span class="cm">/* FIXME modify keymap change events with an event filter</span>
+<a name="line-513"></a><span class="cm"> * and force a reload if we get one</span>
+<a name="line-514"></a><span class="cm"> */</span>
+<a name="line-515"></a>
+<a name="line-516"></a> <span class="n">reload_modmap</span> <span class="p">(</span><span class="n">keymap</span><span class="p">,</span> <span class="n">modmap</span><span class="p">);</span>
+<a name="line-517"></a>
+<a name="line-518"></a> <span class="n">g_object_set_data_full</span> <span class="p">(</span><span class="n">G_OBJECT</span> <span class="p">(</span><span class="n">keymap</span><span class="p">),</span>
+<a name="line-519"></a> <span class="s">&quot;egg-modmap&quot;</span><span class="p">,</span>
+<a name="line-520"></a> <span class="n">modmap</span><span class="p">,</span>
+<a name="line-521"></a> <span class="n">g_free</span><span class="p">);</span>
+<a name="line-522"></a> <span class="p">}</span>
+<a name="line-523"></a>
+<a name="line-524"></a> <span class="n">g_assert</span> <span class="p">(</span><span class="n">modmap</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-525"></a>
+<a name="line-526"></a> <span class="k">return</span> <span class="n">modmap</span><span class="p">;</span>
+<a name="line-527"></a><span class="p">}</span>
+</pre></div>
+</td></tr></table>
+ </div>
+ <div id="footer">
+ <p>
+ Cppcheck 1.90 - a tool for static C/C++ code analysis</br>
+ </br>
+ Internet: <a href="http://cppcheck.net">http://cppcheck.net</a></br>
+ IRC: <a href="irc://irc.freenode.net/cppcheck">irc://irc.freenode.net/cppcheck</a></br>
+ </p>
+ </div>
+ </body>
+</html>
diff --git a/[email protected]_travis-ci/index.html b/[email protected]_travis-ci/index.html
new file mode 100644
index 0000000..812f8b5
--- /dev/null
+++ b/[email protected]_travis-ci/index.html
@@ -0,0 +1,101 @@
+
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Cppcheck - HTML report - mate-indicator-applet</title>
+ <link rel="stylesheet" href="style.css">
+ <style>
+
+ </style>
+ <script language="javascript">
+ function getStyle(el,styleProp) {
+ if (el.currentStyle)
+ var y = el.currentStyle[styleProp];
+ else if (window.getComputedStyle)
+ var y = document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);
+ return y;
+ }
+ function toggle() {
+ var el = this.expandable_content;
+ var mark = this.expandable_marker;
+ if (el.style.display == "block") {
+ el.style.display = "none";
+ mark.innerHTML = "[+]";
+ } else {
+ el.style.display = "block";
+ mark.innerHTML = "[-]";
+ }
+ }
+ function init_expandables() {
+ var elts = document.getElementsByClassName("expandable");
+ for (var i = 0; i < elts.length; i++) {
+ var el = elts[i];
+ var clickable = el.getElementsByTagName("span")[0];
+ var marker = clickable.getElementsByClassName("marker")[0];
+ var content = el.getElementsByClassName("content")[0];
+ var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right"));
+ content.style.width = width + "px";
+ clickable.expandable_content = content;
+ clickable.expandable_marker = marker;
+ clickable.onclick = toggle;
+ }
+ }
+ function set_class_display(c, st) {
+ var elements = document.querySelectorAll('.' + c),
+ len = elements.length;
+ for (i = 0; i < len; i++) {
+ elements[i].style.display = st;
+ }
+ }
+ function toggle_class_visibility(id) {
+ var box = document.getElementById(id);
+ set_class_display(id, box.checked ? '' : 'none');
+ }
+ function toggle_all(){
+ var elts = document.getElementsByTagName("input");
+ for (var i = 1; i < elts.length; i++) {
+ var el = elts[i];
+ el.checked ? el.checked=false : el.checked=true;
+ toggle_class_visibility(el.id);
+ }
+ }
+
+ </script>
+ </head>
+ <body onload="init_expandables()">
+ <div id="header">
+ <h1>Cppcheck report - mate-indicator-applet: </h1>
+ </div>
+ <div id="menu_index">
+ <p id="filename"><a href="index.html">Defect summary;</a> </p>
+
+ <label><input type="checkbox" onclick="toggle_all()" checked> Toggle all</label>
+ <table>
+ <tr><th>Show</th><th>#</th><th>Defect ID</th></tr>
+ <tr><td><input type='checkbox' onclick='toggle_class_visibility(this.id)' id='duplicateExpression' name='duplicateExpression' checked></td><td>1</td><td>duplicateExpression</td></tr>
+ <tr><td><input type='checkbox' onclick='toggle_class_visibility(this.id)' id='missingIncludeSystem' name='missingIncludeSystem' checked></td><td>1</td><td>missingIncludeSystem</td></tr>
+ <tr><td></td><td>2</td><td>total</td></tr>
+ </table>
+ <p><a href="stats.html">Statistics</a></p>
+ </div>
+ <div id="content_index">
+
+ <table>
+ <tr><th>Line</th><th>Id</th><th>CWE</th><th>Severity</th><th>Message</th></tr>
+ <tr><td colspan='5'><a href='1.html'></a></td></tr>
+ <tr class="missingIncludeSystem"><td><a href="1.html#line-0">0</a></td><td>missingIncludeSystem</td><td></td><td>information</td><td >Cppcheck cannot find all the include files (use --check-config for details)</td></tr>
+ <tr><td colspan='5'><a href='0.html'>src/eggaccelerators.c</a></td></tr>
+ <tr class="duplicateExpression"><td><a href="0.html#line-321">321</a></td><td>duplicateExpression</td><td><a href='https://cwe.mitre.org/data/definitions/398.html'>398</a></td><td>style</td><td >Same expression on both sides of &apos;-=&apos;.</td></tr>
+ </table>
+ </div>
+ <div id="footer">
+ <p>
+ Cppcheck 1.90 - a tool for static C/C++ code analysis</br>
+ </br>
+ Internet: <a href="http://cppcheck.net">http://cppcheck.net</a></br>
+ IRC: <a href="irc://irc.freenode.net/cppcheck">irc://irc.freenode.net/cppcheck</a></br>
+ </p>
+ </div>
+ </body>
+</html>
diff --git a/[email protected]_travis-ci/stats.html b/[email protected]_travis-ci/stats.html
new file mode 100644
index 0000000..14ae0d4
--- /dev/null
+++ b/[email protected]_travis-ci/stats.html
@@ -0,0 +1,89 @@
+
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Cppcheck - HTML report - mate-indicator-applet</title>
+ <link rel="stylesheet" href="style.css">
+ <style>
+
+ </style>
+ <script language="javascript">
+ function getStyle(el,styleProp) {
+ if (el.currentStyle)
+ var y = el.currentStyle[styleProp];
+ else if (window.getComputedStyle)
+ var y = document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);
+ return y;
+ }
+ function toggle() {
+ var el = this.expandable_content;
+ var mark = this.expandable_marker;
+ if (el.style.display == "block") {
+ el.style.display = "none";
+ mark.innerHTML = "[+]";
+ } else {
+ el.style.display = "block";
+ mark.innerHTML = "[-]";
+ }
+ }
+ function init_expandables() {
+ var elts = document.getElementsByClassName("expandable");
+ for (var i = 0; i < elts.length; i++) {
+ var el = elts[i];
+ var clickable = el.getElementsByTagName("span")[0];
+ var marker = clickable.getElementsByClassName("marker")[0];
+ var content = el.getElementsByClassName("content")[0];
+ var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right"));
+ content.style.width = width + "px";
+ clickable.expandable_content = content;
+ clickable.expandable_marker = marker;
+ clickable.onclick = toggle;
+ }
+ }
+ function set_class_display(c, st) {
+ var elements = document.querySelectorAll('.' + c),
+ len = elements.length;
+ for (i = 0; i < len; i++) {
+ elements[i].style.display = st;
+ }
+ }
+ function toggle_class_visibility(id) {
+ var box = document.getElementById(id);
+ set_class_display(id, box.checked ? '' : 'none');
+ }
+ function toggle_all(){
+ var elts = document.getElementsByTagName("input");
+ for (var i = 1; i < elts.length; i++) {
+ var el = elts[i];
+ el.checked ? el.checked=false : el.checked=true;
+ toggle_class_visibility(el.id);
+ }
+ }
+
+ </script>
+ </head>
+ <body onload="init_expandables()">
+ <div id="header">
+ <h1>Cppcheck report - mate-indicator-applet: Statistics </h1>
+ </div>
+ <div id="menu_index">
+ <p id="filename"><a href="index.html">Back to summary</a> </p>
+
+ </div>
+ <div id="content_index">
+<p>Top 10 files for style severity, total findings: 1</br>
+&#160;&#160;&#160;1&#160;<a href="0.html"> src/eggaccelerators.c</a></br>
+</p>
+
+ </div>
+ <div id="footer">
+ <p>
+ Cppcheck 1.90 - a tool for static C/C++ code analysis</br>
+ </br>
+ Internet: <a href="http://cppcheck.net">http://cppcheck.net</a></br>
+ IRC: <a href="irc://irc.freenode.net/cppcheck">irc://irc.freenode.net/cppcheck</a></br>
+ </p>
+ </div>
+ </body>
+</html>
diff --git a/[email protected]_travis-ci/style.css b/[email protected]_travis-ci/style.css
new file mode 100644
index 0000000..c39571c
--- /dev/null
+++ b/[email protected]_travis-ci/style.css
@@ -0,0 +1,149 @@
+
+body {
+ font: 13px Arial, Verdana, Sans-Serif;
+ margin: 0;
+ width: auto;
+}
+
+h1 {
+ margin: 10px;
+}
+
+#footer > p {
+ margin: 4px;
+}
+
+.error {
+ background-color: #ffb7b7;
+}
+
+.error2 {
+ background-color: #faa;
+ border: 1px dotted black;
+ display: inline-block;
+ margin-left: 4px;
+}
+
+.inconclusive {
+ background-color: #B6B6B4;
+}
+
+.inconclusive2 {
+ background-color: #B6B6B4;
+ border: 1px dotted black;
+ display: inline-block;
+ margin-left: 4px;
+}
+
+div.verbose {
+ display: inline-block;
+ vertical-align: top;
+ cursor: help;
+}
+
+div.verbose div.content {
+ display: none;
+ position: absolute;
+ padding: 10px;
+ margin: 4px;
+ max-width: 40%;
+ white-space: pre-wrap;
+ border: 1px solid black;
+ background-color: #FFFFCC;
+ cursor: auto;
+}
+
+.highlight .hll {
+ padding: 1px;
+}
+
+#header {
+ border-bottom: thin solid #aaa;
+}
+
+#menu {
+ float: left;
+ margin-top: 5px;
+ text-align: left;
+ width: 150px;
+ /*height: 75%;*/
+ position: fixed;
+ overflow: auto;
+ z-index: 1;
+}
+
+#menu_index {
+ float: left;
+ margin-top: 5px;
+ padding-left: 5px;
+ text-align: left;
+ width: 300px;
+ /*height: 75%;*/
+ position: fixed;
+ overflow: auto;
+ z-index: 1;
+}
+
+#menu > a {
+ display: block;
+ margin-left: 10px;
+ font: 12px;
+ z-index: 1;
+}
+
+#filename {
+ margin-left: 10px;
+ font: 12px;
+ z-index: 1;
+}
+
+.highlighttable {
+ background-color:white;
+ z-index: 10;
+ position: relative;
+ margin: -10 px;
+}
+
+#content {
+ background-color: white;
+ -webkit-box-sizing: content-box;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+ float: left;
+ margin: 5px;
+ margin-left: 10px;
+ padding: 0 10px 10px 10px;
+ width: 80%;
+ padding-left: 150px;
+}
+
+#content_index {
+ background-color: white;
+ -webkit-box-sizing: content-box;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+ float: left;
+ margin: 5px;
+ margin-left: 10px;
+ padding: 0 10px 10px 10px;
+ width: 80%;
+ padding-left: 300px;
+}
+
+.linenos {
+ border-right: thin solid #aaa;
+ color: lightgray;
+ padding-right: 6px;
+}
+
+#footer {
+ border-top: thin solid #aaa;
+ clear: both;
+ font-size: 90%;
+ margin-top: 5px;
+}
+
+#footer ul {
+ list-style-type: none;
+ padding-left: 0;
+}
diff --git a/[email protected]_master/0.html b/[email protected]_master/0.html
new file mode 100644
index 0000000..dfb584a
--- /dev/null
+++ b/[email protected]_master/0.html
@@ -0,0 +1,1208 @@
+
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Cppcheck - HTML report - mate-indicator-applet</title>
+ <link rel="stylesheet" href="style.css">
+ <style>
+.highlight .hll { background-color: #ffffcc }
+.highlight { background: #ffffff; }
+.highlight .c { color: #888888 } /* Comment */
+.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */
+.highlight .k { color: #008800; font-weight: bold } /* Keyword */
+.highlight .o { color: #333333 } /* Operator */
+.highlight .ch { color: #888888 } /* Comment.Hashbang */
+.highlight .cm { color: #888888 } /* Comment.Multiline */
+.highlight .cp { color: #557799 } /* Comment.Preproc */
+.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
+.highlight .c1 { color: #888888 } /* Comment.Single */
+.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */
+.highlight .gd { color: #A00000 } /* Generic.Deleted */
+.highlight .ge { font-style: italic } /* Generic.Emph */
+.highlight .gr { color: #FF0000 } /* Generic.Error */
+.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.highlight .gi { color: #00A000 } /* Generic.Inserted */
+.highlight .go { color: #888888 } /* Generic.Output */
+.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
+.highlight .gs { font-weight: bold } /* Generic.Strong */
+.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.highlight .gt { color: #0044DD } /* Generic.Traceback */
+.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
+.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
+.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
+.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */
+.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
+.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */
+.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */
+.highlight .s { background-color: #fff0f0 } /* Literal.String */
+.highlight .na { color: #0000CC } /* Name.Attribute */
+.highlight .nb { color: #007020 } /* Name.Builtin */
+.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */
+.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
+.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
+.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */
+.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */
+.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */
+.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */
+.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
+.highlight .nt { color: #007700 } /* Name.Tag */
+.highlight .nv { color: #996633 } /* Name.Variable */
+.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */
+.highlight .w { color: #bbbbbb } /* Text.Whitespace */
+.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */
+.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */
+.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */
+.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
+.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */
+.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */
+.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */
+.highlight .sc { color: #0044DD } /* Literal.String.Char */
+.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */
+.highlight .sd { color: #DD4422 } /* Literal.String.Doc */
+.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */
+.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */
+.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */
+.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */
+.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */
+.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */
+.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */
+.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */
+.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
+.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */
+.highlight .vc { color: #336699 } /* Name.Variable.Class */
+.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */
+.highlight .vi { color: #3333BB } /* Name.Variable.Instance */
+.highlight .vm { color: #996633 } /* Name.Variable.Magic */
+.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
+ </style>
+ <script language="javascript">
+ function getStyle(el,styleProp) {
+ if (el.currentStyle)
+ var y = el.currentStyle[styleProp];
+ else if (window.getComputedStyle)
+ var y = document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);
+ return y;
+ }
+ function toggle() {
+ var el = this.expandable_content;
+ var mark = this.expandable_marker;
+ if (el.style.display == "block") {
+ el.style.display = "none";
+ mark.innerHTML = "[+]";
+ } else {
+ el.style.display = "block";
+ mark.innerHTML = "[-]";
+ }
+ }
+ function init_expandables() {
+ var elts = document.getElementsByClassName("expandable");
+ for (var i = 0; i < elts.length; i++) {
+ var el = elts[i];
+ var clickable = el.getElementsByTagName("span")[0];
+ var marker = clickable.getElementsByClassName("marker")[0];
+ var content = el.getElementsByClassName("content")[0];
+ var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right"));
+ content.style.width = width + "px";
+ clickable.expandable_content = content;
+ clickable.expandable_marker = marker;
+ clickable.onclick = toggle;
+ }
+ }
+ function set_class_display(c, st) {
+ var elements = document.querySelectorAll('.' + c),
+ len = elements.length;
+ for (i = 0; i < len; i++) {
+ elements[i].style.display = st;
+ }
+ }
+ function toggle_class_visibility(id) {
+ var box = document.getElementById(id);
+ set_class_display(id, box.checked ? '' : 'none');
+ }
+ function toggle_all(){
+ var elts = document.getElementsByTagName("input");
+ for (var i = 1; i < elts.length; i++) {
+ var el = elts[i];
+ el.checked ? el.checked=false : el.checked=true;
+ toggle_class_visibility(el.id);
+ }
+ }
+
+ </script>
+ </head>
+ <body onload="init_expandables()">
+ <div id="header">
+ <h1>Cppcheck report - mate-indicator-applet: src/eggaccelerators.c </h1>
+ </div>
+ <div id="menu" dir="rtl">
+ <p id="filename"><a href="index.html">Defects:</a> eggaccelerators.c</p>
+<a href='0.html#line-321'> duplicateExpression 321</a>
+ </div>
+ <div id="content">
+<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 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
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+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
+467
+468
+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
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527</pre></div></td><td class="code"><div class="highlight"><pre><span></span><a name="line-1"></a><span class="cm">/* eggaccelerators.c</span>
+<a name="line-2"></a><span class="cm"> * Copyright (C) 2002 Red Hat, Inc.; Copyright 1998, 2001 Tim Janik</span>
+<a name="line-3"></a><span class="cm"> * Developed by Havoc Pennington, Tim Janik</span>
+<a name="line-4"></a><span class="cm"> *</span>
+<a name="line-5"></a><span class="cm"> * This library is free software; you can redistribute it and/or</span>
+<a name="line-6"></a><span class="cm"> * modify it under the terms of the GNU Library General Public</span>
+<a name="line-7"></a><span class="cm"> * License as published by the Free Software Foundation; either</span>
+<a name="line-8"></a><span class="cm"> * version 2 of the License, or (at your option) any later version.</span>
+<a name="line-9"></a><span class="cm"> *</span>
+<a name="line-10"></a><span class="cm"> * This library is distributed in the hope that it will be useful,</span>
+<a name="line-11"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
+<a name="line-12"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span>
+<a name="line-13"></a><span class="cm"> * Library General Public License for more details.</span>
+<a name="line-14"></a><span class="cm"> *</span>
+<a name="line-15"></a><span class="cm"> * You should have received a copy of the GNU Library General Public</span>
+<a name="line-16"></a><span class="cm"> * License along with this library; if not, write to the</span>
+<a name="line-17"></a><span class="cm"> * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA</span>
+<a name="line-18"></a><span class="cm"> */</span>
+<a name="line-19"></a>
+<a name="line-20"></a><span class="cp">#include</span> <span class="cpf">&quot;eggaccelerators.h&quot;</span><span class="cp"></span>
+<a name="line-21"></a>
+<a name="line-22"></a><span class="cp">#include</span> <span class="cpf">&lt;string.h&gt;</span><span class="cp"></span>
+<a name="line-23"></a><span class="cp">#include</span> <span class="cpf">&lt;gdk/gdkx.h&gt;</span><span class="cp"></span>
+<a name="line-24"></a><span class="cp">#include</span> <span class="cpf">&lt;gdk/gdkkeysyms.h&gt;</span><span class="cp"></span>
+<a name="line-25"></a>
+<a name="line-26"></a><span class="k">enum</span>
+<a name="line-27"></a><span class="p">{</span>
+<a name="line-28"></a> <span class="n">EGG_MODMAP_ENTRY_SHIFT</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span>
+<a name="line-29"></a> <span class="n">EGG_MODMAP_ENTRY_LOCK</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span>
+<a name="line-30"></a> <span class="n">EGG_MODMAP_ENTRY_CONTROL</span> <span class="o">=</span> <span class="mi">2</span><span class="p">,</span>
+<a name="line-31"></a> <span class="n">EGG_MODMAP_ENTRY_MOD1</span> <span class="o">=</span> <span class="mi">3</span><span class="p">,</span>
+<a name="line-32"></a> <span class="n">EGG_MODMAP_ENTRY_MOD2</span> <span class="o">=</span> <span class="mi">4</span><span class="p">,</span>
+<a name="line-33"></a> <span class="n">EGG_MODMAP_ENTRY_MOD3</span> <span class="o">=</span> <span class="mi">5</span><span class="p">,</span>
+<a name="line-34"></a> <span class="n">EGG_MODMAP_ENTRY_MOD4</span> <span class="o">=</span> <span class="mi">6</span><span class="p">,</span>
+<a name="line-35"></a> <span class="n">EGG_MODMAP_ENTRY_MOD5</span> <span class="o">=</span> <span class="mi">7</span><span class="p">,</span>
+<a name="line-36"></a> <span class="n">EGG_MODMAP_ENTRY_LAST</span> <span class="o">=</span> <span class="mi">8</span>
+<a name="line-37"></a><span class="p">};</span>
+<a name="line-38"></a>
+<a name="line-39"></a><span class="cp">#define MODMAP_ENTRY_TO_MODIFIER(x) (1 &lt;&lt; (x))</span>
+<a name="line-40"></a>
+<a name="line-41"></a><span class="k">typedef</span> <span class="k">struct</span>
+<a name="line-42"></a><span class="p">{</span>
+<a name="line-43"></a> <span class="n">EggVirtualModifierType</span> <span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_LAST</span><span class="p">];</span>
+<a name="line-44"></a>
+<a name="line-45"></a><span class="p">}</span> <span class="n">EggModmap</span><span class="p">;</span>
+<a name="line-46"></a>
+<a name="line-47"></a><span class="k">const</span> <span class="n">EggModmap</span><span class="o">*</span> <span class="nf">egg_keymap_get_modmap</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">);</span>
+<a name="line-48"></a>
+<a name="line-49"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-50"></a><span class="nf">is_alt</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-51"></a><span class="p">{</span>
+<a name="line-52"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-53"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;a&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;A&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-54"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-55"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-56"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-57"></a><span class="p">}</span>
+<a name="line-58"></a>
+<a name="line-59"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-60"></a><span class="nf">is_ctl</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-61"></a><span class="p">{</span>
+<a name="line-62"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-63"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;c&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;C&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-64"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-65"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-66"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-67"></a><span class="p">}</span>
+<a name="line-68"></a>
+<a name="line-69"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-70"></a><span class="nf">is_modx</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-71"></a><span class="p">{</span>
+<a name="line-72"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-73"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;m&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;M&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-74"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;o&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;O&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-75"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;d&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;D&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-76"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">&gt;=</span> <span class="sc">&#39;1&#39;</span> <span class="o">&amp;&amp;</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">&lt;=</span> <span class="sc">&#39;5&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-77"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-78"></a><span class="p">}</span>
+<a name="line-79"></a>
+<a name="line-80"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-81"></a><span class="nf">is_ctrl</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-82"></a><span class="p">{</span>
+<a name="line-83"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-84"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;c&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;C&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-85"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-86"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-87"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-88"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-89"></a><span class="p">}</span>
+<a name="line-90"></a>
+<a name="line-91"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-92"></a><span class="nf">is_shft</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-93"></a><span class="p">{</span>
+<a name="line-94"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-95"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-96"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;h&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;H&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-97"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;f&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;F&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-98"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-99"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-100"></a><span class="p">}</span>
+<a name="line-101"></a>
+<a name="line-102"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-103"></a><span class="nf">is_shift</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-104"></a><span class="p">{</span>
+<a name="line-105"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-106"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-107"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;h&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;H&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-108"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;i&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;I&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-109"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;f&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;F&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-110"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-111"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-112"></a><span class="p">}</span>
+<a name="line-113"></a>
+<a name="line-114"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-115"></a><span class="nf">is_control</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-116"></a><span class="p">{</span>
+<a name="line-117"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-118"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;c&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;C&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-119"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;o&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;O&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-120"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;n&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;N&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-121"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-122"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-123"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;o&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;O&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-124"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-125"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">8</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-126"></a><span class="p">}</span>
+<a name="line-127"></a>
+<a name="line-128"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-129"></a><span class="nf">is_release</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-130"></a><span class="p">{</span>
+<a name="line-131"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-132"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-133"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-134"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-135"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-136"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;a&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;A&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-137"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-138"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-139"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">8</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-140"></a><span class="p">}</span>
+<a name="line-141"></a>
+<a name="line-142"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-143"></a><span class="nf">is_meta</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-144"></a><span class="p">{</span>
+<a name="line-145"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-146"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;m&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;M&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-147"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-148"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-149"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;a&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;A&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-150"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-151"></a><span class="p">}</span>
+<a name="line-152"></a>
+<a name="line-153"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-154"></a><span class="nf">is_super</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-155"></a><span class="p">{</span>
+<a name="line-156"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-157"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-158"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;u&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;U&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-159"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;p&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;P&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-160"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-161"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-162"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-163"></a><span class="p">}</span>
+<a name="line-164"></a>
+<a name="line-165"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-166"></a><span class="nf">is_hyper</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-167"></a><span class="p">{</span>
+<a name="line-168"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-169"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;h&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;H&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-170"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;y&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;Y&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-171"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;p&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;P&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-172"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-173"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-174"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-175"></a><span class="p">}</span>
+<a name="line-176"></a>
+<a name="line-177"></a><span class="cm">/**</span>
+<a name="line-178"></a><span class="cm"> * egg_accelerator_parse_virtual:</span>
+<a name="line-179"></a><span class="cm"> * @accelerator: string representing an accelerator</span>
+<a name="line-180"></a><span class="cm"> * @accelerator_key: return location for accelerator keyval</span>
+<a name="line-181"></a><span class="cm"> * @accelerator_mods: return location for accelerator modifier mask</span>
+<a name="line-182"></a><span class="cm"> *</span>
+<a name="line-183"></a><span class="cm"> * Parses a string representing a virtual accelerator. The format</span>
+<a name="line-184"></a><span class="cm"> * looks like &quot;&amp;lt;Control&amp;gt;a&quot; or &quot;&amp;lt;Shift&amp;gt;&amp;lt;Alt&amp;gt;F1&quot; or</span>
+<a name="line-185"></a><span class="cm"> * &quot;&amp;lt;Release&amp;gt;z&quot; (the last one is for key release). The parser</span>
+<a name="line-186"></a><span class="cm"> * is fairly liberal and allows lower or upper case, and also</span>
+<a name="line-187"></a><span class="cm"> * abbreviations such as &quot;&amp;lt;Ctl&amp;gt;&quot; and &quot;&amp;lt;Ctrl&amp;gt;&quot;.</span>
+<a name="line-188"></a><span class="cm"> *</span>
+<a name="line-189"></a><span class="cm"> * If the parse fails, @accelerator_key and @accelerator_mods will</span>
+<a name="line-190"></a><span class="cm"> * be set to 0 (zero) and %FALSE will be returned. If the string contains</span>
+<a name="line-191"></a><span class="cm"> * only modifiers, @accelerator_key will be set to 0 but %TRUE will be</span>
+<a name="line-192"></a><span class="cm"> * returned.</span>
+<a name="line-193"></a><span class="cm"> *</span>
+<a name="line-194"></a><span class="cm"> * The virtual vs. concrete accelerator distinction is a relic of</span>
+<a name="line-195"></a><span class="cm"> * how the X Window System works; there are modifiers Mod2-Mod5 that</span>
+<a name="line-196"></a><span class="cm"> * can represent various keyboard keys (numlock, meta, hyper, etc.),</span>
+<a name="line-197"></a><span class="cm"> * the virtual modifier represents the keyboard key, the concrete</span>
+<a name="line-198"></a><span class="cm"> * modifier the actual Mod2-Mod5 bits in the key press event.</span>
+<a name="line-199"></a><span class="cm"> *</span>
+<a name="line-200"></a><span class="cm"> * Returns: %TRUE on success.</span>
+<a name="line-201"></a><span class="cm"> */</span>
+<a name="line-202"></a><span class="n">gboolean</span>
+<a name="line-203"></a><span class="nf">egg_accelerator_parse_virtual</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">accelerator</span><span class="p">,</span>
+<a name="line-204"></a> <span class="n">guint</span> <span class="o">*</span><span class="n">accelerator_key</span><span class="p">,</span>
+<a name="line-205"></a> <span class="n">EggVirtualModifierType</span> <span class="o">*</span><span class="n">accelerator_mods</span><span class="p">)</span>
+<a name="line-206"></a><span class="p">{</span>
+<a name="line-207"></a> <span class="n">guint</span> <span class="n">keyval</span><span class="p">;</span>
+<a name="line-208"></a> <span class="n">GdkModifierType</span> <span class="n">mods</span><span class="p">;</span>
+<a name="line-209"></a> <span class="n">gint</span> <span class="n">len</span><span class="p">;</span>
+<a name="line-210"></a> <span class="n">gboolean</span> <span class="n">bad_keyval</span><span class="p">;</span>
+<a name="line-211"></a>
+<a name="line-212"></a> <span class="k">if</span> <span class="p">(</span><span class="n">accelerator_key</span><span class="p">)</span>
+<a name="line-213"></a> <span class="o">*</span><span class="n">accelerator_key</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-214"></a> <span class="k">if</span> <span class="p">(</span><span class="n">accelerator_mods</span><span class="p">)</span>
+<a name="line-215"></a> <span class="o">*</span><span class="n">accelerator_mods</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-216"></a>
+<a name="line-217"></a> <span class="n">g_return_val_if_fail</span> <span class="p">(</span><span class="n">accelerator</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">,</span> <span class="n">FALSE</span><span class="p">);</span>
+<a name="line-218"></a>
+<a name="line-219"></a> <span class="n">bad_keyval</span> <span class="o">=</span> <span class="n">FALSE</span><span class="p">;</span>
+<a name="line-220"></a>
+<a name="line-221"></a> <span class="n">keyval</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-222"></a> <span class="n">mods</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-223"></a> <span class="n">len</span> <span class="o">=</span> <span class="n">strlen</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">);</span>
+<a name="line-224"></a> <span class="k">while</span> <span class="p">(</span><span class="n">len</span><span class="p">)</span>
+<a name="line-225"></a> <span class="p">{</span>
+<a name="line-226"></a> <span class="k">if</span> <span class="p">(</span><span class="o">*</span><span class="n">accelerator</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span>
+<a name="line-227"></a> <span class="p">{</span>
+<a name="line-228"></a> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">9</span> <span class="o">&amp;&amp;</span> <span class="n">is_release</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-229"></a> <span class="p">{</span>
+<a name="line-230"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">9</span><span class="p">;</span>
+<a name="line-231"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">9</span><span class="p">;</span>
+<a name="line-232"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_RELEASE_MASK</span><span class="p">;</span>
+<a name="line-233"></a> <span class="p">}</span>
+<a name="line-234"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">9</span> <span class="o">&amp;&amp;</span> <span class="n">is_control</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-235"></a> <span class="p">{</span>
+<a name="line-236"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">9</span><span class="p">;</span>
+<a name="line-237"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">9</span><span class="p">;</span>
+<a name="line-238"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_CONTROL_MASK</span><span class="p">;</span>
+<a name="line-239"></a> <span class="p">}</span>
+<a name="line-240"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">7</span> <span class="o">&amp;&amp;</span> <span class="n">is_shift</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-241"></a> <span class="p">{</span>
+<a name="line-242"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-243"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-244"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SHIFT_MASK</span><span class="p">;</span>
+<a name="line-245"></a> <span class="p">}</span>
+<a name="line-246"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">6</span> <span class="o">&amp;&amp;</span> <span class="n">is_shft</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-247"></a> <span class="p">{</span>
+<a name="line-248"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-249"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-250"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SHIFT_MASK</span><span class="p">;</span>
+<a name="line-251"></a> <span class="p">}</span>
+<a name="line-252"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">6</span> <span class="o">&amp;&amp;</span> <span class="n">is_ctrl</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-253"></a> <span class="p">{</span>
+<a name="line-254"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-255"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-256"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_CONTROL_MASK</span><span class="p">;</span>
+<a name="line-257"></a> <span class="p">}</span>
+<a name="line-258"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">6</span> <span class="o">&amp;&amp;</span> <span class="n">is_modx</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-259"></a> <span class="p">{</span>
+<a name="line-260"></a> <span class="k">static</span> <span class="k">const</span> <span class="n">guint</span> <span class="n">mod_vals</span><span class="p">[]</span> <span class="o">=</span> <span class="p">{</span>
+<a name="line-261"></a> <span class="n">EGG_VIRTUAL_ALT_MASK</span><span class="p">,</span> <span class="n">EGG_VIRTUAL_MOD2_MASK</span><span class="p">,</span> <span class="n">EGG_VIRTUAL_MOD3_MASK</span><span class="p">,</span>
+<a name="line-262"></a> <span class="n">EGG_VIRTUAL_MOD4_MASK</span><span class="p">,</span> <span class="n">EGG_VIRTUAL_MOD5_MASK</span>
+<a name="line-263"></a> <span class="p">};</span>
+<a name="line-264"></a>
+<a name="line-265"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-266"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">4</span><span class="p">;</span>
+<a name="line-267"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">mod_vals</span><span class="p">[</span><span class="o">*</span><span class="n">accelerator</span> <span class="o">-</span> <span class="sc">&#39;1&#39;</span><span class="p">];</span>
+<a name="line-268"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">2</span><span class="p">;</span>
+<a name="line-269"></a> <span class="p">}</span>
+<a name="line-270"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">5</span> <span class="o">&amp;&amp;</span> <span class="n">is_ctl</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-271"></a> <span class="p">{</span>
+<a name="line-272"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">5</span><span class="p">;</span>
+<a name="line-273"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">5</span><span class="p">;</span>
+<a name="line-274"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_CONTROL_MASK</span><span class="p">;</span>
+<a name="line-275"></a> <span class="p">}</span>
+<a name="line-276"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">5</span> <span class="o">&amp;&amp;</span> <span class="n">is_alt</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-277"></a> <span class="p">{</span>
+<a name="line-278"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">5</span><span class="p">;</span>
+<a name="line-279"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">5</span><span class="p">;</span>
+<a name="line-280"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_ALT_MASK</span><span class="p">;</span>
+<a name="line-281"></a> <span class="p">}</span>
+<a name="line-282"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">6</span> <span class="o">&amp;&amp;</span> <span class="n">is_meta</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-283"></a> <span class="p">{</span>
+<a name="line-284"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-285"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-286"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_META_MASK</span><span class="p">;</span>
+<a name="line-287"></a> <span class="p">}</span>
+<a name="line-288"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">7</span> <span class="o">&amp;&amp;</span> <span class="n">is_hyper</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-289"></a> <span class="p">{</span>
+<a name="line-290"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-291"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-292"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_HYPER_MASK</span><span class="p">;</span>
+<a name="line-293"></a> <span class="p">}</span>
+<a name="line-294"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">7</span> <span class="o">&amp;&amp;</span> <span class="n">is_super</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-295"></a> <span class="p">{</span>
+<a name="line-296"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-297"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-298"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SUPER_MASK</span><span class="p">;</span>
+<a name="line-299"></a> <span class="p">}</span>
+<a name="line-300"></a> <span class="k">else</span>
+<a name="line-301"></a> <span class="p">{</span>
+<a name="line-302"></a> <span class="n">gchar</span> <span class="n">last_ch</span><span class="p">;</span>
+<a name="line-303"></a>
+<a name="line-304"></a> <span class="n">last_ch</span> <span class="o">=</span> <span class="o">*</span><span class="n">accelerator</span><span class="p">;</span>
+<a name="line-305"></a> <span class="k">while</span> <span class="p">(</span><span class="n">last_ch</span> <span class="o">&amp;&amp;</span> <span class="n">last_ch</span> <span class="o">!=</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">)</span>
+<a name="line-306"></a> <span class="p">{</span>
+<a name="line-307"></a> <span class="n">last_ch</span> <span class="o">=</span> <span class="o">*</span><span class="n">accelerator</span><span class="p">;</span>
+<a name="line-308"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">1</span><span class="p">;</span>
+<a name="line-309"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">1</span><span class="p">;</span>
+<a name="line-310"></a> <span class="p">}</span>
+<a name="line-311"></a> <span class="p">}</span>
+<a name="line-312"></a> <span class="p">}</span>
+<a name="line-313"></a> <span class="k">else</span>
+<a name="line-314"></a> <span class="p">{</span>
+<a name="line-315"></a> <span class="n">keyval</span> <span class="o">=</span> <span class="n">gdk_keyval_from_name</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">);</span>
+<a name="line-316"></a>
+<a name="line-317"></a> <span class="k">if</span> <span class="p">(</span><span class="n">keyval</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span>
+<a name="line-318"></a> <span class="n">bad_keyval</span> <span class="o">=</span> <span class="n">TRUE</span><span class="p">;</span>
+<a name="line-319"></a>
+<a name="line-320"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="n">len</span><span class="p">;</span>
+<a name="line-321"></a><span class="hll"> <span class="n">len</span> <span class="o">-=</span> <span class="n">len</span><span class="p">;</span><div class='verbose expandable'><span class='error2'>&lt;--- Same expression on both sides of '-='. <span class='marker'>[+]</span></span><div class='content'>Finding the same expression on both sides of an operator is suspicious and might indicate a cut and paste or logic error. Please examine this code carefully to determine if it is correct.</div></div>
+</span><a name="line-322"></a> <span class="p">}</span>
+<a name="line-323"></a> <span class="p">}</span>
+<a name="line-324"></a>
+<a name="line-325"></a> <span class="k">if</span> <span class="p">(</span><span class="n">accelerator_key</span><span class="p">)</span>
+<a name="line-326"></a> <span class="o">*</span><span class="n">accelerator_key</span> <span class="o">=</span> <span class="n">gdk_keyval_to_lower</span> <span class="p">(</span><span class="n">keyval</span><span class="p">);</span>
+<a name="line-327"></a> <span class="k">if</span> <span class="p">(</span><span class="n">accelerator_mods</span><span class="p">)</span>
+<a name="line-328"></a> <span class="o">*</span><span class="n">accelerator_mods</span> <span class="o">=</span> <span class="n">mods</span><span class="p">;</span>
+<a name="line-329"></a>
+<a name="line-330"></a> <span class="k">return</span> <span class="o">!</span><span class="n">bad_keyval</span><span class="p">;</span>
+<a name="line-331"></a><span class="p">}</span>
+<a name="line-332"></a>
+<a name="line-333"></a><span class="kt">void</span>
+<a name="line-334"></a><span class="nf">egg_keymap_resolve_virtual_modifiers</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">,</span>
+<a name="line-335"></a> <span class="n">EggVirtualModifierType</span> <span class="n">virtual_mods</span><span class="p">,</span>
+<a name="line-336"></a> <span class="n">GdkModifierType</span> <span class="o">*</span><span class="n">concrete_mods</span><span class="p">)</span>
+<a name="line-337"></a><span class="p">{</span>
+<a name="line-338"></a> <span class="n">GdkModifierType</span> <span class="n">concrete</span><span class="p">;</span>
+<a name="line-339"></a> <span class="kt">int</span> <span class="n">i</span><span class="p">;</span>
+<a name="line-340"></a> <span class="k">const</span> <span class="n">EggModmap</span> <span class="o">*</span><span class="n">modmap</span><span class="p">;</span>
+<a name="line-341"></a>
+<a name="line-342"></a> <span class="n">g_return_if_fail</span> <span class="p">(</span><span class="n">GDK_IS_KEYMAP</span> <span class="p">(</span><span class="n">keymap</span><span class="p">));</span>
+<a name="line-343"></a> <span class="n">g_return_if_fail</span> <span class="p">(</span><span class="n">concrete_mods</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-344"></a>
+<a name="line-345"></a> <span class="n">modmap</span> <span class="o">=</span> <span class="n">egg_keymap_get_modmap</span> <span class="p">(</span><span class="n">keymap</span><span class="p">);</span>
+<a name="line-346"></a>
+<a name="line-347"></a> <span class="cm">/* Not so sure about this algorithm. */</span>
+<a name="line-348"></a>
+<a name="line-349"></a> <span class="n">concrete</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-350"></a> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-351"></a> <span class="k">while</span> <span class="p">(</span><span class="n">i</span> <span class="o">&lt;</span> <span class="n">EGG_MODMAP_ENTRY_LAST</span><span class="p">)</span>
+<a name="line-352"></a> <span class="p">{</span>
+<a name="line-353"></a> <span class="k">if</span> <span class="p">(</span><span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">&amp;</span> <span class="n">virtual_mods</span><span class="p">)</span>
+<a name="line-354"></a> <span class="n">concrete</span> <span class="o">|=</span> <span class="p">(</span><span class="mi">1</span> <span class="o">&lt;&lt;</span> <span class="n">i</span><span class="p">);</span>
+<a name="line-355"></a>
+<a name="line-356"></a> <span class="o">++</span><span class="n">i</span><span class="p">;</span>
+<a name="line-357"></a> <span class="p">}</span>
+<a name="line-358"></a>
+<a name="line-359"></a> <span class="o">*</span><span class="n">concrete_mods</span> <span class="o">=</span> <span class="n">concrete</span><span class="p">;</span>
+<a name="line-360"></a><span class="p">}</span>
+<a name="line-361"></a>
+<a name="line-362"></a><span class="kt">void</span>
+<a name="line-363"></a><span class="nf">egg_keymap_virtualize_modifiers</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">,</span>
+<a name="line-364"></a> <span class="n">GdkModifierType</span> <span class="n">concrete_mods</span><span class="p">,</span>
+<a name="line-365"></a> <span class="n">EggVirtualModifierType</span> <span class="o">*</span><span class="n">virtual_mods</span><span class="p">)</span>
+<a name="line-366"></a><span class="p">{</span>
+<a name="line-367"></a> <span class="n">GdkModifierType</span> <span class="n">virtual</span><span class="p">;</span>
+<a name="line-368"></a> <span class="kt">int</span> <span class="n">i</span><span class="p">;</span>
+<a name="line-369"></a> <span class="k">const</span> <span class="n">EggModmap</span> <span class="o">*</span><span class="n">modmap</span><span class="p">;</span>
+<a name="line-370"></a>
+<a name="line-371"></a> <span class="n">g_return_if_fail</span> <span class="p">(</span><span class="n">GDK_IS_KEYMAP</span> <span class="p">(</span><span class="n">keymap</span><span class="p">));</span>
+<a name="line-372"></a> <span class="n">g_return_if_fail</span> <span class="p">(</span><span class="n">virtual_mods</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-373"></a>
+<a name="line-374"></a> <span class="n">modmap</span> <span class="o">=</span> <span class="n">egg_keymap_get_modmap</span> <span class="p">(</span><span class="n">keymap</span><span class="p">);</span>
+<a name="line-375"></a>
+<a name="line-376"></a> <span class="cm">/* Not so sure about this algorithm. */</span>
+<a name="line-377"></a>
+<a name="line-378"></a> <span class="n">virtual</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-379"></a> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-380"></a> <span class="k">while</span> <span class="p">(</span><span class="n">i</span> <span class="o">&lt;</span> <span class="n">EGG_MODMAP_ENTRY_LAST</span><span class="p">)</span>
+<a name="line-381"></a> <span class="p">{</span>
+<a name="line-382"></a> <span class="k">if</span> <span class="p">((</span><span class="mi">1</span> <span class="o">&lt;&lt;</span> <span class="n">i</span><span class="p">)</span> <span class="o">&amp;</span> <span class="n">concrete_mods</span><span class="p">)</span>
+<a name="line-383"></a> <span class="p">{</span>
+<a name="line-384"></a> <span class="n">EggVirtualModifierType</span> <span class="n">cleaned</span><span class="p">;</span>
+<a name="line-385"></a>
+<a name="line-386"></a> <span class="n">cleaned</span> <span class="o">=</span> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">&amp;</span> <span class="o">~</span><span class="p">(</span><span class="n">EGG_VIRTUAL_MOD2_MASK</span> <span class="o">|</span>
+<a name="line-387"></a> <span class="n">EGG_VIRTUAL_MOD3_MASK</span> <span class="o">|</span>
+<a name="line-388"></a> <span class="n">EGG_VIRTUAL_MOD4_MASK</span> <span class="o">|</span>
+<a name="line-389"></a> <span class="n">EGG_VIRTUAL_MOD5_MASK</span><span class="p">);</span>
+<a name="line-390"></a>
+<a name="line-391"></a> <span class="k">if</span> <span class="p">(</span><span class="n">cleaned</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">)</span>
+<a name="line-392"></a> <span class="p">{</span>
+<a name="line-393"></a> <span class="n">virtual</span> <span class="o">|=</span> <span class="n">cleaned</span><span class="p">;</span>
+<a name="line-394"></a> <span class="p">}</span>
+<a name="line-395"></a> <span class="k">else</span>
+<a name="line-396"></a> <span class="p">{</span>
+<a name="line-397"></a> <span class="cm">/* Rather than dropping mod2-&gt;mod5 if not bound,</span>
+<a name="line-398"></a><span class="cm"> * go ahead and use the concrete names</span>
+<a name="line-399"></a><span class="cm"> */</span>
+<a name="line-400"></a> <span class="n">virtual</span> <span class="o">|=</span> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">i</span><span class="p">];</span>
+<a name="line-401"></a> <span class="p">}</span>
+<a name="line-402"></a> <span class="p">}</span>
+<a name="line-403"></a>
+<a name="line-404"></a> <span class="o">++</span><span class="n">i</span><span class="p">;</span>
+<a name="line-405"></a> <span class="p">}</span>
+<a name="line-406"></a>
+<a name="line-407"></a> <span class="o">*</span><span class="n">virtual_mods</span> <span class="o">=</span> <span class="n">virtual</span><span class="p">;</span>
+<a name="line-408"></a><span class="p">}</span>
+<a name="line-409"></a>
+<a name="line-410"></a><span class="k">static</span> <span class="kt">void</span>
+<a name="line-411"></a><span class="nf">reload_modmap</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">,</span>
+<a name="line-412"></a> <span class="n">EggModmap</span> <span class="o">*</span><span class="n">modmap</span><span class="p">)</span>
+<a name="line-413"></a><span class="p">{</span>
+<a name="line-414"></a> <span class="n">XModifierKeymap</span> <span class="o">*</span><span class="n">xmodmap</span><span class="p">;</span>
+<a name="line-415"></a> <span class="kt">int</span> <span class="n">map_size</span><span class="p">;</span>
+<a name="line-416"></a> <span class="kt">int</span> <span class="n">i</span><span class="p">;</span>
+<a name="line-417"></a>
+<a name="line-418"></a> <span class="cm">/* FIXME multihead */</span>
+<a name="line-419"></a> <span class="n">xmodmap</span> <span class="o">=</span> <span class="n">XGetModifierMapping</span> <span class="p">(</span><span class="n">gdk_x11_get_default_xdisplay</span> <span class="p">());</span>
+<a name="line-420"></a>
+<a name="line-421"></a> <span class="n">memset</span> <span class="p">(</span><span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="k">sizeof</span> <span class="p">(</span><span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">));</span>
+<a name="line-422"></a>
+<a name="line-423"></a> <span class="cm">/* there are 8 modifiers, and the first 3 are shift, shift lock,</span>
+<a name="line-424"></a><span class="cm"> * and control</span>
+<a name="line-425"></a><span class="cm"> */</span>
+<a name="line-426"></a> <span class="n">map_size</span> <span class="o">=</span> <span class="mi">8</span> <span class="o">*</span> <span class="n">xmodmap</span><span class="o">-&gt;</span><span class="n">max_keypermod</span><span class="p">;</span>
+<a name="line-427"></a> <span class="n">i</span> <span class="o">=</span> <span class="mi">3</span> <span class="o">*</span> <span class="n">xmodmap</span><span class="o">-&gt;</span><span class="n">max_keypermod</span><span class="p">;</span>
+<a name="line-428"></a> <span class="k">while</span> <span class="p">(</span><span class="n">i</span> <span class="o">&lt;</span> <span class="n">map_size</span><span class="p">)</span>
+<a name="line-429"></a> <span class="p">{</span>
+<a name="line-430"></a> <span class="cm">/* get the key code at this point in the map,</span>
+<a name="line-431"></a><span class="cm"> * see if its keysym is one we&#39;re interested in</span>
+<a name="line-432"></a><span class="cm"> */</span>
+<a name="line-433"></a> <span class="kt">int</span> <span class="n">keycode</span> <span class="o">=</span> <span class="n">xmodmap</span><span class="o">-&gt;</span><span class="n">modifiermap</span><span class="p">[</span><span class="n">i</span><span class="p">];</span>
+<a name="line-434"></a> <span class="n">GdkKeymapKey</span> <span class="o">*</span><span class="n">keys</span><span class="p">;</span>
+<a name="line-435"></a> <span class="n">guint</span> <span class="o">*</span><span class="n">keyvals</span><span class="p">;</span>
+<a name="line-436"></a> <span class="kt">int</span> <span class="n">n_entries</span><span class="p">;</span>
+<a name="line-437"></a> <span class="kt">int</span> <span class="n">j</span><span class="p">;</span>
+<a name="line-438"></a> <span class="n">EggVirtualModifierType</span> <span class="n">mask</span><span class="p">;</span>
+<a name="line-439"></a>
+<a name="line-440"></a> <span class="n">keys</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span>
+<a name="line-441"></a> <span class="n">keyvals</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span>
+<a name="line-442"></a> <span class="n">n_entries</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-443"></a>
+<a name="line-444"></a> <span class="n">gdk_keymap_get_entries_for_keycode</span> <span class="p">(</span><span class="n">keymap</span><span class="p">,</span>
+<a name="line-445"></a> <span class="n">keycode</span><span class="p">,</span>
+<a name="line-446"></a> <span class="o">&amp;</span><span class="n">keys</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">keyvals</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">n_entries</span><span class="p">);</span>
+<a name="line-447"></a>
+<a name="line-448"></a> <span class="n">mask</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-449"></a> <span class="n">j</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-450"></a> <span class="k">while</span> <span class="p">(</span><span class="n">j</span> <span class="o">&lt;</span> <span class="n">n_entries</span><span class="p">)</span>
+<a name="line-451"></a> <span class="p">{</span>
+<a name="line-452"></a> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Num_Lock</span><span class="p">)</span>
+<a name="line-453"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_NUM_LOCK_MASK</span><span class="p">;</span>
+<a name="line-454"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Scroll_Lock</span><span class="p">)</span>
+<a name="line-455"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SCROLL_LOCK_MASK</span><span class="p">;</span>
+<a name="line-456"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Meta_L</span> <span class="o">||</span>
+<a name="line-457"></a> <span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Meta_R</span><span class="p">)</span>
+<a name="line-458"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_META_MASK</span><span class="p">;</span>
+<a name="line-459"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Hyper_L</span> <span class="o">||</span>
+<a name="line-460"></a> <span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Hyper_R</span><span class="p">)</span>
+<a name="line-461"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_HYPER_MASK</span><span class="p">;</span>
+<a name="line-462"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Super_L</span> <span class="o">||</span>
+<a name="line-463"></a> <span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Super_R</span><span class="p">)</span>
+<a name="line-464"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SUPER_MASK</span><span class="p">;</span>
+<a name="line-465"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">==</span> <span class="n">GDK_KEY_Mode_switch</span><span class="p">)</span>
+<a name="line-466"></a> <span class="n">mask</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MODE_SWITCH_MASK</span><span class="p">;</span>
+<a name="line-467"></a>
+<a name="line-468"></a> <span class="o">++</span><span class="n">j</span><span class="p">;</span>
+<a name="line-469"></a> <span class="p">}</span>
+<a name="line-470"></a>
+<a name="line-471"></a> <span class="cm">/* Mod1Mask is 1 &lt;&lt; 3 for example, i.e. the</span>
+<a name="line-472"></a><span class="cm"> * fourth modifier, i / keyspermod is the modifier</span>
+<a name="line-473"></a><span class="cm"> * index</span>
+<a name="line-474"></a><span class="cm"> */</span>
+<a name="line-475"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">i</span><span class="o">/</span><span class="n">xmodmap</span><span class="o">-&gt;</span><span class="n">max_keypermod</span><span class="p">]</span> <span class="o">|=</span> <span class="n">mask</span><span class="p">;</span>
+<a name="line-476"></a>
+<a name="line-477"></a> <span class="n">g_free</span> <span class="p">(</span><span class="n">keyvals</span><span class="p">);</span>
+<a name="line-478"></a> <span class="n">g_free</span> <span class="p">(</span><span class="n">keys</span><span class="p">);</span>
+<a name="line-479"></a>
+<a name="line-480"></a> <span class="o">++</span><span class="n">i</span><span class="p">;</span>
+<a name="line-481"></a> <span class="p">}</span>
+<a name="line-482"></a>
+<a name="line-483"></a> <span class="cm">/* Add in the not-really-virtual fixed entries */</span>
+<a name="line-484"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_SHIFT</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SHIFT_MASK</span><span class="p">;</span>
+<a name="line-485"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_CONTROL</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_CONTROL_MASK</span><span class="p">;</span>
+<a name="line-486"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_LOCK</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_LOCK_MASK</span><span class="p">;</span>
+<a name="line-487"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD1</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_ALT_MASK</span><span class="p">;</span>
+<a name="line-488"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD2</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MOD2_MASK</span><span class="p">;</span>
+<a name="line-489"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD3</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MOD3_MASK</span><span class="p">;</span>
+<a name="line-490"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD4</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MOD4_MASK</span><span class="p">;</span>
+<a name="line-491"></a> <span class="n">modmap</span><span class="o">-&gt;</span><span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_MOD5</span><span class="p">]</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_MOD5_MASK</span><span class="p">;</span>
+<a name="line-492"></a>
+<a name="line-493"></a> <span class="n">XFreeModifiermap</span> <span class="p">(</span><span class="n">xmodmap</span><span class="p">);</span>
+<a name="line-494"></a><span class="p">}</span>
+<a name="line-495"></a>
+<a name="line-496"></a><span class="k">const</span> <span class="n">EggModmap</span><span class="o">*</span>
+<a name="line-497"></a><span class="nf">egg_keymap_get_modmap</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">)</span>
+<a name="line-498"></a><span class="p">{</span>
+<a name="line-499"></a> <span class="n">EggModmap</span> <span class="o">*</span><span class="n">modmap</span><span class="p">;</span>
+<a name="line-500"></a>
+<a name="line-501"></a> <span class="cm">/* This is all a hack, much simpler when we can just</span>
+<a name="line-502"></a><span class="cm"> * modify GDK directly.</span>
+<a name="line-503"></a><span class="cm"> */</span>
+<a name="line-504"></a>
+<a name="line-505"></a> <span class="n">modmap</span> <span class="o">=</span> <span class="n">g_object_get_data</span> <span class="p">(</span><span class="n">G_OBJECT</span> <span class="p">(</span><span class="n">keymap</span><span class="p">),</span>
+<a name="line-506"></a> <span class="s">&quot;egg-modmap&quot;</span><span class="p">);</span>
+<a name="line-507"></a>
+<a name="line-508"></a> <span class="k">if</span> <span class="p">(</span><span class="n">modmap</span> <span class="o">==</span> <span class="nb">NULL</span><span class="p">)</span>
+<a name="line-509"></a> <span class="p">{</span>
+<a name="line-510"></a> <span class="n">modmap</span> <span class="o">=</span> <span class="n">g_new0</span> <span class="p">(</span><span class="n">EggModmap</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
+<a name="line-511"></a>
+<a name="line-512"></a> <span class="cm">/* FIXME modify keymap change events with an event filter</span>
+<a name="line-513"></a><span class="cm"> * and force a reload if we get one</span>
+<a name="line-514"></a><span class="cm"> */</span>
+<a name="line-515"></a>
+<a name="line-516"></a> <span class="n">reload_modmap</span> <span class="p">(</span><span class="n">keymap</span><span class="p">,</span> <span class="n">modmap</span><span class="p">);</span>
+<a name="line-517"></a>
+<a name="line-518"></a> <span class="n">g_object_set_data_full</span> <span class="p">(</span><span class="n">G_OBJECT</span> <span class="p">(</span><span class="n">keymap</span><span class="p">),</span>
+<a name="line-519"></a> <span class="s">&quot;egg-modmap&quot;</span><span class="p">,</span>
+<a name="line-520"></a> <span class="n">modmap</span><span class="p">,</span>
+<a name="line-521"></a> <span class="n">g_free</span><span class="p">);</span>
+<a name="line-522"></a> <span class="p">}</span>
+<a name="line-523"></a>
+<a name="line-524"></a> <span class="n">g_assert</span> <span class="p">(</span><span class="n">modmap</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">);</span>
+<a name="line-525"></a>
+<a name="line-526"></a> <span class="k">return</span> <span class="n">modmap</span><span class="p">;</span>
+<a name="line-527"></a><span class="p">}</span>
+</pre></div>
+</td></tr></table>
+ </div>
+ <div id="footer">
+ <p>
+ Cppcheck 1.90 - a tool for static C/C++ code analysis</br>
+ </br>
+ Internet: <a href="http://cppcheck.net">http://cppcheck.net</a></br>
+ IRC: <a href="irc://irc.freenode.net/cppcheck">irc://irc.freenode.net/cppcheck</a></br>
+ </p>
+ </div>
+ </body>
+</html>
diff --git a/[email protected]_master/index.html b/[email protected]_master/index.html
new file mode 100644
index 0000000..812f8b5
--- /dev/null
+++ b/[email protected]_master/index.html
@@ -0,0 +1,101 @@
+
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Cppcheck - HTML report - mate-indicator-applet</title>
+ <link rel="stylesheet" href="style.css">
+ <style>
+
+ </style>
+ <script language="javascript">
+ function getStyle(el,styleProp) {
+ if (el.currentStyle)
+ var y = el.currentStyle[styleProp];
+ else if (window.getComputedStyle)
+ var y = document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);
+ return y;
+ }
+ function toggle() {
+ var el = this.expandable_content;
+ var mark = this.expandable_marker;
+ if (el.style.display == "block") {
+ el.style.display = "none";
+ mark.innerHTML = "[+]";
+ } else {
+ el.style.display = "block";
+ mark.innerHTML = "[-]";
+ }
+ }
+ function init_expandables() {
+ var elts = document.getElementsByClassName("expandable");
+ for (var i = 0; i < elts.length; i++) {
+ var el = elts[i];
+ var clickable = el.getElementsByTagName("span")[0];
+ var marker = clickable.getElementsByClassName("marker")[0];
+ var content = el.getElementsByClassName("content")[0];
+ var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right"));
+ content.style.width = width + "px";
+ clickable.expandable_content = content;
+ clickable.expandable_marker = marker;
+ clickable.onclick = toggle;
+ }
+ }
+ function set_class_display(c, st) {
+ var elements = document.querySelectorAll('.' + c),
+ len = elements.length;
+ for (i = 0; i < len; i++) {
+ elements[i].style.display = st;
+ }
+ }
+ function toggle_class_visibility(id) {
+ var box = document.getElementById(id);
+ set_class_display(id, box.checked ? '' : 'none');
+ }
+ function toggle_all(){
+ var elts = document.getElementsByTagName("input");
+ for (var i = 1; i < elts.length; i++) {
+ var el = elts[i];
+ el.checked ? el.checked=false : el.checked=true;
+ toggle_class_visibility(el.id);
+ }
+ }
+
+ </script>
+ </head>
+ <body onload="init_expandables()">
+ <div id="header">
+ <h1>Cppcheck report - mate-indicator-applet: </h1>
+ </div>
+ <div id="menu_index">
+ <p id="filename"><a href="index.html">Defect summary;</a> </p>
+
+ <label><input type="checkbox" onclick="toggle_all()" checked> Toggle all</label>
+ <table>
+ <tr><th>Show</th><th>#</th><th>Defect ID</th></tr>
+ <tr><td><input type='checkbox' onclick='toggle_class_visibility(this.id)' id='duplicateExpression' name='duplicateExpression' checked></td><td>1</td><td>duplicateExpression</td></tr>
+ <tr><td><input type='checkbox' onclick='toggle_class_visibility(this.id)' id='missingIncludeSystem' name='missingIncludeSystem' checked></td><td>1</td><td>missingIncludeSystem</td></tr>
+ <tr><td></td><td>2</td><td>total</td></tr>
+ </table>
+ <p><a href="stats.html">Statistics</a></p>
+ </div>
+ <div id="content_index">
+
+ <table>
+ <tr><th>Line</th><th>Id</th><th>CWE</th><th>Severity</th><th>Message</th></tr>
+ <tr><td colspan='5'><a href='1.html'></a></td></tr>
+ <tr class="missingIncludeSystem"><td><a href="1.html#line-0">0</a></td><td>missingIncludeSystem</td><td></td><td>information</td><td >Cppcheck cannot find all the include files (use --check-config for details)</td></tr>
+ <tr><td colspan='5'><a href='0.html'>src/eggaccelerators.c</a></td></tr>
+ <tr class="duplicateExpression"><td><a href="0.html#line-321">321</a></td><td>duplicateExpression</td><td><a href='https://cwe.mitre.org/data/definitions/398.html'>398</a></td><td>style</td><td >Same expression on both sides of &apos;-=&apos;.</td></tr>
+ </table>
+ </div>
+ <div id="footer">
+ <p>
+ Cppcheck 1.90 - a tool for static C/C++ code analysis</br>
+ </br>
+ Internet: <a href="http://cppcheck.net">http://cppcheck.net</a></br>
+ IRC: <a href="irc://irc.freenode.net/cppcheck">irc://irc.freenode.net/cppcheck</a></br>
+ </p>
+ </div>
+ </body>
+</html>
diff --git a/[email protected]_master/stats.html b/[email protected]_master/stats.html
new file mode 100644
index 0000000..14ae0d4
--- /dev/null
+++ b/[email protected]_master/stats.html
@@ -0,0 +1,89 @@
+
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Cppcheck - HTML report - mate-indicator-applet</title>
+ <link rel="stylesheet" href="style.css">
+ <style>
+
+ </style>
+ <script language="javascript">
+ function getStyle(el,styleProp) {
+ if (el.currentStyle)
+ var y = el.currentStyle[styleProp];
+ else if (window.getComputedStyle)
+ var y = document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);
+ return y;
+ }
+ function toggle() {
+ var el = this.expandable_content;
+ var mark = this.expandable_marker;
+ if (el.style.display == "block") {
+ el.style.display = "none";
+ mark.innerHTML = "[+]";
+ } else {
+ el.style.display = "block";
+ mark.innerHTML = "[-]";
+ }
+ }
+ function init_expandables() {
+ var elts = document.getElementsByClassName("expandable");
+ for (var i = 0; i < elts.length; i++) {
+ var el = elts[i];
+ var clickable = el.getElementsByTagName("span")[0];
+ var marker = clickable.getElementsByClassName("marker")[0];
+ var content = el.getElementsByClassName("content")[0];
+ var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right"));
+ content.style.width = width + "px";
+ clickable.expandable_content = content;
+ clickable.expandable_marker = marker;
+ clickable.onclick = toggle;
+ }
+ }
+ function set_class_display(c, st) {
+ var elements = document.querySelectorAll('.' + c),
+ len = elements.length;
+ for (i = 0; i < len; i++) {
+ elements[i].style.display = st;
+ }
+ }
+ function toggle_class_visibility(id) {
+ var box = document.getElementById(id);
+ set_class_display(id, box.checked ? '' : 'none');
+ }
+ function toggle_all(){
+ var elts = document.getElementsByTagName("input");
+ for (var i = 1; i < elts.length; i++) {
+ var el = elts[i];
+ el.checked ? el.checked=false : el.checked=true;
+ toggle_class_visibility(el.id);
+ }
+ }
+
+ </script>
+ </head>
+ <body onload="init_expandables()">
+ <div id="header">
+ <h1>Cppcheck report - mate-indicator-applet: Statistics </h1>
+ </div>
+ <div id="menu_index">
+ <p id="filename"><a href="index.html">Back to summary</a> </p>
+
+ </div>
+ <div id="content_index">
+<p>Top 10 files for style severity, total findings: 1</br>
+&#160;&#160;&#160;1&#160;<a href="0.html"> src/eggaccelerators.c</a></br>
+</p>
+
+ </div>
+ <div id="footer">
+ <p>
+ Cppcheck 1.90 - a tool for static C/C++ code analysis</br>
+ </br>
+ Internet: <a href="http://cppcheck.net">http://cppcheck.net</a></br>
+ IRC: <a href="irc://irc.freenode.net/cppcheck">irc://irc.freenode.net/cppcheck</a></br>
+ </p>
+ </div>
+ </body>
+</html>
diff --git a/[email protected]_master/style.css b/[email protected]_master/style.css
new file mode 100644
index 0000000..c39571c
--- /dev/null
+++ b/[email protected]_master/style.css
@@ -0,0 +1,149 @@
+
+body {
+ font: 13px Arial, Verdana, Sans-Serif;
+ margin: 0;
+ width: auto;
+}
+
+h1 {
+ margin: 10px;
+}
+
+#footer > p {
+ margin: 4px;
+}
+
+.error {
+ background-color: #ffb7b7;
+}
+
+.error2 {
+ background-color: #faa;
+ border: 1px dotted black;
+ display: inline-block;
+ margin-left: 4px;
+}
+
+.inconclusive {
+ background-color: #B6B6B4;
+}
+
+.inconclusive2 {
+ background-color: #B6B6B4;
+ border: 1px dotted black;
+ display: inline-block;
+ margin-left: 4px;
+}
+
+div.verbose {
+ display: inline-block;
+ vertical-align: top;
+ cursor: help;
+}
+
+div.verbose div.content {
+ display: none;
+ position: absolute;
+ padding: 10px;
+ margin: 4px;
+ max-width: 40%;
+ white-space: pre-wrap;
+ border: 1px solid black;
+ background-color: #FFFFCC;
+ cursor: auto;
+}
+
+.highlight .hll {
+ padding: 1px;
+}
+
+#header {
+ border-bottom: thin solid #aaa;
+}
+
+#menu {
+ float: left;
+ margin-top: 5px;
+ text-align: left;
+ width: 150px;
+ /*height: 75%;*/
+ position: fixed;
+ overflow: auto;
+ z-index: 1;
+}
+
+#menu_index {
+ float: left;
+ margin-top: 5px;
+ padding-left: 5px;
+ text-align: left;
+ width: 300px;
+ /*height: 75%;*/
+ position: fixed;
+ overflow: auto;
+ z-index: 1;
+}
+
+#menu > a {
+ display: block;
+ margin-left: 10px;
+ font: 12px;
+ z-index: 1;
+}
+
+#filename {
+ margin-left: 10px;
+ font: 12px;
+ z-index: 1;
+}
+
+.highlighttable {
+ background-color:white;
+ z-index: 10;
+ position: relative;
+ margin: -10 px;
+}
+
+#content {
+ background-color: white;
+ -webkit-box-sizing: content-box;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+ float: left;
+ margin: 5px;
+ margin-left: 10px;
+ padding: 0 10px 10px 10px;
+ width: 80%;
+ padding-left: 150px;
+}
+
+#content_index {
+ background-color: white;
+ -webkit-box-sizing: content-box;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+ float: left;
+ margin: 5px;
+ margin-left: 10px;
+ padding: 0 10px 10px 10px;
+ width: 80%;
+ padding-left: 300px;
+}
+
+.linenos {
+ border-right: thin solid #aaa;
+ color: lightgray;
+ padding-right: 6px;
+}
+
+#footer {
+ border-top: thin solid #aaa;
+ clear: both;
+ font-size: 90%;
+ margin-top: 5px;
+}
+
+#footer ul {
+ list-style-type: none;
+ padding-left: 0;
+}
diff --git a/[email protected]_master/0.html b/[email protected]_master/0.html
new file mode 100644
index 0000000..dfb584a
--- /dev/null
+++ b/[email protected]_master/0.html
@@ -0,0 +1,1208 @@
+
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Cppcheck - HTML report - mate-indicator-applet</title>
+ <link rel="stylesheet" href="style.css">
+ <style>
+.highlight .hll { background-color: #ffffcc }
+.highlight { background: #ffffff; }
+.highlight .c { color: #888888 } /* Comment */
+.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */
+.highlight .k { color: #008800; font-weight: bold } /* Keyword */
+.highlight .o { color: #333333 } /* Operator */
+.highlight .ch { color: #888888 } /* Comment.Hashbang */
+.highlight .cm { color: #888888 } /* Comment.Multiline */
+.highlight .cp { color: #557799 } /* Comment.Preproc */
+.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
+.highlight .c1 { color: #888888 } /* Comment.Single */
+.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */
+.highlight .gd { color: #A00000 } /* Generic.Deleted */
+.highlight .ge { font-style: italic } /* Generic.Emph */
+.highlight .gr { color: #FF0000 } /* Generic.Error */
+.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.highlight .gi { color: #00A000 } /* Generic.Inserted */
+.highlight .go { color: #888888 } /* Generic.Output */
+.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
+.highlight .gs { font-weight: bold } /* Generic.Strong */
+.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.highlight .gt { color: #0044DD } /* Generic.Traceback */
+.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
+.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
+.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
+.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */
+.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
+.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */
+.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */
+.highlight .s { background-color: #fff0f0 } /* Literal.String */
+.highlight .na { color: #0000CC } /* Name.Attribute */
+.highlight .nb { color: #007020 } /* Name.Builtin */
+.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */
+.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
+.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
+.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */
+.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */
+.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */
+.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */
+.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
+.highlight .nt { color: #007700 } /* Name.Tag */
+.highlight .nv { color: #996633 } /* Name.Variable */
+.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */
+.highlight .w { color: #bbbbbb } /* Text.Whitespace */
+.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */
+.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */
+.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */
+.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
+.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */
+.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */
+.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */
+.highlight .sc { color: #0044DD } /* Literal.String.Char */
+.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */
+.highlight .sd { color: #DD4422 } /* Literal.String.Doc */
+.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */
+.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */
+.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */
+.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */
+.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */
+.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */
+.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */
+.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */
+.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
+.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */
+.highlight .vc { color: #336699 } /* Name.Variable.Class */
+.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */
+.highlight .vi { color: #3333BB } /* Name.Variable.Instance */
+.highlight .vm { color: #996633 } /* Name.Variable.Magic */
+.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
+ </style>
+ <script language="javascript">
+ function getStyle(el,styleProp) {
+ if (el.currentStyle)
+ var y = el.currentStyle[styleProp];
+ else if (window.getComputedStyle)
+ var y = document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);
+ return y;
+ }
+ function toggle() {
+ var el = this.expandable_content;
+ var mark = this.expandable_marker;
+ if (el.style.display == "block") {
+ el.style.display = "none";
+ mark.innerHTML = "[+]";
+ } else {
+ el.style.display = "block";
+ mark.innerHTML = "[-]";
+ }
+ }
+ function init_expandables() {
+ var elts = document.getElementsByClassName("expandable");
+ for (var i = 0; i < elts.length; i++) {
+ var el = elts[i];
+ var clickable = el.getElementsByTagName("span")[0];
+ var marker = clickable.getElementsByClassName("marker")[0];
+ var content = el.getElementsByClassName("content")[0];
+ var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right"));
+ content.style.width = width + "px";
+ clickable.expandable_content = content;
+ clickable.expandable_marker = marker;
+ clickable.onclick = toggle;
+ }
+ }
+ function set_class_display(c, st) {
+ var elements = document.querySelectorAll('.' + c),
+ len = elements.length;
+ for (i = 0; i < len; i++) {
+ elements[i].style.display = st;
+ }
+ }
+ function toggle_class_visibility(id) {
+ var box = document.getElementById(id);
+ set_class_display(id, box.checked ? '' : 'none');
+ }
+ function toggle_all(){
+ var elts = document.getElementsByTagName("input");
+ for (var i = 1; i < elts.length; i++) {
+ var el = elts[i];
+ el.checked ? el.checked=false : el.checked=true;
+ toggle_class_visibility(el.id);
+ }
+ }
+
+ </script>
+ </head>
+ <body onload="init_expandables()">
+ <div id="header">
+ <h1>Cppcheck report - mate-indicator-applet: src/eggaccelerators.c </h1>
+ </div>
+ <div id="menu" dir="rtl">
+ <p id="filename"><a href="index.html">Defects:</a> eggaccelerators.c</p>
+<a href='0.html#line-321'> duplicateExpression 321</a>
+ </div>
+ <div id="content">
+<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 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
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+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
+467
+468
+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
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527</pre></div></td><td class="code"><div class="highlight"><pre><span></span><a name="line-1"></a><span class="cm">/* eggaccelerators.c</span>
+<a name="line-2"></a><span class="cm"> * Copyright (C) 2002 Red Hat, Inc.; Copyright 1998, 2001 Tim Janik</span>
+<a name="line-3"></a><span class="cm"> * Developed by Havoc Pennington, Tim Janik</span>
+<a name="line-4"></a><span class="cm"> *</span>
+<a name="line-5"></a><span class="cm"> * This library is free software; you can redistribute it and/or</span>
+<a name="line-6"></a><span class="cm"> * modify it under the terms of the GNU Library General Public</span>
+<a name="line-7"></a><span class="cm"> * License as published by the Free Software Foundation; either</span>
+<a name="line-8"></a><span class="cm"> * version 2 of the License, or (at your option) any later version.</span>
+<a name="line-9"></a><span class="cm"> *</span>
+<a name="line-10"></a><span class="cm"> * This library is distributed in the hope that it will be useful,</span>
+<a name="line-11"></a><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
+<a name="line-12"></a><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span>
+<a name="line-13"></a><span class="cm"> * Library General Public License for more details.</span>
+<a name="line-14"></a><span class="cm"> *</span>
+<a name="line-15"></a><span class="cm"> * You should have received a copy of the GNU Library General Public</span>
+<a name="line-16"></a><span class="cm"> * License along with this library; if not, write to the</span>
+<a name="line-17"></a><span class="cm"> * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA</span>
+<a name="line-18"></a><span class="cm"> */</span>
+<a name="line-19"></a>
+<a name="line-20"></a><span class="cp">#include</span> <span class="cpf">&quot;eggaccelerators.h&quot;</span><span class="cp"></span>
+<a name="line-21"></a>
+<a name="line-22"></a><span class="cp">#include</span> <span class="cpf">&lt;string.h&gt;</span><span class="cp"></span>
+<a name="line-23"></a><span class="cp">#include</span> <span class="cpf">&lt;gdk/gdkx.h&gt;</span><span class="cp"></span>
+<a name="line-24"></a><span class="cp">#include</span> <span class="cpf">&lt;gdk/gdkkeysyms.h&gt;</span><span class="cp"></span>
+<a name="line-25"></a>
+<a name="line-26"></a><span class="k">enum</span>
+<a name="line-27"></a><span class="p">{</span>
+<a name="line-28"></a> <span class="n">EGG_MODMAP_ENTRY_SHIFT</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span>
+<a name="line-29"></a> <span class="n">EGG_MODMAP_ENTRY_LOCK</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span>
+<a name="line-30"></a> <span class="n">EGG_MODMAP_ENTRY_CONTROL</span> <span class="o">=</span> <span class="mi">2</span><span class="p">,</span>
+<a name="line-31"></a> <span class="n">EGG_MODMAP_ENTRY_MOD1</span> <span class="o">=</span> <span class="mi">3</span><span class="p">,</span>
+<a name="line-32"></a> <span class="n">EGG_MODMAP_ENTRY_MOD2</span> <span class="o">=</span> <span class="mi">4</span><span class="p">,</span>
+<a name="line-33"></a> <span class="n">EGG_MODMAP_ENTRY_MOD3</span> <span class="o">=</span> <span class="mi">5</span><span class="p">,</span>
+<a name="line-34"></a> <span class="n">EGG_MODMAP_ENTRY_MOD4</span> <span class="o">=</span> <span class="mi">6</span><span class="p">,</span>
+<a name="line-35"></a> <span class="n">EGG_MODMAP_ENTRY_MOD5</span> <span class="o">=</span> <span class="mi">7</span><span class="p">,</span>
+<a name="line-36"></a> <span class="n">EGG_MODMAP_ENTRY_LAST</span> <span class="o">=</span> <span class="mi">8</span>
+<a name="line-37"></a><span class="p">};</span>
+<a name="line-38"></a>
+<a name="line-39"></a><span class="cp">#define MODMAP_ENTRY_TO_MODIFIER(x) (1 &lt;&lt; (x))</span>
+<a name="line-40"></a>
+<a name="line-41"></a><span class="k">typedef</span> <span class="k">struct</span>
+<a name="line-42"></a><span class="p">{</span>
+<a name="line-43"></a> <span class="n">EggVirtualModifierType</span> <span class="n">mapping</span><span class="p">[</span><span class="n">EGG_MODMAP_ENTRY_LAST</span><span class="p">];</span>
+<a name="line-44"></a>
+<a name="line-45"></a><span class="p">}</span> <span class="n">EggModmap</span><span class="p">;</span>
+<a name="line-46"></a>
+<a name="line-47"></a><span class="k">const</span> <span class="n">EggModmap</span><span class="o">*</span> <span class="nf">egg_keymap_get_modmap</span> <span class="p">(</span><span class="n">GdkKeymap</span> <span class="o">*</span><span class="n">keymap</span><span class="p">);</span>
+<a name="line-48"></a>
+<a name="line-49"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-50"></a><span class="nf">is_alt</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-51"></a><span class="p">{</span>
+<a name="line-52"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-53"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;a&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;A&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-54"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-55"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-56"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-57"></a><span class="p">}</span>
+<a name="line-58"></a>
+<a name="line-59"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-60"></a><span class="nf">is_ctl</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-61"></a><span class="p">{</span>
+<a name="line-62"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-63"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;c&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;C&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-64"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-65"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-66"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-67"></a><span class="p">}</span>
+<a name="line-68"></a>
+<a name="line-69"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-70"></a><span class="nf">is_modx</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-71"></a><span class="p">{</span>
+<a name="line-72"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-73"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;m&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;M&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-74"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;o&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;O&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-75"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;d&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;D&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-76"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">&gt;=</span> <span class="sc">&#39;1&#39;</span> <span class="o">&amp;&amp;</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">&lt;=</span> <span class="sc">&#39;5&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-77"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-78"></a><span class="p">}</span>
+<a name="line-79"></a>
+<a name="line-80"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-81"></a><span class="nf">is_ctrl</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-82"></a><span class="p">{</span>
+<a name="line-83"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-84"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;c&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;C&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-85"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-86"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-87"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-88"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-89"></a><span class="p">}</span>
+<a name="line-90"></a>
+<a name="line-91"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-92"></a><span class="nf">is_shft</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-93"></a><span class="p">{</span>
+<a name="line-94"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-95"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-96"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;h&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;H&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-97"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;f&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;F&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-98"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-99"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-100"></a><span class="p">}</span>
+<a name="line-101"></a>
+<a name="line-102"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-103"></a><span class="nf">is_shift</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-104"></a><span class="p">{</span>
+<a name="line-105"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-106"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-107"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;h&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;H&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-108"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;i&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;I&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-109"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;f&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;F&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-110"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-111"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-112"></a><span class="p">}</span>
+<a name="line-113"></a>
+<a name="line-114"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-115"></a><span class="nf">is_control</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-116"></a><span class="p">{</span>
+<a name="line-117"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-118"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;c&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;C&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-119"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;o&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;O&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-120"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;n&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;N&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-121"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-122"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-123"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;o&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;O&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-124"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-125"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">8</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-126"></a><span class="p">}</span>
+<a name="line-127"></a>
+<a name="line-128"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-129"></a><span class="nf">is_release</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-130"></a><span class="p">{</span>
+<a name="line-131"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-132"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-133"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-134"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;l&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;L&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-135"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-136"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;a&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;A&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-137"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-138"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-139"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">8</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-140"></a><span class="p">}</span>
+<a name="line-141"></a>
+<a name="line-142"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-143"></a><span class="nf">is_meta</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-144"></a><span class="p">{</span>
+<a name="line-145"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-146"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;m&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;M&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-147"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-148"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;t&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;T&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-149"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;a&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;A&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-150"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-151"></a><span class="p">}</span>
+<a name="line-152"></a>
+<a name="line-153"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-154"></a><span class="nf">is_super</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-155"></a><span class="p">{</span>
+<a name="line-156"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-157"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;s&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;S&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-158"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;u&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;U&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-159"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;p&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;P&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-160"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-161"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-162"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-163"></a><span class="p">}</span>
+<a name="line-164"></a>
+<a name="line-165"></a><span class="k">static</span> <span class="kr">inline</span> <span class="n">gboolean</span>
+<a name="line-166"></a><span class="nf">is_hyper</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">string</span><span class="p">)</span>
+<a name="line-167"></a><span class="p">{</span>
+<a name="line-168"></a> <span class="k">return</span> <span class="p">((</span><span class="n">string</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-169"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;h&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;H&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-170"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;y&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;Y&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-171"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;p&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;P&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-172"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;e&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;E&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-173"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;r&#39;</span> <span class="o">||</span> <span class="n">string</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;R&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
+<a name="line-174"></a> <span class="p">(</span><span class="n">string</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sc">&#39;&gt;&#39;</span><span class="p">));</span>
+<a name="line-175"></a><span class="p">}</span>
+<a name="line-176"></a>
+<a name="line-177"></a><span class="cm">/**</span>
+<a name="line-178"></a><span class="cm"> * egg_accelerator_parse_virtual:</span>
+<a name="line-179"></a><span class="cm"> * @accelerator: string representing an accelerator</span>
+<a name="line-180"></a><span class="cm"> * @accelerator_key: return location for accelerator keyval</span>
+<a name="line-181"></a><span class="cm"> * @accelerator_mods: return location for accelerator modifier mask</span>
+<a name="line-182"></a><span class="cm"> *</span>
+<a name="line-183"></a><span class="cm"> * Parses a string representing a virtual accelerator. The format</span>
+<a name="line-184"></a><span class="cm"> * looks like &quot;&amp;lt;Control&amp;gt;a&quot; or &quot;&amp;lt;Shift&amp;gt;&amp;lt;Alt&amp;gt;F1&quot; or</span>
+<a name="line-185"></a><span class="cm"> * &quot;&amp;lt;Release&amp;gt;z&quot; (the last one is for key release). The parser</span>
+<a name="line-186"></a><span class="cm"> * is fairly liberal and allows lower or upper case, and also</span>
+<a name="line-187"></a><span class="cm"> * abbreviations such as &quot;&amp;lt;Ctl&amp;gt;&quot; and &quot;&amp;lt;Ctrl&amp;gt;&quot;.</span>
+<a name="line-188"></a><span class="cm"> *</span>
+<a name="line-189"></a><span class="cm"> * If the parse fails, @accelerator_key and @accelerator_mods will</span>
+<a name="line-190"></a><span class="cm"> * be set to 0 (zero) and %FALSE will be returned. If the string contains</span>
+<a name="line-191"></a><span class="cm"> * only modifiers, @accelerator_key will be set to 0 but %TRUE will be</span>
+<a name="line-192"></a><span class="cm"> * returned.</span>
+<a name="line-193"></a><span class="cm"> *</span>
+<a name="line-194"></a><span class="cm"> * The virtual vs. concrete accelerator distinction is a relic of</span>
+<a name="line-195"></a><span class="cm"> * how the X Window System works; there are modifiers Mod2-Mod5 that</span>
+<a name="line-196"></a><span class="cm"> * can represent various keyboard keys (numlock, meta, hyper, etc.),</span>
+<a name="line-197"></a><span class="cm"> * the virtual modifier represents the keyboard key, the concrete</span>
+<a name="line-198"></a><span class="cm"> * modifier the actual Mod2-Mod5 bits in the key press event.</span>
+<a name="line-199"></a><span class="cm"> *</span>
+<a name="line-200"></a><span class="cm"> * Returns: %TRUE on success.</span>
+<a name="line-201"></a><span class="cm"> */</span>
+<a name="line-202"></a><span class="n">gboolean</span>
+<a name="line-203"></a><span class="nf">egg_accelerator_parse_virtual</span> <span class="p">(</span><span class="k">const</span> <span class="n">gchar</span> <span class="o">*</span><span class="n">accelerator</span><span class="p">,</span>
+<a name="line-204"></a> <span class="n">guint</span> <span class="o">*</span><span class="n">accelerator_key</span><span class="p">,</span>
+<a name="line-205"></a> <span class="n">EggVirtualModifierType</span> <span class="o">*</span><span class="n">accelerator_mods</span><span class="p">)</span>
+<a name="line-206"></a><span class="p">{</span>
+<a name="line-207"></a> <span class="n">guint</span> <span class="n">keyval</span><span class="p">;</span>
+<a name="line-208"></a> <span class="n">GdkModifierType</span> <span class="n">mods</span><span class="p">;</span>
+<a name="line-209"></a> <span class="n">gint</span> <span class="n">len</span><span class="p">;</span>
+<a name="line-210"></a> <span class="n">gboolean</span> <span class="n">bad_keyval</span><span class="p">;</span>
+<a name="line-211"></a>
+<a name="line-212"></a> <span class="k">if</span> <span class="p">(</span><span class="n">accelerator_key</span><span class="p">)</span>
+<a name="line-213"></a> <span class="o">*</span><span class="n">accelerator_key</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-214"></a> <span class="k">if</span> <span class="p">(</span><span class="n">accelerator_mods</span><span class="p">)</span>
+<a name="line-215"></a> <span class="o">*</span><span class="n">accelerator_mods</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-216"></a>
+<a name="line-217"></a> <span class="n">g_return_val_if_fail</span> <span class="p">(</span><span class="n">accelerator</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">,</span> <span class="n">FALSE</span><span class="p">);</span>
+<a name="line-218"></a>
+<a name="line-219"></a> <span class="n">bad_keyval</span> <span class="o">=</span> <span class="n">FALSE</span><span class="p">;</span>
+<a name="line-220"></a>
+<a name="line-221"></a> <span class="n">keyval</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-222"></a> <span class="n">mods</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+<a name="line-223"></a> <span class="n">len</span> <span class="o">=</span> <span class="n">strlen</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">);</span>
+<a name="line-224"></a> <span class="k">while</span> <span class="p">(</span><span class="n">len</span><span class="p">)</span>
+<a name="line-225"></a> <span class="p">{</span>
+<a name="line-226"></a> <span class="k">if</span> <span class="p">(</span><span class="o">*</span><span class="n">accelerator</span> <span class="o">==</span> <span class="sc">&#39;&lt;&#39;</span><span class="p">)</span>
+<a name="line-227"></a> <span class="p">{</span>
+<a name="line-228"></a> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">9</span> <span class="o">&amp;&amp;</span> <span class="n">is_release</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-229"></a> <span class="p">{</span>
+<a name="line-230"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">9</span><span class="p">;</span>
+<a name="line-231"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">9</span><span class="p">;</span>
+<a name="line-232"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_RELEASE_MASK</span><span class="p">;</span>
+<a name="line-233"></a> <span class="p">}</span>
+<a name="line-234"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">9</span> <span class="o">&amp;&amp;</span> <span class="n">is_control</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-235"></a> <span class="p">{</span>
+<a name="line-236"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">9</span><span class="p">;</span>
+<a name="line-237"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">9</span><span class="p">;</span>
+<a name="line-238"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_CONTROL_MASK</span><span class="p">;</span>
+<a name="line-239"></a> <span class="p">}</span>
+<a name="line-240"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">7</span> <span class="o">&amp;&amp;</span> <span class="n">is_shift</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-241"></a> <span class="p">{</span>
+<a name="line-242"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-243"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">7</span><span class="p">;</span>
+<a name="line-244"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SHIFT_MASK</span><span class="p">;</span>
+<a name="line-245"></a> <span class="p">}</span>
+<a name="line-246"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">6</span> <span class="o">&amp;&amp;</span> <span class="n">is_shft</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-247"></a> <span class="p">{</span>
+<a name="line-248"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-249"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-250"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_SHIFT_MASK</span><span class="p">;</span>
+<a name="line-251"></a> <span class="p">}</span>
+<a name="line-252"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">6</span> <span class="o">&amp;&amp;</span> <span class="n">is_ctrl</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-253"></a> <span class="p">{</span>
+<a name="line-254"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-255"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-256"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_CONTROL_MASK</span><span class="p">;</span>
+<a name="line-257"></a> <span class="p">}</span>
+<a name="line-258"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">6</span> <span class="o">&amp;&amp;</span> <span class="n">is_modx</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-259"></a> <span class="p">{</span>
+<a name="line-260"></a> <span class="k">static</span> <span class="k">const</span> <span class="n">guint</span> <span class="n">mod_vals</span><span class="p">[]</span> <span class="o">=</span> <span class="p">{</span>
+<a name="line-261"></a> <span class="n">EGG_VIRTUAL_ALT_MASK</span><span class="p">,</span> <span class="n">EGG_VIRTUAL_MOD2_MASK</span><span class="p">,</span> <span class="n">EGG_VIRTUAL_MOD3_MASK</span><span class="p">,</span>
+<a name="line-262"></a> <span class="n">EGG_VIRTUAL_MOD4_MASK</span><span class="p">,</span> <span class="n">EGG_VIRTUAL_MOD5_MASK</span>
+<a name="line-263"></a> <span class="p">};</span>
+<a name="line-264"></a>
+<a name="line-265"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">6</span><span class="p">;</span>
+<a name="line-266"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">4</span><span class="p">;</span>
+<a name="line-267"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">mod_vals</span><span class="p">[</span><span class="o">*</span><span class="n">accelerator</span> <span class="o">-</span> <span class="sc">&#39;1&#39;</span><span class="p">];</span>
+<a name="line-268"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">2</span><span class="p">;</span>
+<a name="line-269"></a> <span class="p">}</span>
+<a name="line-270"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">5</span> <span class="o">&amp;&amp;</span> <span class="n">is_ctl</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name="line-271"></a> <span class="p">{</span>
+<a name="line-272"></a> <span class="n">accelerator</span> <span class="o">+=</span> <span class="mi">5</span><span class="p">;</span>
+<a name="line-273"></a> <span class="n">len</span> <span class="o">-=</span> <span class="mi">5</span><span class="p">;</span>
+<a name="line-274"></a> <span class="n">mods</span> <span class="o">|=</span> <span class="n">EGG_VIRTUAL_CONTROL_MASK</span><span class="p">;</span>
+<a name="line-275"></a> <span class="p">}</span>
+<a name="line-276"></a> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&gt;=</span> <span class="mi">5</span> <span class="o">&amp;&amp;</span> <span class="n">is_alt</span> <span class="p">(</span><span class="n">accelerator</span><span class="p">))</span>
+<a name=