finger diffs for adapting from BSD4.3 to OSx4.1
DugalJP
jpd at usl-pc.usl.edu
Wed Aug 2 01:14:36 AEST 1989
I found a few problems in converting the BSD4.3 finger to run on my OSx4.1
Pyramids, so here's a context diff - seems to be working well for a few
days now.
-- James Dugal
=========================================================================
*** finger.bsd.c Tue Aug 1 10:03:32 1989
--- /usr/src/ucb/finger.c Mon Jul 31 11:02:28 1989
***************
*** 195,200
exit(2);
}
if (unquick) {
extern _pw_stayopen;
setpwent();
--- 195,201 -----
exit(2);
}
if (unquick) {
+ #ifdef BSD43
extern _pw_stayopen;
#endif
***************
*** 196,201
}
if (unquick) {
extern _pw_stayopen;
setpwent();
_pw_stayopen = 1;
--- 197,203 -----
if (unquick) {
#ifdef BSD43
extern _pw_stayopen;
+ #endif
setpwent();
#ifdef BSD43
***************
*** 198,203
extern _pw_stayopen;
setpwent();
_pw_stayopen = 1;
fwopen();
}
--- 200,206 -----
#endif
setpwent();
+ #ifdef BSD43
_pw_stayopen = 1;
#endif
fwopen();
***************
*** 199,204
setpwent();
_pw_stayopen = 1;
fwopen();
}
while (read(uf, (char *)&user, sizeof user) == sizeof user) {
--- 202,208 -----
setpwent();
#ifdef BSD43
_pw_stayopen = 1;
+ #endif
fwopen();
}
while (read(uf, (char *)&user, sizeof user) == sizeof user) {
***************
*** 273,278
if (unquick) {
setpwent();
if (!match) {
extern _pw_stayopen;
_pw_stayopen = 1;
--- 277,283 -----
if (unquick) {
setpwent();
if (!match) {
+ #ifdef BSD43
extern _pw_stayopen;
_pw_stayopen = 1;
***************
*** 276,281
extern _pw_stayopen;
_pw_stayopen = 1;
for (p = person1; p != 0; p = p->link)
if (pw = getpwnam(p->name))
p->pwd = pwdcopy(pw);
--- 281,287 -----
extern _pw_stayopen;
_pw_stayopen = 1;
+ #endif
for (p = person1; p != 0; p = p->link)
if (pw = getpwnam(p->name))
p->pwd = pwdcopy(pw);
***************
*** 372,378
if (unquick) {
if (!unshort)
if (wide)
! printf("Login Name TTY Idle When Office\n");
else
printf("Login TTY Idle When Office\n");
} else {
--- 378,384 -----
if (unquick) {
if (!unshort)
if (wide)
! printf("Login Name TTY Idle When Office\n");
else
printf("Login TTY Idle When Office\n");
} else {
***************
*** 374,380
if (wide)
printf("Login Name TTY Idle When Office\n");
else
! printf("Login TTY Idle When Office\n");
} else {
printf("Login TTY When");
if (idle)
--- 380,386 -----
if (wide)
printf("Login Name TTY Idle When Office\n");
else
! printf("Login TTY Idle When Office\n");
} else {
printf("Login TTY When");
if (idle)
***************
*** 376,382
else
printf("Login TTY Idle When Office\n");
} else {
! printf("Login TTY When");
if (idle)
printf(" Idle");
putchar('\n');
--- 382,388 -----
else
printf("Login TTY Idle When Office\n");
} else {
! printf("Login TTY When");
if (idle)
printf(" Idle");
putchar('\n');
***************
*** 512,517
pers->tty[2] == 'y') {
if (pers->tty[3] == 'd' && pers->loggedin)
dialup = 1;
printf("%-2.2s ", pers->tty + 3);
} else
printf("%-2.2s ", pers->tty);
--- 518,528 -----
pers->tty[2] == 'y') {
if (pers->tty[3] == 'd' && pers->loggedin)
dialup = 1;
+ #ifdef pyr
+ printf("%-3.3s ", pers->tty + 3);
+ } else
+ printf("%-3.3s ", pers->tty);
+ #else
printf("%-2.2s ", pers->tty + 3);
} else
printf("%-2.2s ", pers->tty);
***************
*** 515,520
printf("%-2.2s ", pers->tty + 3);
} else
printf("%-2.2s ", pers->tty);
} else
printf(" ");
p = ctime(&pers->loginat);
--- 526,532 -----
printf("%-2.2s ", pers->tty + 3);
} else
printf("%-2.2s ", pers->tty);
+ #endif
} else
printf(" ");
p = ctime(&pers->loginat);
***************
*** 638,643
switch (len) {
case 4:
*p++ = ' ';
*p++ = 'x';
*p++ = '2';
*p++ = '-';
--- 650,656 -----
switch (len) {
case 4:
*p++ = ' ';
+ #ifdef X2
*p++ = 'x';
*p++ = '2';
*p++ = '-';
***************
*** 641,646
*p++ = 'x';
*p++ = '2';
*p++ = '-';
for (i = 0; i < 4; i++)
*p++ = *s++;
break;
--- 654,664 -----
*p++ = 'x';
*p++ = '2';
*p++ = '-';
+ #else
+ *p++ = ' ';
+ *p++ = ' ';
+ *p++ = 'x';
+ #endif
for (i = 0; i < 4; i++)
*p++ = *s++;
break;
--
-- James Dugal, N5KNX USENET: ...!{dalsqnt,killer}!usl!jpd
Associate Director Internet: jpd at usl.edu
Computing Center US Mail: PO Box 42770 Lafayette, LA 70504
University of Southwestern LA. Tel. 318-231-6417 U.S.A.
More information about the Comp.sys.pyramid
mailing list