commit 93f44ca841be46cc02f3c95a71c731804fc5fd81
Author: Mattias Andrée <maandree_AT_kth.se>
AuthorDate: Mon Jan 16 07:45:27 2017 +0100
Commit: Mattias Andrée <maandree_AT_kth.se>
CommitDate: Mon Jan 16 07:45:27 2017 +0100
Add blind-rotate-90, blind-rotate-180, and blind-rotate-270
Signed-off-by: Mattias Andrée <maandree_AT_kth.se>
diff --git a/.gitignore b/.gitignore
index d29a89a..62daebd 100644
--- a/.gitignore
+++ b/.gitignore
_AT_@ -8,3 +8,6 @@
*.o
*.out
/blind-*
+!/blind-rotate-90
+!/blind-rotate-180
+!/blind-rotate-270
diff --git a/Makefile b/Makefile
index 690a3e9..cee5f8c 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -33,6 +33,11 @@ BIN =\
blind-transpose\
blind-write-head
+SCRIPTS =\
+ blind-rotate-90\
+ blind-rotate-180\
+ blind-rotate-270
+
all: $(BIN)
%: %.o util.o stream.o
diff --git a/blind-rotate-180 b/blind-rotate-180
new file mode 100755
index 0000000..73cbd15
--- /dev/null
+++ b/blind-rotate-180
_AT_@ -0,0 +1,18 @@
+#!/bin/sh
+
+set -e
+
+if ! test $# = 0; then
+ if test "$1" = --; then
+ shift 1
+ fi
+ if ! test $# = 0; then
+ printf 'usage: %s\n' "$0" >&2
+ exit 1
+ fi
+fi
+
+flip="$(printf '%s\n' "$0" | sed 's/[^/]*$/blind-flip/')"
+flop="$(printf '%s\n' "$0" | sed 's/[^/]*$/blind-flop/')"
+
+"$flip" | "$flop"
diff --git a/blind-rotate-270 b/blind-rotate-270
new file mode 100755
index 0000000..77305ca
--- /dev/null
+++ b/blind-rotate-270
_AT_@ -0,0 +1,18 @@
+#!/bin/sh
+
+set -e
+
+if ! test $# = 0; then
+ if test "$1" = --; then
+ shift 1
+ fi
+ if ! test $# = 0; then
+ printf 'usage: %s\n' "$0" >&2
+ exit 1
+ fi
+fi
+
+transpose="$(printf '%s\n' "$0" | sed 's/[^/]*$/blind-transpose/')"
+flop="$( printf '%s\n' "$0" | sed 's/[^/]*$/blind-flop/')"
+
+"$flop" | "$transpose"
diff --git a/blind-rotate-90 b/blind-rotate-90
new file mode 100755
index 0000000..bbecc5b
--- /dev/null
+++ b/blind-rotate-90
_AT_@ -0,0 +1,18 @@
+#!/bin/sh
+
+set -e
+
+if ! test $# = 0; then
+ if test "$1" = --; then
+ shift 1
+ fi
+ if ! test $# = 0; then
+ printf 'usage: %s\n' "$0" >&2
+ exit 1
+ fi
+fi
+
+transpose="$(printf '%s\n' "$0" | sed 's/[^/]*$/blind-transpose/')"
+flop="$( printf '%s\n' "$0" | sed 's/[^/]*$/blind-flop/')"
+
+"$transpose" | "$flop"
Received on Mon Jan 16 2017 - 07:46:40 CET
This archive was generated by hypermail 2.3.0
: Mon Jan 16 2017 - 07:48:18 CET