]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - login-utils/chsh.c
Imported from util-linux-2.10s tarball.
[thirdparty/util-linux.git] / login-utils / chsh.c
index f17b176fb2be7e08236fa754a0750201f25a1318..d1a3fa8207594612d38c78ee67eb479c46fdbd0b 100644 (file)
@@ -37,6 +37,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
@@ -71,19 +64,17 @@ struct sinfo {
     char *shell;
 };
 
-static void parse_argv P((int argc, char *argv[], struct sinfo *pinfo));
-static void usage P((FILE *fp));
-static char *prompt P((char *question, char *def_val));
-static int check_shell P((char *shell));
-static boolean get_shell_list P((char *shell));
-static void *xmalloc P((int bytes));
-extern int setpwnam P((struct passwd *pwd));
+static void parse_argv (int argc, char *argv[], struct sinfo *pinfo);
+static void usage (FILE *fp);
+static char *prompt (char *question, char *def_val);
+static int check_shell (char *shell);
+static boolean get_shell_list (char *shell);
+static void *xmalloc (int bytes);
+
 #define memzero(ptr, size) memset((char *) ptr, 0, size)
 
-int main (argc, argv)
-    int argc;
-    char *argv[];
-{
+int
+main (int argc, char *argv[]) {
     char *cp, *shell, *oldshell;
     uid_t uid;
     struct sinfo info;