libcdio  2.1.0
About: GNU libcdio is a library for CD-ROM and CD image access.
  Fossies Dox: libcdio-2.1.0.tar.bz2  ("inofficial" and yet experimental doxygen-generated source code documentation)  

cd-read.c File Reference
#include "util.h"
#include <cdio/mmc.h>
#include "getopt.h"
Include dependency graph for cd-read.c:

Go to the source code of this file.

Data Structures

struct  subopt_entry_t
 
struct  arguments
 

Macros

#define O_BINARY   0
 

Enumerations

enum  {
  OP_HANDLED = 0, OP_SOURCE_AUTO, OP_SOURCE_BIN, OP_SOURCE_CUE,
  OP_SOURCE_NRG, OP_SOURCE_CDRDAO, OP_SOURCE_DEVICE, OP_USAGE,
  OP_READ_MODE, OP_VERSION
}
 
enum  read_mode_t {
  READ_AUDIO = CDIO_READ_MODE_AUDIO, READ_M1F1 = CDIO_READ_MODE_M1F1, READ_M1F2 = CDIO_READ_MODE_M1F2, READ_M2F1 = CDIO_READ_MODE_M2F1,
  READ_M2F2 = CDIO_READ_MODE_M2F2, READ_MODE_UNINIT, READ_ANY
}
 

Functions

static void hexdump (FILE *stream, uint8_t *buffer, unsigned int len, int just_hex)
 
static int compare_subopts (const void *key1, const void *key2)
 
static void process_suboption (const char *subopt, const subopt_entry_t *sublist, const int num, const char *subopt_name)
 
static void parse_source (int opt)
 
static bool parse_options (int argc, char *argv[])
 
static void log_handler (cdio_log_level_t level, const char message[])
 
static void init (void)
 
int main (int argc, char *argv[])
 

Variables

static const subopt_entry_t modes_sublist []
 
static struct arguments opts
 

Macro Definition Documentation

◆ O_BINARY

#define O_BINARY   0

Definition at line 37 of file cd-read.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
OP_HANDLED 
OP_SOURCE_AUTO 
OP_SOURCE_BIN 
OP_SOURCE_CUE 
OP_SOURCE_NRG 
OP_SOURCE_CDRDAO 
OP_SOURCE_DEVICE 
OP_USAGE 
OP_READ_MODE 
OP_VERSION 

Definition at line 41 of file cd-read.c.

◆ read_mode_t

Enumerator
READ_AUDIO 
READ_M1F1 
READ_M1F2 
READ_M2F1 
READ_M2F2 
READ_MODE_UNINIT 
READ_ANY 

Definition at line 62 of file cd-read.c.

Function Documentation

◆ compare_subopts()

static int compare_subopts ( const void *  key1,
const void *  key2 
)
static

Definition at line 149 of file cd-read.c.

References subopt_entry_t::name.

Referenced by process_suboption().

◆ hexdump()

static void hexdump ( FILE *  stream,
uint8_t *  buffer,
unsigned int  len,
int  just_hex 
)
static

Definition at line 121 of file cd-read.c.

References buffer, and i.

Referenced by main().

◆ init()

◆ log_handler()

static void log_handler ( cdio_log_level_t  level,
const char  message[] 
)
static

Definition at line 463 of file cd-read.c.

References CDIO_LOG_DEBUG, CDIO_LOG_INFO, CDIO_LOG_WARN, arguments::debug_level, gl_default_cdio_log_handler, and opts.

Referenced by init().

◆ main()

◆ parse_options()

◆ parse_source()

◆ process_suboption()

static void process_suboption ( const char *  subopt,
const subopt_entry_t sublist,
const int  num,
const char *  subopt_name 
)
static

Variable Documentation

◆ modes_sublist

const subopt_entry_t modes_sublist[]
static
Initial value:
= {
{"any", READ_ANY},
{"audio", READ_AUDIO},
{"m1f1", READ_M1F1},
{"m1f2", READ_M1F2},
{"m2f1", READ_M2F1},
{"m2f2", READ_M2F2},
{"mode1form1", READ_M1F1},
{"mode1form2", READ_M1F2},
{"mode2form1", READ_M2F1},
{"mode2form2", READ_M2F2},
{"red", READ_AUDIO},
}

Definition at line 82 of file cd-read.c.

Referenced by parse_options().

◆ opts

READ_M1F1
Definition: cd-read.c:65
READ_M2F2
Definition: cd-read.c:68
READ_AUDIO
Definition: cd-read.c:64
READ_M1F2
Definition: cd-read.c:66
READ_ANY
Definition: cd-read.c:70
READ_M2F1
Definition: cd-read.c:67