File: fortran_patches

package info (click to toggle)
ifeffit 2%3A1.2.11d-12.5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 12,312 kB
  • sloc: fortran: 35,441; ansic: 8,454; makefile: 4,774; python: 3,315; perl: 3,144; sh: 2,721; ada: 1,003; tcl: 95
file content (50 lines) | stat: -rw-r--r-- 1,596 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Description: Patches to the FORTRAN source
 .
   * Enable FEFF to calculate chi
   * Modify array dimensioning for increased capacity
 .
Author: Carlo Segre <segre@debian.org>

--- ifeffit-1.2.11d.orig/src/feff6/feff.f
+++ ifeffit-1.2.11d/src/feff6/feff.f
@@ -117,11 +117,11 @@ c        Dump out fbetac for central ato
          call genfmt (ipr3, critcw, sig2g, iorder)
       endif
 
-c      if (mchi .eq. 1)  then
-c         call echo('Calculating chi...')
-c         call ff2chi (ipr4, critcw, s02, tk, thetad, icsig,
-c     1        vrcorr, vicorr)
-c      endif
+      if (mchi .eq. 1)  then
+         call echo('Calculating chi...')
+         call ff2chi (ipr4, critcw, s02, tk, thetad, icsig,
+     1        vrcorr, vicorr)
+      endif
 
        call echo('Feff done.  Have a nice day.')
        end
--- ifeffit-1.2.11d.orig/src/lib/iff_show.f
+++ ifeffit-1.2.11d/src/lib/iff_show.f
@@ -431,8 +431,8 @@ c
        character*(*) s, t , messg*256
        integer k, j, istrln
        external istrln
-       k = max(13, istrln(s))
-       j = max(2, istrln(t))
+       k = min(max(13, istrln(s)),256)
+       j = min(max(2, istrln(t)), 252-k)
        write(messg,11)  s(1:k), ' = ', t(1:j)
        call echo(messg)
  11    format('$',3a)
@@ -443,8 +443,8 @@ c
        character*(*) s, t , messg*256
        integer    k, j, istrln
        external istrln
-       k = max(14, istrln(s))
-       j = max(2, istrln(t))
+       k = min(max(14, istrln(s)), 256)
+       j = min(max(2, istrln(t)), 253-k)
        write(messg,11)  s(1:k), ': ', t(1:j)
        call echo(messg)
  11    format (3a)