diff y4-funcs.sh @ 11:3565d93c2fb1

add mpsplit.pl
author HIROSE Yuuji <yuuji@gentei.org>
date Mon, 20 Jul 2015 18:09:20 +0900
parents 3db7524d3dea
children f2204bd941d5
line wrap: on
line diff
--- a/y4-funcs.sh	Mon Jul 20 11:53:05 2015 +0900
+++ b/y4-funcs.sh	Mon Jul 20 18:09:20 2015 +0900
@@ -442,7 +442,7 @@
    esac)
 }
 mktempd() {
-  TMPDIR=$tmpdir mktemp -d -t $session
+  TMPDIR=$tmpd mktemp -d -t $session
 }
 getval() {
   # $1=table $2=col $3(optional)=condition
@@ -939,7 +939,7 @@
 cgiinit() {
   session=`date +%F-$$`
   tmpf=tmp/stream
-  tmpd=`mktempd`
+  tmpd=`tmpd=$tmpdir mktempd`
   tmpfiles=$tmpfiles" $tmpd"
   addsession $session
   getcookie
@@ -954,12 +954,13 @@
   case "$CONTENT_TYPE" in
     *boundary*)
       bndry=${CONTENT_TYPE#*boundary=}
-      for us in `LC_CTYPE=C ./mpsplit.rb "$bndry" $tmpdir < $tmpf`
+      #for us in `LC_CTYPE=C ./mpsplit.rb "$bndry" $tmpdir < $tmpf`
+      for us in `LC_CTYPE=C ./mpsplit.pl "$bndry" $tmpdir < $tmpf`
       do
 	k=${us%%\=*}
 	#echo u=$us
-	# v="`echo ${us#*=}|nkf -Ww -mQ|sed -e 's/=/=3d/g' -e 's/\"/=22/g'`"
-	v="`echo ${us#*=}|nkf -Ww -mQ|sed -e 's/\"/\"\"/g'`"
+	#v="`echo ${us#*=}|nkf -Ww -mQ|sed -e 's/\"/\"\"/g'`"
+	v="`echo ${us#*=}|unhexize`"
  # err k=$k v=$v
 	case "$k" in
 	  *:filename)

yatex.org