/[anubis]/anubis/src/misc.c
ViewVC logotype

Diff of /anubis/src/misc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by gray, Thu Feb 6 15:47:36 2003 UTC revision 1.3 by polak, Tue Feb 11 21:07:29 2003 UTC
# Line 267  change_to_lower(char *s) Line 267  change_to_lower(char *s)
267          return;          return;
268  }  }
269    
 /****************  
  ROT-13 encoding  
 *****************/  
   
 void  
 check_rot13(void)  
 {  
         if (message.body && (mopt & M_ROT13B)) {  
                 int c;  
                 char *txt = message.body;  
                 for (c = strlen(txt) - 1; c >= 0; c--)  
                 {  
                         txt[c] = (islower((unsigned char)txt[c])  
                         ? 'a'+ (txt[c] - 'a' + 13)%26 : isupper((unsigned char)txt[c])  
                         ? 'A' + (txt[c] - 'A' + 13)%26 : txt[c]);  
                 }  
         }  
         return;  
 }  
   
270  /* EOF */  /* EOF */
271    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26