Add extern statement. Also fix the strlwr definition on Windows.master
@@ -1,5 +1,5 @@ | |||||
cmake_minimum_required(VERSION 3.24) | cmake_minimum_required(VERSION 3.24) | ||||
project(midi_note_id_utils C) | |||||
project(midi_utils C) | |||||
set(CMAKE_C_STANDARD 11) | set(CMAKE_C_STANDARD 11) | ||||
@@ -1,6 +1,6 @@ | |||||
#include "midi-utils.h" | #include "midi-utils.h" | ||||
#if !defined __WIN32 | |||||
#if !defined _WIN32 | |||||
void _strlwr(char* dest) { | void _strlwr(char* dest) { | ||||
for (unsigned int i = 0; i < strlen(dest); i += 1) { | for (unsigned int i = 0; i < strlen(dest); i += 1) { | ||||
if ('A' <= dest[i] && dest[i] <= 'Z') { | if ('A' <= dest[i] && dest[i] <= 'Z') { | ||||
@@ -11,8 +11,16 @@ | |||||
#define MIDI_CC_SOSTENUTO 0x42u | #define MIDI_CC_SOSTENUTO 0x42u | ||||
#define MIDI_CC_UNACORDA 0x43u | #define MIDI_CC_UNACORDA 0x43u | ||||
char* MIDI_GetNoteName(unsigned char); | |||||
#if defined __cplusplus | |||||
extern "C" { | |||||
#endif | |||||
char *MIDI_GetNoteName(unsigned char); | |||||
unsigned char MIDI_GetNoteFromName(const char*); | |||||
unsigned char MIDI_GetNoteFromName(const char *); | |||||
#if defined __cplusplus | |||||
} | |||||
#endif | |||||
#endif | #endif |