ref: 5cf42c28a0223319b7744ce57bfeeea7dd70a850
parent: c078d804a64b2d8ccc210a27bcaead96f26dfeca
author: uriel <[email protected]>
date: Fri Sep 26 07:09:18 EDT 2008
Syntax fix and other minnor improvements
--- a/bin/cgilib.rc
+++ b/bin/cgilib.rc
@@ -10,13 +10,13 @@
exit
}
-fn setvars {
+fn get_post_args {
ifs='&
' for(pair in `{cat}) {
pair = `{echo -n $pair | sed 's/=/\&/'} \
ifs=() \
if(~ $pair(1) $*)
- eval $pair(1)'=`{urldecode $pair(2)}'
+ $pair(1) = `{urldecode $pair(2)}
}
}
@@ -36,6 +36,9 @@
# .rec parsing
fn parse_rec {
- sed 's/% *//; /^$/q' < $1
- sed -n '/^$/,$p' < $1
+ for(i in `{sed 's/% *//; /^$/q' < $1}) {
+ v = `{echo $i | sed 's/^/rec_/; s/=.*//;'}
+ $v = `{echo $i | sed
+ }
+ rec_data = `{sed -n '/^$/,$p' < $1}
}