From 66ee8158b69525e12060ef558cb5d77feadab1dc Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 7 Dec 2006 00:25:44 +0100 Subject: Imported from util-linux-2.10s tarball. --- login-utils/chfn.c | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) (limited to 'login-utils/chfn.c') diff --git a/login-utils/chfn.c b/login-utils/chfn.c index 73a9b8918..de228241b 100644 --- a/login-utils/chfn.c +++ b/login-utils/chfn.c @@ -34,6 +34,8 @@ #include #include #include "my_crypt.h" +#include "islocal.h" +#include "setpwnam.h" #include "nls.h" #include "env.h" @@ -42,15 +44,6 @@ #include #endif -extern int is_local(char *); - -#undef P -#if __STDC__ -#define P(foo) foo -#else -#define P(foo) () -#endif - typedef unsigned char boolean; #define false 0 #define true 1 @@ -69,17 +62,15 @@ struct finfo { char *other; }; -static boolean parse_argv P((int argc, char *argv[], struct finfo *pinfo)); -static void usage P((FILE *fp)); -static void parse_passwd P((struct passwd *pw, struct finfo *pinfo)); -static void ask_info P((struct finfo *oldfp, struct finfo *newfp)); -static char *prompt P((char *question, char *def_val)); -static int check_gecos_string P((char *msg, char *gecos)); -static boolean set_changed_data P((struct finfo *oldfp, struct finfo *newfp)); -static int save_new_data P((struct finfo *pinfo)); -static void *xmalloc P((int bytes)); - -extern int setpwnam P((struct passwd *pwd)); +static boolean parse_argv (int argc, char *argv[], struct finfo *pinfo); +static void usage (FILE *fp); +static void parse_passwd (struct passwd *pw, struct finfo *pinfo); +static void ask_info (struct finfo *oldfp, struct finfo *newfp); +static char *prompt (char *question, char *def_val); +static int check_gecos_string (char *msg, char *gecos); +static boolean set_changed_data (struct finfo *oldfp, struct finfo *newfp); +static int save_new_data (struct finfo *pinfo); +static void *xmalloc (int bytes); #define memzero(ptr, size) memset((char *) ptr, 0, size) -- cgit v1.2.3-55-g7522