emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Dave Love
Subject: [Emacs-diffs] Changes to emacs/src/w32.c
Date: Wed, 12 Feb 2003 13:02:54 -0500

Index: emacs/src/w32.c
diff -c emacs/src/w32.c:1.82 emacs/src/w32.c:1.83
*** emacs/src/w32.c:1.82        Wed Dec 18 01:16:28 2002
--- emacs/src/w32.c     Tue Feb  4 09:03:13 2003
***************
*** 343,349 ****
  int
  gethostname (char *buffer, int size)
  {
!   /* NT only allows small host names, so the buffer is 
       certainly large enough.  */
    return !GetComputerName (buffer, &size);
  }
--- 343,349 ----
  int
  gethostname (char *buffer, int size)
  {
!   /* NT only allows small host names, so the buffer is
       certainly large enough.  */
    return !GetComputerName (buffer, &size);
  }
***************
*** 356,362 ****
    int i;
  
    /* A faithful emulation is going to have to be saved for a rainy day.  */
!   for (i = 0; i < nelem; i++) 
      {
        loadavg[i] = 0.0;
      }
--- 356,362 ----
    int i;
  
    /* A faithful emulation is going to have to be saved for a rainy day.  */
!   for (i = 0; i < nelem; i++)
      {
        loadavg[i] = 0.0;
      }
***************
*** 373,379 ****
  static char the_passwd_dir[PASSWD_FIELD_SIZE];
  static char the_passwd_shell[PASSWD_FIELD_SIZE];
  
! static struct passwd the_passwd = 
  {
    the_passwd_name,
    the_passwd_passwd,
--- 373,379 ----
  static char the_passwd_dir[PASSWD_FIELD_SIZE];
  static char the_passwd_shell[PASSWD_FIELD_SIZE];
  
! static struct passwd the_passwd =
  {
    the_passwd_name,
    the_passwd_passwd,
***************
*** 385,414 ****
    the_passwd_shell,
  };
  
! int 
! getuid () 
! { 
    return the_passwd.pw_uid;
  }
  
! int 
! geteuid () 
! { 
    /* I could imagine arguing for checking to see whether the user is
       in the Administrators group and returning a UID of 0 for that
       case, but I don't know how wise that would be in the long run.  */
!   return getuid (); 
  }
  
! int 
! getgid () 
! { 
    return the_passwd.pw_gid;
  }
  
! int 
! getegid () 
! { 
    return getgid ();
  }
  
--- 385,414 ----
    the_passwd_shell,
  };
  
! int
! getuid ()
! {
    return the_passwd.pw_uid;
  }
  
! int
! geteuid ()
! {
    /* I could imagine arguing for checking to see whether the user is
       in the Administrators group and returning a UID of 0 for that
       case, but I don't know how wise that would be in the long run.  */
!   return getuid ();
  }
  
! int
! getgid ()
! {
    return the_passwd.pw_gid;
  }
  
! int
! getegid ()
! {
    return getgid ();
  }
  
***************
*** 424,430 ****
  getpwnam (char *name)
  {
    struct passwd *pw;
!   
    pw = getpwuid (getuid ());
    if (!pw)
      return pw;
--- 424,430 ----
  getpwnam (char *name)
  {
    struct passwd *pw;
! 
    pw = getpwuid (getuid ());
    if (!pw)
      return pw;
***************
*** 782,838 ****
  
  /* Routines that are no-ops on NT but are defined to get Emacs to compile.  */
  
! int 
! sigsetmask (int signal_mask) 
! { 
    return 0;
  }
  
! int 
! sigmask (int sig) 
! { 
    return 0;
  }
  
! int 
! sigblock (int sig) 
! { 
    return 0;
  }
  
! int 
! sigunblock (int sig) 
! { 
    return 0;
  }
  
! int 
! setpgrp (int pid, int gid) 
! { 
    return 0;
  }
  
! int 
! alarm (int seconds) 
! { 
    return 0;
  }
  
! void 
! unrequest_sigio (void) 
! { 
    return;
  }
  
  void
! request_sigio (void) 
! { 
    return;
  }
  
  #define REG_ROOT "SOFTWARE\\GNU\\Emacs"
  
! LPBYTE 
  w32_get_resource (key, lpdwtype)
      char *key;
      LPDWORD lpdwtype;
--- 782,838 ----
  
  /* Routines that are no-ops on NT but are defined to get Emacs to compile.  */
  
! int
! sigsetmask (int signal_mask)
! {
    return 0;
  }
  
! int
! sigmask (int sig)
! {
    return 0;
  }
  
! int
! sigblock (int sig)
! {
    return 0;
  }
  
! int
! sigunblock (int sig)
! {
    return 0;
  }
  
! int
! setpgrp (int pid, int gid)
! {
    return 0;
  }
  
! int
! alarm (int seconds)
! {
    return 0;
  }
  
! void
! unrequest_sigio (void)
! {
    return;
  }
  
  void
! request_sigio (void)
! {
    return;
  }
  
  #define REG_ROOT "SOFTWARE\\GNU\\Emacs"
  
! LPBYTE
  w32_get_resource (key, lpdwtype)
      char *key;
      LPDWORD lpdwtype;
***************
*** 841,882 ****
    HKEY hrootkey = NULL;
    DWORD cbData;
    BOOL ok = FALSE;
!   
!   /* Check both the current user and the local machine to see if 
       we have any resources.  */
!   
    if (RegOpenKeyEx (HKEY_CURRENT_USER, REG_ROOT, 0, KEY_READ, &hrootkey) == 
ERROR_SUCCESS)
      {
        lpvalue = NULL;
  
!       if (RegQueryValueEx (hrootkey, key, NULL, NULL, NULL, &cbData) == 
ERROR_SUCCESS 
!         && (lpvalue = (LPBYTE) xmalloc (cbData)) != NULL 
          && RegQueryValueEx (hrootkey, key, NULL, lpdwtype, lpvalue, &cbData) 
== ERROR_SUCCESS)
        {
          return (lpvalue);
        }
  
        if (lpvalue) xfree (lpvalue);
!       
        RegCloseKey (hrootkey);
!     } 
!   
    if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, REG_ROOT, 0, KEY_READ, &hrootkey) == 
ERROR_SUCCESS)
      {
        lpvalue = NULL;
!       
        if (RegQueryValueEx (hrootkey, key, NULL, NULL, NULL, &cbData) == 
ERROR_SUCCESS
          && (lpvalue = (LPBYTE) xmalloc (cbData)) != NULL
          && RegQueryValueEx (hrootkey, key, NULL, lpdwtype, lpvalue, &cbData) 
== ERROR_SUCCESS)
        {
          return (lpvalue);
        }
!       
        if (lpvalue) xfree (lpvalue);
!       
        RegCloseKey (hrootkey);
!     } 
!   
    return (NULL);
  }
  
--- 841,882 ----
    HKEY hrootkey = NULL;
    DWORD cbData;
    BOOL ok = FALSE;
! 
!   /* Check both the current user and the local machine to see if
       we have any resources.  */
! 
    if (RegOpenKeyEx (HKEY_CURRENT_USER, REG_ROOT, 0, KEY_READ, &hrootkey) == 
ERROR_SUCCESS)
      {
        lpvalue = NULL;
  
!       if (RegQueryValueEx (hrootkey, key, NULL, NULL, NULL, &cbData) == 
ERROR_SUCCESS
!         && (lpvalue = (LPBYTE) xmalloc (cbData)) != NULL
          && RegQueryValueEx (hrootkey, key, NULL, lpdwtype, lpvalue, &cbData) 
== ERROR_SUCCESS)
        {
          return (lpvalue);
        }
  
        if (lpvalue) xfree (lpvalue);
! 
        RegCloseKey (hrootkey);
!     }
! 
    if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, REG_ROOT, 0, KEY_READ, &hrootkey) == 
ERROR_SUCCESS)
      {
        lpvalue = NULL;
! 
        if (RegQueryValueEx (hrootkey, key, NULL, NULL, NULL, &cbData) == 
ERROR_SUCCESS
          && (lpvalue = (LPBYTE) xmalloc (cbData)) != NULL
          && RegQueryValueEx (hrootkey, key, NULL, lpdwtype, lpvalue, &cbData) 
== ERROR_SUCCESS)
        {
          return (lpvalue);
        }
! 
        if (lpvalue) xfree (lpvalue);
! 
        RegCloseKey (hrootkey);
!     }
! 
    return (NULL);
  }
  
***************
*** 933,939 ****
      {
        char * name;
        char * def_value;
!     } env_vars[] = 
      {
        {"HOME", "C:/"},
        {"PRELOAD_WINSOCK", NULL},
--- 933,939 ----
      {
        char * name;
        char * def_value;
!     } env_vars[] =
      {
        {"HOME", "C:/"},
        {"PRELOAD_WINSOCK", NULL},
***************
*** 987,993 ****
          *p = 0;
          for (p = modname; *p; p++)
            if (*p == '\\') *p = '/';
!                 
          _snprintf (buf, sizeof(buf)-1, "emacs_dir=%s", modname);
          _putenv (strdup (buf));
        }
--- 987,993 ----
          *p = 0;
          for (p = modname; *p; p++)
            if (*p == '\\') *p = '/';
! 
          _snprintf (buf, sizeof(buf)-1, "emacs_dir=%s", modname);
          _putenv (strdup (buf));
        }
***************
*** 1019,1025 ****
                else if (dwType == REG_SZ)
                  {
                    char buf[SET_ENV_BUF_SIZE];
!                 
                    _snprintf (buf, sizeof(buf)-1, "%s=%s", env_vars[i].name, 
lpval);
                    _putenv (strdup (buf));
                  }
--- 1019,1025 ----
                else if (dwType == REG_SZ)
                  {
                    char buf[SET_ENV_BUF_SIZE];
! 
                    _snprintf (buf, sizeof(buf)-1, "%s=%s", env_vars[i].name, 
lpval);
                    _putenv (strdup (buf));
                  }
***************
*** 1113,1119 ****
    static char configuration_buffer[32];
  
    /* Determine the processor type.  */
!   switch (get_processor_type ()) 
      {
  
  #ifdef PROCESSOR_INTEL_386
--- 1113,1119 ----
    static char configuration_buffer[32];
  
    /* Determine the processor type.  */
!   switch (get_processor_type ())
      {
  
  #ifdef PROCESSOR_INTEL_386
***************
*** 1230,1236 ****
  #include <sys/timeb.h>
  
  /* Emulate gettimeofday (Ulrich Leodolter, 1/11/95).  */
! void 
  gettimeofday (struct timeval *tv, struct timezone *tz)
  {
    struct timeb tb;
--- 1230,1236 ----
  #include <sys/timeb.h>
  
  /* Emulate gettimeofday (Ulrich Leodolter, 1/11/95).  */
! void
  gettimeofday (struct timeval *tv, struct timezone *tz)
  {
    struct timeb tb;
***************
*** 1238,1244 ****
  
    tv->tv_sec = tb.time;
    tv->tv_usec = tb.millitm * 1000L;
!   if (tz) 
      {
        tz->tz_minuteswest = tb.timezone;       /* minutes west of Greenwich  */
        tz->tz_dsttime = tb.dstflag;    /* type of dst correction  */
--- 1238,1244 ----
  
    tv->tv_sec = tb.time;
    tv->tv_usec = tb.millitm * 1000L;
!   if (tz)
      {
        tz->tz_minuteswest = tb.timezone;       /* minutes west of Greenwich  */
        tz->tz_dsttime = tb.dstflag;    /* type of dst correction  */
***************
*** 1250,1256 ****
  /* ------------------------------------------------------------------------- 
*/
  
  /* Place a wrapper around the MSVC version of ctime.  It returns NULL
!    on network directories, so we handle that case here.  
     (Ulrich Leodolter, 1/11/95).  */
  char *
  sys_ctime (const time_t *t)
--- 1250,1256 ----
  /* ------------------------------------------------------------------------- 
*/
  
  /* Place a wrapper around the MSVC version of ctime.  It returns NULL
!    on network directories, so we handle that case here.
     (Ulrich Leodolter, 1/11/95).  */
  char *
  sys_ctime (const time_t *t)
***************
*** 1356,1362 ****
       tell whether they are or not.  Also, the UNC association of drive
       letters mapped to remote volumes can be changed at any time (even
       by other processes) without notice.
!    
       As a compromise, so we can benefit from caching info for remote
       volumes, we use a simple expiry mechanism to invalidate cache
       entries that are more than ten seconds old.  */
--- 1356,1362 ----
       tell whether they are or not.  Also, the UNC association of drive
       letters mapped to remote volumes can be changed at any time (even
       by other processes) without notice.
! 
       As a compromise, so we can benefit from caching info for remote
       volumes, we use a simple expiry mechanism to invalidate cache
       entries that are more than ten seconds old.  */
***************
*** 1462,1468 ****
  
    if (pPath)
      *pPath = name;
!     
    info = GetCachedVolumeInformation (rootname);
    if (info != NULL)
      {
--- 1462,1468 ----
  
    if (pPath)
      *pPath = name;
! 
    info = GetCachedVolumeInformation (rootname);
    if (info != NULL)
      {
***************
*** 1600,1606 ****
         stricmp (p, ".cmd") == 0));
  }
  
! /* Emulate the Unix directory procedures opendir, closedir, 
     and readdir.  We can't use the procedures supplied in sysdep.c,
     so we provide them here.  */
  
--- 1600,1606 ----
         stricmp (p, ".cmd") == 0));
  }
  
! /* Emulate the Unix directory procedures opendir, closedir,
     and readdir.  We can't use the procedures supplied in sysdep.c,
     so we provide them here.  */
  
***************
*** 1673,1680 ****
  {
    if (wnet_enum_handle != INVALID_HANDLE_VALUE)
      {
!       if (!read_unc_volume (wnet_enum_handle, 
!                             dir_find_data.cFileName, 
                              MAX_PATH))
        return NULL;
      }
--- 1673,1680 ----
  {
    if (wnet_enum_handle != INVALID_HANDLE_VALUE)
      {
!       if (!read_unc_volume (wnet_enum_handle,
!                             dir_find_data.cFileName,
                              MAX_PATH))
        return NULL;
      }
***************
*** 1700,1713 ****
        if (!FindNextFile (dir_find_handle, &dir_find_data))
        return NULL;
      }
!   
    /* Emacs never uses this value, so don't bother making it match
       value returned by stat().  */
    dir_static.d_ino = 1;
!   
    dir_static.d_reclen = sizeof (struct direct) - MAXNAMLEN + 3 +
      dir_static.d_namlen - dir_static.d_namlen % 4;
!   
    dir_static.d_namlen = strlen (dir_find_data.cFileName);
    strcpy (dir_static.d_name, dir_find_data.cFileName);
    if (dir_is_fat)
--- 1700,1713 ----
        if (!FindNextFile (dir_find_handle, &dir_find_data))
        return NULL;
      }
! 
    /* Emacs never uses this value, so don't bother making it match
       value returned by stat().  */
    dir_static.d_ino = 1;
! 
    dir_static.d_reclen = sizeof (struct direct) - MAXNAMLEN + 3 +
      dir_static.d_namlen - dir_static.d_namlen % 4;
! 
    dir_static.d_namlen = strlen (dir_find_data.cFileName);
    strcpy (dir_static.d_name, dir_find_data.cFileName);
    if (dir_is_fat)
***************
*** 1721,1747 ****
        if (!*p)
        _strlwr (dir_static.d_name);
      }
!   
    return &dir_static;
  }
  
  HANDLE
  open_unc_volume (char *path)
  {
!   NETRESOURCE nr; 
    HANDLE henum;
    int result;
  
!   nr.dwScope = RESOURCE_GLOBALNET; 
!   nr.dwType = RESOURCETYPE_DISK; 
!   nr.dwDisplayType = RESOURCEDISPLAYTYPE_SERVER; 
!   nr.dwUsage = RESOURCEUSAGE_CONTAINER; 
!   nr.lpLocalName = NULL; 
    nr.lpRemoteName = map_w32_filename (path, NULL);
!   nr.lpComment = NULL; 
!   nr.lpProvider = NULL;   
  
!   result = WNetOpenEnum(RESOURCE_GLOBALNET, RESOURCETYPE_DISK,  
                        RESOURCEUSAGE_CONNECTABLE, &nr, &henum);
  
    if (result == NO_ERROR)
--- 1721,1747 ----
        if (!*p)
        _strlwr (dir_static.d_name);
      }
! 
    return &dir_static;
  }
  
  HANDLE
  open_unc_volume (char *path)
  {
!   NETRESOURCE nr;
    HANDLE henum;
    int result;
  
!   nr.dwScope = RESOURCE_GLOBALNET;
!   nr.dwType = RESOURCETYPE_DISK;
!   nr.dwDisplayType = RESOURCEDISPLAYTYPE_SERVER;
!   nr.dwUsage = RESOURCEUSAGE_CONTAINER;
!   nr.lpLocalName = NULL;
    nr.lpRemoteName = map_w32_filename (path, NULL);
!   nr.lpComment = NULL;
!   nr.lpProvider = NULL;
  
!   result = WNetOpenEnum(RESOURCE_GLOBALNET, RESOURCETYPE_DISK,
                        RESOURCEUSAGE_CONNECTABLE, &nr, &henum);
  
    if (result == NO_ERROR)
***************
*** 1802,1808 ****
  
  /* Shadow some MSVC runtime functions to map requests for long filenames
     to reasonable short names if necessary.  This was originally added to
!    permit running Emacs on NT 3.1 on a FAT partition, which doesn't support 
     long file names.  */
  
  int
--- 1802,1808 ----
  
  /* Shadow some MSVC runtime functions to map requests for long filenames
     to reasonable short names if necessary.  This was originally added to
!    permit running Emacs on NT 3.1 on a FAT partition, which doesn't support
     long file names.  */
  
  int
***************
*** 2452,2458 ****
      permission = _S_IREAD;
    else
      permission = _S_IREAD | _S_IWRITE;
!   
    if (wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
      permission |= _S_IEXEC;
    else if (is_exec (name))
--- 2452,2458 ----
      permission = _S_IREAD;
    else
      permission = _S_IREAD | _S_IWRITE;
! 
    if (wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
      permission |= _S_IEXEC;
    else if (is_exec (name))
***************
*** 2536,2542 ****
      permission = _S_IREAD;
    else
      permission = _S_IREAD | _S_IWRITE;
!   
    if (info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
      permission |= _S_IEXEC;
    else
--- 2536,2542 ----
      permission = _S_IREAD;
    else
      permission = _S_IREAD | _S_IWRITE;
! 
    if (info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
      permission |= _S_IEXEC;
    else
***************
*** 2788,2794 ****
    WSAEFAULT               , "Bad address",
    WSAEINVAL               , "Invalid argument",
    WSAEMFILE               , "Too many open files",
!                       
    WSAEWOULDBLOCK          , "Resource temporarily unavailable",
    WSAEINPROGRESS          , "Operation now in progress",
    WSAEALREADY             , "Operation already in progress",
--- 2788,2794 ----
    WSAEFAULT               , "Bad address",
    WSAEINVAL               , "Invalid argument",
    WSAEMFILE               , "Too many open files",
! 
    WSAEWOULDBLOCK          , "Resource temporarily unavailable",
    WSAEINPROGRESS          , "Operation now in progress",
    WSAEALREADY             , "Operation already in progress",
***************
*** 2826,2832 ****
    WSAEDQUOT               , "Double quote in host name",    /* really not 
sure */
    WSAESTALE               , "Data is stale",              /* not sure */
    WSAEREMOTE              , "Remote error",               /* not sure */
!                       
    WSASYSNOTREADY          , "Network subsystem is unavailable",
    WSAVERNOTSUPPORTED      , "WINSOCK.DLL version out of range",
    WSANOTINITIALISED       , "Winsock not initialized successfully",
--- 2826,2832 ----
    WSAEDQUOT               , "Double quote in host name",    /* really not 
sure */
    WSAESTALE               , "Data is stale",              /* not sure */
    WSAEREMOTE              , "Remote error",               /* not sure */
! 
    WSASYSNOTREADY          , "Network subsystem is unavailable",
    WSAVERNOTSUPPORTED      , "WINSOCK.DLL version out of range",
    WSANOTINITIALISED       , "Winsock not initialized successfully",
***************
*** 2844,2850 ****
    WSA_E_CANCELLED         , "Operation already cancelled",  /* really not 
sure */
    WSAEREFUSED             , "Operation refused",          /* not sure */
  #endif
!                       
    WSAHOST_NOT_FOUND       , "Host not found",
    WSATRY_AGAIN            , "Authoritative host not found during name lookup",
    WSANO_RECOVERY          , "Non-recoverable error during name lookup",
--- 2844,2850 ----
    WSA_E_CANCELLED         , "Operation already cancelled",  /* really not 
sure */
    WSAEREFUSED             , "Operation refused",          /* not sure */
  #endif
! 
    WSAHOST_NOT_FOUND       , "Host not found",
    WSATRY_AGAIN            , "Authoritative host not found during name lookup",
    WSANO_RECOVERY          , "Non-recoverable error during name lookup",
***************
*** 2899,2905 ****
  
    /* call the real socket function */
    s = pfn_socket (af, type, protocol);
!   
    if (s != INVALID_SOCKET)
      return socket_to_fd (s);
  
--- 2899,2905 ----
  
    /* call the real socket function */
    s = pfn_socket (af, type, protocol);
! 
    if (s != INVALID_SOCKET)
      return socket_to_fd (s);
  
***************
*** 2972,2978 ****
                  {
                    CloseHandle (new_s);
                  }
!             } 
          }
        }
        fd_info[fd].hnd = (HANDLE) s;
--- 2972,2978 ----
                  {
                    CloseHandle (new_s);
                  }
!             }
          }
        }
        fd_info[fd].hnd = (HANDLE) s;
***************
*** 3185,3191 ****
        return rc;
      }
    h_errno = ENOTSOCK;
!   return SOCKET_ERROR;      
  }
  
  int
--- 3185,3191 ----
        return rc;
      }
    h_errno = ENOTSOCK;
!   return SOCKET_ERROR;
  }
  
  int
***************
*** 3206,3212 ****
        return rc;
      }
    h_errno = ENOTSOCK;
!   return SOCKET_ERROR;      
  }
  
  int
--- 3206,3212 ----
        return rc;
      }
    h_errno = ENOTSOCK;
!   return SOCKET_ERROR;
  }
  
  int
***************
*** 3227,3233 ****
        return rc;
      }
    h_errno = ENOTSOCK;
!   return SOCKET_ERROR;      
  }
  
  int
--- 3227,3233 ----
        return rc;
      }
    h_errno = ENOTSOCK;
!   return SOCKET_ERROR;
  }
  
  int
***************
*** 3425,3431 ****
    /* make sure we close the destination first if it's a pipe or socket */
    if (src != dst && fd_info[dst].flags != 0)
      sys_close (dst);
!   
    rc = _dup2 (src, dst);
    if (rc == 0)
      {
--- 3425,3431 ----
    /* make sure we close the destination first if it's a pipe or socket */
    if (src != dst && fd_info[dst].flags != 0)
      sys_close (dst);
! 
    rc = _dup2 (src, dst);
    if (rc == 0)
      {
***************
*** 3485,3493 ****
        DebPrint (("_sys_read_ahead: internal error: fd %d is not a pipe or 
socket!\n", fd));
        abort ();
      }
!   
    cp->status = STATUS_READ_IN_PROGRESS;
!   
    if (fd_info[fd].flags & FILE_PIPE)
      {
        rc = _read (fd, &cp->chr, sizeof (char));
--- 3485,3493 ----
        DebPrint (("_sys_read_ahead: internal error: fd %d is not a pipe or 
socket!\n", fd));
        abort ();
      }
! 
    cp->status = STATUS_READ_IN_PROGRESS;
! 
    if (fd_info[fd].flags & FILE_PIPE)
      {
        rc = _read (fd, &cp->chr, sizeof (char));
***************
*** 3529,3535 ****
        }
      }
  #endif
!   
    if (rc == sizeof (char))
      cp->status = STATUS_READ_SUCCEEDED;
    else
--- 3529,3535 ----
        }
      }
  #endif
! 
    if (rc == sizeof (char))
      cp->status = STATUS_READ_SUCCEEDED;
    else
***************
*** 3728,3734 ****
                  next[0] = '\n';
                  dst = next + 1;
                  count++;
!               }           
              else
                /* copied remaining partial line -> now finished */
                break;
--- 3728,3734 ----
                  next[0] = '\n';
                  dst = next + 1;
                  count++;
!               }
              else
                /* copied remaining partial line -> now finished */
                break;
***************
*** 3781,3787 ****
       it cannot find the Windows installation file.  If this file does
       not exist in the expected place, tell the user.  */
  
!   if (!noninteractive && !inhibit_window_system) 
      {
        extern Lisp_Object Vwindow_system, Vload_path, Qfile_exists_p;
        Lisp_Object objs[2];
--- 3781,3787 ----
       it cannot find the Windows installation file.  If this file does
       not exist in the expected place, tell the user.  */
  
!   if (!noninteractive && !inhibit_window_system)
      {
        extern Lisp_Object Vwindow_system, Vload_path, Qfile_exists_p;
        Lisp_Object objs[2];
***************
*** 3794,3807 ****
        full_load_path = Fappend (2, objs);
        init_file = build_string ("term/w32-win");
        fd = openp (full_load_path, init_file, Vload_suffixes, NULL, Qnil);
!       if (fd < 0) 
        {
          Lisp_Object load_path_print = Fprin1_to_string (full_load_path, Qnil);
          char *init_file_name = SDATA (init_file);
          char *load_path = SDATA (load_path_print);
          char *buffer = alloca (1024);
  
!         sprintf (buffer, 
                   "The Emacs Windows initialization file \"%s.el\" "
                   "could not be found in your Emacs installation.  "
                   "Emacs checked the following directories for this file:\n"
--- 3794,3807 ----
        full_load_path = Fappend (2, objs);
        init_file = build_string ("term/w32-win");
        fd = openp (full_load_path, init_file, Vload_suffixes, NULL, Qnil);
!       if (fd < 0)
        {
          Lisp_Object load_path_print = Fprin1_to_string (full_load_path, Qnil);
          char *init_file_name = SDATA (init_file);
          char *load_path = SDATA (load_path_print);
          char *buffer = alloca (1024);
  
!         sprintf (buffer,
                   "The Emacs Windows initialization file \"%s.el\" "
                   "could not be found in your Emacs installation.  "
                   "Emacs checked the following directories for this file:\n"
***************
*** 3866,3879 ****
  
      /* ignore errors when duplicating and closing; typically the
         handles will be invalid when running as a gui program. */
!     DuplicateHandle (parent, 
!                    GetStdHandle (STD_INPUT_HANDLE), 
                     parent,
!                    &stdin_save, 
!                    0, 
!                    FALSE, 
                     DUPLICATE_SAME_ACCESS);
!     
      DuplicateHandle (parent,
                     GetStdHandle (STD_OUTPUT_HANDLE),
                     parent,
--- 3866,3879 ----
  
      /* ignore errors when duplicating and closing; typically the
         handles will be invalid when running as a gui program. */
!     DuplicateHandle (parent,
!                    GetStdHandle (STD_INPUT_HANDLE),
                     parent,
!                    &stdin_save,
!                    0,
!                    FALSE,
                     DUPLICATE_SAME_ACCESS);
! 
      DuplicateHandle (parent,
                     GetStdHandle (STD_OUTPUT_HANDLE),
                     parent,
***************
*** 3881,3887 ****
                     0,
                     FALSE,
                     DUPLICATE_SAME_ACCESS);
!     
      DuplicateHandle (parent,
                     GetStdHandle (STD_ERROR_HANDLE),
                     parent,
--- 3881,3887 ----
                     0,
                     FALSE,
                     DUPLICATE_SAME_ACCESS);
! 
      DuplicateHandle (parent,
                     GetStdHandle (STD_ERROR_HANDLE),
                     parent,
***************
*** 3889,3895 ****
                     0,
                     FALSE,
                     DUPLICATE_SAME_ACCESS);
!     
      fclose (stdin);
      fclose (stdout);
      fclose (stderr);
--- 3889,3895 ----
                     0,
                     FALSE,
                     DUPLICATE_SAME_ACCESS);
! 
      fclose (stdin);
      fclose (stdout);
      fclose (stderr);
***************
*** 3926,3932 ****
      while (*drive <= 'Z')
      {
        /* Record if this drive letter refers to a fixed drive. */
!       fixed_drives[DRIVE_INDEX (*drive)] = 
        (GetDriveType (drive) == DRIVE_FIXED);
  
        (*drive)++;
--- 3926,3932 ----
      while (*drive <= 'Z')
      {
        /* Record if this drive letter refers to a fixed drive. */
!       fixed_drives[DRIVE_INDEX (*drive)] =
        (GetDriveType (drive) == DRIVE_FIXED);
  
        (*drive)++;
***************
*** 3935,3941 ****
      /* Reset the volume info cache.  */
      volume_cache = NULL;
    }
!   
    /* Check to see if Emacs has been installed correctly.  */
    check_windows_init_file ();
  }
--- 3935,3941 ----
      /* Reset the volume info cache.  */
      volume_cache = NULL;
    }
! 
    /* Check to see if Emacs has been installed correctly.  */
    check_windows_init_file ();
  }




reply via email to

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