/[emacs]/emacs/lib-src/emacsclient.c
ViewVC logotype

Diff of /emacs/lib-src/emacsclient.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.56 by stephen, Mon Dec 2 20:57:42 2002 UTC revision 1.57 by lektu, Wed Mar 12 21:36:29 2003 UTC
# Line 1  Line 1 
1  /* Client process that communicates with GNU Emacs acting as server.  /* Client process that communicates with GNU Emacs acting as server.
2     Copyright (C) 1986, 1987, 1994, 1999, 2000, 2001     Copyright (C) 1986, 1987, 1994, 1999, 2000, 2001, 2003
3     Free Software Foundation, Inc.     Free Software Foundation, Inc.
4    
5  This file is part of GNU Emacs.  This file is part of GNU Emacs.
# Line 122  decode_options (argc, argv) Line 122  decode_options (argc, argv)
122            break;            break;
123    
124          case 'V':          case 'V':
125            fprintf (stderr, "emacsclient %s\n", VERSION);            printf ("emacsclient %s\n", VERSION);
126            exit (1);            exit (0);
127            break;            break;
128    
129          case 'H':          case 'H':
         default:  
130            print_help_and_exit ();            print_help_and_exit ();
131              break;
132    
133            default:
134              fprintf (stderr, "Try `%s --help' for more information\n", progname);
135              exit (1);
136              break;
137          }          }
138      }      }
139  }  }
# Line 136  decode_options (argc, argv) Line 141  decode_options (argc, argv)
141  void  void
142  print_help_and_exit ()  print_help_and_exit ()
143  {  {
144    fprintf (stderr,    printf (
145             "Usage: %s [OPTIONS] FILE...\n\            "Usage: %s [OPTIONS] FILE...\n\
146  Tell the Emacs server to visit the specified files.\n\  Tell the Emacs server to visit the specified files.\n\
147  Every FILE can be either just a FILENAME or [+LINE[:COLUMN]] FILENAME.\n\  Every FILE can be either just a FILENAME or [+LINE[:COLUMN]] FILENAME.\n\
148    \n\
149  The following OPTIONS are accepted:\n\  The following OPTIONS are accepted:\n\
150  -V, --version           Just print a version info and return\n\  -V, --version           Just print a version info and return\n\
151  -H, --help              Print this usage information message\n\  -H, --help              Print this usage information message\n\
# Line 148  The following OPTIONS are accepted:\n\ Line 154  The following OPTIONS are accepted:\n\
154  -d, --display=DISPLAY   Visit the file in the given display\n\  -d, --display=DISPLAY   Visit the file in the given display\n\
155  -a, --alternate-editor=EDITOR\n\  -a, --alternate-editor=EDITOR\n\
156                          Editor to fallback to if the server is not running\n\                          Editor to fallback to if the server is not running\n\
157    \n\
158  Report bugs to bug-gnu-emacs@gnu.org.\n", progname);  Report bugs to bug-gnu-emacs@gnu.org.\n", progname);
159    exit (1);    exit (0);
160  }  }
161    
162  /* Return a copy of NAME, inserting a &  /* Return a copy of NAME, inserting a &
# Line 294  main (argc, argv) Line 301  main (argc, argv)
301    decode_options (argc, argv);    decode_options (argc, argv);
302    
303    if (argc - optind < 1)    if (argc - optind < 1)
304      print_help_and_exit ();      {
305          fprintf (stderr, "%s: file name or argument required\n", progname);
306          fprintf (stderr, "Try `%s --help' for more information\n", progname);
307          exit (1);
308        }
309    
310    /*    /*
311     * Open up an AF_UNIX socket in this person's home directory     * Open up an AF_UNIX socket in this person's home directory

Legend:
Removed from v.1.56  
changed lines
  Added in v.1.57

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26