LIRC libraries
LinuxInfraredRemoteControl
config_file.c File Reference

Implements config_file.h. More...

#include <dirent.h>
#include <errno.h>
#include <glob.h>
#include <limits.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <libgen.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
#include <ctype.h>
#include "include/media/lirc.h"
#include "lirc/lirc_log.h"
#include "lirc/lirc_options.h"
#include "lirc/ir_remote.h"
#include "lirc/config_file.h"
#include "lirc/transmit.h"
#include "lirc/config_flags.h"

Go to the source code of this file.

Macros

#define LINE_LEN   1024
 
#define MAX_INCLUDES   10
 

Enumerations

enum  directive {
  ID_none, ID_remote, ID_codes, ID_raw_codes,
  ID_raw_name
}
 

Functions

void ** init_void_array (struct void_array *ar, size_t chunk_size, size_t item_size)
 
int add_void_array (struct void_array *ar, void *dataptr)
 
void * get_void_array (struct void_array *ar)
 
void * s_malloc (size_t size)
 
char * s_strdup (char *string)
 
ir_code s_strtocode (const char *val)
 
__u32 s_strtou32 (char *val)
 
int s_strtoi (char *val)
 
unsigned int s_strtoui (char *val)
 
lirc_t s_strtolirc_t (char *val)
 
int checkMode (int is_mode, int c_mode, char *error)
 
int addSignal (struct void_array *signals, char *val)
 
struct ir_ncodedefineCode (char *key, char *val, struct ir_ncode *code)
 
struct ir_code_nodedefineNode (struct ir_ncode *code, const char *val)
 
int parseFlags (char *val)
 
int defineRemote (char *key, char *val, char *val2, struct ir_remote *rem)
 
struct ir_remoteread_config (FILE *f, const char *name)
 
void free_config (struct ir_remote *remotes)
 

Variables

const char * whitespace = " \t"
 
const struct flaglist all_flags []
 

Detailed Description

Implements config_file.h.

Author
Pablo d'Angelo

Definition in file config_file.c.

Variable Documentation

const struct flaglist all_flags[]
Initial value:
= {
{"RAW_CODES", RAW_CODES},
{"RC5", RC5},
{"SHIFT_ENC", SHIFT_ENC},
{"RC6", RC6},
{"RCMM", RCMM},
{"SPACE_ENC", SPACE_ENC},
{"SPACE_FIRST", SPACE_FIRST},
{"GOLDSTAR", GOLDSTAR},
{"GRUNDIG", GRUNDIG},
{"BO", BO},
{"SERIAL", SERIAL},
{"XMP", XMP},
{"REVERSE", REVERSE},
{"NO_HEAD_REP", NO_HEAD_REP},
{"NO_FOOT_REP", NO_FOOT_REP},
{"CONST_LENGTH", CONST_LENGTH},
{"REPEAT_HEADER", REPEAT_HEADER},
{NULL, 0},
}
#define NO_FOOT_REP
#define RC6
#define GOLDSTAR
#define SPACE_ENC
#define RCMM
#define RC5
#define REPEAT_HEADER
#define SPACE_FIRST
#define CONST_LENGTH
#define NO_HEAD_REP
#define GRUNDIG
#define SERIAL
#define SHIFT_ENC
#define BO
#define RAW_CODES
#define XMP

All flags i config file: Their name and mask.

Definition at line 87 of file config_file.c.