<br><br><div class="gmail_quote">2008/4/3 Sorin <<a href="mailto:sorin19840@yahoo.com">sorin19840@yahoo.com</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>La Tema 1 SO - mini-shell, considerand urmatorul cod:</div> <div>char comanda[100];</div> <div>void main()<br>{<br>while (1)<br>{ </div></blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><br>printf("\");</div></blockquote><div><br>aici sigur e asa ? </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><br>
gets(comanda)<br>// parsare + executa(comanda);<br>if (strncmp(comanda,"exit",4)==0)) break;<br>if (strncmp(comanda,"quit",4)==0)) break;<br>}</div> <div>La rularea interactiva, nu e nici o problema, dar <br>
daca ai intr-un fisier test.txt de exemplu</div> <div>comanda1<br>comanda2<br>comanda3<br>exit</div> <div>in loc sa afiseze;</div> <div>>comanda1<br>output comanda1<br>>comanda2<br>output comanda2<br>>comanda3<br>
output comanda3</div> <div>afiseaza:</div> <div>>comanda1<br>output comanda1<br>comanda2<br>output comanda2<br>comanda3<br>output comanda3<br>>></div> <div>( linia > de prompt nu o pune inaintea comenzii, ci le pune pe toate la sfarsit )</div>
<div>Din cauza asta, programul nu trece nici un test pe site.<br>Ai o idee/solutie?</div> <div>PS: N-am folosit parserul de pe site. Nu
pot folosi pointer si getline.</div></blockquote><div><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div> </div><p>
</p><hr size="1">You rock. That's why Blockbuster's offering you <a href="http://us.rd.yahoo.com/evt=47523/*http://tc.deals.yahoo.com/tc/blockbuster/text5.com" target="_blank">one month of Blockbuster Total Access</a>, No Cost.<br>
_______________________________________________<br>
so mailing list<br>
<a href="mailto:so@cursuri.cs.pub.ro">so@cursuri.cs.pub.ro</a><br>
<a href="http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/so" target="_blank">http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/so</a><br>
<br></blockquote></div>