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