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/pop.c


From: Pavel Janík
Subject: [Emacs-diffs] Changes to emacs/lib-src/pop.c
Date: Sun, 30 Dec 2001 17:05:51 -0500

Index: emacs/lib-src/pop.c
diff -c emacs/lib-src/pop.c:1.29 emacs/lib-src/pop.c:1.30
*** emacs/lib-src/pop.c:1.29    Sat Dec 29 17:22:07 2001
--- emacs/lib-src/pop.c Sun Dec 30 17:05:51 2001
***************
*** 296,302 ****
        free ((char *) server);
        return (0);
      }
!         
    server->file = sock;
    server->data = 0;
    server->buffer_index = 0;
--- 296,302 ----
        free ((char *) server);
        return (0);
      }
! 
    server->file = sock;
    server->data = 0;
    server->buffer_index = 0;
***************
*** 367,373 ****
        strcpy (pop_error, "In multi-line query in pop_stat");
        return (-1);
      }
!      
    if (sendline (server, "STAT") || (pop_getline (server, &fromserver) < 0))
      return (-1);
  
--- 367,373 ----
        strcpy (pop_error, "In multi-line query in pop_stat");
        return (-1);
      }
! 
    if (sendline (server, "STAT") || (pop_getline (server, &fromserver) < 0))
      return (-1);
  
***************
*** 387,393 ****
      }
  
    *count = atoi (&fromserver[4]);
!      
    fromserver = index (&fromserver[4], ' ');
    if (! fromserver)
      {
--- 387,393 ----
      }
  
    *count = atoi (&fromserver[4]);
! 
    fromserver = index (&fromserver[4], ' ');
    if (! fromserver)
      {
***************
*** 896,902 ****
       popserver server;
  {
    char *fromserver;
!      
    if (server->in_multi)
      {
        strcpy (pop_error, "In multi-line query in pop_last");
--- 896,902 ----
       popserver server;
  {
    char *fromserver;
! 
    if (server->in_multi)
      {
        strcpy (pop_error, "In multi-line query in pop_last");
***************
*** 1009,1015 ****
   * Arguments:
   *    host    The host to which to connect.
   *    flags   Option flags.
!  *    
   * Return value: A file descriptor indicating the connection, or -1
   *    indicating failure, in which case an error has been copied
   *    into pop_error.
--- 1009,1015 ----
   * Arguments:
   *    host    The host to which to connect.
   *    flags   Option flags.
!  *
   * Return value: A file descriptor indicating the connection, or -1
   *    indicating failure, in which case an error has been copied
   *    into pop_error.
***************
*** 1112,1118 ****
        strncat (pop_error, strerror (errno),
               ERROR_MAX - sizeof (POP_SOCKET_ERROR));
        return (-1);
!         
      }
  
    while (*hostent->h_addr_list)
--- 1112,1118 ----
        strncat (pop_error, strerror (errno),
               ERROR_MAX - sizeof (POP_SOCKET_ERROR));
        return (-1);
! 
      }
  
    while (*hostent->h_addr_list)
***************
*** 1125,1131 ****
      }
  
  #define CONNECT_ERROR "Could not connect to POP server: "
!      
    if (! *hostent->h_addr_list)
      {
        CLOSESOCKET (sock);
--- 1125,1131 ----
      }
  
  #define CONNECT_ERROR "Could not connect to POP server: "
! 
    if (! *hostent->h_addr_list)
      {
        CLOSESOCKET (sock);
***************
*** 1133,1139 ****
        strncat (pop_error, strerror (errno),
               ERROR_MAX - sizeof (CONNECT_ERROR));
        return (-1);
!         
      }
  
  #ifdef KERBEROS
--- 1133,1139 ----
        strncat (pop_error, strerror (errno),
               ERROR_MAX - sizeof (CONNECT_ERROR));
        return (-1);
! 
      }
  
  #ifdef KERBEROS
***************
*** 1157,1163 ****
  
        if ((rem = krb5_auth_con_init (kcontext, &auth_context)))
        goto krb5error;
!       
        if (rem = krb5_cc_default (kcontext, &ccdef))
        goto krb5error;
  
--- 1157,1163 ----
  
        if ((rem = krb5_auth_con_init (kcontext, &auth_context)))
        goto krb5error;
! 
        if (rem = krb5_cc_default (kcontext, &ccdef))
        goto krb5error;
  
***************
*** 1215,1221 ****
          CLOSESOCKET (sock);
          return (-1);
        }
! #else  /* ! KERBEROS5 */        
        ticket = (KTEXT) malloc (sizeof (KTEXT_ST));
        realhost = strdup (hostent->h_name);
        rem = krb_sendauth (0L, sock, ticket, "pop", realhost,
--- 1215,1221 ----
          CLOSESOCKET (sock);
          return (-1);
        }
! #else  /* ! KERBEROS5 */
        ticket = (KTEXT) malloc (sizeof (KTEXT_ST));
        realhost = strdup (hostent->h_name);
        rem = krb_sendauth (0L, sock, ticket, "pop", realhost,
***************
*** 1285,1291 ****
  
          found = server->buffer_index;
          data_used = (cp + 2) - server->buffer - found;
!              
          *cp = '\0';           /* terminate the string to be returned */
          server->data -= data_used;
          server->buffer_index += data_used;
--- 1285,1291 ----
  
          found = server->buffer_index;
          data_used = (cp + 2) - server->buffer - found;
! 
          *cp = '\0';           /* terminate the string to be returned */
          server->data -= data_used;
          server->buffer_index += data_used;
***************
*** 1354,1360 ****
          char *cp;
          server->data += ret;
          server->buffer[server->data] = '\0';
!              
          cp = find_crlf (server->buffer + search_offset,
                          server->data - search_offset);
          if (cp)
--- 1354,1360 ----
          char *cp;
          server->data += ret;
          server->buffer[server->data] = '\0';
! 
          cp = find_crlf (server->buffer + search_offset,
                          server->data - search_offset);
          if (cp)
***************
*** 1461,1467 ****
   *
   * Arguments:
   *    server  The server to read from.
!  * 
   * Returns: 0 for success, else for failure and puts error in pop_error.
   *
   * Side effects: On failure, may make the connection unusable.
--- 1461,1467 ----
   *
   * Arguments:
   *    server  The server to read from.
!  *
   * Returns: 0 for success, else for failure and puts error in pop_error.
   *
   * Side effects: On failure, may make the connection unusable.
***************
*** 1492,1498 ****
        pop_trash (server);
        return (-1);
      }
! }       
  
  #if 0
  /*
--- 1492,1498 ----
        pop_trash (server);
        return (-1);
      }
! }
  
  #if 0
  /*
***************
*** 1538,1544 ****
   *    Changes made to the maildrop since the session was started (or
   *    since the last pop_reset) may be lost.
   */
! void 
  pop_close (server)
       popserver server;
  {
--- 1538,1544 ----
   *    Changes made to the maildrop since the session was started (or
   *    since the last pop_reset) may be lost.
   */
! void
  pop_close (server)
       popserver server;
  {



reply via email to

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