#include <../src/config.h>
#undef signal
+#include <ctype.h>
#include <stdio.h>
#include <getopt.h>
#ifdef HAVE_UNISTD_H
print_help_and_exit ()
{
fprintf (stderr,
- "Usage: %s [-a ALTERNATE-EDITOR] [-n] [--no-wait] [+LINENUMBER] FILENAME\n",
+ "Usage: %s [-a ALTERNATE-EDITOR] [-n] [--no-wait] [+LINE[:COLUMN]] FILENAME\n",
progname);
fprintf (stderr,
"Or %s --version\n",
if (*argv[i] == '+')
{
char *p = argv[i] + 1;
- while (*p >= '0' && *p <= '9') p++;
+ while (isdigit (*p) || *p == ':') p++;
if (*p != 0)
fprintf (out, "%s/", quote_file_name (cwd));
}
if (*modified_arg == '+')
{
char *p = modified_arg + 1;
- while (*p >= '0' && *p <= '9') p++;
+ while (isdigit (*p) || *p == ':')
+ p++;
if (*p != 0)
need_cwd = 1;
}