Re: [Freeciv-Dev] [PATCH] include and comments
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Hello,
this patch is good but incomplete. If I have well followed what David
wants to do, headers define functions available for other program (or part
of the program). Include in a header file must contain all the
necessary structs used in the header and only that.
So, in advdomestic, I will add "player.h" and "city.h", in ...
Another remark, we use #include "foo.h" for the FreeCiv headers and
<foo.h> for the system/library/... headers.
There will be lots of patches to integrate for 1.8.2 ! :)
Bye,
On 5 Jul 1999, Markus Linnala wrote:
>
> This patch should be harmless to include. It just adds two
> includes and some comments.
>
> 1999-07-05 Markus Linnala <maage@xxxxxxxxx>
>
> * ai/advdomestic.h: ai_choice is at aitools.h
> * ai/advattitude.h: ai_choice is at aitools.h
>
> diff -u --ignore-space-change --recursive --new-file
> --exclude-from=.diffignore freeciv-cvs/ai/advdomestic.h
> m/freeciv/ai/advdomestic.h
> --- freeciv-cvs/ai/advdomestic.h Sat Jun 12 15:03:19 1999
> +++ m/freeciv/ai/advdomestic.h Sat Jul 3 15:10:22 1999
> @@ -13,8 +13,10 @@
> #ifndef FC__ADVDOMESTIC_H
> #define FC__ADVDOMESTIC_H
>
> +#include <aitools.h>
> +
> void domestic_advisor_choose_build(struct player *pplayer, struct city
> *pcity,
> struct ai_choice *choice);
> void ai_eval_buildings(struct city *pcity);
>
> -#endif
> +#endif /* FC__ADVDOMESTIC_H */
> diff -u --ignore-space-change --recursive --new-file
> --exclude-from=.diffignore freeciv-cvs/common/capability.h
> m/freeciv/common/capability.h
> --- freeciv-cvs/common/capability.h Fri Jun 11 14:56:50 1999
> +++ m/freeciv/common/capability.h Sat Jul 3 15:10:22 1999
> @@ -17,4 +17,4 @@
> int has_capability(const char *cap, const char *capstr);
> int has_capabilities(const char *us, const char *them);
>
> -#endif
> +#endif /* FC__CAPABILITY_H */
> diff -u --ignore-space-change --recursive --new-file
> --exclude-from=.diffignore freeciv-cvs/server/autoattack.h
> m/freeciv/server/autoattack.h
> --- freeciv-cvs/server/autoattack.h Wed Feb 10 23:49:28 1999
> +++ m/freeciv/server/autoattack.h Sat Jul 3 15:10:22 1999
> @@ -15,4 +15,4 @@
>
> void auto_attack(void);
>
> -#endif
> +#endif /* FC__AUTOATTACK_H */
> diff -u --ignore-space-change --recursive --new-file
> --exclude-from=.diffignore freeciv-cvs/ai/advattitude.h
> m/freeciv/ai/advattitude.h
> --- freeciv-cvs/ai/advattitude.h Sat Jun 12 15:03:19 1999
> +++ m/freeciv/ai/advattitude.h Sat Jul 3 15:10:22 1999
> @@ -13,6 +13,8 @@
> #ifndef FC__ADVATTITUDE_H
> #define FC__ADVATTITUDE_H
>
> +#include <aitools.h>
> +
> void attitude_advisor_choose_tech(struct player *pplayer,
> struct ai_choice *choice);
>
> --
> //Markus
>
>
|
|