Lines Matching refs:strp

152 static const char * getzname(const char * strp) ATTRIBUTE_PURE;
153 static const char * getqzname(const char * strp, const int delim)
155 static const char * getnum(const char * strp, int * nump, int min,
157 static const char * getsecs(const char * strp, int_fast32_t * secsp);
158 static const char * getoffset(const char * strp, int_fast32_t * offsetp);
159 static const char * getrule(const char * strp, struct rule * rulep);
662 getzname(register const char * strp) in getzname() argument
666 while ((c = *strp) != '\0' && !is_digit(c) && c != ',' && c != '-' && in getzname()
668 ++strp; in getzname()
669 return strp; in getzname()
682 getqzname(register const char *strp, const int delim) in getqzname() argument
686 while ((c = *strp) != '\0' && c != delim) in getqzname()
687 ++strp; in getqzname()
688 return strp; in getqzname()
699 getnum(register const char * strp, int * const nump, const int min, const int max) in getnum() argument
704 if (strp == NULL || !is_digit(c = *strp)) in getnum()
711 c = *++strp; in getnum()
716 return strp; in getnum()
728 getsecs(register const char *strp, int_fast32_t *const secsp) in getsecs() argument
738 strp = getnum(strp, &num, 0, HOURSPERDAY * DAYSPERWEEK - 1); in getsecs()
739 if (strp == NULL) in getsecs()
742 if (*strp == ':') { in getsecs()
743 ++strp; in getsecs()
744 strp = getnum(strp, &num, 0, MINSPERHOUR - 1); in getsecs()
745 if (strp == NULL) in getsecs()
748 if (*strp == ':') { in getsecs()
749 ++strp; in getsecs()
751 strp = getnum(strp, &num, 0, SECSPERMIN); in getsecs()
752 if (strp == NULL) in getsecs()
757 return strp; in getsecs()
768 getoffset(register const char *strp, int_fast32_t *const offsetp) in getoffset() argument
772 if (*strp == '-') { in getoffset()
774 ++strp; in getoffset()
775 } else if (*strp == '+') in getoffset()
776 ++strp; in getoffset()
777 strp = getsecs(strp, offsetp); in getoffset()
778 if (strp == NULL) in getoffset()
782 return strp; in getoffset()
793 getrule(const char * strp, register struct rule * const rulep) in getrule() argument
795 if (*strp == 'J') { in getrule()
800 ++strp; in getrule()
801 strp = getnum(strp, &rulep->r_day, 1, DAYSPERNYEAR); in getrule()
802 } else if (*strp == 'M') { in getrule()
807 ++strp; in getrule()
808 strp = getnum(strp, &rulep->r_mon, 1, MONSPERYEAR); in getrule()
809 if (strp == NULL) in getrule()
811 if (*strp++ != '.') in getrule()
813 strp = getnum(strp, &rulep->r_week, 1, 5); in getrule()
814 if (strp == NULL) in getrule()
816 if (*strp++ != '.') in getrule()
818 strp = getnum(strp, &rulep->r_day, 0, DAYSPERWEEK - 1); in getrule()
819 } else if (is_digit(*strp)) { in getrule()
824 strp = getnum(strp, &rulep->r_day, 0, DAYSPERLYEAR - 1); in getrule()
826 if (strp == NULL) in getrule()
828 if (*strp == '/') { in getrule()
832 ++strp; in getrule()
833 strp = getoffset(strp, &rulep->r_time); in getrule()
835 return strp; in getrule()