svn 14567
Michael S. Zick
mszick at morethan.org
Sun Mar 19 17:47:30 PST 2006
On Sun March 19 2006 17:32, Rob Landley wrote:
> Adding a comment is nice, but how is #defining a constant just to use it on
> the next an improvement?
>
// Like?
- #include <stdio.h>
+ #define STANDARD_IO_H stdio.h
+ #include <STANDARD_IO_H>
/* We get paid by the characters typed */
>
> #define HELLO_WORLD "Hello World!"
> #include <stdlib.h>
> #define RETURN_CODE EXIT_SUCCESS
> #define RETURN_TYPE ARGUMENT_COUNT_TYPE
> #define STARTING_POINT main
> #define ARGUMENT_COUNT_TYPE int
> #define ARGUMENT_COUNT argc
> #define ARGUMENT_LIST_TYPE char *
> #define ARGUMENT_LIST argv
> #define TEST_FUNCTION printf
>
> RETURN_TYPE STARTING_POINT(ARGUMENT_COUNT_TYPE ARGUMENT_COUNT,
> ARGUMENT_LIST_TYPE ARGUMENT_LIST)
> {
> TEST_FUNCTION(HELLO_WORLD);
>
> RETURN RETURN_CODE;
> }
>
> Rob
// Name with held because I forgot to '#ifdef' it.
More information about the busybox
mailing list