/[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.59.2.1 by handa, Fri Apr 16 12:49:44 2004 UTC revision 1.59.2.2 by miles, Mon Jun 28 07:28:22 2004 UTC
# Line 44  Boston, MA 02111-1307, USA.  */ Line 44  Boston, MA 02111-1307, USA.  */
44  char *getenv (), *getwd ();  char *getenv (), *getwd ();
45  char *getcwd ();  char *getcwd ();
46    
 /* This is defined with -D from the compilation command,  
    which extracts it from ../lisp/version.el.  */  
   
47  #ifndef VERSION  #ifndef VERSION
48  #define VERSION "unspecified"  #define VERSION "unspecified"
49  #endif  #endif
# Line 131  decode_options (argc, argv) Line 128  decode_options (argc, argv)
128    
129          case 'V':          case 'V':
130            printf ("emacsclient %s\n", VERSION);            printf ("emacsclient %s\n", VERSION);
131            exit (0);            exit (EXIT_SUCCESS);
132            break;            break;
133    
134          case 'H':          case 'H':
# Line 140  decode_options (argc, argv) Line 137  decode_options (argc, argv)
137    
138          default:          default:
139            fprintf (stderr, "Try `%s --help' for more information\n", progname);            fprintf (stderr, "Try `%s --help' for more information\n", progname);
140            exit (1);            exit (EXIT_FAILURE);
141            break;            break;
142          }          }
143      }      }
# Line 166  The following OPTIONS are accepted:\n\ Line 163  The following OPTIONS are accepted:\n\
163                          Editor to fallback to if the server is not running\n\                          Editor to fallback to if the server is not running\n\
164  \n\  \n\
165  Report bugs to bug-gnu-emacs@gnu.org.\n", progname);  Report bugs to bug-gnu-emacs@gnu.org.\n", progname);
166    exit (0);    exit (EXIT_SUCCESS);
167  }  }
168    
169  /* In NAME, insert a & before each &, each space, each newline, and  /* In NAME, insert a & before each &, each space, each newline, and
# Line 221  xmalloc (size) Line 218  xmalloc (size)
218    if (result == NULL)    if (result == NULL)
219    {    {
220      perror ("malloc");      perror ("malloc");
221      exit (1);      exit (EXIT_FAILURE);
222    }    }
223    return result;    return result;
224  }  }
# Line 243  fail (argc, argv) Line 240  fail (argc, argv)
240      }      }
241    else    else
242      {      {
243        exit (1);        exit (EXIT_FAILURE);
244      }      }
245  }  }
246    
# Line 314  main (argc, argv) Line 311  main (argc, argv)
311      {      {
312        fprintf (stderr, "%s: file name or argument required\n", progname);        fprintf (stderr, "%s: file name or argument required\n", progname);
313        fprintf (stderr, "Try `%s --help' for more information\n", progname);        fprintf (stderr, "Try `%s --help' for more information\n", progname);
314        exit (1);        exit (EXIT_FAILURE);
315      }      }
316    
317    /*    /*
# Line 356  main (argc, argv) Line 353  main (argc, argv)
353        {        {
354          fprintf (stderr, "%s: socket-name %s too long",          fprintf (stderr, "%s: socket-name %s too long",
355                   argv[0], socket_name);                   argv[0], socket_name);
356          exit (1);          exit (EXIT_FAILURE);
357        }        }
358    
359      /* See if the socket exists, and if it's owned by us. */      /* See if the socket exists, and if it's owned by us. */
# Line 391  main (argc, argv) Line 388  main (argc, argv)
388                    {                    {
389                      fprintf (stderr, "%s: socket-name %s too long",                      fprintf (stderr, "%s: socket-name %s too long",
390                               argv[0], socket_name);                               argv[0], socket_name);
391                      exit (1);                      exit (EXIT_FAILURE);
392                    }                    }
393    
394                  sock_status = socket_status (server.sun_path);                  sock_status = socket_status (server.sun_path);
# Line 522  To start the server in Emacs, type \"M-x Line 519  To start the server in Emacs, type \"M-x
519          }          }
520        fprintf (out, " ");        fprintf (out, " ");
521      }      }
522      
523    fprintf (out, "\n");    fprintf (out, "\n");
524    fflush (out);    fflush (out);
525    
526    /* Maybe wait for an answer.   */    /* Maybe wait for an answer.   */
527    if (nowait)    if (nowait)
528      return 0;      return EXIT_SUCCESS;
529    
530    if (!eval)    if (!eval)
531      {      {
# Line 550  To start the server in Emacs, type \"M-x Line 547  To start the server in Emacs, type \"M-x
547      printf ("\n");      printf ("\n");
548    fflush (stdout);    fflush (stdout);
549    
550    return 0;    return EXIT_SUCCESS;
551  }  }
552    
553  #endif /* HAVE_SOCKETS */  #endif /* HAVE_SOCKETS */
# Line 572  strerror (errnum) Line 569  strerror (errnum)
569    
570  /* arch-tag: f39bb9c4-73eb-477e-896d-50832e2ca9a7  /* arch-tag: f39bb9c4-73eb-477e-896d-50832e2ca9a7
571     (do not change this comment) */     (do not change this comment) */
572    
573    /* emacsclient.c ends here */

Legend:
Removed from v.1.59.2.1  
changed lines
  Added in v.1.59.2.2

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