Article View: fr.comp.lang.c
Article #15480Re: Re: conjugaison et autres exos sur les chaines [Was : Un système de conj...]
From: Emmanuel Delahaye
Date: Thu, 22 Sep 2005 16:13
Date: Thu, 22 Sep 2005 16:13
88 lines
3879 bytes
3879 bytes
Antoine Leca wrote on 22/09/05 :
>> main.c:13: warning: no previous prototype for 'usage'
>
> Quelle utilit� ?
C'est une fonction locale. Il manque 'static'.
> (En plus, je ne comprends pas comment tu obtiens 13).
Parce que j'ai quelques lignes perso au-dessus...
#ifndef __BORLANDC__
#define DBG 0
#define ARG 0
#include "frmwrk/inc/main.h"
#endif
/*
----------------------------------------------------------------------
*/
Ca permet de mettre en route certains debugs rapidement. Ok, �a fausse
les N� de lignes...
>> main.c: In function `usage':
>>
>> main.c:16: warning: function might be possible candidate for attribute
>> `noreturn'
>
> Verbeux.
C'est pas moi qui ait �crit gcc...
>> #include <inttypes.h>
>>
>> #if 1
>> #if !defined (__STDC_VERSION__)\
>> || (defined (__STDC_VERSION__) && __STDC_VERSION__ < 199901)
>> #error must be a C99 compiler
>> #endif
>> #endif
>
> Avant l'#include <inttypes.h>, ce serait mieux.
Ok.
>> int ret = EXIT_SUCCESS;
>
> Pr�somptueux ;-)
Non, optimiste !
>> if (argc == 2)
>> {
> [ GROOOOOOS couic ]
>> }
>> else
>> {
>> usage ();
>
> Mouais. C'est du style, c'est s�r, mais tu fais vraiment cela en production,
> de mettre le cas court tout en bas ?
Oui, toujours.
> Je sais bien que tu n'aime pas la forme
>
> if( d�tection des mauvais coups ) {
> protestations �ventuelles;
> return CODE_ERREUR;
> }
Beark!
> mais c'est quand m�me plus clair dans des cas comme celui-l�, non ? (�
> condition bien s�r de les garder au d�but de la fonction et ne pas les
> parsemer tout au long, cela a m�me des vertus documentaires, alors que ton
> code m'a enduit d'erreur, je pensais que tu r�p�tais le code de Pierre quant
> � la valeur retourn�e...)
Question d'habitude...
--
Emmanuel
The C-FAQ: http://www.eskimo.com/~scs/C-faq/faq.html
The C-library: http://www.dinkumware.com/refxc.html
"Mal nommer les choses c'est ajouter du malheur au
monde." -- Albert Camus.
Technical Details
Message-ID:
<mn.b4457d59eaeeb19e.15512@YOURBRAnoos.fr>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!proxad.net!infeed-4.proxad.net!news18-e.free.fr!not-for-mailReferences:
<1126342327.583568.21420@g43g2000cwa.googlegroups.com> <4329e5d4$0$7846$8fcfb975@news.wanadoo.fr> <dge4b6$fqa$1@reader1.imaginet.fr> <mn.837a7d59123d924a.15512@YOURBRAnoos.fr> <432adddf$0$17220$8fcfb975@news.wanadoo.fr> <mn.84407d597cfa6e6e.15512@YOURBRAnoos.fr> <432b2a92$0$7861$8fcfb975@news.wanadoo.fr> <432c19e0$0$1710$8fcfb975@news.wanadoo.fr> <432cad90$0$27422$8fcfb975@news.wanadoo.fr> <432d1b7c$0$1743$8fcfb975@news.wanadoo.fr> <432d3117$0$1742$8fcfb975@news.wanadoo.fr> <mn.93877d590449a7bc.15512@YOURBRAnoos.fr> <432d7667$0$17248$8fcfb975@news.wanadoo.fr> <mn.94047d599f0cc076.15512@YOURBRAnoos.fr> <432da70c$0$1735$8fcfb975@news.wanadoo.fr> <mn.94c47d590202e83a.15512@YOURBRAnoos.fr> <43315679$0$27421$8fcfb975@news.wanadoo.fr> <mn.ad0b7d59687aaf3b.31483@laposte.net> <mn.ad467d5958d83976.15512@YOURBRAnoos.fr> <dgu2qs$oa1$1@shakotay.alphanet.ch>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!proxad.net!infeed-4.proxad.net!news18-e.free.fr!not-for-mail Subject: Re: Re: conjugaison et autres exos sur les chaines [Was : Un système de conj...] 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> <mn.837a7d59123d924a.15512@YOURBRAnoos.fr> <432adddf$0$17220$8fcfb975@news.wanadoo.fr> <mn.84407d597cfa6e6e.15512@YOURBRAnoos.fr> <432b2a92$0$7861$8fcfb975@news.wanadoo.fr> <432c19e0$0$1710$8fcfb975@news.wanadoo.fr> <432cad90$0$27422$8fcfb975@news.wanadoo.fr> <432d1b7c$0$1743$8fcfb975@news.wanadoo.fr> <432d3117$0$1742$8fcfb975@news.wanadoo.fr> <mn.93877d590449a7bc.15512@YOURBRAnoos.fr> <432d7667$0$17248$8fcfb975@news.wanadoo.fr> <mn.94047d599f0cc076.15512@YOURBRAnoos.fr> <432da70c$0$1735$8fcfb975@news.wanadoo.fr> <mn.94c47d590202e83a.15512@YOURBRAnoos.fr> <43315679$0$27421$8fcfb975@news.wanadoo.fr> <mn.ad0b7d59687aaf3b.31483@laposte.net> <mn.ad467d5958d83976.15512@YOURBRAnoos.fr> <dgu2qs$oa1$1@shakotay.alphanet.ch> Newsgroups: fr.comp.lang.c Message-ID: <mn.b4457d59eaeeb19e.15512@YOURBRAnoos.fr> X-Newsreader: MesNews/1.04.00.00-fr Date: Thu, 22 Sep 2005 18:13:45 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15"; format=flowed Content-Transfer-Encoding: 8bit Lines: 90 Organization: Guest of ProXad - France NNTP-Posting-Date: 22 Sep 2005 18:13:46 MEST NNTP-Posting-Host: 81.65.109.78 X-Trace: 1127405626 news18-e.free.fr 7339 81.65.109.78:15531 X-Complaints-To: abuse@proxad.net