The "keymap" command can now be compiled on Zeta as well - for some stupid reason
it introduces a find_directory_r() instead of making the original call thread-safe. Maybe we should only support this operation on Haiku, anyway. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14597 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -308,7 +308,7 @@ Keymap::ComputeChars(const char *buffer, struct re_registers ®s, int i, int &
|
|||||||
} else if (sscanf(buffer + regs.start[i], "0x%s", hexChars) > 0) {
|
} else if (sscanf(buffer + regs.start[i], "0x%s", hexChars) > 0) {
|
||||||
length = strlen(hexChars) / 2;
|
length = strlen(hexChars) / 2;
|
||||||
for (uint32 j = 0; j < length; j++)
|
for (uint32 j = 0; j < length; j++)
|
||||||
sscanf(hexChars + 2*j, "%02x", (uint8*)current + j);
|
sscanf(hexChars + 2*j, "%02hhx", current + j);
|
||||||
}
|
}
|
||||||
fChars[offset] = length;
|
fChars[offset] = length;
|
||||||
offset += length + 1;
|
offset += length + 1;
|
||||||
@@ -1087,7 +1087,10 @@ void
|
|||||||
Keymap::RestoreSystemDefault()
|
Keymap::RestoreSystemDefault()
|
||||||
{
|
{
|
||||||
#ifdef __BEOS__
|
#ifdef __BEOS__
|
||||||
|
// work-around to get rid of this stupid find_directory_r() on Zeta
|
||||||
|
# ifdef find_directory
|
||||||
|
# undef find_directory
|
||||||
|
# endif
|
||||||
BPath path;
|
BPath path;
|
||||||
if (find_directory(B_USER_SETTINGS_DIRECTORY, &path)!=B_OK)
|
if (find_directory(B_USER_SETTINGS_DIRECTORY, &path)!=B_OK)
|
||||||
return;
|
return;
|
||||||
@@ -1098,7 +1101,6 @@ Keymap::RestoreSystemDefault()
|
|||||||
ref.Remove();
|
ref.Remove();
|
||||||
|
|
||||||
_restore_key_map_();
|
_restore_key_map_();
|
||||||
|
|
||||||
#else // ! __BEOS__
|
#else // ! __BEOS__
|
||||||
fprintf(stderr, "Unsupported operation on this platform!\n");
|
fprintf(stderr, "Unsupported operation on this platform!\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user