9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] preprocessing C code
@ 2009-07-14 10:23 cej
  2009-07-14 11:11 ` Steve Simon
  0 siblings, 1 reply; 3+ messages in thread
From: cej @ 2009-07-14 10:23 UTC (permalink / raw)
  To: 9fans


Hi all,
I'm APE-porting some programs densely peppered wioth #-directives. Is there a way to preprocess the code, say:

#define CLIENTSERVER	0
#if	CLIENTSERVER
blah blah blah...
#else
//some useful code here
#endif	/*CLIENTSERVER*/


to get:
//some useful code here
??

I mean, just to extract the relevant portions of code under #defined conditions.
Thanks,
++pac.






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

* Re: [9fans] preprocessing C code
  2009-07-14 10:23 [9fans] preprocessing C code cej
@ 2009-07-14 11:11 ` Steve Simon
  2009-07-14 11:18   ` cej
  0 siblings, 1 reply; 3+ messages in thread
From: Steve Simon @ 2009-07-14 11:11 UTC (permalink / raw)
  To: 9fans

> I'm APE-porting some programs densely peppered wioth #-directives.

I have this too, try:

contrib/install steve/unifdef

-Steve



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

* Re: [9fans] preprocessing C code
  2009-07-14 11:11 ` Steve Simon
@ 2009-07-14 11:18   ` cej
  0 siblings, 0 replies; 3+ messages in thread
From: cej @ 2009-07-14 11:18 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 207 bytes --]

Thanks, going there,
Peter.



-----Original Message-----
> I'm APE-porting some programs densely peppered wioth #-directives. 

I have this too, try:

contrib/install steve/unifdef

-Steve



[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 2317 bytes --]

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

end of thread, other threads:[~2009-07-14 11:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-14 10:23 [9fans] preprocessing C code cej
2009-07-14 11:11 ` Steve Simon
2009-07-14 11:18   ` cej

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 NNTP newsgroup(s).