On Tue, 23 Nov 2010 17:29:49 +0800, Magicloud Magiclouds wrote: > On Tue, Nov 23, 2010 at 5:24 PM, Camaleón wrote:
>>> I meant code-wise, just using printf would give a wrap output, right? >> >> Ah... I haven't read the source code. >> >> Do you see any call to the standard printf() function? It seems ps >> command integrates some output formatting options :-? > > This is where I got confused. From my understanding of the code, ps > calculates the width of the screen/string, and cut the output source > string "manually". > But I do not know how it gets the width of the screen. Well... gathering information about the running terminal is possible: s...@stt008:~$ stty -a | grep column speed 38400 baud; rows 63; columns 86; line = 0; But how does internally do "ps"? Dunno :-? Greetings, -- Camaleón -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

