projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
file reorg, pathnames.h, paths.h
[unix-history]
/
usr
/
src
/
usr.bin
/
chpass
/
util.c
diff --git
a/usr/src/usr.bin/chpass/util.c
b/usr/src/usr.bin/chpass/util.c
index
1a9bfae
..
bb1eedd
100644
(file)
--- a/
usr/src/usr.bin/chpass/util.c
+++ b/
usr/src/usr.bin/chpass/util.c
@@
-16,7
+16,7
@@
*/
#ifndef lint
*/
#ifndef lint
-static char sccsid[] = "@(#)util.c 5.
6
(Berkeley) %G%";
+static char sccsid[] = "@(#)util.c 5.
10
(Berkeley) %G%";
#endif /* not lint */
#include <sys/types.h>
#endif /* not lint */
#include <sys/types.h>
@@
-24,9
+24,9
@@
static char sccsid[] = "@(#)util.c 5.6 (Berkeley) %G%";
#include <tzfile.h>
#include <pwd.h>
#include <stdio.h>
#include <tzfile.h>
#include <pwd.h>
#include <stdio.h>
-#include <chpass.h>
#include <strings.h>
#include <ctype.h>
#include <strings.h>
#include <ctype.h>
+#include "chpass.h"
#include "pathnames.h"
static int dmsize[] =
#include "pathnames.h"
static int dmsize[] =
@@
-40,7
+40,7
@@
ttoa(tval)
time_t tval;
{
struct tm *tp;
time_t tval;
{
struct tm *tp;
- static char tbuf[
1
0];
+ static char tbuf[
5
0];
if (tval) {
tp = localtime(&tval);
if (tval) {
tp = localtime(&tval);
@@
-95,11
+95,11
@@
bad: return(1);
tval = isleap(year) && month > 2;
for (--year; year >= EPOCH_YEAR; --year)
tval += isleap(year) ?
tval = isleap(year) && month > 2;
for (--year; year >= EPOCH_YEAR; --year)
tval += isleap(year) ?
- DAYS
_PER_LYEAR : DAYS_PER_
NYEAR;
+ DAYS
PERLYEAR : DAYSPER
NYEAR;
while (--month)
tval += dmsize[month];
while (--month)
tval += dmsize[month];
- tval += day
- 1
;
- tval = tval * HOURS
_PER_DAY * MINS_PER_HOUR * SECS_PER_
MIN;
+ tval += day;
+ tval = tval * HOURS
PERDAY * MINSPERHOUR * SECSPER
MIN;
tval -= lt->tm_gmtoff;
*store = tval;
return(0);
tval -= lt->tm_gmtoff;
*store = tval;
return(0);
@@
-112,7
+112,7
@@
print(fp, pw)
register char *p;
char *getusershell(), *ttoa();
register char *p;
char *getusershell(), *ttoa();
- fprintf(fp, "Changing user database information for %s.\n",
+ fprintf(fp, "
#
Changing user database information for %s.\n",
pw->pw_name);
if (!uid) {
fprintf(fp, "Login: %s\n", pw->pw_name);
pw->pw_name);
if (!uid) {
fprintf(fp, "Login: %s\n", pw->pw_name);