Lines Matching refs:fields

185 static void	inleap(char ** fields, int nfields);
186 static void inlink(char ** fields, int nfields);
187 static void inrule(char ** fields, int nfields);
188 static bool inzcont(char ** fields, int nfields);
189 static bool inzone(char ** fields, int nfields);
247 ** Which fields are which on a Zone line.
264 ** Which fields are which on a Zone continuation line.
297 ** Which fields are which on a Link line.
307 ** Which fields are which on a Leap line.
319 /* Expires lines are like Leap lines, except without CORR and ROLL fields. */
323 /* The maximum number of fields on any of the above lines.
1759 char *fields[MAX_FIELDS];
1763 nfields = getfields(buf, fields,
1764 sizeof fields / sizeof *fields);
1768 wantcont = inzcont(fields, nfields);
1772 lp = byword(fields[0], line_codes);
1777 inrule(fields, nfields);
1781 wantcont = inzone(fields, nfields);
1784 inlink(fields, nfields);
1788 inleap(fields, nfields);
1792 inexpires(fields, nfields);
1885 inrule(char **fields, int nfields)
1890 error(_("wrong number of fields on Rule line"));
1893 switch (*fields[RF_NAME]) {
1899 error(_("Invalid rule name \"%s\""), fields[RF_NAME]);
1904 r.r_save = getsave(fields[RF_SAVE], &r.r_isdst);
1905 if (!rulesub(&r, fields[RF_LOYEAR], fields[RF_HIYEAR],
1906 fields[RF_COMMAND], fields[RF_MONTH], fields[RF_DAY],
1907 fields[RF_TOD]))
1909 r.r_name = estrdup(fields[RF_NAME]);
1910 r.r_abbrvar = estrdup(fields[RF_ABBRVAR]);
1918 inzone(char **fields, int nfields)
1923 error(_("wrong number of fields on Zone line"));
1926 if (lcltime != NULL && strcmp(fields[ZF_NAME], tzdefault) == 0) {
1931 if (strcmp(fields[ZF_NAME], TZDEFRULES) == 0 && psxrules != NULL) {
1938 strcmp(zones[i].z_name, fields[ZF_NAME]) == 0) {
1941 fields[ZF_NAME],
1946 return inzsub(fields, nfields, false);
1950 inzcont(char **fields, int nfields)
1953 error(_("wrong number of fields on Zone continuation line"));
1956 return inzsub(fields, nfields, true);
1960 inzsub(char **fields, int nfields, bool iscont)
1979 } else if (!namecheck(fields[ZF_NAME]))
1992 z.z_stdoff = gethms(fields[i_stdoff], _("invalid UT offset"));
1993 if ((cp = strchr(fields[i_format], '%')) != 0) {
1995 || strchr(fields[i_format], '/')) {
2001 format_len = strlen(fields[i_format]);
2010 fields[i_untilyear],
2014 fields[i_untilmonth] : "Jan",
2015 (nfields > i_untilday) ? fields[i_untilday] : "1",
2016 (nfields > i_untiltime) ? fields[i_untiltime] : "0"))
2031 z.z_name = iscont ? NULL : estrdup(fields[ZF_NAME]);
2032 z.z_rule = estrdup(fields[i_rule]);
2033 z.z_format = cp1 = estrdup(fields[i_format]);
2035 cp1[cp - fields[i_format]] = 's';
2038 fields[i_format]);
2050 getleapdatetime(char **fields, bool expire_line)
2062 cp = fields[LP_YEAR];
2088 if ((lp = byword(fields[LP_MONTH], mon_names)) == NULL) {
2099 cp = fields[LP_DAY];
2115 tod = gethms(fields[LP_TIME], _("invalid time of day"));
2123 inleap(char **fields, int nfields)
2126 error(_("wrong number of fields on Leap line"));
2128 zic_t t = getleapdatetime(fields, false);
2130 struct lookup const *lp = byword(fields[LP_ROLL], leap_types);
2135 if (!fields[LP_CORR][0]) /* infile() turns "-" into "". */
2137 else if (strcmp(fields[LP_CORR], "+") == 0)
2149 inexpires(char **fields, int nfields)
2152 error(_("wrong number of fields on Expires line"));
2156 leapexpires = getleapdatetime(fields, true);
2160 inlink(char **fields, int nfields)
2165 error(_("wrong number of fields on Link line"));
2168 if (*fields[LF_TARGET] == '\0') {
2172 if (! namecheck(fields[LF_LINKNAME]))
2176 l.l_target = estrdup(fields[LF_TARGET]);
2177 l.l_linkname = estrdup(fields[LF_LINKNAME]);
3801 error(_("Too many input fields"));