<p dir="ltr">Related to this the references in the man page that talk about default behavior for terminal and a program does that mean we detect what is calling our program and set default behavior? </p>
<div class="gmail_quote">On Oct 10, 2013 4:54 PM, &quot;Jan Schaumann&quot; &lt;<a href="mailto:jschauma@stevens.edu">jschauma@stevens.edu</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hui Zheng &lt;<a href="mailto:hzheng5@stevens.edu">hzheng5@stevens.edu</a>&gt; wrote:<br>
<br>
&gt; When I implement the &quot;-q&quot; flag,<br>
&gt; I found it&#39;s not just about ASCII code.<br>
<br>
Correct - that is why the manual page says &quot;non-printable&quot; characters,<br>
and not &quot;ASCII characters&quot;.<br>
<br>
You can compare what the system ls(1) does.  Try this out:<br>
<br>
ls ~jschauma/tmp/<br>
ls ~jschauma/tmp | cat<br>
<br>
(The Linux version does not appear to have a &#39;-w&#39; option corresponding<br>
to ours, but it switches to printing all raw characters if not printing<br>
to a terminal.)<br>
<br>
isprint(3) is the correct library function to use here.<br>
<br>
-Jan<br>
_______________________________________________<br>
cs631apue mailing list<br>
<a href="mailto:cs631apue@lists.stevens.edu">cs631apue@lists.stevens.edu</a><br>
<a href="https://lists.stevens.edu/mailman/listinfo/cs631apue" target="_blank">https://lists.stevens.edu/mailman/listinfo/cs631apue</a><br>
</blockquote></div>