cryptui: Use a single space after a full stop to follow the Windows GUI guidelines.

Francois Gouget fgouget at free.fr
Wed Mar 28 10:50:10 CDT 2012


---

To avoid lots of fuzzying I recommend running the attached script as 
follows:

cd po
wr --no-backup 's/are communicating.  It can also/are communicating. It can also/
wr --no-backup 's/messages.  Certificate stores/messages. Certificate stores/'


 dlls/cryptui/cryptui.rc |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/cryptui/cryptui.rc b/dlls/cryptui/cryptui.rc
index 5bd5ec1..6a4eb42 100644
--- a/dlls/cryptui/cryptui.rc
+++ b/dlls/cryptui/cryptui.rc
@@ -279,7 +279,7 @@ FONT 8, "MS Shell Dlg"
 BEGIN
   LTEXT "Welcome to the Certificate Import Wizard", IDC_IMPORT_TITLE, 115,7,195,30
   LTEXT "This wizard helps you import certificates, certificate revocation lists, and certificate trust lists from a file to a certificate store.\n\n\
-A certificate can be used to identify you or the computer with which you are communicating.  It can also be used for authentication, and to sign messages.  Certificate stores are collections of certificates, certificate revocation lists, and certificate trust lists.\n\n\
+A certificate can be used to identify you or the computer with which you are communicating. It can also be used for authentication, and to sign messages. Certificate stores are collections of certificates, certificate revocation lists, and certificate trust lists.\n\n\
 To continue, click Next.",
     -1, 115,40,195,120
 END
@@ -369,7 +369,7 @@ FONT 8, "MS Shell Dlg"
 BEGIN
   LTEXT "Welcome to the Certificate Export Wizard", IDC_EXPORT_TITLE, 115,7,195,30
   LTEXT "This wizard helps you export certificates, certificate revocation lists, and certificate trust lists from a certificate store to a file.\n\n\
-A certificate can be used to identify you or the computer with which you are communicating.  It can also be used for authentication, and to sign messages.  Certificate stores are collections of certificates, certificate revocation lists, and certificate trust lists.\n\n\
+A certificate can be used to identify you or the computer with which you are communicating. It can also be used for authentication, and to sign messages. Certificate stores are collections of certificates, certificate revocation lists, and certificate trust lists.\n\n\
 To continue, click Next.",
     -1, 115,40,195,120
 END
-- 
1.7.9.1
-------------- next part --------------
#!/usr/bin/perl
use warnings;
use strict;

my $name0=$0;
$name0 =~ s+^.*/++;

sub error(@)
{
    print STDERR "$name0:error: ", @_;
}


# Parse the command line
my $opt_file_match;
my $opt_file_exclude;
my $opt_backup=1;
my $opt_verbose;
my $opt_cmd;
my $usage;
while (@ARGV > 0)
{
    my $arg=shift @ARGV;
    if ($arg eq "--file-match")
    {
        if (defined $opt_file_match)
        {
            error("$arg option already specified\n");
            $usage=2;
        }
        elsif (@ARGV == 0)
        {
            error("missing parameter for the $arg option\n");
            $usage=2;
        }
        else
        {
            $opt_file_match=shift @ARGV;
        }
    }
    elsif ($arg eq "--file-exclude")
    {
        if (defined $opt_file_exclude)
        {
            error("$arg option already specified\n");
            $usage=2;
        }
        elsif (@ARGV == 0)
        {
            error("missing parameter for the $arg option\n");
            $usage=2;
        }
        else
        {
            $opt_file_exclude=shift @ARGV;
        }
    }
    elsif ($arg eq "--backup")
    {
        $opt_backup=1;
    }
    elsif ($arg eq "--no-backup")
    {
        $opt_backup=0;
    }
    elsif ($arg eq "--verbose")
    {
        $opt_verbose=1;
    }
    elsif ($arg eq "--no-verbose")
    {
        $opt_verbose=0;
    }
    elsif ($arg eq "--help" or $arg eq "-h" or $arg eq "-?")
    {
        $usage=0;
	last;
    }
    elsif (defined $opt_cmd)
    {
        error("command already specified\n");
        $usage=2;
    }
    else
    {
        $opt_cmd=$arg;
    }
}

# Verify the parameters
my ($match_pattern, $subst);
if (!defined $usage)
{
    if (!defined $opt_cmd)
    {
	error("you must specify a command\n");
	$usage=2;
    }
    elsif ($opt_cmd =~ /^d(.)(.+)\1$/)
    {
	$match_pattern=$2;
    }
    elsif ($opt_cmd =~ /^s(.).+\1.*\1[a-z]*$/)
    {
	$subst=$opt_cmd;
    }
    else
    {
	error("invalid command '$opt_cmd'\n");
	$usage=2;
    }
}
if (defined $usage)
{
    if ($usage)
    {
        error("try '$name0 --help' for more information\n");
        exit $usage;
    }
    print "Usage: $name0 [--file-match MATCH] [--file-exclude SKIP] [--no-backup]\n";
    print "          [--verbose] [--help] s/regexp/string/opts|d/regexp/\n";

    print "\n";
    print "Performs string replacements or line deletions, recursively, on the matching\n";
    print "files.\n";

    print "\n";
    print "Options:\n";
    print "  s/regexp/string/opts A Perl string substitution expression. It can use\n";
    print "                 references such as '\$1' and options for case insensitive\n";
    print "                 operation for instance.\n";
    print "  d/regexp/      Deletes the line if the Perl regular expression matches.\n";
    print "  --file-match MATCH A perl regular expression selecting the files to work on.\n";
    print "  --file-exclude SKIP A perl regular expression specifying files to skip. This\n";
    print "                 takes precedence over the --file-match option.\n";
    print "  --no-backup    Do not make a backup of the original file if set. The default\n";
    print "                 is to make a copy of the unmodified file with the '.bak'\n";
    print "                 extension.\n";
    print "  --verbose      Output more information about what is going on.\n";
    print "  --help, -h     Shows this help message.\n";
    exit 0;
}


my @dirs=("./");
while (@dirs)
{
    my $dir=shift @dirs;
    my $dh;
    if (!opendir($dh, $dir))
    {
        error("unable to read '$dir': $!\n");
        next;
    }
    foreach my $entry (readdir $dh)
    {
        next if ($entry =~ /^\.\.?$/);
        next if ($entry =~ /(~|\.bak)$/);
        $entry="$dir$entry";
        if (!-l $entry and -d _)
        {
            push @dirs, "$entry/";
            next;
        }
        next if (defined $opt_file_exclude and $entry =~ /$opt_file_exclude/);
        next if (defined $opt_file_match and $entry !~ /$opt_file_match/);

        print "$entry\n" if ($opt_verbose);
	my ($in, $out);
        if (!open($in, "<", $entry))
        {
            error("unable to open '$entry' for reading: $!\n");
            next;
        }
        if (!open($out, ">", "$entry.$$"))
        {
            error("unable to open '$entry.$$' for writing: $!\n");
            close($in);
            next;
        }
        my $modified;
        while (<$in>)
        {
            if (defined $subst)
            {
                $modified=1 if (eval "$subst");
            }
            elsif (/$match_pattern/)
            {
                # Delete the line
                $modified=1;
                next;
            }
            print $out $_;
        }
        close($out);
        close($in);
        if ($modified)
        {
            my $mode=(stat($entry))[2];
            rename "$entry", "$entry.bak" if ($opt_backup and !-f "$entry.bak");
            rename "$entry.$$", "$entry";
            chmod $mode, $entry;
            if ($opt_verbose)
            {
                print " -> modified\n";
            }
            else
            {
                print "$entry\n";
            }
        }
        else
        {
            unlink "$entry.$$";
        }
    }
    closedir($dh);
}


More information about the wine-patches mailing list