All of lore.kernel.org
 help / color / mirror / Atom feed
* Numeric constants as strings
@ 2007-02-19  9:16 Andy Parkins
  2007-02-19  9:38 ` Junio C Hamano
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Andy Parkins @ 2007-02-19  9:16 UTC (permalink / raw)
  To: git

Hello,

I'm working on bringing my hash width literals patch up to date now that 1.5.0 
has passed.  It's all been trivial apart from one line:

#define HASH_WIDTH_ASCII 40
-               printf("%-40s %s%s (%d subtrees)\n",
+               printf("%-" HASH_WIDTH_ASCII "s %s%s (%d subtrees)\n",

This compiles, but I suspect that it's not going to do what I want it to do.  
It's something I've never been able to do in C - how does one get quotes 
around a defined value?  I don't really want to resort to

+               printf("%-*s %s%s (%d subtrees)\n", HASH_WIDTH_ASCII,

As that's a runtime change.



Andy
-- 
Dr Andy Parkins, M Eng (hons), MIEE
andyparkins@gmail.com

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

end of thread, other threads:[~2007-02-20 13:05 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-19  9:16 Numeric constants as strings Andy Parkins
2007-02-19  9:38 ` Junio C Hamano
2007-02-19  9:49   ` Shawn O. Pearce
2007-02-19 10:01     ` Matthieu Moy
2007-02-19 10:54       ` Andy Parkins
2007-02-19 10:14   ` Andy Parkins
2007-02-19  9:49 ` Junio C Hamano
2007-02-19 11:00   ` Andy Parkins
2007-02-19 10:04 ` Mark Wooding
2007-02-19 11:02   ` Andy Parkins
2007-02-20 13:06     ` Jakub Narebski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.