<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, "Jan Schaumann" <<a href="mailto:jschauma@stevens.edu">jschauma@stevens.edu</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hui Zheng <<a href="mailto:hzheng5@stevens.edu">hzheng5@stevens.edu</a>> wrote:<br>
<br>
> When I implement the "-q" flag,<br>
> I found it's not just about ASCII code.<br>
<br>
Correct - that is why the manual page says "non-printable" characters,<br>
and not "ASCII characters".<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 '-w' 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>