naev 0.10.4
Functions | Variables
cond.c File Reference

Handles lua conditionals. More...

#include "cond.h"
#include "log.h"
#include "nlua.h"
#include "nluadef.h"

Go to the source code of this file.

Functions

int cond_init (void)
 Initializes the conditional subsystem. More...
 
void cond_exit (void)
 Destroys the conditional subsystem. More...
 
int cond_check (const char *cond)
 Checks to see if a condition is true. More...
 

Variables

static nlua_env cond_env = LUA_NOREF
 

Detailed Description

Handles lua conditionals.

Definition in file cond.c.

Function Documentation

◆ cond_check()

int cond_check ( const char *  cond)

Checks to see if a condition is true.

Parameters
condCondition to check.
Returns
0 if is false, 1 if is true, -1 on error.

Definition at line 53 of file cond.c.

◆ cond_exit()

void cond_exit ( void  )

Destroys the conditional subsystem.

Definition at line 41 of file cond.c.

◆ cond_init()

int cond_init ( void  )

Initializes the conditional subsystem.

Conditional Lua env.

Definition at line 24 of file cond.c.

Variable Documentation

◆ cond_env

nlua_env cond_env = LUA_NOREF
static

Definition at line 19 of file cond.c.