<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi Rob,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I started working on fold.c cleanup,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
going through the code, and testing it out, i have a couple of questions.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<ol>
<li>gnu fold engulfs \n unconditionally i.e if there is a \n after the fold has happend that redundant \n does not make it to the output , that kind of makes sense but the posix spec only mentions carriage returns and only if the -b option is not specified.
 (Note* That the current pending/fold outputs an extra new line.)</li><li>the current fold implementation has unfold capability , that i think should not be squeezed in fold (as of yet), my plan is to have unfold as a separate utility that uses infrastructure from fold if necessary, or at least make unfold as a config option,
 please share your thoughts on this.</li><li>The tabstop thing is bit confusing for me, as the posix spec says <span>"Tab stops shall be at each column position</span><span> n such that n modulo 8 equals 1."</span> ( from this i understand that given the column the next column where the tab ends should
 be a column whose modulo 8 returns 1 , kind of this pseudo code ? where start is the current column. (am i understanding it right ?)<br>
</li></ol>
<span>int get_next_ts(int start)</span><br>
<div>{<br>
</div>
<div>     if (start <= 1)<br>
</div>
<div>          return 9;<br>
</div>
<div>     <br>
</div>
<div>     if ((start % 8) == 1)<br>
</div>
<div>          return start;<br>
</div>
<div> <br>
</div>
<div>     return get_next_ts(++start);<br>
</div>
<span>}</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Haroon<br>
</div>
</body>
</html>