On 08/29/2010 09:14 AM, Sharad Birmiwal wrote:
On Sat, Aug 28, 2010 at 4:30 AM, sonu kumar<[email protected]>  wrote:
hi,
Am looking for an solution to write a function similar to printf() in C.
I know it's going to be hardware and OS dependent..
Logic is to find the terminal file and write into it.
But where and which file/dir  ,i have to look for to do the same in Linux ?

Use varargs (google for it) and "write(1, buf, sizeof(buf));" (1 is
the filehandle for stdout =>  it writes to terminal).


SB


That's what I said, using stdarg.h
But his environment doesn't permit use of standard libraries; probably he's working to write a kernel.

--
Regards,
Nilesh Govindarajan
Facebook: http://www.facebook.com/nilesh.gr
Twitter: http://twitter.com/nileshgr
Website: http://www.itech7.com
VPS Hosting: http://www.itech7.com/a/vps

--
l...@iitd - http://tinyurl.com/ycueutm

Reply via email to