Lines Matching refs:rule
61 struct rule {
86 int r_todo; /* a rule to do (used in outzone) */
109 struct rule * z_rules;
112 struct rule z_untilrule;
167 static zic_t rpytime(const struct rule * rp, int wantedy);
168 static void rulesub(struct rule * rp,
173 static int stringrule(char * result, const struct rule * rp,
184 const struct rule* rule,
187 static void emit_icu_rule(FILE* f, const struct rule* r, int ruleIndex);
188 static int add_icu_final_rules(const struct rule* r1, const struct rule* r2);
251 ** Which files are which on a Rule line.
293 static struct rule * rules;
319 static const struct rule ** finalRules;
327 { "Rule", LC_RULE },
479 (void) fprintf(stderr, _(" (rule from \"%s\", line %d)"),
516 const struct rule* rule,
519 fprintf(f, "zone %s %d %d %s", zoneName, zoneOffset, startYear, rule->r_name);
522 fprintf(f, " # zone %s, offset %d, year >= %d, rule %s (%d)\n",
524 rule->r_name, ruleIndex);
536 emit_icu_rule(FILE* f, const struct rule* r, int ruleIndex) {
539 fprintf(stderr, "rule %s, file %s, line %d\n",
544 fprintf(f, "rule %s %s %d %d %d %ld %d %d %ld",
567 add_icu_final_rules(const struct rule* r1, const struct rule* r2) {
574 finalRules = (const struct rule**) (void*) erealloc((char *) finalRules,
850 ** Sort by rule name.
858 return strcmp(((const struct rule *) cp1)->r_name,
859 ((const struct rule *) cp2)->r_name);
866 register struct rule * rp;
881 warning(_("same rule name in multiple files"));
883 warning(_("same rule name in multiple files"));
927 ** Note, though, that if there's no rule,
1092 static struct rule r;
1095 error(_("wrong number of fields on Rule line"));
1099 error(_("nameless rule"));
1111 rules = (struct rule *) (void *) erealloc((char *) rules,
1388 register struct rule * const rp;
1636 ++fromi; /* handled by default rule */
1960 const struct rule * const rp;
2019 register struct rule * rp;
2020 register struct rule * stdrp;
2021 register struct rule * dstrp;
2047 ** Let's find the latest rule.
2061 ** do not try to apply a rule to the zone.
2101 register struct rule * rp;
2119 const struct rule* finalRule1;
2120 const struct rule* finalRule2;
2160 ** Generate lots of data if a rule can't cover all future times.
2224 /* There might be an overriding non-max rule
2226 * max rule's start year. For example,
2228 * Rule Foo 2010 max ...
2229 * Rule Foo 2015 only ...
2236 * to be adjusted, so the final rule will be properly
2241 * If there are two rules, non-max rule and max rule
2244 * Rule Foo 2010 only ....
2245 * Rule Foo 2010 max ....
2247 * In this case, the final (max) rule actually starts
2250 * final rule start year to 1 year ahead (in the worst case)
2262 warning("only one max rule found (ICU)");
2276 const struct rule* t = finalRule1;
2280 /* Add final rule to our list */
2341 ** Find the rule (of those to do, if any)
2397 * the actual final rule takes effect (year + 1),
2399 * transition defined by the final rule. Otherwise
2401 * begining of the year when the final rule takes
2806 ** Given a rule, and a year, compute the date - in seconds since January 1,
2807 ** 1970, 00:00 LOCAL time - in that year that the rule refers to.
2812 register const struct rule * const rp;
2881 warning(_("rule goes past start/end of month--\