]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - login-utils/chfn.c
Imported from util-linux-2.10s tarball.
[thirdparty/util-linux.git] / login-utils / chfn.c
index 73a9b8918633c590f93fc8055e2ec5603783419e..de228241b872af1403a1a093fd37051e2e23fcf8 100644 (file)
@@ -34,6 +34,8 @@
 #include <ctype.h>
 #include <getopt.h>
 #include "my_crypt.h"
+#include "islocal.h"
+#include "setpwnam.h"
 #include "nls.h"
 #include "env.h"
 
 #include <security/pam_misc.h>
 #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)