🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fr.comp.lang.c
Article #15311

Re: rot13 [Was : Re: conjugaison et autres ...]

#15311
From: Emmanuel Delahaye
Date: Sun, 02 Oct 2005 00:24
22 lines
1919 bytes
candide wrote on 02/10/05 :
> Voici mon code, peut-�tre tr�s scolaire (mais apr�s tout ce serait d�j� 
> �a), peut-�tre fautif||maladroit||na�f. Corrections  y compris sur des 
> d�tails, et id�es d'alternatives (pointeurs ?) sont les bienvenues. Merci. 

> 		  if (s[i] >= 'a' && s[i] <= 'z')
> 			s[i] = 97+(s[i]+20)%26;
> 	       if (s[i] >= 'A' && s[i] <= 'Z')
> 			s[i] = 65+s[i]%26;

Tu fais des hypoth�ses sur les valeurs des caract�res. C'est mal. Ton 
code ne fonctionne pas sur AS-400. Et pour les accentu�es, �a se passe 
comment ?


-- 
Emmanuel
The C-FAQ: http://www.eskimo.com/~scs/C-faq/faq.html
The C-library: http://www.dinkumware.com/refxc.html

"There are 10 types of people in the world today;
those that understand binary, and those that dont."
Technical Details
Message-ID: <mn.10907d5a55119e84.15512@YOURBRAnoos.fr>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!infeed-1.proxad.net!news18-e.free.fr!not-for-mail
References: <1126342327.583568.21420@g43g2000cwa.googlegroups.com> <4329e5d4$0$7846$8fcfb975@news.wanadoo.fr> <dge4b6$fqa$1@reader1.imaginet.fr> <432ab809$0$1734$8fcfb975@news.wanadoo.fr> <mn.84b07d59016a857b.31483@laposte.net> <433f16ac$0$27406$8fcfb975@news.wanadoo.fr>

Show Full Headers
Complete Article Headers
X-Google-Thread: f9822,b21b26167a936e28
X-Google-Attributes: gidf9822,public
X-Google-Language: FRENCH,ASCII
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!infeed-1.proxad.net!news18-e.free.fr!not-for-mail
Subject: Re: rot13 [Was : Re: conjugaison et autres ...]
From: "Emmanuel Delahaye" <emdel@YOURBRAnoos.fr>
References: <1126342327.583568.21420@g43g2000cwa.googlegroups.com> <4329e5d4$0$7846$8fcfb975@news.wanadoo.fr> <dge4b6$fqa$1@reader1.imaginet.fr> <432ab809$0$1734$8fcfb975@news.wanadoo.fr> <mn.84b07d59016a857b.31483@laposte.net> <433f16ac$0$27406$8fcfb975@news.wanadoo.fr>
Newsgroups: fr.comp.lang.c
Message-ID: <mn.10907d5a55119e84.15512@YOURBRAnoos.fr>
X-Newsreader: MesNews/1.04.00.00-fr
Date: Sun, 02 Oct 2005 02:24:40 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-15"; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 24
Organization: Guest of ProXad - France
NNTP-Posting-Date: 02 Oct 2005 02:24:42 MEST
NNTP-Posting-Host: 81.65.109.78
X-Trace: 1128212682 news18-e.free.fr 28005 81.65.109.78:17043
X-Complaints-To: abuse@proxad.net