Delete record-buffer, and rename unrecord-buffer to bury-buffer-internal.
[bpt/emacs.git] / lib-src / ntlib.c
index 4cfb7ad..83f653f 100644 (file)
@@ -1,13 +1,12 @@
 /* Utility and Unix shadow routines for GNU Emacs support programs on NT.
-   Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005,
-                 2006, 2007, 2008  Free Software Foundation, Inc.
+   Copyright (C) 1994, 2001-2011  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
-GNU Emacs is free software; you can redistribute it and/or modify
+GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3, or (at your option)
-any later version.
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,9 +14,8 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GNU Emacs; see the file COPYING.  If not, write to
-the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-Boston, MA 02110-1301, USA.
+along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
 
    Geoff Voelker (voelker@cs.washington.edu)                         10-8-94
 */
@@ -30,6 +28,7 @@ Boston, MA 02110-1301, USA.
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <errno.h>
+#include <ctype.h>
 
 #include "ntlib.h"
 
@@ -39,7 +38,7 @@ Boston, MA 02110-1301, USA.
    would necessitate including windows.h in the files that used it.
    This is much easier.  */
 void
-sleep(unsigned long seconds)
+sleep (unsigned long seconds)
 {
   Sleep (seconds * 1000);
 }
@@ -57,7 +56,7 @@ static HANDLE getppid_parent;
 static int    getppid_ppid;
 
 int
-getppid(void)
+getppid (void)
 {
   char *ppid;
   DWORD result;
@@ -65,7 +64,7 @@ getppid(void)
   ppid = getenv ("EM_PARENT_PROCESS_ID");
   if (!ppid)
     {
-      printf("no pid.\n");
+      printf ("no pid.\n");
       return 0;
     }
   else
@@ -75,11 +74,11 @@ getppid(void)
 
   if (!getppid_parent)
     {
-      getppid_parent = OpenProcess (SYNCHRONIZE, FALSE, atoi(ppid));
+      getppid_parent = OpenProcess (SYNCHRONIZE, FALSE, atoi (ppid));
       if (!getppid_parent)
        {
          printf ("Failed to open handle to parent process: %d\n",
-                GetLastError());
+                GetLastError ());
          exit (1);
        }
     }
@@ -95,13 +94,13 @@ getppid(void)
       return 1;
     case WAIT_FAILED:
     default:
-      printf ("Checking parent status failed: %d\n", GetLastError());
+      printf ("Checking parent status failed: %d\n", GetLastError ());
       exit (1);
     }
 }
 
 char *
-getlogin ()
+getlogin (void)
 {
   static char user_name[256];
   DWORD  length = sizeof (user_name);
@@ -120,20 +119,38 @@ cuserid (char * s)
   return name;
 }
 
+unsigned
+getuid (void)
+{
+  return 0;
+}
+
+unsigned
+getgid (void)
+{
+  return 0;
+}
+
+unsigned
+getegid (void)
+{
+  return 0;
+}
+
 int
-getuid ()
+setuid (unsigned uid)
 {
   return 0;
 }
 
 int
-setuid (int uid)
+setregid (unsigned rgid, unsigned gid)
 {
   return 0;
 }
 
 struct passwd *
-getpwuid (int uid)
+getpwuid (unsigned uid)
 {
   return NULL;
 }
@@ -186,7 +203,7 @@ getpass (const char * prompt)
 }
 
 int
-fchown (int fd, int uid, int gid)
+fchown (int fd, unsigned uid, unsigned gid)
 {
   return 0;
 }
@@ -202,7 +219,7 @@ sys_ctime (const time_t *t)
 }
 
 FILE *
-sys_fopen(const char * path, const char * mode)
+sys_fopen (const char * path, const char * mode)
 {
   return fopen (path, mode);
 }
@@ -357,5 +374,3 @@ stat (const char * path, struct stat * buf)
   return 0;
 }
 
-/* arch-tag: 7b63fb83-70ee-4124-8822-54e53e5d0773
-   (do not change this comment) */