+/*
+ * Return true if the chars in template appear at the
+ * end of check, I.e., are it's suffix.
+ */
+static
+is_suffix(check, template)
+ char *check, *template;
+{
+ register char *c, *t;
+
+ for (c = check; *c++;)
+ ;
+ for (t = template; *t++;)
+ ;
+ for (;;) {
+ if (t == template)
+ return 1;
+ if (c == check || *--t != *--c)
+ return 0;
+ }
+}
+