summaryrefslogtreecommitdiff
path: root/src/mt/rfind_not_of.f
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2011-10-08 20:30:28 +0200
committerHenrik Rydberg <rydberg@euromail.se>2011-10-08 20:30:28 +0200
commit5df79c53745fde5d6c3340a2979b1429cd5892c1 (patch)
tree1a81af141708b826e9c61e8a04019994fcca8298 /src/mt/rfind_not_of.f
Initial import of htcd system 1.0
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'src/mt/rfind_not_of.f')
-rw-r--r--src/mt/rfind_not_of.f80
1 files changed, 80 insertions, 0 deletions
diff --git a/src/mt/rfind_not_of.f b/src/mt/rfind_not_of.f
new file mode 100644
index 0000000..04a42d6
--- /dev/null
+++ b/src/mt/rfind_not_of.f
@@ -0,0 +1,80 @@
1ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
2c
3c HTCd - Copyright (C) 1998-2006 Henrik Rydberg
4c
5c This program is free software; you can redistribute it and/or modify
6c it under the terms of the GNU General Public License as published by
7c the Free Software Foundation; either version 2 of the License, or
8c (at your option) any later version.
9c
10c This program is distributed in the hope that it will be useful,
11c but WITHOUT ANY WARRANTY; without even the implied warranty of
12c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13c GNU General Public License for more details.
14c
15c You should have received a copy of the GNU General Public License
16c along with this program; if not, write to the Free Software
17c Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18c
19
20 integer function rfind_not_of(s,n,c)
21 byte s(0:1),c(0:1)
22 integer i,m,n
23 m=mod(n,16)
24 do 10 i=n-16,m,-16
25 if(c(s(i+15)).eq.0)go to 115
26 if(c(s(i+14)).eq.0)go to 114
27 if(c(s(i+13)).eq.0)go to 113
28 if(c(s(i+12)).eq.0)go to 112
29 if(c(s(i+11)).eq.0)go to 111
30 if(c(s(i+10)).eq.0)go to 110
31 if(c(s(i+9)).eq.0)go to 109
32 if(c(s(i+8)).eq.0)go to 108
33 if(c(s(i+7)).eq.0)go to 107
34 if(c(s(i+6)).eq.0)go to 106
35 if(c(s(i+5)).eq.0)go to 105
36 if(c(s(i+4)).eq.0)go to 104
37 if(c(s(i+3)).eq.0)go to 103
38 if(c(s(i+2)).eq.0)go to 102
39 if(c(s(i+1)).eq.0)go to 101
40 if(c(s(i)).eq.0)go to 100
41 10 continue
42 do 20 i=m-1,0,-1
43 if(c(s(i)).eq.0)go to 100
44 20 continue
45 rfind_not_of=-1
46 return
47 100 rfind_not_of=i
48 return
49 101 rfind_not_of=i+1
50 return
51 102 rfind_not_of=i+2
52 return
53 103 rfind_not_of=i+3
54 return
55 104 rfind_not_of=i+4
56 return
57 105 rfind_not_of=i+5
58 return
59 106 rfind_not_of=i+6
60 return
61 107 rfind_not_of=i+7
62 return
63 108 rfind_not_of=i+8
64 return
65 109 rfind_not_of=i+9
66 return
67 110 rfind_not_of=i+10
68 return
69 111 rfind_not_of=i+11
70 return
71 112 rfind_not_of=i+12
72 return
73 113 rfind_not_of=i+13
74 return
75 114 rfind_not_of=i+14
76 return
77 115 rfind_not_of=i+15
78 return
79 end
80