[gnumeric] embedder: make data local.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] embedder: make data local.
- Date: Tue, 18 Oct 2011 18:26:36 +0000 (UTC)
commit c9cf4fe29dac9ce9ad06ed7281291e8b93022035
Author: Morten Welinder <terra gnome org>
Date: Tue Oct 18 14:23:31 2011 -0400
embedder: make data local.
NEWS | 1 +
tools/ChangeLog | 3 ++-
tools/embedder | 16 ++++++++--------
3 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/NEWS b/NEWS
index 58aca42..b3f8870 100644
--- a/NEWS
+++ b/NEWS
@@ -52,6 +52,7 @@ Morten:
* Fix stf import crash. [#658982]
* Fix leaks.
* Fix GUI crash for invalid dates.
+ * Embed ui files into the Gnumeric binary.
Valek:
* In xls import, set LABEL encoding based on FONT charset converted to
diff --git a/tools/ChangeLog b/tools/ChangeLog
index e40ec57..71e4708 100644
--- a/tools/ChangeLog
+++ b/tools/ChangeLog
@@ -1,6 +1,7 @@
2011-10-18 Morten Welinder <terra gnome org>
- * embedder (embed): Handler compression.
+ * embedder (embed): Handler compression. Make data local to
+ registration function.
2011-07-31 Morten Welinder <terra gnome org>
diff --git a/tools/embedder b/tools/embedder
index e2ae05c..23c22d4 100644
--- a/tools/embedder
+++ b/tools/embedder
@@ -27,6 +27,9 @@ foreach (@includes) {
my $fileno = 0;
my $reg = "";
my $docompress = 0;
+print "void\n";
+print "$regfunc (void)\n";
+print "{\n";
foreach my $file (@ARGV) {
if ($file eq 'COMPRESS') {
$docompress = 1;
@@ -38,16 +41,13 @@ foreach my $file (@ARGV) {
}
&embed ($file, $docompress);
}
-print "void\n";
-print "$regfunc (void)\n";
-print "{\n";
print $reg;
print "}\n";
sub embed {
my ($file, $docompress) = @_;
- print "/* Embedded file $file */\n";
+ print " /* Embedded file $file */\n";
my $data;
{
@@ -79,11 +79,11 @@ sub embed_data {
my $len = length ($data);
if ($len == 0) {
- print "static const char ${id}[] = \"\";\n";
+ print " static const char ${id}[] = \"\";\n";
return;
}
- print "static const char ${id}[] =\n";
+ print " static const char ${id}[] =\n";
my $linelen = 0;
my $nohex = 0;
foreach my $c (split (//, $data)) {
@@ -92,8 +92,8 @@ sub embed_data {
$linelen = 0;
}
if ($linelen == 0) {
- print " \"";
- $linelen += 3;
+ print " \"";
+ $linelen += 5;
}
my $thisnohex = $nohex;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]