projects
/
feisty_meow.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixing obnoxious cygwin / windows problems, which apparently is now my new job.
[feisty_meow.git]
/
scripts
/
math
/
inc_num.pl
diff --git
a/scripts/math/inc_num.pl
b/scripts/math/inc_num.pl
index 4746115c2142e8bbc6673c596d4cfa20bf0fa9d5..acecc29f665d3fb1c88cd856a8cec14e14526130 100644
(file)
--- a/
scripts/math/inc_num.pl
+++ b/
scripts/math/inc_num.pl
@@
-29,6
+29,9
@@
sub get_number {
if ($number < 10) { $number = '0'.$number; }
if ($number < 100) { $number = '0'.$number; }
if ($number < 1000) { $number = '0'.$number; }
if ($number < 10) { $number = '0'.$number; }
if ($number < 100) { $number = '0'.$number; }
if ($number < 1000) { $number = '0'.$number; }
+ # upgraded to 6 digit numbers. whoo hoo.
+ if ($number < 10000) { $number = '0'.$number; }
+ if ($number < 100000) { $number = '0'.$number; }
close(NUMBERING);
return $number;
}
close(NUMBERING);
return $number;
}
@@
-37,9
+40,9
@@
sub get_number {
sub next_number {
local($number_file) = @_;
local($number) = &get_number($number_file);
sub next_number {
local($number_file) = @_;
local($number) = &get_number($number_file);
- if ($number < 0) { $number = '0000'; }
+ if ($number < 0) { $number = '0000
00
'; }
$number++;
$number++;
- if ($number > 9999
) { $number = '
0000'; }
+ if ($number > 9999
99) { $number = '00
0000'; }
open(NUMBERING, "> $number_file");
#print "number is now $number\n";
print NUMBERING "$number\n";
open(NUMBERING, "> $number_file");
#print "number is now $number\n";
print NUMBERING "$number\n";