Freeciv-3.3
Loading...
Searching...
No Matches
Data Structures | Macros | Functions
section_file.h File Reference
#include "support.h"
#include "spechash.h"

Go to the source code of this file.

Data Structures

struct  section
 
struct  section_file
 

Macros

#define SECFILE_LOG(secfile, psection, format, ...)
 
#define SECFILE_RETURN_IF_FAIL(secfile, psection, condition)
 
#define SECFILE_RETURN_VAL_IF_FAIL(secfile, psection, condition, value)
 
#define SPECHASH_TAG   section
 
#define SPECHASH_CSTR_KEY_TYPE
 
#define SPECHASH_IDATA_TYPE   struct section *
 
#define SPECHASH_TAG   entry
 
#define SPECHASH_ASTR_KEY_TYPE
 
#define SPECHASH_IDATA_TYPE   struct entry *
 

Functions

void secfile_log (const struct section_file *secfile, const struct section *psection, const char *file, const char *function, int line, const char *format,...) fc__attribute((__format__(__printf__
 
bool entry_from_token (struct section *psection, const char *name, const char *tok)
 

Macro Definition Documentation

◆ SECFILE_LOG

#define SECFILE_LOG (   secfile,
  psection,
  format,
  ... 
)
Value:
secfile_log(secfile, psection, __FILE__, __FUNCTION__, __FC_LINE__, \
format, ## __VA_ARGS__)
char * incite_cost
Definition comments.c:76
#define __FC_LINE__
Definition log.h:41
void secfile_log(const struct section_file *secfile, const struct section *psection, const char *file, const char *function, int line, const char *format,...) fc__attribute((__format__(__printf__

Definition at line 59 of file section_file.h.

◆ SECFILE_RETURN_IF_FAIL

#define SECFILE_RETURN_IF_FAIL (   secfile,
  psection,
  condition 
)
Value:
if (!(condition)) { \
SECFILE_LOG(secfile, psection, "Assertion '%s' failed.", #condition); \
return; \
}

Definition at line 62 of file section_file.h.

◆ SECFILE_RETURN_VAL_IF_FAIL

#define SECFILE_RETURN_VAL_IF_FAIL (   secfile,
  psection,
  condition,
  value 
)
Value:
if (!(condition)) { \
SECFILE_LOG(secfile, psection, "Assertion '%s' failed.", #condition); \
return value; \
}

Definition at line 67 of file section_file.h.

◆ SPECHASH_ASTR_KEY_TYPE

#define SPECHASH_ASTR_KEY_TYPE

Definition at line 79 of file section_file.h.

◆ SPECHASH_CSTR_KEY_TYPE

#define SPECHASH_CSTR_KEY_TYPE

Definition at line 74 of file section_file.h.

◆ SPECHASH_IDATA_TYPE [1/2]

#define SPECHASH_IDATA_TYPE   struct section *

Definition at line 75 of file section_file.h.

◆ SPECHASH_IDATA_TYPE [2/2]

#define SPECHASH_IDATA_TYPE   struct entry *

Definition at line 75 of file section_file.h.

◆ SPECHASH_TAG [1/2]

#define SPECHASH_TAG   section

Definition at line 73 of file section_file.h.

◆ SPECHASH_TAG [2/2]

#define SPECHASH_TAG   entry

Definition at line 73 of file section_file.h.

Function Documentation

◆ entry_from_token()

bool entry_from_token ( struct section psection,
const char name,
const char tok 
)

Add entry to section from token.

Definition at line 135 of file section_file.c.

Referenced by entry_from_inf_token().

◆ secfile_log()

void secfile_log ( const struct section_file secfile,
const struct section psection,
const char file,
const char function,
int  line,
const char format,
  ... 
)