summaryrefslogtreecommitdiff
path: root/test/Scripts
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-09-10 04:56:59 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-09-10 04:56:59 +0000
commitf3e2d80770c43e2ae1e5ba0d6a944974087f57ae (patch)
tree98850a66b7d67f74ce2f40eccf3757beb3ce713a /test/Scripts
parentfabcb9127f278a77b8aae5673be1115390c55050 (diff)
downloadllvm-f3e2d80770c43e2ae1e5ba0d6a944974087f57ae.tar.gz
llvm-f3e2d80770c43e2ae1e5ba0d6a944974087f57ae.tar.bz2
llvm-f3e2d80770c43e2ae1e5ba0d6a944974087f57ae.tar.xz
Remove prcontext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81427 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Scripts')
-rwxr-xr-xtest/Scripts/prcontext.tcl36
1 files changed, 0 insertions, 36 deletions
diff --git a/test/Scripts/prcontext.tcl b/test/Scripts/prcontext.tcl
deleted file mode 100755
index 5ab0854b0b..0000000000
--- a/test/Scripts/prcontext.tcl
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/tclsh
-#
-# Usage:
-# prcontext <pattern> <# lines of context>
-# (for platforms that don't have grep -C)
-
-
-#
-# Get the arguments
-#
-set pattern [lindex $argv 0]
-set num [lindex $argv 1]
-
-
-#
-# Get all of the lines in the file.
-#
-set lines [split [read stdin] \n]
-
-set index 0
-foreach line $lines {
- if { [regexp $pattern $line match matchline] } {
- if { [ expr [expr $index - $num] < 0 ] } {
- set bottom 0
- } else {
- set bottom [expr $index - $num]
- }
- set endLineNum [ expr [expr $index + $num] + 1]
- while {$bottom < $endLineNum} {
- set output [lindex $lines $bottom]
- puts $output
- set bottom [expr $bottom + 1]
- }
- }
- set index [expr $index + 1]
-} \ No newline at end of file