Freeciv-3.2
Loading...
Searching...
No Matches
iterator.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 "shared.h"
20
21#include "iterator.h"
22
23/*******************************************************************/
26static void invalid_iter_next(struct iterator *it)
27{
28 /* Do nothing. */
29}
30
31/*******************************************************************/
34static void *invalid_iter_get(const struct iterator *it)
35{
36 return NULL;
37}
38
39/*******************************************************************/
42static bool invalid_iter_valid(const struct iterator *it)
43{
44 return FALSE;
45}
46
47/*******************************************************************/
52{
56 return it;
57}
char * incite_cost
Definition comments.c:75
static void * invalid_iter_get(const struct iterator *it)
Definition iterator.c:34
static bool invalid_iter_valid(const struct iterator *it)
Definition iterator.c:42
struct iterator * invalid_iter_init(struct iterator *it)
Definition iterator.c:51
static void invalid_iter_next(struct iterator *it)
Definition iterator.c:26
bool(* valid)(const struct iterator *it)
Definition iterator.h:34
void *(* get)(const struct iterator *it)
Definition iterator.h:33
void(* next)(struct iterator *it)
Definition iterator.h:32
#define FALSE
Definition support.h:47