aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorGerd Moellmann2001-07-17 10:57:25 +0000
committerGerd Moellmann2001-07-17 10:57:25 +0000
commit8b8f50f8108fae825e95d2fa7a33491f65761a9b (patch)
tree9decfbb660f02a217ebda5d4b8794840f0d89cdf /lib-src
parent1a4d41fae9b3890cfbb66f1bb5393d29dff79b9a (diff)
downloademacs-8b8f50f8108fae825e95d2fa7a33491f65761a9b.tar.gz
emacs-8b8f50f8108fae825e95d2fa7a33491f65761a9b.zip
(print_help_and_exit): Fix help message for
+LINE:COLUMN option. (main): Add support for +LINE:COLUMN command line argument.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/emacsclient.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index f16b126b751..b63a4d2bf50 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -24,6 +24,7 @@ Boston, MA 02111-1307, USA. */
24#include <../src/config.h> 24#include <../src/config.h>
25#undef signal 25#undef signal
26 26
27#include <ctype.h>
27#include <stdio.h> 28#include <stdio.h>
28#include <getopt.h> 29#include <getopt.h>
29#ifdef HAVE_UNISTD_H 30#ifdef HAVE_UNISTD_H
@@ -115,7 +116,7 @@ void
115print_help_and_exit () 116print_help_and_exit ()
116{ 117{
117 fprintf (stderr, 118 fprintf (stderr,
118 "Usage: %s [-a ALTERNATE-EDITOR] [-n] [--no-wait] [+LINENUMBER] FILENAME\n", 119 "Usage: %s [-a ALTERNATE-EDITOR] [-n] [--no-wait] [+LINE[:COLUMN]] FILENAME\n",
119 progname); 120 progname);
120 fprintf (stderr, 121 fprintf (stderr,
121 "Or %s --version\n", 122 "Or %s --version\n",
@@ -424,7 +425,7 @@ main (argc, argv)
424 if (*argv[i] == '+') 425 if (*argv[i] == '+')
425 { 426 {
426 char *p = argv[i] + 1; 427 char *p = argv[i] + 1;
427 while (*p >= '0' && *p <= '9') p++; 428 while (isdigit (*p) || *p == ':') p++;
428 if (*p != 0) 429 if (*p != 0)
429 fprintf (out, "%s/", quote_file_name (cwd)); 430 fprintf (out, "%s/", quote_file_name (cwd));
430 } 431 }
@@ -567,7 +568,8 @@ main (argc, argv)
567 if (*modified_arg == '+') 568 if (*modified_arg == '+')
568 { 569 {
569 char *p = modified_arg + 1; 570 char *p = modified_arg + 1;
570 while (*p >= '0' && *p <= '9') p++; 571 while (isdigit (*p) || *p == ':')
572 p++;
571 if (*p != 0) 573 if (*p != 0)
572 need_cwd = 1; 574 need_cwd = 1;
573 } 575 }