42e13282d7
This fixes the compilation failure when building on MINIX. Change-Id: Iaa2ac5d73ce5f4a8219cacbe726e1398bcdb5740
32 lines
703 B
C
32 lines
703 B
C
/* genmap - output binary keymap Author: Marcus Hampel
|
|
*/
|
|
#include <sys/types.h>
|
|
#include <stdint.h>
|
|
#include <unistd.h>
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <errno.h>
|
|
#include "../../../include/minix/input.h"
|
|
#include "../../../include/minix/keymap.h"
|
|
|
|
keymap_t keymap = {
|
|
#include KEYSRC
|
|
};
|
|
|
|
int main(void)
|
|
{
|
|
/* This utility used to do compression, but the entire keymap fits in a
|
|
* single 4K file system block now anyway, so who cares anymore?
|
|
*/
|
|
if (write(1, KEY_MAGIC, 4) != 4) {
|
|
perror("write");
|
|
return EXIT_FAILURE;
|
|
}
|
|
if (write(1, keymap, sizeof(keymap)) != sizeof(keymap)) {
|
|
perror("write");
|
|
return EXIT_FAILURE;
|
|
}
|
|
|
|
return EXIT_SUCCESS;
|
|
}
|