Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4632e5c

Browse files
committed
Perl scripts: revert43ce181
Small improvement not worth the code churn.Reported-by: Andrew DunstanDiscussion:https://postgr.es/m/42f2242a-422b-4aa3-8d60-d67b229c4a52@dunslane.netBackpatch-through: master
1 parentd5622ac commit4632e5c

File tree

6 files changed

+23
-23
lines changed

6 files changed

+23
-23
lines changed

‎src/tools/copyright.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ sub wanted
4444
returnif ($_ =~m/\.(ico|bin|po|key)$/);
4545

4646
my@lines;
47-
tie@lines,'Tie::File',$File::Find::name;
47+
tie@lines,"Tie::File",$File::Find::name;
4848

4949
# We process all lines because some files have copyright
5050
# strings embedded in them, e.g. src/bin/psql/help.c

‎src/tools/gen_export.pl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
'format:s'=> \$format,
1515
'libname:s'=> \$libname,
1616
'input:s'=> \$input,
17-
'output:s'=> \$output)ordie'wrong arguments';
17+
'output:s'=> \$output)ordie"wrong arguments";
1818

1919
if (not($formateq'darwin'
2020
or$formateq'gnu'
@@ -32,9 +32,9 @@
3232

3333
if ($formateq'gnu')
3434
{
35-
print$output_handle'{
35+
print$output_handle"{
3636
global:
37-
';
37+
";
3838
}
3939
elsif ($formateq'win')
4040
{
@@ -76,7 +76,7 @@
7676

7777
if ($formateq'gnu')
7878
{
79-
print$output_handle' local: *;
79+
print$output_handle" local: *;
8080
};
81-
';
81+
";
8282
}

‎src/tools/gen_keywordlist.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@
160160

161161
# Emit the definition of the hash function.
162162

163-
my$funcname =$varname .'_hash_func';
163+
my$funcname =$varname ."_hash_func";
164164

165165
my$f = PerfectHash::generate_hash_function(\@keywords,$funcname,
166166
case_fold=>$case_fold);
@@ -169,7 +169,7 @@
169169

170170
# Emit the struct that wraps all this lookup info into one variable.
171171

172-
printf$kwdef'static'if !$extern;
172+
printf$kwdef"static"if !$extern;
173173
printf$kwdef"const ScanKeywordList%s = {\n",$varname;
174174
printf$kwdefqq|\t%s_kw_string,\n|,$varname;
175175
printf$kwdefqq|\t%s_kw_offsets,\n|,$varname;

‎src/tools/msvc_gendef.pl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ sub extract_syms
7272
nextunless$pieces[6];
7373

7474
# Skip externs used from another compilation unit
75-
nextif ($pieces[2]eq'UNDEF');
75+
nextif ($pieces[2]eq"UNDEF");
7676

7777
# Skip static symbols
78-
nextunless ($pieces[4]eq'External');
78+
nextunless ($pieces[4]eq"External");
7979

8080
# Skip some more MSVC-generated crud
8181
nextif$pieces[6] =~/^@/;
@@ -120,7 +120,7 @@ sub writedef
120120

121121
# Strip the leading underscore for win32, but not x64
122122
$f =~s/^_//
123-
unless ($archeq'x86_64');
123+
unless ($archeq"x86_64");
124124

125125
# Emit just the name if it's a function symbol, or emit the name
126126
# decorated with the DATA option for variables.
@@ -193,11 +193,11 @@ sub usage
193193

194194
my$cmd ="dumpbin /nologo /symbols /out:$tmpfile" .join('',@files);
195195

196-
system($cmd) == 0ordie'Could not call dumpbin';
196+
system($cmd) == 0ordie"Could not call dumpbin";
197197
rename($tmpfile,$symfile)ordie$!;
198198
extract_syms($symfile, \%def);
199199
print"\n";
200200

201201
writedef($deffile,$arch, \%def);
202202

203-
print'Generated' .scalar(keys(%def)) ." symbols\n";
203+
print"Generated" .scalar(keys(%def)) ." symbols\n";

‎src/tools/version_stamp.pl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
{
3838
$dotneeded = 1;
3939
}
40-
elsif ($minoreq'devel')
40+
elsif ($minoreq"devel")
4141
{
4242
$dotneeded = 0;
4343
}
@@ -63,7 +63,7 @@
6363
# Create various required forms of the version number
6464
if ($dotneeded)
6565
{
66-
$fullversion =$majorversion .'.' .$minor;
66+
$fullversion =$majorversion ."." .$minor;
6767
}
6868
else
6969
{
@@ -73,8 +73,8 @@
7373
# Get the autoconf version number for eventual nag message
7474
# (this also ensures we're in the right directory)
7575

76-
my$aconfver ='';
77-
open(my$fh,'<','configure.ac') ||die"could not read configure.ac:$!\n";
76+
my$aconfver ="";
77+
open(my$fh,'<',"configure.ac") ||die"could not read configure.ac:$!\n";
7878
while (<$fh>)
7979
{
8080
if (m/^m4_if\(m4_defn\(\[m4_PACKAGE_VERSION\]\),\[(.*)\],\[\],\[m4_fatal/
@@ -85,17 +85,17 @@
8585
}
8686
}
8787
close($fh);
88-
$aconfverne''
88+
$aconfverne""
8989
||die"could not find autoconf version number in configure.ac\n";
9090

9191
# Update configure.ac and other files that contain version numbers
9292

93-
my$fixedfiles ='';
93+
my$fixedfiles ="";
9494

95-
sed_file('configure.ac',
95+
sed_file("configure.ac",
9696
"-e 's/AC_INIT(\\[PostgreSQL\\],\\[[0-9a-z.]*\\]/AC_INIT([PostgreSQL], [$fullversion]/'"
9797
);
98-
sed_file('meson.build',
98+
sed_file("meson.build",
9999
qq{-e "/^project(/,/^)/ s/ version: '[0-9a-z.]*',/ version: '$fullversion',/"}
100100
);
101101

@@ -107,7 +107,7 @@
107107
subsed_file
108108
{
109109
my ($filename,$sedargs) =@_;
110-
my ($tmpfilename) =$filename .'.tmp';
110+
my ($tmpfilename) =$filename .".tmp";
111111

112112
system("sed$sedargs$filename >$tmpfilename") == 0
113113
ordie"sed failed:$?";

‎src/tools/win32tzlist.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ BEGIN
3838
#
3939
my$basekey;
4040
$HKEY_LOCAL_MACHINE->Open(
41-
'SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones',$basekey)
41+
"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones",$basekey)
4242
ordie$!;
4343

4444
my@subkeys;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp