diff options
Diffstat (limited to 'src/mt/sconvert.f')
| -rw-r--r-- | src/mt/sconvert.f | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/mt/sconvert.f b/src/mt/sconvert.f new file mode 100644 index 0000000..e887610 --- /dev/null +++ b/src/mt/sconvert.f | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc | ||
| 2 | c | ||
| 3 | c HTCd - Copyright (C) 1998-2006 Henrik Rydberg | ||
| 4 | c | ||
| 5 | c This program is free software; you can redistribute it and/or modify | ||
| 6 | c it under the terms of the GNU General Public License as published by | ||
| 7 | c the Free Software Foundation; either version 2 of the License, or | ||
| 8 | c (at your option) any later version. | ||
| 9 | c | ||
| 10 | c This program is distributed in the hope that it will be useful, | ||
| 11 | c but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | c GNU General Public License for more details. | ||
| 14 | c | ||
| 15 | c You should have received a copy of the GNU General Public License | ||
| 16 | c along with this program; if not, write to the Free Software | ||
| 17 | c Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 18 | c | ||
| 19 | |||
| 20 | subroutine sconvert(s,sn,tab) | ||
| 21 | byte s(0:1),tab(0:1) | ||
| 22 | integer i,m,sn | ||
| 23 | m=mod(sn,4) | ||
| 24 | do 10 i=0,m-1 | ||
| 25 | s(i)=tab(s(i)) | ||
| 26 | 10 continue | ||
| 27 | do 20 i=m,sn-1,4 | ||
| 28 | s(i)=tab(s(i)) | ||
| 29 | s(i+1)=tab(s(i+1)) | ||
| 30 | s(i+2)=tab(s(i+2)) | ||
| 31 | s(i+3)=tab(s(i+3)) | ||
| 32 | 20 continue | ||
| 33 | return | ||
| 34 | end | ||
| 35 | |||
