Drop 32bit-support.patch: Applied upstream
Matthias Klumpp
7 years ago
0 | From 3f83d1d6116beb39093d62f595dda352492f7f34 Mon Sep 17 00:00:00 2001 | |
1 | From: Matthias Klumpp <matthias@tenstral.net> | |
2 | Date: Sat, 16 Jul 2016 19:30:44 +0200 | |
3 | Subject: [PATCH] Fix build on 32bit architectures | |
4 | ||
5 | --- | |
6 | source/gx/terminix/application.d | 2 +- | |
7 | source/gx/terminix/appwindow.d | 2 +- | |
8 | source/gx/terminix/cmdparams.d | 4 ++-- | |
9 | source/gx/terminix/preferences.d | 2 +- | |
10 | source/gx/terminix/session.d | 6 +++--- | |
11 | source/gx/terminix/terminal/terminal.d | 12 ++++++------ | |
12 | source/gx/util/array.d | 2 +- | |
13 | 7 files changed, 15 insertions(+), 15 deletions(-) | |
14 | ||
15 | diff --git a/source/gx/terminix/application.d b/source/gx/terminix/application.d | |
16 | index e4d73d1..6079c45 100644 | |
17 | --- a/source/gx/terminix/application.d | |
18 | +++ b/source/gx/terminix/application.d | |
19 | @@ -161,7 +161,7 @@ private: | |
20 | Menu appMenu = new Menu(); | |
21 | ||
22 | registerAction(this, ACTION_PREFIX, ACTION_ACTIVATE_SESSION, null, delegate(GVariant value, SimpleAction) { | |
23 | - ulong l; | |
24 | + size_t l; | |
25 | string sessionUUID = value.getString(l); | |
26 | trace("activate-session triggered for session " ~ sessionUUID); | |
27 | foreach (window; appWindows) { | |
28 | diff --git a/source/gx/terminix/appwindow.d b/source/gx/terminix/appwindow.d | |
29 | index bac17e6..3952dcf 100644 | |
30 | --- a/source/gx/terminix/appwindow.d | |
31 | +++ b/source/gx/terminix/appwindow.d | |
32 | @@ -366,7 +366,7 @@ private: | |
33 | registerActionWithSettings(sessionActions, ACTION_PREFIX, ACTION_SESSION_TERMINAL_X ~ to!string(i), gsShortcuts, delegate(GVariant, SimpleAction sa) { | |
34 | Session session = getCurrentSession(); | |
35 | if (session !is null) { | |
36 | - ulong terminalID = to!ulong(sa.getName()[$ - 1 .. $]); | |
37 | + auto terminalID = to!size_t(sa.getName()[$ - 1 .. $]); | |
38 | if (terminalID == 0) | |
39 | terminalID = 10; | |
40 | session.focusTerminal(terminalID); | |
41 | diff --git a/source/gx/terminix/cmdparams.d b/source/gx/terminix/cmdparams.d | |
42 | index 3e3a31d..dee0248 100644 | |
43 | --- a/source/gx/terminix/cmdparams.d | |
44 | +++ b/source/gx/terminix/cmdparams.d | |
45 | @@ -75,7 +75,7 @@ private: | |
46 | if (value is null) | |
47 | return ""; | |
48 | else { | |
49 | - ulong l; | |
50 | + size_t l; | |
51 | return value.getString(l); | |
52 | } | |
53 | } | |
54 | @@ -129,7 +129,7 @@ public: | |
55 | ||
56 | _session = getValues(vd, CMD_SESSION); | |
57 | if (_session.length > 0) { | |
58 | - for (ulong i = _session.length - 1; i--; i >= 0) { | |
59 | + for (auto i = _session.length - 1; i--; i >= 0) { | |
60 | _session[i] = expandTilde(_session[i]); | |
61 | if (!isFile(_session[i])) { | |
62 | writeln(format(_("Ignoring parameter session as '%s' does not exist"), _session)); | |
63 | diff --git a/source/gx/terminix/preferences.d b/source/gx/terminix/preferences.d | |
64 | index 25fb0c5..434a2bd 100644 | |
65 | --- a/source/gx/terminix/preferences.d | |
66 | +++ b/source/gx/terminix/preferences.d | |
67 | @@ -320,7 +320,7 @@ public: | |
68 | string[] matches = settings.getStrv(SETTINGS_PROFILE_AUTOMATIC_SWITCH_KEY); | |
69 | foreach (match; matches) { | |
70 | //is there a tilde in the directory right after the first colon? | |
71 | - long isTilde = match.indexOf(":~"); | |
72 | + auto isTilde = match.indexOf(":~"); | |
73 | if (isTilde >= 0) { | |
74 | string path = match[(isTilde + 1) .. $]; | |
75 | path = expandTilde(path); | |
76 | diff --git a/source/gx/terminix/session.d b/source/gx/terminix/session.d | |
77 | index 7efdfcd..9bda11e 100644 | |
78 | --- a/source/gx/terminix/session.d | |
79 | +++ b/source/gx/terminix/session.d | |
80 | @@ -1145,7 +1145,7 @@ public: | |
81 | * Focus the next terminal in the session | |
82 | */ | |
83 | void focusNext() { | |
84 | - ulong id = 1; | |
85 | + size_t id = 1; | |
86 | if (currentTerminal !is null) { | |
87 | id = currentTerminal.terminalID + 1; | |
88 | if (id > terminals.length) | |
89 | @@ -1158,7 +1158,7 @@ public: | |
90 | * Focus the previous terminal in the session | |
91 | */ | |
92 | void focusPrevious() { | |
93 | - ulong id = 1; | |
94 | + size_t id = 1; | |
95 | if (currentTerminal !is null) { | |
96 | id = currentTerminal.terminalID; | |
97 | if (id == 1) | |
98 | @@ -1234,7 +1234,7 @@ public: | |
99 | /** | |
100 | * Focus the terminal designated by the ID | |
101 | */ | |
102 | - bool focusTerminal(ulong terminalID) { | |
103 | + bool focusTerminal(size_t terminalID) { | |
104 | if (terminalID > 0 && terminalID <= terminals.length) { | |
105 | return focusTerminal(terminals[terminalID - 1]); | |
106 | } | |
107 | diff --git a/source/gx/terminix/terminal/terminal.d b/source/gx/terminix/terminal/terminal.d | |
108 | index 8a7bf26..61804a9 100644 | |
109 | --- a/source/gx/terminix/terminal/terminal.d | |
110 | +++ b/source/gx/terminix/terminal/terminal.d | |
111 | @@ -246,7 +246,7 @@ private: | |
112 | // default profile will be stored here. | |
113 | string _defaultProfileUUID; | |
114 | //Sequential identifier, used to enable user to select terminal by number. Can change, not constant | |
115 | - ulong _terminalID; | |
116 | + size_t _terminalID; | |
117 | //Unique identifier for this terminal, never shown to user, never changes | |
118 | immutable string _terminalUUID; | |
119 | //overrides profile title | |
120 | @@ -601,7 +601,7 @@ private: | |
121 | //Select Profile | |
122 | GVariant pu = new GVariant(activeProfileUUID); | |
123 | saProfileSelect = registerAction(group, ACTION_PREFIX, ACTION_PROFILE_SELECT, null, delegate(GVariant value, SimpleAction sa) { | |
124 | - ulong l; | |
125 | + size_t l; | |
126 | string uuid = value.getString(l); | |
127 | activeProfileUUID = uuid; | |
128 | saProfileSelect.setState(value); | |
129 | @@ -611,7 +611,7 @@ private: | |
130 | // | |
131 | GVariant encoding = new GVariant(gsProfile.getString(SETTINGS_PROFILE_ENCODING_KEY)); | |
132 | saEncodingSelect = registerAction(group, ACTION_PREFIX, ACTION_ENCODING_SELECT, null, delegate(GVariant value, SimpleAction sa) { | |
133 | - ulong l; | |
134 | + size_t l; | |
135 | sa.setState(value); | |
136 | vte.setEncoding(value.getString(l)); | |
137 | }, encoding.getType(), encoding); | |
138 | @@ -1319,7 +1319,7 @@ private: | |
139 | vte.setScrollOnKeystroke(gsProfile.getBoolean(SETTINGS_PROFILE_SCROLL_ON_INPUT_KEY)); | |
140 | break; | |
141 | case SETTINGS_PROFILE_UNLIMITED_SCROLL_KEY, SETTINGS_PROFILE_SCROLLBACK_LINES_KEY: | |
142 | - long scrollLines = gsProfile.getBoolean(SETTINGS_PROFILE_UNLIMITED_SCROLL_KEY) ? -1 : gsProfile.getInt(SETTINGS_PROFILE_SCROLLBACK_LINES_KEY); | |
143 | + auto scrollLines = gsProfile.getBoolean(SETTINGS_PROFILE_UNLIMITED_SCROLL_KEY) ? -1 : gsProfile.getInt(SETTINGS_PROFILE_SCROLLBACK_LINES_KEY); | |
144 | vte.setScrollbackLines(scrollLines); | |
145 | break; | |
146 | case SETTINGS_PROFILE_BACKSPACE_BINDING_KEY: | |
147 | @@ -2111,11 +2111,11 @@ public: | |
148 | /** | |
149 | * A numeric ID managed by the session, this ID can and does change | |
150 | */ | |
151 | - @property ulong terminalID() { | |
152 | + @property size_t terminalID() { | |
153 | return _terminalID; | |
154 | } | |
155 | ||
156 | - @property void terminalID(ulong ID) { | |
157 | + @property void terminalID(size_t ID) { | |
158 | if (this._terminalID != ID) { | |
159 | this._terminalID = ID; | |
160 | updateTitle(); | |
161 | diff --git a/source/gx/util/array.d b/source/gx/util/array.d | |
162 | index 7516287..db37fe4 100644 | |
163 | --- a/source/gx/util/array.d | |
164 | +++ b/source/gx/util/array.d | |
165 | @@ -17,7 +17,7 @@ import std.array; | |
166 | * Adapted from grestful, modified to explicitly check index | |
167 | */ | |
168 | void remove(T)(ref T[] array, T element) { | |
169 | - long index = array.countUntil(element); | |
170 | + auto index = array.countUntil(element); | |
171 | if (index >= 0) | |
172 | array = std.algorithm.remove(array, index); | |
173 | } |