+/*
+ * pattern2() - searches for patn within search string, returns pos
+ */
+int pattern2(char *search, char *patn)
+{
+ int a;
+ for (a=0; a<strlen(search); ++a) {
+ if (!strncasecmp(&search[a],patn,strlen(patn))) return(a);
+ }
+ return(-1);
+ }
+
+
+/*
+ * Strip leading and trailing spaces from a string
+ */
+void striplt(char *buf)
+{
+ while ((strlen(buf) > 0) && (isspace(buf[0])))
+ strcpy(buf, &buf[1]);
+ while (isspace(buf[strlen(buf) - 1]))
+ buf[strlen(buf) - 1] = 0;
+}
+
+
+