cleaned: tabs2spc, re-indent correctly etc

This commit is contained in:
Thomas von Dein
2017-09-25 09:41:23 +02:00
parent ca983f02c1
commit aaae9a8ae0

View File

@@ -1,7 +1,7 @@
#!/usr/bin/perl
#
# note - console notes management with database and encryption support.
# Copyright (C) 1999-2016 T.v.Dein (see README for details!)
# Copyright (C) 1999-2017 T.v.Dein (see README for details!)
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -38,7 +38,6 @@ use Getopt::Long;
use FileHandle;
use File::Spec;
use YAML;
#use Data::Dumper;
#
@@ -139,12 +138,10 @@ my (
# these are not customizable at runtime!
$hardparams = "(readonly|maxlen|dbdriver|useencryption|cryptmethod)";
$CONF = File::Spec->catfile($ENV{HOME}, ".noterc");
$USER = getlogin || getpwuid($<);
chomp $USER;
$USER = getlogin || getpwuid($<); chomp $USER;
$TOPIC = 1;
$VERSION = "1.3.24";
$VERSION = "1.3.25";
$CurDepth = 1; # the current depth inside the topic "directory" structure...
$maxlen = "auto";
$timelen = 22;
@@ -532,7 +529,8 @@ sub encrypt_passwd {
if ($@) {
print "Something went wrong: $@\n";
exit 1;
} else {
}
else {
print "Encrypted password:\n$crypt_string\n";
}
}
@@ -1302,7 +1300,7 @@ sub interactive {
sub usage
{
print qq~This is the program note $VERSION by Thomas Linden (c) 1999-2009.
print qq~This is the program note $VERSION by T.v.Dein (c) 1999-2017.
It comes with absolutely NO WARRANTY. It is distributed under the
terms of the GNU General Public License. Use it at your own risk :-)
@@ -1735,7 +1733,8 @@ sub tree {
$LocalTree->{$node}->{$NoteKey} = [];
}
&tree($num, $text, $LocalTree->{$node}, @nodes);
} else {
}
else {
if (length($text) > ($maxlen - 5)) {
$text = substr($text, 0, ($maxlen -5));
}