emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lib-src/emacsclient.c


From: Pavel Janík
Subject: [Emacs-diffs] Changes to emacs/lib-src/emacsclient.c
Date: Wed, 19 Dec 2001 02:21:00 -0500

Index: emacs/lib-src/emacsclient.c
diff -c emacs/lib-src/emacsclient.c:1.48 emacs/lib-src/emacsclient.c:1.49
*** emacs/lib-src/emacsclient.c:1.48    Tue Oct  9 06:18:30 2001
--- emacs/lib-src/emacsclient.c Wed Dec 19 02:21:00 2001
***************
*** 21,30 ****
  
  
  #define NO_SHORTNAMES
! #include <../src/config.h>
  #undef signal
  
! #include <ctype.h> 
  #include <stdio.h>
  #include <getopt.h>
  #ifdef HAVE_UNISTD_H
--- 21,34 ----
  
  
  #define NO_SHORTNAMES
! 
! #ifdef HAVE_CONFIG_H
! #include "config.h"
! #endif
! 
  #undef signal
  
! #include <ctype.h>
  #include <stdio.h>
  #include <getopt.h>
  #ifdef HAVE_UNISTD_H
***************
*** 84,101 ****
        break;
  
        alternate_editor = getenv ("ALTERNATE_EDITOR");
!       
        switch (opt)
        {
        case 0:
          /* If getopt returns 0, then it has already processed a
             long-named option.  We should do nothing.  */
          break;
!         
        case 'a':
          alternate_editor = optarg;
          break;
!         
        case 'n':
          nowait = 1;
          break;
--- 88,105 ----
        break;
  
        alternate_editor = getenv ("ALTERNATE_EDITOR");
! 
        switch (opt)
        {
        case 0:
          /* If getopt returns 0, then it has already processed a
             long-named option.  We should do nothing.  */
          break;
! 
        case 'a':
          alternate_editor = optarg;
          break;
! 
        case 'n':
          nowait = 1;
          break;
***************
*** 157,163 ****
      }
    *q++ = 0;
  
-   
    return copy;
  }
  
--- 161,166 ----
***************
*** 198,204 ****
  }
  
  
-        
  
  #if !defined (HAVE_SOCKETS) && !defined (HAVE_SYSVIPC)
  
--- 201,206 ----
***************
*** 272,278 ****
    if (argc - optind < 1)
      print_help_and_exit ();
  
!   /* 
     * Open up an AF_UNIX socket in this person's home directory
     */
  
--- 274,280 ----
    if (argc - optind < 1)
      print_help_and_exit ();
  
!   /*
     * Open up an AF_UNIX socket in this person's home directory
     */
  
***************
*** 282,288 ****
        perror ("socket");
        fail (argc, argv);
      }
!   
    server.sun_family = AF_UNIX;
  
    {
--- 284,290 ----
        perror ("socket");
        fail (argc, argv);
      }
! 
    server.sun_family = AF_UNIX;
  
    {
***************
*** 317,327 ****
           our euid.  If so, look for a socket based on the UID
           associated with the name.  This is reminiscent of the logic
           that init_editfns uses to set the global Vuser_full_name.  */
!  
        char *user_name = (char *) getenv ("LOGNAME");
        if (!user_name)
          user_name = (char *) getenv ("USER");
!        
        if (user_name)
          {
            struct passwd *pw = getpwnam (user_name);
--- 319,329 ----
           our euid.  If so, look for a socket based on the UID
           associated with the name.  This is reminiscent of the logic
           that init_editfns uses to set the global Vuser_full_name.  */
! 
        char *user_name = (char *) getenv ("LOGNAME");
        if (!user_name)
          user_name = (char *) getenv ("USER");
! 
        if (user_name)
          {
            struct passwd *pw = getpwnam (user_name);
***************
*** 334,340 ****
              }
          }
        }
!  
       switch (sock_status)
         {
         case 1:
--- 336,342 ----
              }
          }
        }
! 
       switch (sock_status)
         {
         case 1:
***************
*** 346,352 ****
             fail (argc, argv);
           }
         break;
!        
         case 2:
         /* `stat' failed */
         if (errno == ENOENT)
--- 348,354 ----
             fail (argc, argv);
           }
         break;
! 
         case 2:
         /* `stat' failed */
         if (errno == ENOENT)
***************
*** 448,455 ****
       the first line we read will actually be the output we just sent.
       We can't predict whether that will happen, so if it does, we
       detect it by recognizing `Client: ' at the beginning.  */
!   
!   while (str = fgets (string, BUFSIZ, in))
      printf ("%s", str);
  
    return 0;
--- 450,457 ----
       the first line we read will actually be the output we just sent.
       We can't predict whether that will happen, so if it does, we
       detect it by recognizing `Client: ' at the beginning.  */
! 
!   while ((str = fgets (string, BUFSIZ, in)))
      printf ("%s", str);
  
    return 0;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]