public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
* Need info about the internals of printf
@ 2019-06-17 18:32 Eswar Chandra Tadikonda
  2019-06-17 18:37 ` Florian Weimer
  2019-06-17 19:55 ` Konstantin Kharlamov
  0 siblings, 2 replies; 3+ messages in thread
From: Eswar Chandra Tadikonda @ 2019-06-17 18:32 UTC (permalink / raw)
  To: libc-help

Hi,

I am going through the glibc source code cloned from the git repository. I
am quite interested on how the printf function works really under the code
to print the characters on display.

I actually got stuck at __vfprintf_internal function which i am not able to
find the definition through tags. BTW, is this the actual function called
internally by printf ?

Can you please help me on this code learning ?

Also please suggest me the right tools/method to traverse through the
source code...

Thanks,
Eswar

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Need info about the internals of printf
  2019-06-17 18:32 Need info about the internals of printf Eswar Chandra Tadikonda
@ 2019-06-17 18:37 ` Florian Weimer
  2019-06-17 19:55 ` Konstantin Kharlamov
  1 sibling, 0 replies; 3+ messages in thread
From: Florian Weimer @ 2019-06-17 18:37 UTC (permalink / raw)
  To: Eswar Chandra Tadikonda; +Cc: libc-help

* Eswar Chandra Tadikonda:

> I actually got stuck at __vfprintf_internal function which i am not able to
> find the definition through tags.

Tags browsers generally do not work with the glibc sources due to heavy
use of the preprocessor, unfortunately.

stdio-common/vfprintf-internal.c has the implementation, and it contains
this:

#ifndef COMPILE_WPRINTF
# define vfprintf       __vfprintf_internal

So its vfprintf function is actually __vfprintf_internal.

> BTW, is this the actual function called internally by printf ?

Yes, calls eventually end up there.

Thanks,
Florian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Need info about the internals of printf
  2019-06-17 18:32 Need info about the internals of printf Eswar Chandra Tadikonda
  2019-06-17 18:37 ` Florian Weimer
@ 2019-06-17 19:55 ` Konstantin Kharlamov
  1 sibling, 0 replies; 3+ messages in thread
From: Konstantin Kharlamov @ 2019-06-17 19:55 UTC (permalink / raw)
  To: Eswar Chandra Tadikonda; +Cc: libc-help



В Вт, июн 18, 2019 at 00:02, Eswar Chandra Tadikonda 
<teswarsrinivas@gmail.com> написал:
> Hi,
> 
> I am going through the glibc source code cloned from the git 
> repository. I
> am quite interested on how the printf function works really under the 
> code
> to print the characters on display.
> 
> I actually got stuck at __vfprintf_internal function which i am not 
> able to
> find the definition through tags. BTW, is this the actual function 
> called
> internally by printf ?
> 
> Can you please help me on this code learning ?
> 
> Also please suggest me the right tools/method to traverse through the
> source code...

The reason you can't find is because universal ctags, etc, by default 
disable detecting some stuff. Per this question 
https://stackoverflow.com/q/3655743/2388257#when-using-exuberant-ctags-what-options-to-you-use 
you can use e.g.

	$ ctags --c-kinds=+defgpstux -R .

then, with universal ctags, I see the tag.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-17 19:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-17 18:32 Need info about the internals of printf Eswar Chandra Tadikonda
2019-06-17 18:37 ` Florian Weimer
2019-06-17 19:55 ` Konstantin Kharlamov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).