aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/se_programs.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-08-08 00:32:27 -0400
committerRalph Amissah <ralph@amissah.com>2014-08-08 00:32:27 -0400
commit809034240a1be22cc00cb3b4c1df1dd2facdc8f8 (patch)
tree89f9301644b85ff0ff3e0b7c82cca13c5b6389a2 /lib/sisu/v5/se_programs.rb
parentv5 v6: version & changelog (& rakefile) (diff)
v5: merged v6 libraries
* commandline, --act0 to --act9, rc-config with flag:act[0-9] * configurable command line options increased to 0 - 9 (instead of 0 - 5) * use --act0 to --act9 (previous flags -1 to -5; -0 to -9 now available) * default --act0 * rc config with flag:act0 to flag:act9 (previously roman numerals) * legacy roman numeral configuration works (for now) * use opt.act, code internals (simplify, cleaner; remove opt.cmd & opt.mod) * hub, further changes related to use of opt.act; hub file split
Diffstat (limited to 'lib/sisu/v5/se_programs.rb')
-rw-r--r--lib/sisu/v5/se_programs.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/sisu/v5/se_programs.rb b/lib/sisu/v5/se_programs.rb
index 35d68cb6..4eef1ce9 100644
--- a/lib/sisu/v5/se_programs.rb
+++ b/lib/sisu/v5/se_programs.rb
@@ -87,7 +87,7 @@ module SiSU_Sys_Call
end
@sys.locale
end
- def file_encoding(filename,cmd='') #file encoding
+ def file_encoding(filename,act='') #file encoding
program='file'
fnsp=SiSU_Env::InfoEnv.new(filename).source_file_with_path
if program_found?(program)
@@ -98,9 +98,13 @@ module SiSU_Sys_Call
encoding
else 'UTF-8 assumed, encoding undetermined'
end
- puts encoding if cmd =~/[VM]/
+ if act[:verbose_plus][:set] ==:on \
+ or act[:maintenance][:set] ==:on
+ puts encoding
+ end
encoding
- else encoding='UTF-8 assumed, file encoding check program unavailable'
+ else
+ 'UTF-8 assumed, file encoding check program unavailable'
end
end
def wc #word count