Home | History | Annotate | Download | only in tzcode

Lines Matching refs:strp

136 static const char *	getzname(const char * strp) ATTRIBUTE_PURE;
137 static const char * getqzname(const char * strp, const int delim)
139 static const char * getnum(const char * strp, int * nump, int min,
141 static const char * getsecs(const char * strp, int_fast32_t * secsp);
142 static const char * getoffset(const char * strp, int_fast32_t * offsetp);
143 static const char * getrule(const char * strp, struct rule * rulep);
649 getzname(register const char *strp)
653 while ((c = *strp) != '\0' && !is_digit(c) && c != ',' && c != '-' &&
655 ++strp;
656 return strp;
669 getqzname(register const char *strp, const int delim)
673 while ((c = *strp) != '\0' && c != delim)
674 ++strp;
675 return strp;
686 getnum(register const char *strp, int *const nump, const int min, const int max)
691 if (strp == NULL || !is_digit(c = *strp))
698 c = *++strp;
703 return strp;
715 getsecs(register const char *strp, int_fast32_t *const secsp)
725 strp = getnum(strp, &num, 0, HOURSPERDAY * DAYSPERWEEK - 1);
726 if (strp == NULL)
729 if (*strp == ':') {
730 ++strp;
731 strp = getnum(strp, &num, 0, MINSPERHOUR - 1);
732 if (strp == NULL)
735 if (*strp == ':') {
736 ++strp;
738 strp = getnum(strp, &num, 0, SECSPERMIN);
739 if (strp == NULL)
744 return strp;
755 getoffset(register const char *strp, int_fast32_t *const offsetp)
759 if (*strp == '-') {
761 ++strp;
762 } else if (*strp == '+')
763 ++strp;
764 strp = getsecs(strp, offsetp);
765 if (strp == NULL)
769 return strp;
780 getrule(const char *strp, register struct rule *const rulep)
782 if (*strp == 'J') {
787 ++strp;
788 strp = getnum(strp, &rulep->r_day, 1, DAYSPERNYEAR);
789 } else if (*strp == 'M') {
794 ++strp;
795 strp = getnum(strp, &rulep->r_mon, 1, MONSPERYEAR);
796 if (strp == NULL)
798 if (*strp++ != '.')
800 strp = getnum(strp, &rulep->r_week, 1, 5);
801 if (strp == NULL)
803 if (*strp++ != '.')
805 strp = getnum(strp, &rulep->r_day, 0, DAYSPERWEEK - 1);
806 } else if (is_digit(*strp)) {
811 strp = getnum(strp, &rulep->r_day, 0, DAYSPERLYEAR - 1);
813 if (strp == NULL)
815 if (*strp == '/') {
819 ++strp;
820 strp = getoffset(strp, &rulep->r_time);
822 return strp;