haha<br>Merry Xmas. =)<br><br><div class="gmail_quote">2008/12/25 Rodrigo Padula de Oliveira <span dir="ltr">&lt;<a href="mailto:rodrigopadula@projetofedora.org">rodrigopadula@projetofedora.org</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Conrad Meyer escreveu:<br>
<div class="Ih2E3d">&gt; On Wednesday 24 December 2008 03:53:30 pm Paul wrote:<br>
&gt;&gt; Hi,<br>
&gt;&gt;<br>
&gt;&gt;&gt; /*MerryChristmas.c*/<br>
&gt;&gt;&gt; void main (int argc, char* argv[])<br>
&gt;&gt; main has never and will never return anything other than an int. It&#39;s in<br>
&gt;&gt; the standard!!!!<br>
&gt;&gt;<br>
&gt;&gt;&gt; {<br>
&gt;&gt;&gt; &nbsp; &nbsp; printf(&quot;\n Merry Christmas! \n&quot;);<br>
&gt;&gt;&gt; &nbsp; &nbsp; if (strcmp(argv[1],&quot;girl&quot;) == 0) &nbsp; &nbsp;/*general idea*/<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; printf(&quot;Kisses! \n&quot;);<br>
&gt;&gt;&gt; &nbsp; &nbsp; else<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; printf(&quot;Hugs! \n&quot;);<br>
&gt;&gt;&gt; }<br>
&gt;&gt; Ouch! What happens though if argv[1] is &quot;Girl&quot; or &quot;gIrl&quot; (you get the<br>
&gt;&gt; idea). Surely something like<br>
&gt;&gt;<br>
&gt;&gt; if (strcmp(tolower(argv[1])),&quot;girl)<br>
&gt;<br>
&gt; More like:<br>
&gt; if (!strcasecmp(argv[1], &quot;girl&quot;))<br>
&gt;<br>
&gt;&gt; would make more sense and catch the problems. However, we don&#39;t take<br>
&gt;&gt; into account here if argv[1] is null, so a catch is required..<br>
&gt;<br>
&gt; This is C, no catches. Check argc &gt;= 2.<br>
&gt;<br>
&gt;&gt; Oh dear. I need sleep.<br>
&gt;&gt;<br>
&gt;&gt; MERRY CHRISTMAS FOLKS!!!!!<br>
&gt;&gt;<br>
&gt;&gt; TTFN<br>
&gt;&gt;<br>
&gt;&gt; Paul<br>
&gt;<br>
&gt; Yup :).<br>
&gt;<br>
<br>
<br>
</div>Nerds hehehe!!<br>
<br>
Best regards!<br>
<div class="Ih2E3d"><br>
--<br>
<br>
Rodrigo Padula de Oliveira<br>
M.Sc. Student - COPPE/UFRJ<br>
Fedora Community Manager - Latin America<br>
</div><a href="http://www.proyectofedora.org" target="_blank">http://www.proyectofedora.org</a><br>
<div><div></div><div class="Wj3C7c"><br>
<br>
<br>
--<br>
fedora-devel-list mailing list<br>
<a href="mailto:fedora-devel-list@redhat.com">fedora-devel-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/fedora-devel-list" target="_blank">https://www.redhat.com/mailman/listinfo/fedora-devel-list</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Henrique &quot;LonelySpooky&quot; Junior<br><a href="http://www.lonelyspooky.com">http://www.lonelyspooky.com</a><br>-------------------------------------------------------------<br>
&quot;In a world without walls and fences, who needs windows and gates?!&quot;<br>