<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>הודעה</TITLE>
<META content="MSHTML 6.00.6000.17063" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2><SPAN
class=475265409-27072010>Hi,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=475265409-27072010></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=475265409-27072010>I have a C program
that reads one line of text from the keyboard.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=475265409-27072010></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=475265409-27072010>The original program
was written 10 years ago and was compiled with cc on AIX 4.x.
</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=475265409-27072010>I used the gets()
function which was the only option available at the time.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=475265409-27072010></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=475265409-27072010>Recently, I had to
port the program to gcc on Linux, but I was confronted with lots of
segfaults.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=475265409-27072010>So, I had to change
the function to getline() which is much more stable and
secure.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=475265409-27072010></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=475265409-27072010>However, I was asked
to maintain the new version on AIX 5.3 as well. </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=475265409-27072010></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=475265409-27072010>When recompiling the
program on the AIX machine I was confronted with the lack of getline() in AIX
implementation of cc.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=475265409-27072010>I do not have gcc on
that machine, and installing it would be an option of last resort
.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=475265409-27072010></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=475265409-27072010>I am looking for an
alternative to getline(), that would be portable to both Linux and
AIX.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=475265409-27072010></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=475265409-27072010>Please
advise.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=475265409-27072010></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=475265409-27072010>Thanks.</SPAN></FONT></DIV></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV><?xml:namespace prefix = o ns =
"urn:schemas-microsoft-com:office:office" /><o:SmartTagType
name="country-region"
namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType><o:SmartTagType
name="place"
namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType>
<STYLE>
st1\:*{behavior:url(#ieooui) }
</STYLE>
<STYLE>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0cm;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
p
        {mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
span.SpellE
        {mso-style-name:"";
        mso-spl-e:yes;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;
        mso-header-margin:35.4pt;
        mso-footer-margin:35.4pt;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</STYLE>
<DIV class=Section1>
<P style="TEXT-ALIGN: right" align=right><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> </SPAN><?xml:namespace prefix
= st1 ns = "urn:schemas-microsoft-com:office:smarttags"
/><st1:country-region><st1:place><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Israel</SPAN></st1:place></st1:country-region><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> <SPAN
class=SpellE>Shikler</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="TEXT-ALIGN: right" align=right><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN
style="mso-spacerun: yes"> </SPAN></SPAN><FONT face=Arial
size=2></FONT></P></DIV>
<DIV> </DIV></BODY></HTML>