+ /* Skip argv[0]. */
+ argc--;
+ argv++;
+
+ while (argc > 0 && *argv[0] == '-')
+ {
+ register char *temp;
+ register int index;
+
+ /*
+ * If it appears that we are handling options, then make sure
+ * that all of the options specified are actually valid.
+ * Otherwise, the string should just be echoed.
+ */
+ temp = argv[0] + 1;
+
+ for (index = 0; temp[index]; index++)
+ {
+ if (strrchr("neE", temp[index]) == 0)
+ goto just_echo;
+ }
+
+ if (!*temp)
+ goto just_echo;
+
+ /*
+ * All of the options in temp are valid options to echo.
+ * Handle them.
+ */
+ while (*temp)
+ {
+ if (*temp == 'n')
+ nflag = 1;
+ else if (*temp == 'e')
+ eflag = 1;
+ else if (*temp == 'E')
+ eflag = 0;
+ else
+ goto just_echo;