Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/windirstat.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorOliver Schneider <oliver@assarbad.net>2014-01-20 06:43:52 +0400
committerOliver Schneider <oliver@assarbad.net>2014-01-20 06:43:52 +0400
commitc3313df99eaa7b321fa21488affc585fc05df065 (patch)
treeb0249f1fb476c211c70b8a5d2ecb785429eb90b2 /common
parentca3981f3edb676685c34339c0d8e6dfeeba859c5 (diff)
Removing a few obsolete files
Diffstat (limited to 'common')
-rw-r--r--common/bin2c.lua67
-rw-r--r--common/extract_res.pl229
-rw-r--r--common/rsrc-template.xml140
3 files changed, 0 insertions, 436 deletions
diff --git a/common/bin2c.lua b/common/bin2c.lua
deleted file mode 100644
index 01bd50c..0000000
--- a/common/bin2c.lua
+++ /dev/null
@@ -1,67 +0,0 @@
-local description = [=[
-Usage: lua bin2c.lua [+]filename [status]
-
-Write a C source file to standard output. When this C source file is
-included in another C source file, it has the effect of loading and
-running the specified file at that point in the program.
-
-The file named by 'filename' contains either Lua byte code or Lua source.
-Its contents are used to generate the C output. If + is used, then the
-contents of 'filename' are first compiled before being used to generate
-the C output. If given, 'status' names a C variable used to store the
-return value of either luaL_loadbuffer() or lua_pcall(). Otherwise,
-the return values of these functions will be unavailable.
-
-This program is (overly) careful to generate output identical to the
-output generated by bin2c5.1 from LuaBinaries.
-
-http://lua-users.org/wiki/BinTwoCee
-]=]
-
-if not arg or not arg[1] then
- io.stderr:write(description)
- return
-end
-
-local compile, filename = arg[1]:match"^(+?)(.*)"
-local status = arg[2]
-local arrname = arg[3] and arg[3] or "B1"
-
-local content = compile=="+"
- and string.dump(assert(loadfile(filename)))
- or assert(io.open(filename,"rb")):read"*a"
-
-local dump do
- local numtab={}; for i=0,255 do numtab[string.char(i)]=("%3d,"):format(i) end
- function dump(str)
- return (str:gsub(".", numtab):gsub(("."):rep(80), "%0\n"))
- end
-end
-
-local function boilerplate(content, fmt)
- local basename = filename:match("([^\\/]+)$")
- if basename then
- filename = basename
- end
- return string.format(fmt,
- filename,
- arrname,
- dump(content),
- status and status.." = " or "",
- arrname,
- arrname,
- filename,
- status and status.." = " or "",
- filename)
-end
-
-io.write(boilerplate(content, [=[
-/* Code automatically generated by bin2c -- DO NOT EDIT */
-/* %s */
-static const unsigned char %s[]={
-%s
-};
-
-/* if (0 == (%sluaL_loadbuffer(L,(const char*)%s,sizeof(%s),%q)))
- %slua_pcall(L, 0, 0, 0); */
-]=]))
diff --git a/common/extract_res.pl b/common/extract_res.pl
deleted file mode 100644
index bccc301..0000000
--- a/common/extract_res.pl
+++ /dev/null
@@ -1,229 +0,0 @@
-#!/usr/bin/perl
-use strict;
-use warnings;
-
-# Take English as the baseline
-open(FILE, '<../windirstat/windirstat-utf8.rc');
-my @fconts = <FILE>;
-close(FILE);
-my %strings;
-# Read all the string IDs first of all
-#slurpStrings(\%strings, \@fconts);
-#slurpMenus(\%strings, \@fconts);
-slurpControls(\%strings, \@fconts);
-
-while(my ($key, $value) = each(%strings))
-{
- print "{$key}\n\t$value\n";
-}
-
-# Parse strings (STRINGTABLE and childs) from RC scripts
-sub slurpStrings
-{
- my ($refStrings, $refArray) = @_;
- my ($insidest, $currstr) = (0, undef); # inside a string table?
- foreach my $line (@{$refArray})
- {
- if($line =~ m/^STRINGTABLE/)
- {
- die "Ouch, nested string tables??? [$line]" if($insidest);
- $insidest++;
- }
- elsif(($insidest > 0) and ($line =~ m/^BEGIN/))
- {
- $insidest++; # This is the BEGIN marker of a string table
- }
- elsif(($insidest > 1) and ($line =~ m/^END/))
- {
- $insidest = 0; # We are leaving a string table
- }
- elsif($insidest > 1) # Must be a string inside a string table
- {
- if($currstr)
- {
- $currstr .= $line; # Append current line
- }
- else
- {
- $currstr = $line;
- }
- $currstr =~ s/[\n\r]//gism; # Strip any line breaks
- # Next round if we don't have a quoted string just yet
- if($currstr =~ m/"/)
- {
- # Extract the string ID and the actual string contents
- my ($stringid, $string) = $currstr =~ m/^\s*([A-Za-z_0-9]+)\s+(".+)$/;
- if($stringid and $string)
- {
- # Now let's clean up the strings
- $refStrings->{$stringid} = cleanupString($string);
- }
- else
- {
- print "ERROR PARSING [$currstr]\n";
- }
- $currstr = undef;
- }
- }
- }
-}
-
-# Parse menus (MENUITEM + POPUP) from RC scripts
-sub slurpMenus
-{
- my ($refStrings, $refArray) = @_;
- my ($insidemn, $currstr, $cnt) = (0, undef, 0); # inside a menu?
- foreach my $line (@{$refArray})
- {
- if($line =~ m/^\s*?([A-Za-z0-9_]+)\s+MENU/)
- {
- die "Ouch, nested menus??? [$line]" if($insidemn);
- $insidemn++;
- }
- elsif(($insidemn > 0) and ($line =~ m/^\s*?BEGIN/))
- {
- $insidemn++; # This is the BEGIN marker of a menu
- }
- elsif(($insidemn > 1) and ($line =~ m/^\s*?END/))
- {
- $insidemn--; # We are leaving a menu
- if($insidemn == 1)
- {
- $insidemn--;
- }
- }
- elsif($insidemn > 1) # Must be something inside a menu
- {
- $currstr = $line;
- $currstr =~ s/[\n\r]//gism; # Strip any line breaks
- # Next round if we don't have a quoted string just yet
- # Extract the ID and the actual string contents
- my ($stringid, $string) = (undef, undef);
- unless($currstr =~ /^\s*?MENUITEM\s+?SEPARATOR/)
- {
- # Parse POPUP item
- ($stringid, $string) = $currstr =~ m/^\s*(POPUP)\s+(".+)$/;
- # Not a POPUP item?
- unless($stringid and $string)
- {
- # Parse MENUITEM item
- ($stringid, $string) = $currstr =~ m/^\s*(MENUITEM)\s+(".+)$/;
- if($stringid and $string)
- {
- ($string, $stringid) = $string =~ m/^(".+?),\s*([A-Za-z0-9_]+)\s*$/;
- $stringid = "MENUITEM_" . $stringid;
- }
- }
- else
- {
- $stringid = "POPUP_" . $stringid . sprintf("%03d", $cnt++);
- }
- if($stringid and $string)
- {
- # Now let's clean up the strings
- $refStrings->{$stringid} = cleanupString($string);
- }
- else
- {
- print "ERROR PARSING [$currstr]\n";
- }
- }
- }
- }
-}
-
-# Parse dialogs (DIALOGEX and child controls) from RC scripts
-sub slurpControls
-{
- my ($refStrings, $refArray) = @_;
- my ($insidectl, $currstr, $cnt) = (0, undef, 0); # inside a menu?
- foreach my $line (@{$refArray})
- {
- if($line =~ m/^\s*?([A-Za-z0-9_]+)\s+DIALOGEX?/)
- {
- $currstr = $1; # Use the ID
- die "Ouch, nested dialogs??? [$line]" if($insidectl);
- $insidectl++;
- }
- elsif(($insidectl > 0) and ($line =~ m/^\s*?CAPTION/))
- {
- $insidectl++; # This is the BEGIN marker of a menu
- }
- elsif(($insidectl > 0) and ($line =~ m/^\s*?BEGIN/))
- {
- $insidectl++; # This is the BEGIN marker of a menu
- }
- elsif(($insidectl > 1) and ($line =~ m/^\s*?END/))
- {
- $insidectl--; # We are leaving a menu
- if($insidectl == 1)
- {
- $insidectl--;
- }
- }
- }
-}
-
-sub cleanupString
-{
- my ($value) = @_;
- my ($retval) = $value =~ m/^[^"]*"(.+?)"[^"]*$/;
- $retval =~ s/\\r//gism;
- $retval =~ s/""/"/gism;
- return $retval;
-}
-
-__END__
-
-# Go through the folder, looking for non-English resources
-foreach my $folder (<../wdsr*>)
-{
- next unless( -d "$folder");
- convertSingleLang($folder);
-}
-
-# Handle a single language folder
-sub convertSingleLang
-{
- my ($folder) = @_;
- print "$folder\n";
-}
-
-
- elsif($insidectl > 1) # Must be something inside a menu
- {
- $currstr = $line;
- $currstr =~ s/[\n\r]//gism; # Strip any line breaks
- # Next round if we don't have a quoted string just yet
- # Extract the ID and the actual string contents
- my ($stringid, $string) = (undef, undef);
- unless($currstr =~ /^\s*?MENUITEM\s+?SEPARATOR/)
- {
- # Parse POPUP item
- ($stringid, $string) = $currstr =~ m/^\s*(POPUP)\s+(".+)$/;
- # Not a POPUP item?
- unless($stringid and $string)
- {
- # Parse MENUITEM item
- ($stringid, $string) = $currstr =~ m/^\s*(MENUITEM)\s+(".+)$/;
- if($stringid and $string)
- {
- ($string, $stringid) = $string =~ m/^(".+?),\s*([A-Za-z0-9_]+)\s*$/;
- $stringid = "MENUITEM_" . $stringid;
- }
- }
- else
- {
- $stringid = "POPUP_" . $stringid . sprintf("%03d", $cnt++);
- }
- if($stringid and $string)
- {
- # Now let's clean up the strings
- $refStrings->{$stringid} = cleanupString($string);
- }
- else
- {
- print "ERROR PARSING [$currstr]\n";
- }
- }
- }
diff --git a/common/rsrc-template.xml b/common/rsrc-template.xml
deleted file mode 100644
index 5fedc4b..0000000
--- a/common/rsrc-template.xml
+++ /dev/null
@@ -1,140 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- This is a work-in-progress effort to establish a text-based translation system for WDS.
- It is heavily commented for now, instead of providing a DTD or similar. This may change
- over time and release versions of this file should not contain any comments if possible.
-
- Line breaks within the XML do NOT translate into line breaks in the text that gets
- displayed. Instead the translator has to give the well-known <br /> in places where
- it is needed.
-
- TBD: Allow <br /> also inside attributes in its masked form, i.e. "&lt;br /&gt;"? Probably not!
--->
-<application name="WinDirStat" version="0x00010003">
- <localization>
- <!--
- List of languages
-
- If you correct or amend an existing translation you must never remove the existing
- entries of previous translators!
- -->
- <languages>
- <!--
- "id" attribute is the three-letter ISO code of the language
- "name" is the English name of the language
- "authors" is a comma-separated list of IDs of "author" elements elsewhere
- "priority" can have a comma-separated combination of the following three
- values: "fallback", "locale" and "select". The first always takes
- precedence. "fallback" can only occur once in all languages. If it
- occurs more than once, the first one is automatically used and a
- warning is issued.
- The content of the element is the name of the language in its native form.
- -->
- <language id="enu" name="English" authors="wds_team" priority="select,locale,fallback">English</language>
- <language id="deu" name="German" authors="wds_team" priority="select,locale">Deutsch</language>
- <language id="rus" name="Russian" authors="polyetayev_s" priority="select,locale">Русский</language>
- <!--
- The "id" values determine the name of the elements used throughout this
- file
- -->
- </languages>
- <!--
- List of authors
-
- This is a list of the authors that can be referenced from within the "authors"
- attribute whereever applicable.
- -->
- <authors>
- <!--
- The contents of the "author" elements can contain a subset of simple HTML
- directives (yet to be decided!)
- NOTE: These elements should only contain names, formatting and hyperlinks.
- They will be used in a language-neutral fashion in the About dialog.
- -->
- <author id="wds_team"><a href="http://windirstat.info" target="_blank">WinDirStat team</a></author>
- <author id="polyetayev_s">Sergiy 'Полет' Polyetayev</author>
- </authors>
- <!--
- List of menus
-
- This is a list of menus used by the program. A menu *must* be identified by its
- ID and thus has to provide an "id" attribute in all cases.
- -->
- <menu id="main_menu">
- <!--
- "popup" is a special element that defines a sub-menu of a menu (i.e. nesting)
-
- A popup element may have an "id" attribute if it needs to be referenced
- explicitly from within the program, but it doesn't have to.
- -->
- <popup>
- <!--
- Each language gets its own entry.
-
- Here an incomplete example with English, German and Russian.
- -->
- <text language="enu">File</text>
- <text language="deu">Datei</text>
- <text language="rus">Файл</text>
- <!--
- Items in turn get one language entry each as well
- -->
- <item>
- <text language="enu">Open</text>
- <text language="deu">Öffnen</text>
- <text language="rus">Открыть</text>
- </item>
- <!--
- Menu separators are "empty" items with the "separator" attribute set to "separator"
- -->
- <item separator="separator" />
- <item>
- <text language="enu">Refresh all</text>
- <text language="deu">Alles aktualisieren</text>
- <text language="rus">Обновить все</text>
- </item>
- <item>
- <text language="enu">Refresh selected</text>
- <text language="deu">Markierung aktualisieren</text>
- <text language="rus">Обновить выделенные элементы</text>
- </item>
- <item separator="separator" />
- <item>
- <text language="enu">Quit</text>
- <text language="deu">Beenden</text>
- <text language="rus">Выход</text>
- </item>
- </popup>
- <popup>
- <text language="enu">Edit</text>
- <text language="deu">Bearbeiten</text>
- <text language="rus">Редактировать</text>
- </popup>
- <popup>
- <text language="enu">Cleanup</text>
- <text language="deu">Aufräumen</text>
- <text language="rus">Очистка</text>
- </popup>
- <popup>
- <text language="enu">Treemap</text>
- <text language="deu">Baumkarte</text>
- <text language="rus">Структура каталогов</text>
- </popup>
- <popup>
- <text language="enu">Report</text>
- <text language="deu">Bericht</text>
- <text language="rus">Отчет</text>
- </popup>
- <popup>
- <text language="enu">Options</text>
- <text language="deu">Optionen</text>
- <text language="rus">Настройки</text>
- </popup>
- <popup id="help_menu">
- <text language="enu">Help</text>
- <text language="deu">Hilfe</text>
- <text language="rus">Помощь</text>
- </popup>
- </menu>
- <localization>
-</application>