[Pkg-shadow-commits] r1744 - in upstream/trunk: . lib libmisc

nekral-guest at alioth.debian.org nekral-guest at alioth.debian.org
Thu Jan 24 21:07:14 UTC 2008


Author: nekral-guest
Date: 2008-01-24 21:07:14 +0000 (Thu, 24 Jan 2008)
New Revision: 1744

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/lib/getdef.c
   upstream/trunk/libmisc/addgrps.c
   upstream/trunk/libmisc/age.c
   upstream/trunk/libmisc/env.c
   upstream/trunk/libmisc/limits.c
   upstream/trunk/libmisc/yesno.c
Log:
Replace printf by puts for fixed strings. This would avoid issues caused
by formats introduced in translated strings.


Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2008-01-24 20:54:42 UTC (rev 1743)
+++ upstream/trunk/ChangeLog	2008-01-24 21:07:14 UTC (rev 1744)
@@ -5,9 +5,10 @@
 	src/userdel.c, src/lastlog.c, src/groupmems.c, src/usermod.c,
 	src/expiry.c, src/groupdel.c, src/useradd.c, src/su.c,
 	src/groupmod.c, src/passwd.c, src/groupadd.c, src/login.c,
-	src/suauth.c, src/faillog.c, src/id.c: Replace
-	printf by puts for fixed strings. This would avoid issues caused
-	by formats introduced in translated strings.
+	src/suauth.c, src/faillog.c, src/id.c, libmisc/limits.c,
+	libmisc/addgrps.c, libmisc/env.c, libmisc/age.c, libmisc/yesno.c,
+	lib/getdef.c: Replace printf by puts for fixed strings. This would
+	avoid issues caused by formats introduced in translated strings.
 
 2008-01-23  Nicolas François  <nicolas.francois at centraliens.net>
 

Modified: upstream/trunk/lib/getdef.c
===================================================================
--- upstream/trunk/lib/getdef.c	2008-01-24 20:54:42 UTC (rev 1743)
+++ upstream/trunk/lib/getdef.c	2008-01-24 21:07:14 UTC (rev 1744)
@@ -257,8 +257,8 @@
 	 * Save off the value.
 	 */
 	if ((cp = strdup (value)) == NULL) {
-		fprintf (stderr,
-			 _("Could not allocate space for config info.\n"));
+		fputs (_("Could not allocate space for config info.\n"),
+		       stderr);
 		SYSLOG ((LOG_ERR, "could not allocate space for config info"));
 		return -1;
 	}

Modified: upstream/trunk/libmisc/addgrps.c
===================================================================
--- upstream/trunk/libmisc/addgrps.c	2008-01-24 20:54:42 UTC (rev 1743)
+++ upstream/trunk/libmisc/addgrps.c	2008-01-24 21:07:14 UTC (rev 1744)
@@ -64,7 +64,7 @@
 			continue;
 
 		if (ngroups >= sysconf (_SC_NGROUPS_MAX)) {
-			fprintf (stderr, _("Warning: too many groups\n"));
+			fputs (_("Warning: too many groups\n"), stderr);
 			break;
 		}
 		tmp = (gid_t *) realloc (grouplist, (ngroups + 1) * sizeof (GETGROUPS_T));

Modified: upstream/trunk/libmisc/age.c
===================================================================
--- upstream/trunk/libmisc/age.c	2008-01-24 20:54:42 UTC (rev 1743)
+++ upstream/trunk/libmisc/age.c	2008-01-24 21:07:14 UTC (rev 1744)
@@ -68,13 +68,13 @@
 	case 0:
 		return 0;
 	case 1:
-		printf (_("Your password has expired."));
+		puts (_("Your password has expired."));
 		break;
 	case 2:
-		printf (_("Your password is inactive."));
+		puts (_("Your password is inactive."));
 		break;
 	case 3:
-		printf (_("Your login has expired."));
+		puts (_("Your login has expired."));
 		break;
 	}
 
@@ -168,8 +168,8 @@
 				("Your password will expire in %ld days.\n"),
 				remain);
 		else if (remain == 1)
-			printf (_("Your password will expire tomorrow.\n"));
+			puts (_("Your password will expire tomorrow.\n"));
 		else if (remain == 0)
-			printf (_("Your password will expire today.\n"));
+			puts (_("Your password will expire today.\n"));
 	}
 }

Modified: upstream/trunk/libmisc/env.c
===================================================================
--- upstream/trunk/libmisc/env.c	2008-01-24 20:54:42 UTC (rev 1743)
+++ upstream/trunk/libmisc/env.c	2008-01-24 21:07:14 UTC (rev 1744)
@@ -152,7 +152,7 @@
 				environ = __newenvp;
 			newenvp = __newenvp;
 		} else {
-			fprintf (stderr, _("Environment overflow\n"));
+			fputs (_("Environment overflow\n"), stderr);
 			free (newenvp[--newenvc]);
 		}
 	}

Modified: upstream/trunk/libmisc/limits.c
===================================================================
--- upstream/trunk/libmisc/limits.c	2008-01-24 20:54:42 UTC (rev 1743)
+++ upstream/trunk/libmisc/limits.c	2008-01-24 21:07:14 UTC (rev 1744)
@@ -410,7 +410,7 @@
 		if (info->pw_uid != 0)
 			if (setup_user_limits (info->pw_name) &
 			    LOGIN_ERROR_LOGIN) {
-				fprintf (stderr, _("Too many logins.\n"));
+				fputs (_("Too many logins.\n"), stderr);
 				sleep (2);
 				exit (1);
 			}

Modified: upstream/trunk/libmisc/yesno.c
===================================================================
--- upstream/trunk/libmisc/yesno.c	2008-01-24 20:54:42 UTC (rev 1743)
+++ upstream/trunk/libmisc/yesno.c	2008-01-24 21:07:14 UTC (rev 1744)
@@ -55,7 +55,7 @@
 	 * In read-only mode all questions are answered "no".
 	 */
 	if (read_only) {
-		printf (_("No\n"));
+		puts (_("No\n"));
 		return 0;
 	}
 




More information about the Pkg-shadow-commits mailing list