[cs631apue] Question about the project

Tejas Nadkarni tnadkarn at stevens.edu
Thu Oct 10 17:26:35 EDT 2013


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?
On Oct 10, 2013 4:54 PM, "Jan Schaumann" <jschauma at stevens.edu> wrote:

> Hui Zheng <hzheng5 at stevens.edu> wrote:
>
> > When I implement the "-q" flag,
> > I found it's not just about ASCII code.
>
> Correct - that is why the manual page says "non-printable" characters,
> and not "ASCII characters".
>
> You can compare what the system ls(1) does.  Try this out:
>
> ls ~jschauma/tmp/
> ls ~jschauma/tmp | cat
>
> (The Linux version does not appear to have a '-w' option corresponding
> to ours, but it switches to printing all raw characters if not printing
> to a terminal.)
>
> isprint(3) is the correct library function to use here.
>
> -Jan
> _______________________________________________
> cs631apue mailing list
> cs631apue at lists.stevens.edu
> https://lists.stevens.edu/mailman/listinfo/cs631apue
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.stevens.edu/pipermail/cs631apue/attachments/20131010/9f984aba/attachment.html>


More information about the cs631apue mailing list