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
import std; | |
import std.utf; | |
import std.uni; | |
import std.range.primitives : walkLength; | |
import std.range : take, drop; | |
void main() | |
{ | |
auto s2 = "\U0001f9db\u200d\u2640"; // this is a female vampire (vampire + ZWJ + female) |
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
Loaded modules: [ scsi_vhci mac uppc neti ufs zfs apix uhci hook ip usba xhci specfs pcplusmp nfs cpu.generic arp sockfs smbsrv ] | |
kmdb: target stopped at: | |
kmdb_enter+0xb: movq %rax,%rdi | |
[0]> $C | |
fffffffffbc13e70 kmdb_enter+0xb() | |
fffffffffbc13ea0 debug_enter+0x55(fffffffff7806a12) | |
fffffffffbc13ed0 apix`apic_nmi_intr+0x5e(0, fffffffffbc13f10) | |
fffffffffbc13f00 av_dispatch_nmivect+0x2c(fffffffffbc13f10) | |
fffffffffbc13f10 nmiint+0x152() | |
fffffffffbc861b0 drv_usecwait+0x42(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
// pub sub performance test -- adapted from pubsub demo in nanomsg, | |
// and updated for NNG. | |
// | |
// Copyright 2018 Garrett D'Amore <garrett@damore.org> | |
// | |
// This software is supplied under the terms of the MIT License, a | |
// copy of which should be located in the distribution where this | |
// file was obtained (LICENSE.txt). A copy of the license may also be | |
// found online at https://opensource.org/licenses/MIT. |
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
--- a/src/protocol/bus0/bus.c | |
+++ b/src/protocol/bus0/bus.c | |
@@ -297,7 +297,12 @@ bus0_sock_getq_cb(void *arg) | |
} | |
nni_mtx_lock(&s->mtx); | |
- lastp = nni_list_last(&s->pipes); | |
+ if (((lastp = nni_list_last(&s->pipes)) != NULL) && | |
+ (nni_pipe_id(lastp->npipe) == sender)) { | |
+ // If the last pipe in the list is our sender, |
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
eventfd2(0, 0) = 5 | |
write(5, "\1\0\0\0\0\0\0\0", 8) = 8 | |
poll([{fd=5, events=POLLRDNORM}], 1, 100) = 0 (Timeout) |
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
garrett@hipster{25}> git diff uts/common/os/exec.c | cat | |
diff --git a/usr/src/uts/common/os/exec.c b/usr/src/uts/common/os/exec.c | |
index f222a20..611a6f3 100644 | |
--- a/usr/src/uts/common/os/exec.c | |
+++ b/usr/src/uts/common/os/exec.c | |
@@ -100,6 +100,7 @@ uint_t auxv_hwcap32_2 = 0; /* 32-bit version of auxv_hwcap2 */ | |
#define PSUIDFLAGS (SNOCD|SUGID) | |
#define DEVFD "/dev/fd/" | |
+#define DEVFD_STRLEN (sizeof (DEVFD) - 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
set prompt="%B%m%b{%h}%# " | |
set echo_style=both | |
bindkey ' ' magic-space | |
if ( -f /usr/bin/stty ) then | |
stty sane | |
endif | |
switch ($term) | |
case "wterm": | |
case "xterm*": |
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/message.go b/message.go | |
index 2ae59a5..e1321e8 100644 | |
--- a/message.go | |
+++ b/message.go | |
@@ -15,6 +15,7 @@ | |
package mangos | |
import ( | |
+ "sync" | |
"sync/atomic" |
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/usr/src/cmd/printf/printf.c b/usr/src/cmd/printf/printf.c | |
index fe1bb1b..bf07982 100644 | |
--- a/usr/src/cmd/printf/printf.c | |
+++ b/usr/src/cmd/printf/printf.c | |
@@ -224,12 +224,19 @@ doformat(char *fmt, int *rval) | |
l = strspn(fmt, digits); | |
if ((l > 0) && (fmt[l] == '$')) { | |
int idx = atoi(fmt); | |
+ if (fargv == NULL) { | |
+ warnx1(_("incomplete use of n$"), NULL, NULL); |
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
-tests[21][foramt]='%2$s' | |
-tests[21][args]='abc xyz" | |
+tests[21][format]='%2$s' | |
+tests[21][args]='abc xyz' |