Freeciv-3.3
Loading...
Searching...
No Matches
manual_uclass.c
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13
14#ifdef HAVE_CONFIG_H
15#include <fc_config.h>
16#endif
17
18/* utility */
19#include "fcintl.h"
20
21/* common */
22#include "game.h"
23#include "tech.h"
24
25/* client */
26#include "helpdata.h"
27
28/* tools/manual */
29#include "fc_manual.h"
30
31/**********************************************************************/
38{
39 FILE *doc;
40
42
43 if (doc == NULL) {
44 return FALSE;
45 }
46
47 /* TRANS: markup ... Freeciv version ... ruleset name ... markup */
48 fprintf(doc, _("%sFreeciv %s unit classes help (%s)%s\n\n"),
50 tag_info->title_end);
51 unit_class_iterate(uclass) {
52 char buf[64000];
53
54 fprintf(doc, tag_info->item_begin, "uclass", uclass_index(uclass));
55 fprintf(doc, "%s%s%s\n\n", tag_info->sect_title_begin,
56 uclass_name_translation(uclass), tag_info->sect_title_end);
57
58 fprintf(doc, tag_info->subitem_begin, "helptext");
59 buf[0] = '\0';
60 helptext_unitclass(uclass, buf, sizeof(buf));
61 fprintf(doc, "%s", buf);
62 fprintf(doc, "%s", tag_info->subitem_end);
63
64 fprintf(doc, "%s", tag_info->item_end);
66
68
69 return TRUE;
70}
char * incite_cost
Definition comments.c:76
void manual_finalize(struct tag_types *tag_info, FILE *doc, enum manuals manual)
Definition fc_manual.c:320
FILE * manual_start(struct tag_types *tag_info, int manual_number)
Definition fc_manual.c:291
#define _(String)
Definition fcintl.h:67
struct civ_game game
Definition game.c:61
void helptext_unitclass(struct unit_class *pclass, char *buf, size_t bufsz)
Definition helpdata.c:1866
bool manual_uclasses(struct tag_types *tag_info)
struct packet_ruleset_control control
Definition game.h:83
char name[MAX_LEN_NAME]
#define TRUE
Definition support.h:46
#define FALSE
Definition support.h:47
const char * uclass_name_translation(const struct unit_class *pclass)
Definition unittype.c:1638
#define unit_class_iterate(_p)
Definition unittype.h:915
#define uclass_index(_c_)
Definition unittype.h:749
#define unit_class_iterate_end
Definition unittype.h:922