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

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