about summary refs log tree commit diff stats
path: root/cpp
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-05-01 23:50:45 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-05-01 23:50:45 -0700
commitfb91839e1e78956e39c661b532137249f5fef451 (patch)
tree749b752aa01a73db181f40995f07f4abeffef8b0 /cpp
parentc2089aaa653852c3a3f5e100658f74ec6dc62fb8 (diff)
downloadmu-fb91839e1e78956e39c661b532137249f5fef451.tar.gz
1236
Diffstat (limited to 'cpp')
-rw-r--r--cpp/tangle/030tangle.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/cpp/tangle/030tangle.cc b/cpp/tangle/030tangle.cc
index 33ff6e28..407cd23e 100644
--- a/cpp/tangle/030tangle.cc
+++ b/cpp/tangle/030tangle.cc
@@ -283,7 +283,6 @@ list<Line>::iterator balancing_curly(list<Line>::iterator curr) {
 
 // A scenario is one or more sessions separated by calls to CLEAR_TRACE ('===')
 //  A session is one or more lines of input
-//  followed by a return value ('=>')
 //  followed by one or more lines expected in trace in order ('+')
 //  followed by one or more lines trace shouldn't include ('-')
 //  followed by one or more lines expressing counts of specific layers emitted in trace ('$')
@@ -335,7 +334,7 @@ void emit_test(const string& name, list<Line>& lines, list<Line>& result) {
 
 bool is_input(const string& line) {
   if (line.empty()) return true;
-  return line != "===" && line[0] != '+' && line[0] != '-' && !starts_with(line, "=>") && line[0] != '$' && line[0] != '?';
+  return line != "===" && line[0] != '+' && line[0] != '-' && line[0] != '$' && line[0] != '?';
 }
 
 Line input_lines(list<Line>& hunk) {
#dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
# Copyright (c) 2009, 2010 hut <hut@lavabit.com>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

def move_between(current, minimum, maximum, relative=0, absolute=None):
	i = current
	if isinstance(absolute, int):
		i = absolute
	if isinstance(relative, int):
		i += relative
	i = max(minimum, min(maximum - 1, i))
	return i