+
+#if USG | USG3TTY
+/* It's so wonderful how we all speak the same language... */
+# define index strchr
+# define rindex strrchr
+#endif
+
+checkmodeline(line)
+char *line;
+{
+ char *beg, *end;
+ char cmdbuf[1024];
+ char *index(), *rindex();
+
+ beg = index(line, ':');
+ if (beg == NULL)
+ return;
+ if (beg[-2] != 'e' && beg[-2] != 'v') return;
+ if (beg[-1] != 'x' && beg[-1] != 'i') return;
+
+ strncpy(cmdbuf, beg+1, sizeof cmdbuf);
+ end = rindex(cmdbuf, ':');
+ if (end == NULL)
+ return;
+ *end = 0;
+ globp = cmdbuf;
+ commands(1, 1);
+}