Re-indent.

This commit is contained in:
nekral-guest 2007-12-31 15:34:29 +00:00
parent d6cabcde78
commit 0cc661a2cf

View File

@ -94,13 +94,13 @@ static void usage (void)
{ {
if (amroot) { if (amroot) {
fprintf (stderr, fprintf (stderr,
_("Usage: %s [-f full_name] [-r room_no] " _("Usage: %s [-f full_name] [-r room_no] "
"[-w work_ph]\n" "[-w work_ph]\n"
"\t[-h home_ph] [-o other] [user]\n"), Prog); "\t[-h home_ph] [-o other] [user]\n"), Prog);
} else { } else {
fprintf (stderr, fprintf (stderr,
_("Usage: %s [-f full_name] [-r room_no] " _("Usage: %s [-f full_name] [-r room_no] "
"[-w work_ph] [-h home_ph]\n"), Prog); "[-w work_ph] [-h home_ph]\n"), Prog);
} }
exit (E_USAGE); exit (E_USAGE);
} }
@ -256,7 +256,7 @@ static void process_flags (int argc, char **argv)
case 'f': case 'f':
if (!may_change_field ('f')) { if (!may_change_field ('f')) {
fprintf (stderr, fprintf (stderr,
_("%s: Permission denied.\n"), Prog); _("%s: Permission denied.\n"), Prog);
exit (E_NOPERM); exit (E_NOPERM);
} }
fflg++; fflg++;
@ -265,7 +265,7 @@ static void process_flags (int argc, char **argv)
case 'h': case 'h':
if (!may_change_field ('h')) { if (!may_change_field ('h')) {
fprintf (stderr, fprintf (stderr,
_("%s: Permission denied.\n"), Prog); _("%s: Permission denied.\n"), Prog);
exit (E_NOPERM); exit (E_NOPERM);
} }
hflg++; hflg++;
@ -274,7 +274,7 @@ static void process_flags (int argc, char **argv)
case 'r': case 'r':
if (!may_change_field ('r')) { if (!may_change_field ('r')) {
fprintf (stderr, fprintf (stderr,
_("%s: Permission denied.\n"), Prog); _("%s: Permission denied.\n"), Prog);
exit (E_NOPERM); exit (E_NOPERM);
} }
rflg++; rflg++;
@ -283,7 +283,7 @@ static void process_flags (int argc, char **argv)
case 'o': case 'o':
if (!amroot) { if (!amroot) {
fprintf (stderr, fprintf (stderr,
_("%s: Permission denied.\n"), Prog); _("%s: Permission denied.\n"), Prog);
exit (E_NOPERM); exit (E_NOPERM);
} }
oflg++; oflg++;
@ -292,7 +292,7 @@ static void process_flags (int argc, char **argv)
case 'w': case 'w':
if (!may_change_field ('w')) { if (!may_change_field ('w')) {
fprintf (stderr, fprintf (stderr,
_("%s: Permission denied.\n"), Prog); _("%s: Permission denied.\n"), Prog);
exit (E_NOPERM); exit (E_NOPERM);
} }
wflg++; wflg++;
@ -418,8 +418,8 @@ static void update_gecos (const char *user, char *gecos)
*/ */
if (pw_lock () == 0) { if (pw_lock () == 0) {
fprintf (stderr, fprintf (stderr,
_ _
("Cannot lock the password file; try again later.\n")); ("Cannot lock the password file; try again later.\n"));
SYSLOG ((LOG_WARN, "can't lock /etc/passwd")); SYSLOG ((LOG_WARN, "can't lock /etc/passwd"));
closelog (); closelog ();
exit (E_NOPERM); exit (E_NOPERM);
@ -442,7 +442,7 @@ static void update_gecos (const char *user, char *gecos)
if (NULL == pw) { if (NULL == pw) {
pw_unlock (); pw_unlock ();
fprintf (stderr, fprintf (stderr,
_("%s: %s not found in /etc/passwd\n"), Prog, user); _("%s: %s not found in /etc/passwd\n"), Prog, user);
exit (E_NOPERM); exit (E_NOPERM);
} }
@ -547,26 +547,26 @@ static void check_fields (void)
} }
if (valid_field (roomno, ":,=")) { if (valid_field (roomno, ":,=")) {
fprintf (stderr, _("%s: invalid room number: '%s'\n"), fprintf (stderr, _("%s: invalid room number: '%s'\n"),
Prog, roomno); Prog, roomno);
closelog (); closelog ();
exit (E_NOPERM); exit (E_NOPERM);
} }
if (valid_field (workph, ":,=")) { if (valid_field (workph, ":,=")) {
fprintf (stderr, _("%s: invalid work phone: '%s'\n"), fprintf (stderr, _("%s: invalid work phone: '%s'\n"),
Prog, workph); Prog, workph);
closelog (); closelog ();
exit (E_NOPERM); exit (E_NOPERM);
} }
if (valid_field (homeph, ":,=")) { if (valid_field (homeph, ":,=")) {
fprintf (stderr, _("%s: invalid home phone: '%s'\n"), fprintf (stderr, _("%s: invalid home phone: '%s'\n"),
Prog, homeph); Prog, homeph);
closelog (); closelog ();
exit (E_NOPERM); exit (E_NOPERM);
} }
if (valid_field (slop, ":")) { if (valid_field (slop, ":")) {
fprintf (stderr, fprintf (stderr,
_("%s: '%s' contains illegal characters\n"), _("%s: '%s' contains illegal characters\n"),
Prog, slop); Prog, slop);
closelog (); closelog ();
exit (E_NOPERM); exit (E_NOPERM);
} }
@ -625,16 +625,16 @@ int main (int argc, char **argv)
pw = xgetpwnam (user); pw = xgetpwnam (user);
if (NULL == pw) { if (NULL == pw) {
fprintf (stderr, _("%s: unknown user %s\n"), Prog, fprintf (stderr, _("%s: unknown user %s\n"), Prog,
user); user);
exit (E_NOPERM); exit (E_NOPERM);
} }
} else { } else {
pw = get_my_pwent (); pw = get_my_pwent ();
if (NULL == pw) { if (NULL == pw) {
fprintf (stderr, fprintf (stderr,
_ _
("%s: Cannot determine your user name.\n"), ("%s: Cannot determine your user name.\n"),
Prog); Prog);
exit (E_NOPERM); exit (E_NOPERM);
} }
user = xstrdup (pw->pw_name); user = xstrdup (pw->pw_name);
@ -649,15 +649,15 @@ int main (int argc, char **argv)
char *nis_master; char *nis_master;
fprintf (stderr, fprintf (stderr,
_("%s: cannot change user '%s' on NIS client.\n"), _("%s: cannot change user '%s' on NIS client.\n"),
Prog, user); Prog, user);
if (!yp_get_default_domain (&nis_domain) && if (!yp_get_default_domain (&nis_domain) &&
!yp_master (nis_domain, "passwd.byname", &nis_master)) { !yp_master (nis_domain, "passwd.byname", &nis_master)) {
fprintf (stderr, fprintf (stderr,
_ _
("%s: '%s' is the NIS master for this client.\n"), ("%s: '%s' is the NIS master for this client.\n"),
Prog, nis_master); Prog, nis_master);
} }
exit (E_NOPERM); exit (E_NOPERM);
} }