Lines Matching refs:parent
55 ** A subdomain is less than the corresponding parent domain,
67 ** A subdomain is less than the corresponding parent domain,
140 ** int issubdomain ("child", "parent")
142 ** "child" and "parent" are standardized domain names in such
146 ** returns 1 if "child" is a subdomain of "parent"
147 ** returns 0 if "child" is not a subdomain of "parent"
150 int issubdomain (const char *child, const char *parent)
158 if ( !child || !parent || *child == '\0' || *parent == '\0' )
163 for ( p = parent; *p; p++ )
181 if ( pcnt == 0 ) /* parent is not a fqdn ? */
184 if ( pcnt >= ccnt ) /* parent has more levels than child ? */
187 /* is child a (one level) subdomain of parent ? */
188 if ( strcmp (cdot+1, parent) == 0 ) /* the domains are equal ? */
196 ** int isparentdomain ("child", "parent", level)
198 ** "child" and "parent" are standardized domain names in such
202 ** returns 1 if "child" is a subdomain of "parent"
203 ** returns 0 if "child" is not a subdomain of "parent"
204 ** returns -1 if "child" and "parent" are the same domain
207 int isparentdomain (const char *child, const char *parent, int level)
215 if ( !child || !parent || *child == '\0' || *parent == '\0' )
220 for ( p = parent; *p; p++ )
238 if ( pcnt == 0 ) /* parent is not a fqdn ? */
241 if ( pcnt > ccnt ) /* parent has more levels than child ? */
252 if ( pcnt > ccnt ) /* parent has more levels than child ? */
255 /* is child a (one level) subdomain of parent ? */
256 if ( strcmp (cdot+1, parent) == 0 ) /* the domains are equal ? */