CVS update: /ccvs/windows-NT/

[email protected] 26 May 2005 16:40:02 -0000
Newsgroups gmane.comp.version-control.cvs.cvs
Message-ID <[email protected]>
User: dprice  
Date: 05/05/26 09:40:02

Modified:
 /ccvs/windows-NT/
  ChangeLog, pwd.c, pwd.h

Log:
 * pwd.h, pwd.c: Reformat to CVS conventions.

File Changes:

Directory: /ccvs/windows-NT/
============================

File [changed]: ChangeLog
Url: https://ccvs.cvshome.org/source/browse/ccvs/windows-NT/ChangeLog?r1=1.306&r2=1.307
Delta lines:  +4 -0
-------------------
--- ChangeLog	26 May 2005 16:07:12 -0000	1.306
+++ ChangeLog	26 May 2005 16:40:00 -0000	1.307
@@ -1,5 +1,9 @@
 2005-05-26  Derek Price  <[email protected]>
 
+	* pwd.h, pwd.c: Reformat to CVS conventions.
+
+2005-05-26  Derek Price  <[email protected]>
+
 	* ndir.h, ndir.c: Reformatting to CVS conventions.
 
 2005-05-26  Conrad T. Pino  <[email protected]>

File [changed]: pwd.c
Url: https://ccvs.cvshome.org/source/browse/ccvs/windows-NT/pwd.c?r1=1.8&r2=1.9
Delta lines:  +18 -19
---------------------
--- pwd.c	17 May 2005 22:12:13 -0000	1.8
+++ pwd.c	26 May 2005 16:40:00 -0000	1.9
@@ -30,12 +30,12 @@
 
 static char *login_strings[] =
 {
-  "LOGIN", "USER", "MAILNAME", (char *) 0
+  "LOGIN", "USER", "MAILNAME", NULL
 };
 
 static char *group_strings[] =
 {
-  "GROUP", (char *) 0
+  "GROUP", NULL
 };
 
 
@@ -44,8 +44,8 @@
 static char *home_dir = ".";	/* we feel (no|every)where at home */
 static char *login_shell = "not command.com!";
 
-static char *login = (char *) 0;/* cache the names here	*/
-static char *group = (char *) 0;
+static char *login = NULL;/* cache the names here	*/
+static char *group = NULL;
 
 static struct passwd pw;	/* should we return a malloc()'d structure   */
 static struct group gr;		/* instead of pointers to static structures? */
@@ -65,7 +65,7 @@
 struct passwd *
 getpwnam (const char *name)
 {
-  return (struct passwd *) 0;
+  return NULL;
 }
 
 /* return something like a groupname in a (butchered!) group structure. */
@@ -81,12 +81,12 @@
 struct group *
 getgrnam (const char *name)
 {
-  return (struct group *) 0;
+  return NULL;
 }
 
 /* return something like a username. */
 char *
-getlogin ()
+getlogin (void)
 {
   /* This is how a windows user would override their login name. */
   if (!login)
@@ -105,7 +105,7 @@
 
 /* return something like a group.  */
 char *
-getgr_name ()
+getgr_name (void)
 {
   if (!group)			/* have we been called before? */
     group = lookup_env (group_strings);
@@ -118,47 +118,47 @@
 
 /* return something like a uid.  */
 int
-getuid ()
+getuid (void)
 {
   return 0;			/* every user is a super user ... */
 }
 
 int
-getgid ()
+getgid (void)
 {
   return 0;
 }
 
 int
-geteuid ()
+geteuid (void)
 {
   return 0;
 }
 
 int
-getegid ()
+getegid (void)
 {
   return 0;
 }
 
 struct passwd *
-getpwent ()
+getpwent (void)
 {
-  return (struct passwd *) 0;
+  return NULL;
 }
 
 void
-setpwent ()
+setpwent (void)
 {
 }
 
 void
-endpwent ()
+endpwent (void)
 {
 }
 
 void
-endgrent ()
+endgrent (void)
 {
 }
 
@@ -180,8 +180,7 @@
 
   while (*table && !(ptr = getenv (*table++))) ;	/* scan table */
 
-  if (!ptr)
-    return (char *) 0;
+  if (!ptr) return NULL;
 
   len = strcspn (ptr, " \n\t\n\r");	/* any WS? 	  */
   if (!(entry = xmalloc (len + 1)))

File [changed]: pwd.h
Url: https://ccvs.cvshome.org/source/browse/ccvs/windows-NT/pwd.h?r1=1.6&r2=1.7
Delta lines:  +15 -15
---------------------
--- pwd.h	17 May 2005 22:12:13 -0000	1.6
+++ pwd.h	26 May 2005 16:40:00 -0000	1.7
@@ -41,25 +41,25 @@
   int  gr_gid;
 };
 
-extern struct passwd *getpwuid (int);
-extern struct passwd *getpwnam (const char *);
-extern struct group *getgrgid (int);
-extern struct group *getgrnam (const char *);
-extern char *getlogin (void);
-extern char *getgr_name (void);
-extern int getuid (void);
-extern int getgid (void);
-extern int geteuid (void);
-extern int getegid (void);
+struct passwd *getpwuid (int);
+struct passwd *getpwnam (const char *);
+struct group *getgrgid (int);
+struct group *getgrnam (const char *);
+char *getlogin (void);
+char *getgr_name (void);
+int getuid (void);
+int getgid (void);
+int geteuid (void);
+int getegid (void);
 
 extern int *groups;
 extern int ngroups;
-extern int getgroups (int, int *);
+int getgroups (int, int *);
 
-extern struct passwd *getpwent (void);
-extern void setpwent (void);
-extern void endpwent (void);
-extern void endgrent (void);
+struct passwd *getpwent (void);
+void setpwent (void);
+void endpwent (void);
+void endgrent (void);
 
 /*
  * Local Variables: