diff --git a/slist.c b/slist.c index 23e355a..61b0b97 100644 --- a/slist.c +++ b/slist.c @@ -33,10 +33,6 @@ static unsigned long node_to_number(uint8 *addr) unsigned long n = 0; int i; - /* - * Novell SLIST displays the node field right-aligned in a 12 character - * bracketed field. For a node like 000000000001 this appears as " 1". - */ for (i = 4; i < 10; i++) n = (n << 8) + addr[i]; @@ -81,11 +77,14 @@ int func_slist(int argc, char *argv[], int mode) upstr(pattern); /* - * Match Novell SLIST spacing closely: - * name column 44 chars, then Network / Node Address / Status. + * Match Novell SLIST layout: + * "Known NetWare File Servers" at column 1, + * "Network" at column 45, "Node Address" at column 54. */ - fprintf(stdout, "Known NetWare File Servers Network Node Address Status\n"); - fprintf(stdout, "------------------------- -------- -------------------\n"); + fprintf(stdout, "%-44sNetwork Node Address Status\n", + "Known NetWare File Servers"); + fprintf(stdout, "%-44s-------- -------------------\n", + "-------------------------"); while ((result = ncp_17_37(last_id, NCP_BINDERY_FSERVER, pattern, &obj)) == 0) {