summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-08-29 23:38:50 +0000
committerRalph Amissah <ralph@amissah.com>2014-08-29 23:47:32 +0000
commit90f6210fe416897a7959a65d82b9de1cfa3bc572 (patch)
tree8e683986a10dfb262b12199ef7e2c434519ddfc5
parentv5 v6: hub, sisu version info, when & what to report (diff)
downloadsisu-90f6210fe416897a7959a65d82b9de1cfa3bc572.zip
sisu-90f6210fe416897a7959a65d82b9de1cfa3bc572.tar.xz
v5 v6: dp, texpdf, copyright_and_license, minor fix, used by texpdfsisu_5.6.3
-rw-r--r--data/doc/sisu/CHANGELOG_v52
-rw-r--r--data/doc/sisu/CHANGELOG_v62
-rw-r--r--lib/sisu/v5/dp.rb18
-rw-r--r--lib/sisu/v5/texpdf.rb5
-rw-r--r--lib/sisu/v6/dp.rb18
-rw-r--r--lib/sisu/v6/texpdf.rb5
6 files changed, 42 insertions, 8 deletions
diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5
index eb487b4..93631a5 100644
--- a/data/doc/sisu/CHANGELOG_v5
+++ b/data/doc/sisu/CHANGELOG_v5
@@ -40,6 +40,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.6.3.orig.tar.xz
* hub, sisu version info, when & what to report
+* dp, texpdf, copyright_and_license, minor fix, used by texpdf
+
%% 5.6.2.orig.tar.xz (2014-08-20:33/3)
http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=log;h=refs/tags/sisu_5.6.2
http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_5.6.2-1
diff --git a/data/doc/sisu/CHANGELOG_v6 b/data/doc/sisu/CHANGELOG_v6
index 43045b9..346332a 100644
--- a/data/doc/sisu/CHANGELOG_v6
+++ b/data/doc/sisu/CHANGELOG_v6
@@ -30,6 +30,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_6.2.4.orig.tar.xz
* hub, sisu version info, when & what to report
+* dp, texpdf, copyright_and_license, minor fix, used by texpdf
+
%% 6.2.3.orig.tar.xz (2014-08-20:33/3)
http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=log;h=refs/tags/sisu_6.2.3
http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_6.2.3-1
diff --git a/lib/sisu/v5/dp.rb b/lib/sisu/v5/dp.rb
index 33c6c56..00cf852 100644
--- a/lib/sisu/v5/dp.rb
+++ b/lib/sisu/v5/dp.rb
@@ -158,9 +158,25 @@ module SiSU_Param
class MdDefault
def rights(author,date)
@author,@date=author,date
+ def assignment(author)
+ 'copyright not explicitly stated, ' \
+ + 'program "assigning" copyright to author: ' \
+ + author
+ end
def all
s=nil
if @author
+ #puts assignment(@author)
+ s ||=((@date =~/((?:1[4-9]|2[01])\d{2})/ ) \
+ ? ("Copyright (C) #{$1} #{@author}")
+ : ('Copyright (C)' + @author)) #matches years 1400 through 21\d\d
+ end
+ s
+ end
+ def copyright_and_license
+ s=nil
+ if @author
+ #puts assignment(@author)
s ||=((@date =~/((?:1[4-9]|2[01])\d{2})/ ) \
? ("Copyright (C) #{$1} #{@author}")
: ('Copyright (C)' + @author)) #matches years 1400 through 21\d\d
@@ -584,7 +600,7 @@ module SiSU_Param
' \\\\ '
end
def copyright_and_license
- s=if @h['all'] then @h['all']
+ s=if @h['copyright_and_license'] then @h['copyright_and_license']
else
s=''
if defined? copyright.text \
diff --git a/lib/sisu/v5/texpdf.rb b/lib/sisu/v5/texpdf.rb
index c2c9dc7..e35c7cc 100644
--- a/lib/sisu/v5/texpdf.rb
+++ b/lib/sisu/v5/texpdf.rb
@@ -448,10 +448,9 @@ module SiSU_TeX
end
if defined? @md.rights.all \
and not @md.rights.all.empty?
- rght=@md.rights #.author.dup #dup is necessary, else contents of :rights changed
- sp_char=SiSU_TeX_Pdf::SpecialCharacters.new(@md,rght.copyright.copyright_and_license)
+ sp_char=SiSU_TeX_Pdf::SpecialCharacters.new(@md,@md.rights.copyright.copyright_and_license.dup)
copymark='Copyright {\begin{small}{\copyright\end{small}} '
- #copymark='Copyright {\begin{small}^{\copyright\end{small}} '
+ #copymark='Copyright {\begin{small}^{\copyright\end{small}} '
copyright=sp_char.special_characters_safe.gsub(/\s*Copyright \(C\)/, copymark)
@@rights||="\n #{Tex[:backslash]*2}[3]\\ \\linebreak #{copyright}"
end
diff --git a/lib/sisu/v6/dp.rb b/lib/sisu/v6/dp.rb
index 111896d..595cee3 100644
--- a/lib/sisu/v6/dp.rb
+++ b/lib/sisu/v6/dp.rb
@@ -158,9 +158,25 @@ module SiSU_Param
class MdDefault
def rights(author,date)
@author,@date=author,date
+ def assignment(author)
+ 'copyright not explicitly stated, ' \
+ + 'program "assigning" copyright to author: ' \
+ + author
+ end
def all
s=nil
if @author
+ #puts assignment(@author)
+ s ||=((@date =~/((?:1[4-9]|2[01])\d{2})/ ) \
+ ? ("Copyright (C) #{$1} #{@author}")
+ : ('Copyright (C)' + @author)) #matches years 1400 through 21\d\d
+ end
+ s
+ end
+ def copyright_and_license
+ s=nil
+ if @author
+ #puts assignment(@author)
s ||=((@date =~/((?:1[4-9]|2[01])\d{2})/ ) \
? ("Copyright (C) #{$1} #{@author}")
: ('Copyright (C)' + @author)) #matches years 1400 through 21\d\d
@@ -584,7 +600,7 @@ module SiSU_Param
' \\\\ '
end
def copyright_and_license
- s=if @h['all'] then @h['all']
+ s=if @h['copyright_and_license'] then @h['copyright_and_license']
else
s=''
if defined? copyright.text \
diff --git a/lib/sisu/v6/texpdf.rb b/lib/sisu/v6/texpdf.rb
index 10bfa96..57eab29 100644
--- a/lib/sisu/v6/texpdf.rb
+++ b/lib/sisu/v6/texpdf.rb
@@ -448,10 +448,9 @@ module SiSU_TeX
end
if defined? @md.rights.all \
and not @md.rights.all.empty?
- rght=@md.rights #.author.dup #dup is necessary, else contents of :rights changed
- sp_char=SiSU_TeX_Pdf::SpecialCharacters.new(@md,rght.copyright.copyright_and_license)
+ sp_char=SiSU_TeX_Pdf::SpecialCharacters.new(@md,@md.rights.copyright.copyright_and_license.dup)
copymark='Copyright {\begin{small}{\copyright\end{small}} '
- #copymark='Copyright {\begin{small}^{\copyright\end{small}} '
+ #copymark='Copyright {\begin{small}^{\copyright\end{small}} '
copyright=sp_char.special_characters_safe.gsub(/\s*Copyright \(C\)/, copymark)
@@rights||="\n #{Tex[:backslash]*2}[3]\\ \\linebreak #{copyright}"
end