opttbl.c.diff   [plain text]


--- opttbl.c.orig	2005-01-06 17:32:19.000000000 -0800
+++ opttbl.c	2005-02-18 19:04:17.000000000 -0800
@@ -46,6 +46,7 @@
 public int twiddle;             /* Show tildes after EOF */
 public int show_attn;		/* Hilite first unread line */
 public int shift_count;		/* Number of positions to shift horizontally */
+public int dashn_numline_count;	/* Number of lines override (Unix 2003) */
 public int status_col;		/* Display a status column */
 public int use_lessopen;	/* Use the LESSOPEN filter */
 #if HILITE_SEARCH
@@ -417,6 +418,26 @@
 			NULL
 		}
 	},
+	/* The following entries are added to support UNIX 2003 
+	   compatibility. Each is used because the original option
+	   was already defined in "less".
+	 */
+	{ ']', NULL,
+		NUMBER, 0, &dashn_numline_count, NULL,
+		{	/* This entry maps from the -n option */
+			NULL,
+			NULL,
+			NULL
+		}
+	},
+	{ '}', NULL,
+		STRING, 0, NULL, opt_dashp,
+		{	/* This entry maps from the -p option */
+			NULL,
+			NULL,
+			NULL
+		}
+	},
 	{ '\0', NULL, NOVAR, 0, NULL, NULL, { NULL, NULL, NULL } }
 };