[gnumeric] Win32: fix registry entry handling.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Win32: fix registry entry handling.
- Date: Tue, 23 Dec 2014 01:01:53 +0000 (UTC)
commit 9a14783616a98eaf5edd166f12a85db5c15bfae0
Author: Morten Welinder <terra gnome org>
Date: Mon Dec 22 20:01:14 2014 -0500
Win32: fix registry entry handling.
tools/ChangeLog | 5 +++++
tools/handle-conf-options | 23 +++++++++++++----------
2 files changed, 18 insertions(+), 10 deletions(-)
---
diff --git a/tools/ChangeLog b/tools/ChangeLog
index bfa9f0b..220b3a2 100644
--- a/tools/ChangeLog
+++ b/tools/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-22 Morten Welinder <terra gnome org>
+
+ * handle-conf-options (create_reg): Improve handling of embedded
+ quotes. Fix handling of string lists.
+
2014-09-25 Morten Welinder <terra gnome org>
* Release 1.12.18
diff --git a/tools/handle-conf-options b/tools/handle-conf-options
index 399e837..9a0fbbf 100644
--- a/tools/handle-conf-options
+++ b/tools/handle-conf-options
@@ -698,27 +698,30 @@ sub create_reg {
} elsif ($type eq 'float') {
printf "\"%s\"", $default;
} elsif ($type eq 'string') {
- printf "\"%s\"", $default;
+ print "e_c_string ($default);
} elsif ($type eq 'list:string') {
- print "\"";
+ print "hex(1):";
$default = "" unless defined $default;
if ($default =~ s{^\[(.*)\]$}{$1}) {
+ my $l = 7 + length ($var);
while ($default ne '') {
+ if ($l > 40) {
+ print "\\\n";
+ $l = 0;
+ }
if ($default =~ m{^,}) {
- print "\n";
+ print "0a,00,";
+ $l += 6;
$default = substr ($default, 1);
- } elsif ($default =~ m{^\\.}) {
- print "\\" if $default =~ m{^\\[\\""]};
- print substr ($default, 1, 1);
- $default = substr ($default, 2);
} else {
- print substr ($default, 0, 1);
+ my $c = ord (substr ($default, 0, 1));
+ printf("%02x,00,", $c);
+ $l += 6;
$default = substr ($default, 1);
}
}
- print "\n";
+ print "00,00";
}
- print "\"";
} else {
die "$0: Unhandled type $type\n";
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]