Index: pcb-rnd-poll.cgi =================================================================== --- pcb-rnd-poll.cgi (nonexistent) +++ pcb-rnd-poll.cgi (revision 1585) @@ -0,0 +1,335 @@ +#!/bin/bash + +root=src +db=db +sesdir=$db/session +CGI="/cgi-bin/pcb-rnd-poll.cgi" +spiral=/home/igor2/C/c_exp/captcha/src/captcha/main + +session_fields="SES_EMAIL SES_CAPTCHA" + +# how much each choice is worth when calculating scores +choice2score=' +BEGIN { + SCORE[0] = 15 + SCORE[1] = 10 + SCORE[2] = 6 + SCORE[3] = 3 + SCORE[4] = 1 + SCORE[5] = 0 +} +' + +# ordered list of choices from 0 +choices='I would use pcb-rnd in production for this feature and hereby sign up for testing the feature +I hereby sign up for testing this feature in pcb-rnd +I would definitely download and try pcb-rnd if it already had this feature +I would maybe try pcb-rnd if it had this feature +This feature is interesting, I would maybe use it in mainline, but it is not important enough for me to try pcb-rnd +I do not need this feature at all +' + +# someone is a tester if choice is < $tester_thrs +tester_thrs=2 + +fix_ltgt() +{ + sed "s//\>/g" +} + +qs=`echo "$QUERY_STRING" | tr "&" "\n"` + +for n in $qs +do + exp="QS_$n" + export $exp +done + +get_score() +{ + bn=`basename $1` + fn="$db/votes/$bn" + if test ! -f $fn + then + echo "0" + return + fi +# format: choice|email + awk -F "[|]" ' + (NF > 1) { + choice=$1 + mail=$2 + VOTES[mail] = choice + } + + '"$choice2score"' + + END { + for(n in VOTES) + score += SCORE[VOTES[n]] + print score + } + ' < $fn +} + +render_vote_section() +{ + local old_ifs val n +# echo " $n" + val=$(($val+1)) + done +# echo "" + echo "
None of the above (remove my vote)" + IFS="$old_ifs" +# echo "" +} + +do_list() +{ + local l score name short long bn + while read l + do + score=`get_score $l` + echo "$score $l" + done | sort -n -r | while read score name + do + bn=`basename $name` + echo "" + if test -f $name/icon.png + then + echo "" + else + echo " " + fi + short=`cat $name/short` + long=`cat $name/long` + echo " $score " + echo "[$bn]
$short$long" + echo "

" + if test -z "$QS_SID" + then + echo " start voting " + else + render_vote_section $bn + fi + done +} + +find_all() +{ + find "$root" -maxdepth 1 -type d -print | grep -v ".svn\|^$root\$" +} + +find_text() +{ + for n in `find_all` + do + found=`grep -- "$@" $n/short $n/long` + if test ! -z "$found" + then + echo $n + fi + done +} + +render_captcha() +{ + if test -z "$SES_CAPTCHA" + then + echo "INTERNAL ERROR generating the captcha" + return + fi + echo " ASCII version for the console user" + echo " bitmap version for the GUI user" + echo "

"
+	$spiral -n 35 -aalib "$SES_CAPTCHA" | fix_ltgt | sed "s/ *$//" | grep -v "^$"
+	echo "
" + echo " " +} + +render_userinfo() +{ + if test -z "$SES_EMAIL" + then + echo "(anonymous visitor)" + else + echo "$SES_EMAIL" + echo " (log out) " + fi +} + +render_vote_submit() +{ + if test -z "$QS_SID" + then + return + fi + echo "" +} + +render_html() +{ + local l + + if test -z "$http_hdr" + then + echo "Content-Type: text/html" + echo "" + export http_hdr=1 + fi + + while read l + do + case "$l" in + @\) + echo "
" + echo "" + ;; + *@form_sid*) echo "" ;; + *@list*) echo "$subs_list";; + *@current*) echo "$subs_current";; + *@link_cgi*) echo "" ;; + *@captcha*) render_captcha ;; + *@userinfo*) render_userinfo;; + *@vote_submit) render_vote_submit;; + *) echo "$l" ;; + esac + done +} + +rand_hex() +{ + dd if=/dev/urandom of=/dev/stdout bs=256 count=1 2>/dev/null| md5sum | awk -v len="$1" ' + { + if (len == "") + print $1 + else + print substr($1, 1, int(len)) + } + ' +} + +gen_sid() +{ + local sid n + for n in 1 2 3 4 5 6 7 8 + do + sid=`rand_hex` + if test ! -f "$sesdir/$sid" + then + echo "" > "$sesdir/$sid" + export QS_SID="$sid" + export SES_CAPTCHA=`rand_hex 6` + export SES_EMAIL="" + return + fi + done + + echo "Error creating a session" + exit 0 +} + +ses_save() +{ + local n fld + echo "" > "$sesdir/$QS_SID" + for n in $session_fields + do + fld=`eval echo "\\$$n"` + echo "$n $fld" >> "$sesdir/$QS_SID" + done +} + +ses_load() +{ + local key val + export QS_SID=`echo $QS_SID | tr -d -c "[a-fA-F0-9]"` + if test ! -f "$sesdir/$QS_SID" + then + echo "Error: invalid SID (session id)" + exit + fi + while read key val + do + case "$key" + in + SES_*) export "$key"="$val" + esac + done < "$sesdir/$QS_SID" +} + +cmd_enter() +{ + export subs_current="enter voting" + gen_sid + render_html < $root/head.html + render_html < $root/enter.html +} + +cmd_try_enter() +{ + export subs_current="entering..." + if test "$QS_captcha" != "$SES_CAPTCHA" + then + echo "Error: you got the captcha wrong, please try again." + exit + fi + cmd_list +} + +cmd_list() +{ + if test ! -z "$QS_find" + then + export subs_current="search results for $QS_find" + subs_list=`find_text "$QS_find" | do_list ` + else + export subs_current="list all" + subs_list=`find_all | do_list ` + fi + render_html < $root/head.html + render_html < $root/index.html +} + +cmd_logout() +{ + if test ! -z "$QS_SID" + then + if test -f "$sesdir/$QS_SID" + then + rm $sesdir/$QS_SID + echo "Logged out. Thank you for voting." + exit + fi + fi +} + +########## main ############ + +if test ! -z "$QS_SID" +then + ses_load +fi + + +case "$QS_cmd" +in + enter) cmd_enter ;; + try_enter) cmd_try_enter ;; + logout) cmd_logout ;; + *) cmd_list ;; +esac + + +if test ! -z "$QS_SID" +then + ses_save +fi Property changes on: pcb-rnd-poll.cgi ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: src/bbvia/long =================================================================== --- src/bbvia/long (nonexistent) +++ src/bbvia/long (revision 1585) @@ -0,0 +1,4 @@ +each via would have an optional field that'd describe which layers it connects +

+Compatibilty: mainline pcb wouldn't understand this feature +and would convert all vias tru-hole Index: src/bbvia/short =================================================================== --- src/bbvia/short (nonexistent) +++ src/bbvia/short (revision 1585) @@ -0,0 +1 @@ +blind and burried vias Index: src/clearpolyly/icon.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: src/clearpolyly/icon.png =================================================================== --- src/clearpolyly/icon.png (nonexistent) +++ src/clearpolyly/icon.png (revision 1585) Property changes on: src/clearpolyly/icon.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Index: src/clearpolyly/long =================================================================== --- src/clearpolyly/long (nonexistent) +++ src/clearpolyly/long (revision 1585) @@ -0,0 +1,11 @@ +Make the Clear Polygon flag a per layer flag for each object. If a trace +or via or pin needs to touch one poly and have a clearence to the other, +this feature makes that possible as long as the two polygons are on +different logical layer. They can be on the same physical layer, tho: +a ground trace should touch solder side ground polys but should have +a clearence to solder side Vcc polys. +

+Compatibilty: mainline pcb wouldn't understand this feature +and would convert clear polygon flags which would result in either +"touch-all" or "clear-all" for the object on the given physical layer. + Index: src/clearpolyly/short =================================================================== --- src/clearpolyly/short (nonexistent) +++ src/clearpolyly/short (revision 1585) @@ -0,0 +1 @@ +clear poly flag per layer Index: src/enter.html =================================================================== --- src/enter.html (nonexistent) +++ src/enter.html (revision 1585) @@ -0,0 +1,31 @@ + + + +

Enter voting mode

+This site is registrationless. Each user needs to vote with his/her unique +email address (one address per user allowed). Privacy policy: I will use +your email address only to: +
    +
  • avoid multiple votes per used +
  • contact you in case you signed up for testing a feature with your vote +
+Drop me a mail to pcb-rnd (at) igor2.repo.hu if you want your email address +(and votes) removed. +

+Once you "logged in" with your email address below, you are free to set or +change your vote on any of the features. Features with higher scores and +active test-offers have higher chance to get implemented, but at the end +it is always the coder's choice which feature gets his time/attention. +

+ +@ + + +
your email address +
Please type the 6 hexadecimal digits from the image below +@captcha +
+

+ + + Index: src/head.html =================================================================== --- src/head.html (nonexistent) +++ src/head.html (revision 1585) @@ -0,0 +1,14 @@ + + +

pcb-rnd feature poll

+
Currently shown: +@current + +@userinfo +
+@form_sid +Search: + +
+
+
Index: src/index.html =================================================================== --- src/index.html (nonexistent) +++ src/index.html (revision 1585) @@ -0,0 +1,31 @@ + + + +

Features

+@
+ + + +
  + score + name + description & my vote + +@list + +
+ +
  +
SUBMIT VOTE +
  +
+
+@vote_submit +
+ + + +
+ + + Index: src/pushshove/icon.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: src/pushshove/icon.png =================================================================== --- src/pushshove/icon.png (nonexistent) +++ src/pushshove/icon.png (revision 1585) Property changes on: src/pushshove/icon.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Index: src/pushshove/long =================================================================== --- src/pushshove/long (nonexistent) +++ src/pushshove/long (revision 1585) @@ -0,0 +1,5 @@ +The user defines a new forbidden zone (explicitly or implicitly by grabbing +and moving existing objects). Automatically move out objects from the forbidden +zone by changing and moving them, effectively make room for new objects. +

+Compatibilty: not affected Index: src/pushshove/short =================================================================== --- src/pushshove/short (nonexistent) +++ src/pushshove/short (revision 1585) @@ -0,0 +1 @@ +push & shove Index: src/splitline/icon.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: src/splitline/icon.png =================================================================== --- src/splitline/icon.png (nonexistent) +++ src/splitline/icon.png (revision 1585) Property changes on: src/splitline/icon.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Index: src/splitline/long =================================================================== --- src/splitline/long (nonexistent) +++ src/splitline/long (revision 1585) @@ -0,0 +1,4 @@ +action and GUI/key binding to split an existing segment of a trace +into two by inserting a new endpoint at an arbitrary position. +

+Compatibilty: not affected Index: src/splitline/short =================================================================== --- src/splitline/short (nonexistent) +++ src/splitline/short (revision 1585) @@ -0,0 +1 @@ +split line segments by inserting new points Index: src/textinv/icon.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: src/textinv/icon.png =================================================================== --- src/textinv/icon.png (nonexistent) +++ src/textinv/icon.png (revision 1585) Property changes on: src/textinv/icon.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Index: src/textinv/long =================================================================== --- src/textinv/long (nonexistent) +++ src/textinv/long (revision 1585) @@ -0,0 +1,7 @@ +Be able to write text in inverse, as a cutout on a rectangle. This is useful on +silk layer, especially with small fonts and/or toner transfer. +

+Compatibilty: mainline pcb wouldn't understand this feature +and would convert the text to normal + + Index: src/textinv/short =================================================================== --- src/textinv/short (nonexistent) +++ src/textinv/short (revision 1585) @@ -0,0 +1 @@ +inverse text Index: src/textln/icon.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: src/textln/icon.png =================================================================== --- src/textln/icon.png (nonexistent) +++ src/textln/icon.png (revision 1585) Property changes on: src/textln/icon.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Index: src/textln/long =================================================================== --- src/textln/long (nonexistent) +++ src/textln/long (revision 1585) @@ -0,0 +1,5 @@ +be able to manually change width of text lines, regardless of the font size +

+Compatibilty: mainline pcb wouldn't understand this feature +and would convert the text to the default line width + Index: src/textln/short =================================================================== --- src/textln/short (nonexistent) +++ src/textln/short (revision 1585) @@ -0,0 +1 @@ +manual text line width \ No newline at end of file Index: src/tracelen/icon.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: src/tracelen/icon.png =================================================================== --- src/tracelen/icon.png (nonexistent) +++ src/tracelen/icon.png (revision 1585) Property changes on: src/tracelen/icon.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Index: src/tracelen/long =================================================================== --- src/tracelen/long (nonexistent) +++ src/tracelen/long (revision 1585) @@ -0,0 +1,9 @@ +trace length calculation that: +

    +
  • considers overlapping traces +
  • consdiers tee junctions +
  • displays length on the drawing +
  • displays in real-time so manual trace length optimisation is possible +
+

+Compatibilty: not affected Index: src/tracelen/short =================================================================== --- src/tracelen/short (nonexistent) +++ src/tracelen/short (revision 1585) @@ -0,0 +1 @@ +better trace length calculations Index: src/windows/icon.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: src/windows/icon.png =================================================================== --- src/windows/icon.png (nonexistent) +++ src/windows/icon.png (revision 1585) Property changes on: src/windows/icon.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Index: src/windows/long =================================================================== --- src/windows/long (nonexistent) +++ src/windows/long (revision 1585) @@ -0,0 +1,4 @@ +Port pcb-rnd to windows using the gtk HID. +

+Compatibilty: not affected + Index: src/windows/short =================================================================== --- src/windows/short (nonexistent) +++ src/windows/short (revision 1585) @@ -0,0 +1 @@ +windows port