remove merge conflict artifacts, prefix MwIsKeyUTF8
Some checks failed
pyrite-dev/milsko/pipeline/head There was a failure building this commit
Some checks failed
pyrite-dev/milsko/pipeline/head There was a failure building this commit
This commit is contained in:
parent
597dbe4e5a
commit
2e30d7f4d9
4 changed files with 6 additions and 8 deletions
|
|
@ -42,20 +42,19 @@ MWDECL void MwStringSize(char* out, MwOffset size);
|
||||||
MWDECL void MwStringTime(char* out, time_t t);
|
MWDECL void MwStringTime(char* out, time_t t);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
<<<<<<< HEAD
|
|
||||||
* @brief Prints up to n characters into a bufferMwStringPrintIntoBuffer.
|
* @brief Prints up to n characters into a bufferMwStringPrintIntoBuffer.
|
||||||
* @note On compilers that support C99, this uses vsnprintf to safely print into a buffer; on compilers that don't, vsprintf is used.
|
* @note On compilers that support C99, this uses vsnprintf to safely print into a buffer; on compilers that don't, vsprintf is used.
|
||||||
* @param out Buffer
|
* @param out Buffer
|
||||||
* @param size Max size
|
* @param size Max size
|
||||||
*/
|
*/
|
||||||
MWDECL void MwStringPrintIntoBuffer(char* out, MwU32 size, const char* fmt, ...);
|
MWDECL void MwStringPrintIntoBuffer(char* out, MwU32 size, const char* fmt, ...);
|
||||||
=======
|
|
||||||
|
/*!
|
||||||
* @brief Check if the given key is UTF8
|
* @brief Check if the given key is UTF8
|
||||||
* @param key Input
|
* @param key Input
|
||||||
* @return whether its utf8
|
* @return whether its utf8
|
||||||
*/
|
*/
|
||||||
MWDECL MwBool MwIsKeyUTF8(MwU32 key);
|
MWDECL MwBool MwStringIsKeyUTF8(MwU32 key);
|
||||||
>>>>>>> master
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -834,7 +834,7 @@ static void keyboard_key(void* data,
|
||||||
key = MwLLKeyControl;
|
key = MwLLKeyControl;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if(MwIsKeyUTF8(sym)) {
|
if(MwStringIsKeyUTF8(sym)) {
|
||||||
key = sym;
|
key = sym;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -558,7 +558,7 @@ static void MwLLNextEventImpl(MwLL handle) {
|
||||||
strcpy(str, s);
|
strcpy(str, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(MwIsKeyUTF8(sym)) {
|
if(MwStringIsKeyUTF8(sym)) {
|
||||||
char s = str[0];
|
char s = str[0];
|
||||||
|
|
||||||
if(ev.xkey.state & (ShiftMask | LockMask) && !(ev.xkey.state & (ControlMask | Mod1Mask))) {
|
if(ev.xkey.state & (ShiftMask | LockMask) && !(ev.xkey.state & (ControlMask | Mod1Mask))) {
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ void MwStringPrintIntoBuffer(char* out, MwU32 size, const char* fmt, ...) {
|
||||||
va_end(va);
|
va_end(va);
|
||||||
};
|
};
|
||||||
|
|
||||||
MWDECL MwBool MwIsKeyUTF8(MwU32 key) {
|
MWDECL MwBool MwStringIsKeyUTF8(MwU32 key) {
|
||||||
unsigned char bytes[sizeof(MwU32)];
|
unsigned char bytes[sizeof(MwU32)];
|
||||||
memcpy(bytes, &key, sizeof(MwU32));
|
memcpy(bytes, &key, sizeof(MwU32));
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
@ -111,4 +111,3 @@ MWDECL MwBool MwIsKeyUTF8(MwU32 key) {
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
>>>>>>> master
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue