Lines Matching defs:child
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' )
172 for ( p = child; *p; p++ )
179 if ( ccnt == 0 ) /* child is not a fqdn or is not deep enough ? */
184 if ( pcnt >= ccnt ) /* parent has more levels than child ? */
187 /* is child a (one level) subdomain of parent ? */
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' )
229 for ( p = child; *p; p++ )
236 if ( ccnt == 0 || ccnt < level ) /* child is not a fqdn or is not deep enough ? */
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 ? */