changeset 38464:efc4642cfb1a

(print_help_and_exit): Fix help message for +LINE:COLUMN option. (main): Add support for +LINE:COLUMN command line argument.
author Gerd Moellmann <gerd@gnu.org>
date Tue, 17 Jul 2001 10:57:25 +0000
parents 2e3306c6ed15
children 08bc5a88d787
files lib-src/emacsclient.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/emacsclient.c	Tue Jul 17 10:56:35 2001 +0000
+++ b/lib-src/emacsclient.c	Tue Jul 17 10:57:25 2001 +0000
@@ -24,6 +24,7 @@
 #include <../src/config.h>
 #undef signal
 
+#include <ctype.h> 
 #include <stdio.h>
 #include <getopt.h>
 #ifdef HAVE_UNISTD_H
@@ -115,7 +116,7 @@
 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",
@@ -424,7 +425,7 @@
       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));
 	}
@@ -567,7 +568,8 @@
       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;
 	}