Blame SOURCES/bsd-finger-0.17-host-info.patch

d77ab8
--- bsd-finger-0.17/finger/sprint.c	2009-11-02 13:11:20.000000000 +0530
d77ab8
+++ bsd-finger-0.17/finger/sprint.c.add-host-column	2009-11-02 13:10:43.000000000 +0530
d77ab8
@@ -89,7 +89,7 @@ void sflag_print(void) {
d77ab8
 	if (maxlname + maxrname < space-2) { maxlname++; maxrname++; }
d77ab8
 
d77ab8
 	(void)xprintf("%-*s %-*s %s\n", maxlname, "Login", maxrname,
d77ab8
-	    "Name", " Tty      Idle  Login Time   Office     Office Phone");
d77ab8
+	    "Name", " Tty      Idle  Login Time   Office     Office Phone   Host");
d77ab8
 	for (cnt = 0; cnt < entries; ++cnt) {
d77ab8
 		pn = list[cnt];
d77ab8
 		for (w = pn->whead; w != NULL; w = w->next) {
d77ab8
@@ -118,17 +118,18 @@ void sflag_print(void) {
d77ab8
 			else
d77ab8
 				(void)xprintf(" %.5s", p + 11);
d77ab8
 office:
d77ab8
-			if (w->host[0] != '\0') {
d77ab8
-				xprintf(" (%s)", w->host);
d77ab8
-			} else {
d77ab8
 			if (pn->office)
d77ab8
 				(void)xprintf(" %-10.10s", pn->office);
d77ab8
-			else if (pn->officephone)
d77ab8
+			else
d77ab8
 				(void)xprintf(" %-10.10s", " ");
d77ab8
 			if (pn->officephone)
d77ab8
-				(void)xprintf(" %-.14s",
d77ab8
+				(void)xprintf(" %-14.14s",
d77ab8
 				    prphone(pn->officephone));
d77ab8
-			}
d77ab8
+			else if (w->host[0] != '\0')
d77ab8
+				(void)xprintf(" %-14.14s", " ");
d77ab8
+
d77ab8
+			if (w->host[0] != '\0')
d77ab8
+				xprintf(" (%s)", w->host);
d77ab8
 			xputc('\n');
d77ab8
 		}
d77ab8
 	}