]> git.plutz.net Git - cgilite/commitdiff
remove obsolte escape functions
authorPaul Hänsch <paul@plutz.net>
Sat, 13 Feb 2021 21:27:50 +0000 (22:27 +0100)
committerPaul Hänsch <paul@plutz.net>
Sat, 13 Feb 2021 21:27:50 +0000 (22:27 +0100)
storage.sh

index a8484b0514891fe3e7d6f3cfdbb55fba655cb61a..82d3d77b8edf9e34cb237aa685a8228b8fd0d150 100755 (executable)
@@ -67,20 +67,11 @@ RELEASE(){
   fi
 }
 
-STRING='
-  s;\\;\\\\;g;
-  s;\n;\\n;g;
-  s;\t;\\t;g;
-  s;\r;\\r;g;
-  s;\+;\\+;g;
-  s; ;+;g;
-'
-
-STRING_OLD(){
-  { [ $# -eq 0 ] && cat || printf %s "$*"; } \
-  | sed -E ':X; $!{N;bX;}'"$STRING"
-}
-
+# STRING='
+#   s;\\;\\\\;g; s;\t;\\t;g;
+#   s;\n;\\n;g;  s;\r;\\r;g;
+#   s;\+;\\+;g;  s; ;+;g;
+# '
 STRING(){
   local in out=''
   [ $# -gt 0 ] && in="$*" || in="$(cat)"
@@ -96,7 +87,6 @@ STRING(){
   printf '%s' "$out"
 }
 
-
 UNSTRING='
   :UNSTRING_X
   s;((^|[^\\])(\\\\)*)\\n;\1\n;g;
@@ -107,10 +97,6 @@ UNSTRING='
   s;((^|[^\\])(\\\\)*)\\\+;\1+;g;
   s;\\\\;\\;g;
 '
-UNSTRING_OLD(){
-  { [ $# -eq 0 ] && cat || printf %s "$*"; } \
-  | sed -E "$UNSTRING"
-}
 UNSTRING(){
   local in out=''
   [ $# -gt 0 ] && in="$*" || in="$(cat)"