X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-test.git;a=blobdiff_plain;f=pctb%2Fdictionary-manager;h=d9de00cb99da21296c1142952e15a2eb4961e23c;hp=365aecb01fb1184fc865faa979ae58bba551ff81;hb=9c4e6ae34ea06c776ebbf5410f7bc1ce78edad2f;hpb=21b1420b1f35ea2ae9440f9db9009093a8b6eae2 diff --git a/pctb/dictionary-manager b/pctb/dictionary-manager index 365aecb..d9de00c 100755 --- a/pctb/dictionary-manager +++ b/pctb/dictionary-manager @@ -42,6 +42,9 @@ # if it wrote a byte to fd 4, it can take another question +set aadepth 2 + + #---------- library routines ---------- proc manyset {list args} { @@ -514,7 +517,7 @@ proc upload_status {} { } proc maybe_upload_entry {im def} { - global reqkind privacy_setting env dbname quiet + global reqkind privacy_setting env dbname quiet aadepth debug "DB-UPDATE PRIVACY $privacy_setting" if {!$privacy_setting} return @@ -523,6 +526,8 @@ proc maybe_upload_entry {im def} { set pl {} lappend pl dict $dbname + lappend pl version 3 + lappend pl depth $aadepth if {$privacy_setting>=2} { set pirate [string totitle $env(YPPSC_PIRATE)] @@ -690,9 +695,11 @@ proc char_read_pgm {f} { append o $ointerl } -# debug "DATA $o" - set data [exec pnmscale 1 << $o] - image create photo image/main -data $data + debug "DATA1 $o" + set tmpfile ./#dictimage#.tmp + exec pnmscale 1 << $o >$tmpfile + image create photo image/main -file $tmpfile + file delete $tmpfile } #---------- character set editor display ---------- @@ -898,7 +905,7 @@ proc recursor {} { # $database($context 0x 0x...) = $hex -set database_magic/char {# ypp-sc-tools pctb font v2} +set database_magic/char "# ypp-sc-tools pctb font v3 depth=$aadepth" proc read_database_header/char {f} { global rows @@ -1134,10 +1141,10 @@ proc chop_counted {var} { } proc approve_decompose_data {specdata} { - global data + global data aadepth set data $specdata - regsub-data {^ypp-sc-tools dictionary update v2\n} {} + regsub-data "^ypp-sc-tools dictionary update v3 depth=$aadepth\\n" {} uplevel 1 chop_counted pirate uplevel 1 chop_counted caller uplevel 1 chop_counted dict