Differences From Artifact [f919bded41]:
- File
src/OFLocale.m
— part of check-in
[a0fd103a0b]
at
2021-03-07 02:36:04
on branch trunk
— Style change: Allow more than 1 argument per line
This is only migrating some places, others will be migrated as they are
touched. (user: js, size: 15521) [annotate] [blame] [check-ins using]
To Artifact [43f4209e77]:
- File src/OFLocale.m — part of check-in [1b82d3bf4f] at 2021-03-07 20:25:21 on branch trunk — *.m: Fold methods into one line where it fits (user: js, size: 15502) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
81 82 83 84 85 86 87 | } @finally { free(locale); } } #endif static bool | | > < | < | < | | 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 | } @finally { free(locale); } } #endif static bool evaluateCondition(OFString *condition_, OFDictionary *variables) { OFMutableString *condition = [[condition_ mutableCopy] autorelease]; OFMutableArray *tokens, *operators, *stack; /* Empty condition is the fallback that's always true */ if (condition.length == 0) return true; /* * Dirty hack to allow not needing spaces after "!" or "(" and spaces * before ")". * TODO: Replace with a proper tokenizer. */ [condition replaceOccurrencesOfString: @"!" withString: @"! "]; [condition replaceOccurrencesOfString: @"(" withString: @"( "]; [condition replaceOccurrencesOfString: @")" withString: @" )"]; /* Substitute variables and convert to RPN first */ tokens = [OFMutableArray array]; operators = [OFMutableArray array]; for (OFString *token in [condition componentsSeparatedByString: @" " options: OF_STRING_SKIP_EMPTY]) { |
︙ | ︙ |