diff options
| author | hibby <d@vehibberd.com> | 2018-02-16 15:17:14 +0000 |
|---|---|---|
| committer | hibby <d@vehibberd.com> | 2018-02-16 15:17:14 +0000 |
| commit | 37f727ac0746fd85504aa46c1f023c09b3eff33a (patch) | |
| tree | c8a7ce04545040a8f161ba279528730bd9a3e6ab /lib/hash.f90 | |
| parent | d63dd8d081a6fcd0715cd13f26df59fb831769d2 (diff) | |
New upstream version 1.8.0+repackupstream/1.8.0+repack
Diffstat (limited to 'lib/hash.f90')
| -rw-r--r-- | lib/hash.f90 | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/hash.f90 b/lib/hash.f90 new file mode 100644 index 00000000..37598390 --- /dev/null +++ b/lib/hash.f90 @@ -0,0 +1,10 @@ +subroutine hash(string,len,ihash) + use iso_c_binding, only: c_loc,c_size_t + use hashing + parameter (MASK15=32767) +! character*(*), target :: string + character*1, target :: string + i=nhash(c_loc(string),int(len,c_size_t),146) + ihash=iand(i,MASK15) + return +end subroutine hash |
