summary refs log tree commit diff stats
path: root/contrib/plaintext
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-06-07 19:08:17 -0400
committerDrew DeVault <sir@cmpwn.com>2019-06-07 19:08:17 -0400
commit6b7da37235092f2500de8354030b58d0cc7a25ef (patch)
tree1c3d181e840fd0457c8c03c4b32deeaaf0e411fd /contrib/plaintext
parenta6787fa5d1e0f88b35c981593da0190ef3a0b27f (diff)
downloadaerc-6b7da37235092f2500de8354030b58d0cc7a25ef.tar.gz
Fix hldiff regex for short stats
Diffstat (limited to 'contrib/plaintext')
-rwxr-xr-xcontrib/plaintext1
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/plaintext b/contrib/plaintext
index 1ed97e3..b7feb44 100755
--- a/contrib/plaintext
+++ b/contrib/plaintext
@@ -1,4 +1,5 @@
 #!/usr/bin/env -S awk -f
+# vim: set ft=awk :
 BEGIN {
 	dim = "\x1B[2m"
 	cyan = "\x1B[36m"
static double /* simple pow() */ spow(double x, double y) { @@ -110,6 +92,24 @@ tile(void) { LAYOUTS +static void +incratio(const char *arg, double *ratio, double def) { + double delta; + + if(lt->arrange != tile) + return; + if(!arg) + *ratio = def; + else { + if(1 == sscanf(arg, "%lf", &delta)) { + if(delta + (*ratio) < .1 || delta + (*ratio) > 1.9) + return; + *ratio += delta; + } + } + lt->arrange(); +} + /* extern */ void