This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sys/socket.h> | |
#include <err.h> | |
#include <errno.h> | |
#include <netinet/in.h> | |
#include <stdio.h> | |
#include <string.h> | |
int main(void) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/kblayout-compiler/kblayout-compiler.c b/kblayout-compiler/kblayout-compiler.c | |
index f38e640..b89e83c 100644 | |
--- a/kblayout-compiler/kblayout-compiler.c | |
+++ b/kblayout-compiler/kblayout-compiler.c | |
@@ -601,6 +601,8 @@ int main(int argc, char* argv[]) | |
} | |
break; | |
} | |
+ if ( !found_key ) | |
+ printf("%s\n", line); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include ../../build-aux/platform.mak | |
include ../../build-aux/compiler.mak | |
include ../../build-aux/version.mak | |
include ../../build-aux/dirs.mak | |
OPTLEVEL?=$(DEFAULT_OPTLEVEL) | |
CFLAGS?=$(OPTLEVEL) | |
CFLAGS:=$(CXXFLAGS) -Wall -Wextra -Wno-logical-not-parentheses -Wno-unused-parameter | |
CPPFLAGS:=$(CPPFLAGS) -DBACKWARDS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/utils/Makefile b/utils/Makefile | |
index 53f10fe..0e0c7d0 100644 | |
--- a/utils/Makefile | |
+++ b/utils/Makefile | |
@@ -72,6 +72,9 @@ BINARIES=\ | |
$(BINARIES_EXCEPT_INSTALL) \ | |
xinstall | |
+MANPAGES=\ | |
+chkblayout.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size_t size = 0; | |
char* buffer = NULL; | |
while ( true ) | |
{ | |
size = size ? 2 * size : 4096; | |
buffer = malloc(size); | |
if ( !buffer ) | |
err(1, "malloc"); | |
ssize_t used = readlink(...); | |
/* error check */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
static const char code[] = | |
"#include <stdio.h>\n" | |
"\n" | |
"static const char code[] =\n" | |
" \"\0\";\n" | |
"\n" | |
"int main(void) {\n" | |
" for (size_t i = 0; i < sizeof(code) - 1; i++) {\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* unistd.h: */ | |
#ifndef _UNISTD_H | |
#define _UNISTD_H | |
#include <sys/types.h> | |
#ifdef __cplusplus | |
extern "C" { | |
#endif | |
int execv(const char*, char* const[]); | |
int execve(const char*, char* const[], char* const[]); | |
int execvp(const char*, char* const[]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <fcntl.h> | |
#include <inttypes.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
// The highest bit in the uintmax_t type to avoid shift overflow. | |
#define UINTMAX_HIGH (UINTMAX_C(1) << (sizeof(uintmax_t) * 8 - 1)) | |
// Attempt 1: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/kernel/x64/boot.S b/kernel/x64/boot.S | |
index e541b55..da5798c 100644 | |
--- a/kernel/x64/boot.S | |
+++ b/kernel/x64/boot.S | |
@@ -174,6 +174,15 @@ __start: | |
.code64 | |
2: | |
+ # The upper 32 bits of the general purpose registers are *undefined* after | |
+ # switching into 64-bit mode (Intel Manual, Vol 1, 3.4.1.1 "General-Purpose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wspace ::= '\t' | '\n' | '\v' | '\f' | '\r' | ' '. | |
wspaces ::= <wspace> | |
| <wspace> <wspaces>. | |
ospaces ::= | |
| <wspaces>. | |
char-constant ::= '\'' [^'] '\'' | |
| '\'' '\\' <char> '\''. | |
range-char ::= [^]]. | |
ranges ::= | <range-char> <ranges>. | |
range-constant ::= '[' <ranges> '] |
NewerOlder