Hi, On Thu, 6 Mar 2008, Reece Dunn wrote:AFAIU va_list() works on the stack (on less register-challenged systems than x86, the first parameters are possibly passed as registers, too, but it has to resort to the stack at a certain number of parameters). Since the stack is also used (at least on register-challenged yadda yadda) to store the return address, va_list() would most likely pick that up, too. Now, that just _might_ still work, since the printf() family determines the number of arguments from the format string. But then there are machines which are _not_ completely stack-based, for example SPARC. IIRC the first 8 parameters are passed by a so-called register window, which changes with each function call. So no, I think there is no portable way to pass them around. Of course, having a simple implementation for addf() _not_ using vsnprintf() could help, too (and make the process more efficient, probably). I thought. The formats we'd have to support are: $ git grep strbuf_addf | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/' -e 's/%%//g' -e 's/%/\ &/g' | sed -n -e 's/\(%[^a-zA-Z]*[a-zA-Z]\).*/\1/p' | sort | uniq %02X %06o %c %d %l %o %s %.*s %u So it does not look too bad. 'X', 'o', 'd', 'l' and 'u', possibly with a size specifier (left 0-padded), 'c' and 's' (possibly with a length parameter). The implementation wouldn't be _too_ short, I'd say, but doable. Ciao, Dscho -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Linus Torvalds | Linux 2.6.27-rc8 |
| Greg KH | [patch 00/71] 2.6.26-stable review |
| Dmitry Torokhov | 2.6.27-rc8+ - first impressions |
| jimmy bahuleyan | Re: Hibernation considerations |
git: | |
| Petr Baudis | [FYI][PATCH] Customizing the WinGit installer |
| Jan Hudec | Re: [PATCH] Move all dashed form git commands to libexecdir |
| Jay Soffian | Re: [PATCH] gitweb: Support caching projects list |
| Mark Levedahl | Allowing override of the default "origin" nickname |
| Richard Stallman | Real men don't attack straw men |
| Leon Dippenaar | New tcp stack attack |
| Luca Dell'Oca | Authenticate squid in Active Directory |
| Todd Pytel | IDE or SCSI virtual disks for VMWare image? |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Matthew Dharm | Re: [RFC] Patch to option HSO driver to the kernel |
| Ingo Molnar | Re: [bug] stuck localhost TCP connections, v2.6.26-rc3+ |
| David Miller | Re: [GIT PULL] [IPV6] COMPAT: Fix SSM applications on 64bit kernels. |
