Lines Matching defs:strp
132 static const char * getzname(const char * strp);
133 static const char * getqzname(const char * strp, const int delim);
134 static const char * getnum(const char * strp, int * nump, int min,
136 static const char * getsecs(const char * strp, long * secsp);
137 static const char * getoffset(const char * strp, long * offsetp);
138 static const char * getrule(const char * strp, struct rule * rulep);
596 getzname(const char *strp)
600 while ((c = *strp) != '\0' && !isdigit((unsigned char)c) && c != ',' && c != '-' &&
602 ++strp;
603 return strp;
616 getqzname(const char *strp, const int delim)
620 while ((c = *strp) != '\0' && c != delim)
621 ++strp;
622 return strp;
633 getnum(const char *strp, int *nump, int min, int max)
638 if (strp == NULL || !isdigit((unsigned char)(c = *strp)))
645 c = *++strp;
650 return strp;
662 getsecs(const char *strp, long *secsp)
672 strp = getnum(strp, &num, 0, HOURSPERDAY * DAYSPERWEEK - 1);
673 if (strp == NULL)
676 if (*strp == ':') {
677 ++strp;
678 strp = getnum(strp, &num, 0, MINSPERHOUR - 1);
679 if (strp == NULL)
682 if (*strp == ':') {
683 ++strp;
685 strp = getnum(strp, &num, 0, SECSPERMIN);
686 if (strp == NULL)
691 return strp;
702 getoffset(const char *strp, long *offsetp)
706 if (*strp == '-') {
708 ++strp;
709 } else if (*strp == '+')
710 ++strp;
711 strp = getsecs(strp, offsetp);
712 if (strp == NULL)
716 return strp;
727 getrule(const char *strp, struct rule *rulep)
729 if (*strp == 'J') {
734 ++strp;
735 strp = getnum(strp, &rulep->r_day, 1, DAYSPERNYEAR);
736 } else if (*strp == 'M') {
741 ++strp;
742 strp = getnum(strp, &rulep->r_mon, 1, MONSPERYEAR);
743 if (strp == NULL)
745 if (*strp++ != '.')
747 strp = getnum(strp, &rulep->r_week, 1, 5);
748 if (strp == NULL)
750 if (*strp++ != '.')
752 strp = getnum(strp, &rulep->r_day, 0, DAYSPERWEEK - 1);
753 } else if (isdigit((unsigned char)*strp)) {
758 strp = getnum(strp, &rulep->r_day, 0, DAYSPERLYEAR - 1);
761 if (strp == NULL)
763 if (*strp == '/') {
767 ++strp;
768 strp = getsecs(strp, &rulep->r_time);
771 return strp;