[24383] in Source-Commits

home help back first fref pref prev next nref lref last post

/svn/athena r23978 - in trunk/athena/bin/discuss: client debian

daemon@ATHENA.MIT.EDU (Evan Broder)
Sat Aug 29 17:21:20 2009

Date: Sat, 29 Aug 2009 17:21:07 -0400
From: Evan Broder <broder@MIT.EDU>
Message-Id: <200908292121.n7TLL7c4017844@drugstore.mit.edu>
To: source-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: broder
Date: 2009-08-29 17:21:07 -0400 (Sat, 29 Aug 2009)
New Revision: 23978

Modified:
   trunk/athena/bin/discuss/client/trn_expr.y
   trunk/athena/bin/discuss/debian/changelog
Log:
In discuss:
  * Move the single-letter checks in trn_expr.y:yylex to the bottom of the
    function so that they get caught after commands that start with those
    letters. (Trac: #346)


Modified: trunk/athena/bin/discuss/client/trn_expr.y
===================================================================
--- trunk/athena/bin/discuss/client/trn_expr.y	2009-08-26 20:22:23 UTC (rev 23977)
+++ trunk/athena/bin/discuss/client/trn_expr.y	2009-08-29 21:21:07 UTC (rev 23978)
@@ -129,10 +129,6 @@
 		cp += 4;
 		yylval=trnexpr_curtrn->next;
 		return(NEXT);
-	} else if (match(cp, "n")) {
-		cp += 1;
-		yylval=trnexpr_curtrn->next;
-		return(NEXT);
 	} else if (match(cp, "prev")) {
 		cp += 4;
 		yylval=trnexpr_curtrn->prev;
@@ -141,10 +137,6 @@
 		cp += 4;
 		yylval=trnexpr_curtrn->prev;
 		return(PREV);
-	} else if (match(cp, "b")) {
-		cp += 1;
-		yylval=trnexpr_curtrn->prev;
-		return(PREV);
  	} else if (match(cp, "nref")) {
 		cp += 4;
 		yylval=trnexpr_curtrn->nref;
@@ -169,12 +161,12 @@
 		cp += 4;
 		yylval=trnexpr_curtrn->lref;
 		return(LREF);
-	} else if (*cp=='n' || *cp=='N') {
-		cp++;
+	} else if (match(cp, "n")) {
+		cp += 1;
 		yylval=trnexpr_curtrn->next;
 		return(NEXT);
-	} else if (*cp=='p' || *cp=='P') {
-		cp++;
+	} else if (match(cp, "b") || match(cp, "p")) {
+		cp += 1;
 		yylval=trnexpr_curtrn->prev;
 		return(PREV);
   	} else if (*cp=='l' || *cp=='L') {

Modified: trunk/athena/bin/discuss/debian/changelog
===================================================================
--- trunk/athena/bin/discuss/debian/changelog	2009-08-26 20:22:23 UTC (rev 23977)
+++ trunk/athena/bin/discuss/debian/changelog	2009-08-29 21:21:07 UTC (rev 23978)
@@ -1,3 +1,11 @@
+debathena-discuss (10.0.11-0debathena1) unstable; urgency=low
+
+  * Move the single-letter checks in trn_expr.y:yylex to the bottom of the
+    function so that they get caught after commands that start with those
+    letters. (Trac: #346)
+
+ -- Evan Broder <broder@mit.edu>  Sat, 29 Aug 2009 17:20:43 -0400
+
 debathena-discuss (10.0.10-0debathena2) unstable; urgency=low
 
   * Depend on Kerberos-enabled zephyr instead of build-depending.


home help back first fref pref prev next nref lref last post