STYLE: change "it's" to "it is"

This commit is contained in:
Mark Olesen
2010-04-14 11:39:55 +02:00
parent 7b2aa07925
commit 74b6885674
2 changed files with 7 additions and 38 deletions

View File

@ -1,48 +1,17 @@
#!/usr/bin/perl -w #!/bin/sh
use strict;
use File::Find ();
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
#
# Script # Script
# find-its # find-its
# #
# Description # Description
# Search for *.[CH] files with "it's" # Search for files with "it's"
# This contraction (== "it is") looks too much like "its" (possesive) # This contraction (== "it is") looks too much like "its" (possesive)
# and confuses non-native (and some native) English speakers. # and confuses non-native (and some native) English speakers.
# #
# - print filename and lineNumber
#
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
set -x
cd $WM_PROJECT_DIR || exit 1
my $re_filespec = qr{^.+\.[CH]$}; git grep -e "it's"
# for the convenience of &wanted calls, including -eval statements:
## use vars qw( *name *dir *prune );
## *name = *File::Find::name;
## *dir = *File::Find::dir;
## *prune = *File::Find::prune;
sub wanted {
unless ( lstat($_) and -f _ and -r _ and not -l _ and /$re_filespec/ ) {
return;
}
local @ARGV = $_;
while (<>) {
if (m{it\'s}) {
print "$File::Find::name line=$.\n";
}
}
close ARGV;
}
## Traverse desired filesystems
for my $dir (@ARGV) {
no warnings 'File::Find';
warn "(**) checking '$dir' ...\n";
File::Find::find( { wanted => \&wanted }, $dir );
}
#------------------------------------------------------------------ end-of-file

View File

@ -99,7 +99,7 @@ Foam::scalar Foam::pdfs::general::sample() const
scalar alpha = y + xy_[n-1][0]*(0.5*k*xy_[n-1][0] + d) - integral_[n-1]; scalar alpha = y + xy_[n-1][0]*(0.5*k*xy_[n-1][0] + d) - integral_[n-1];
scalar x = 0.0; scalar x = 0.0;
// if k is small it's a linear equation, otherwise it's of second order // if k is small it is a linear equation, otherwise it is of second order
if (mag(k) > SMALL) if (mag(k) > SMALL)
{ {
scalar p = 2.0*d/k; scalar p = 2.0*d/k;