add string arrays for enums

This commit is contained in:
Josh Coalson
2000-12-22 22:35:33 +00:00
parent 7e17035e54
commit cbf595f158
6 changed files with 73 additions and 4 deletions

View File

@@ -24,11 +24,12 @@
typedef enum {
FLAC__ENCODER_WRITE_OK = 0,
FLAC__ENCODER_WRITE_FATAL_ERROR = 1
FLAC__ENCODER_WRITE_FATAL_ERROR
} FLAC__EncoderWriteStatus;
extern const char *FLAC__EncoderWriteStatusString[];
typedef enum {
FLAC__ENCODER_OK,
FLAC__ENCODER_OK = 0,
FLAC__ENCODER_UNINITIALIZED,
FLAC__ENCODER_INVALID_NUMBER_OF_CHANNELS,
FLAC__ENCODER_INVALID_BITS_PER_SAMPLE,
@@ -44,6 +45,7 @@ typedef enum {
FLAC__ENCODER_FATAL_ERROR_WHILE_WRITING, /* that is, the write_callback returned an error */
FLAC__ENCODER_MEMORY_ALLOCATION_ERROR
} FLAC__EncoderState;
extern const char *FLAC__EncoderStateString[];
struct FLAC__EncoderPrivate;
typedef struct {

View File

@@ -23,7 +23,7 @@
#include "stream_decoder.h"
typedef enum {
FLAC__FILE_DECODER_OK,
FLAC__FILE_DECODER_OK = 0,
FLAC__FILE_DECODER_SEEKING,
FLAC__FILE_DECODER_END_OF_FILE,
FLAC__FILE_DECODER_ERROR_OPENING_FILE,
@@ -32,6 +32,7 @@ typedef enum {
FLAC__FILE_DECODER_STREAM_ERROR,
FLAC__FILE_DECODER_UNINITIALIZED
} FLAC__FileDecoderState;
extern const char *FLAC__FileDecoderStateString[];
struct FLAC__FileDecoderPrivate;
typedef struct {

View File

@@ -23,7 +23,7 @@
#include "format.h"
typedef enum {
FLAC__STREAM_DECODER_SEARCH_FOR_METADATA,
FLAC__STREAM_DECODER_SEARCH_FOR_METADATA = 0,
FLAC__STREAM_DECODER_READ_METADATA,
FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC,
FLAC__STREAM_DECODER_READ_FRAME,
@@ -34,21 +34,25 @@ typedef enum {
FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR,
FLAC__STREAM_DECODER_UNINITIALIZED
} FLAC__StreamDecoderState;
extern const char *FLAC__StreamDecoderStateString[];
typedef enum {
FLAC__STREAM_DECODER_READ_CONTINUE,
FLAC__STREAM_DECODER_READ_END_OF_STREAM,
FLAC__STREAM_DECODER_READ_ABORT
} FLAC__StreamDecoderReadStatus;
extern const char *FLAC__StreamDecoderReadStatusString[];
typedef enum {
FLAC__STREAM_DECODER_WRITE_CONTINUE,
FLAC__STREAM_DECODER_WRITE_ABORT
} FLAC__StreamDecoderWriteStatus;
extern const char *FLAC__StreamDecoderWriteStatusString[];
typedef enum {
FLAC__STREAM_DECODER_ERROR_LOST_SYNC
} FLAC__StreamDecoderErrorStatus;
extern const char *FLAC__StreamDecoderErrorStatusString[];
struct FLAC__StreamDecoderPrivate;
typedef struct {