rules: rename a variable from 's' to 'str' To avoid name conflicts with a future patch. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
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
diff --git a/src/xkbcomp/rules.c b/src/xkbcomp/rules.c
index a6abd52..30c2f45 100644
--- a/src/xkbcomp/rules.c
+++ b/src/xkbcomp/rules.c
@@ -619,7 +619,7 @@ static bool
append_expanded_kccgst_value(struct matcher *m, darray_char *to,
struct sval value)
{
- const char *s = value.start;
+ const char *str = value.start;
darray_char expanded = darray_new();
char ch;
bool expanded_plus, to_plus;
@@ -635,9 +635,9 @@ append_expanded_kccgst_value(struct matcher *m, darray_char *to,
struct matched_sval *expanded_value;
/* Check if that's a start of an expansion. */
- if (s[i] != '%') {
+ if (str[i] != '%') {
/* Just a normal character. */
- darray_appends_nullterminate(expanded, &s[i++], 1);
+ darray_appends_nullterminate(expanded, &str[i++], 1);
continue;
}
if (++i >= value.len) goto error;
@@ -645,15 +645,15 @@ append_expanded_kccgst_value(struct matcher *m, darray_char *to,
pfx = sfx = 0;
/* Check for prefix. */
- if (s[i] == '(' || s[i] == '+' || s[i] == '|' ||
- s[i] == '_' || s[i] == '-') {
- pfx = s[i];
- if (s[i] == '(') sfx = ')';
+ if (str[i] == '(' || str[i] == '+' || str[i] == '|' ||
+ str[i] == '_' || str[i] == '-') {
+ pfx = str[i];
+ if (str[i] == '(') sfx = ')';
if (++i >= value.len) goto error;
}
/* Mandatory model/layout/variant specifier. */
- switch (s[i++]) {
+ switch (str[i++]) {
case 'm': mlv = MLVO_MODEL; break;
case 'l': mlv = MLVO_LAYOUT; break;
case 'v': mlv = MLVO_VARIANT; break;
@@ -662,7 +662,7 @@ append_expanded_kccgst_value(struct matcher *m, darray_char *to,
/* Check for index. */
idx = XKB_LAYOUT_INVALID;
- if (i < value.len && s[i] == '[') {
+ if (i < value.len && str[i] == '[') {
int consumed;
if (mlv != MLVO_LAYOUT && mlv != MLVO_VARIANT) {
@@ -670,7 +670,7 @@ append_expanded_kccgst_value(struct matcher *m, darray_char *to,
goto error;
}
- consumed = extract_layout_index(s + i, value.len - i, &idx);
+ consumed = extract_layout_index(str + i, value.len - i, &idx);
if (consumed == -1) goto error;
i += consumed;
}
@@ -678,7 +678,7 @@ append_expanded_kccgst_value(struct matcher *m, darray_char *to,
/* Check for suffix, if there supposed to be one. */
if (sfx != 0) {
if (i >= value.len) goto error;
- if (s[i++] != sfx) goto error;
+ if (str[i++] != sfx) goto error;
}
/* Get the expanded value. */