return the length of the string until c, if not found returns n */
| 108 | |
| 109 | /* return the length of the string until c, if not found returns n */ |
| 110 | static inline int findchr(char* p, int c, unsigned int size) |
| 111 | { |
| 112 | int len=0; |
| 113 | |
| 114 | for(;len<size;p++){ |
| 115 | if (*p==(unsigned char)c) { |
| 116 | return len; |
| 117 | } |
| 118 | len++; |
| 119 | } |
| 120 | return len; |
| 121 | } |
| 122 | |
| 123 | |
| 124 | /* Parse NAPTR regexp field of the form !pattern!replacement! and return its |