Recognizes if input is ogg or not.
[xiph.git] / vorbis-tools / ogg123 / cfgfile_options.h
blob5c9fd402614cfa0a2f9596cba9d7e748b7b0d37c
1 /********************************************************************
2 * *
3 * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
4 * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY *
5 * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. *
6 * PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
7 * *
8 * THE Ogg123 SOURCE CODE IS (C) COPYRIGHT 2000-2001 *
9 * by Stan Seibert <volsung@xiph.org> AND OTHER CONTRIBUTORS *
10 * http://www.xiph.org/ *
11 * *
12 ********************************************************************
14 last mod: $Id: cfgfile_options.h,v 1.2 2001/12/19 02:52:53 volsung Exp $
16 ********************************************************************/
18 #ifndef __CFGFILE_OPTIONS_H__
19 #define __CFGFILE_OPTIONS_H__
21 #include <stdio.h>
23 typedef enum {
24 opt_type_none = 0,
25 opt_type_bool,
26 opt_type_char,
27 opt_type_string,
28 opt_type_int,
29 opt_type_float,
30 opt_type_double
31 } file_option_type_t;
33 typedef enum {
34 parse_ok = 0,
35 parse_syserr,
36 parse_keynotfound,
37 parse_nokey,
38 parse_badvalue,
39 parse_badtype
40 } parse_code_t;
42 typedef struct file_option_t {
43 char found;
44 const char *name;
45 const char *desc;
46 file_option_type_t type;
47 void *ptr;
48 void *dfl;
49 } file_option_t;
51 void file_options_init (file_option_t opts[]);
52 void file_options_describe (file_option_t opts[], FILE *outfile);
54 parse_code_t parse_line (file_option_t opts[], char *line);
55 parse_code_t parse_config_file (file_option_t opts[], const char *filename);
56 const char *parse_error_string (parse_code_t pcode);
57 void parse_std_configs (file_option_t opts[]);
59 #endif /* __OPTIONS_H__ */