]> diplodocus.org Git - nmh/blobdiff - sbr/strindex.c
%(divide): Avoid SIGFPE on integer divide of INT_MIN by -1.
[nmh] / sbr / strindex.c
index 03910fdff32e014603741d6e8fafb198be21d40f..559e75490677bb2b09ba139da624aafebb3cfb7c 100644 (file)
@@ -1,11 +1,13 @@
-
-/*
- * strindex.c -- "unsigned" lexical index
+/* strindex.c -- "unsigned" lexical index
  *
- * $Id$
+ * This code is Copyright (c) 2002, by the authors of nmh.  See the
+ * COPYRIGHT file in the root directory of the nmh distribution for
+ * complete copyright information.
  */
 
-#include <h/mh.h>
+#include "h/mh.h"
+#include "strindex.h"
+#include "uprf.h"
 
 int
 stringdex (char *p1, char *p2)
@@ -17,7 +19,7 @@ stringdex (char *p1, char *p2)
 
     for (p = p2; *p; p++)
        if (uprf (p, p1))
-           return (p - p2);
+           return p - p2;
 
     return -1;
 }