winmm/tests: Share common function dbg_mcierr.
This commit is contained in:
parent
cd56299e2f
commit
c6a655622c
|
@ -39,7 +39,7 @@ typedef union {
|
|||
MCI_GENERIC_PARMS gen;
|
||||
} MCI_PARMS_UNION;
|
||||
|
||||
static const char* dbg_mcierr(MCIERROR err)
|
||||
const char* dbg_mcierr(MCIERROR err)
|
||||
{
|
||||
switch (err) {
|
||||
case 0: return "0=NOERROR";
|
||||
|
|
|
@ -33,76 +33,7 @@ typedef union {
|
|||
MCI_GENERIC_PARMS gen;
|
||||
} MCI_PARMS_UNION;
|
||||
|
||||
static const char* dbg_mcierr(MCIERROR err)
|
||||
{
|
||||
switch (err) {
|
||||
case 0: return "0=NOERROR";
|
||||
#define X(label) case label: return #label ;
|
||||
X(MCIERR_INVALID_DEVICE_ID)
|
||||
X(MCIERR_UNRECOGNIZED_KEYWORD)
|
||||
X(MCIERR_UNRECOGNIZED_COMMAND)
|
||||
X(MCIERR_HARDWARE)
|
||||
X(MCIERR_INVALID_DEVICE_NAME)
|
||||
X(MCIERR_OUT_OF_MEMORY)
|
||||
X(MCIERR_DEVICE_OPEN)
|
||||
X(MCIERR_CANNOT_LOAD_DRIVER)
|
||||
X(MCIERR_MISSING_COMMAND_STRING)
|
||||
X(MCIERR_PARAM_OVERFLOW)
|
||||
X(MCIERR_MISSING_STRING_ARGUMENT)
|
||||
X(MCIERR_BAD_INTEGER)
|
||||
X(MCIERR_PARSER_INTERNAL)
|
||||
X(MCIERR_DRIVER_INTERNAL)
|
||||
X(MCIERR_MISSING_PARAMETER)
|
||||
X(MCIERR_UNSUPPORTED_FUNCTION)
|
||||
X(MCIERR_FILE_NOT_FOUND)
|
||||
X(MCIERR_DEVICE_NOT_READY)
|
||||
X(MCIERR_INTERNAL)
|
||||
X(MCIERR_DRIVER)
|
||||
X(MCIERR_CANNOT_USE_ALL)
|
||||
X(MCIERR_MULTIPLE)
|
||||
X(MCIERR_EXTENSION_NOT_FOUND)
|
||||
X(MCIERR_OUTOFRANGE)
|
||||
X(MCIERR_FLAGS_NOT_COMPATIBLE)
|
||||
X(MCIERR_FILE_NOT_SAVED)
|
||||
X(MCIERR_DEVICE_TYPE_REQUIRED)
|
||||
X(MCIERR_DEVICE_LOCKED)
|
||||
X(MCIERR_DUPLICATE_ALIAS)
|
||||
X(MCIERR_BAD_CONSTANT)
|
||||
X(MCIERR_MUST_USE_SHAREABLE)
|
||||
X(MCIERR_MISSING_DEVICE_NAME)
|
||||
X(MCIERR_BAD_TIME_FORMAT)
|
||||
X(MCIERR_NO_CLOSING_QUOTE)
|
||||
X(MCIERR_DUPLICATE_FLAGS)
|
||||
X(MCIERR_INVALID_FILE)
|
||||
X(MCIERR_NULL_PARAMETER_BLOCK)
|
||||
X(MCIERR_UNNAMED_RESOURCE)
|
||||
X(MCIERR_NEW_REQUIRES_ALIAS)
|
||||
X(MCIERR_NOTIFY_ON_AUTO_OPEN)
|
||||
X(MCIERR_NO_ELEMENT_ALLOWED)
|
||||
X(MCIERR_NONAPPLICABLE_FUNCTION)
|
||||
X(MCIERR_ILLEGAL_FOR_AUTO_OPEN)
|
||||
X(MCIERR_FILENAME_REQUIRED)
|
||||
X(MCIERR_EXTRA_CHARACTERS)
|
||||
X(MCIERR_DEVICE_NOT_INSTALLED)
|
||||
X(MCIERR_GET_CD)
|
||||
X(MCIERR_SET_CD)
|
||||
X(MCIERR_SET_DRIVE)
|
||||
X(MCIERR_DEVICE_LENGTH)
|
||||
X(MCIERR_DEVICE_ORD_LENGTH)
|
||||
X(MCIERR_NO_INTEGER)
|
||||
X(MCIERR_NO_WINDOW)
|
||||
X(MCIERR_CREATEWINDOW)
|
||||
X(MCIERR_FILE_READ)
|
||||
X(MCIERR_FILE_WRITE)
|
||||
X(MCIERR_NO_IDENTITY)
|
||||
#undef X
|
||||
default: {
|
||||
static char name[20]; /* Not to be called twice in a parameter list! */
|
||||
sprintf(name, "MMSYSERR %u", err);
|
||||
return name;
|
||||
}
|
||||
}
|
||||
}
|
||||
extern const char* dbg_mcierr(MCIERROR err); /* from mci.c */
|
||||
|
||||
static BOOL spurious_message(LPMSG msg)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue