mirror of
https://github.com/jart/cosmopolitan.git
synced 2024-05-13 09:02:41 +00:00
Revert "move back to proc, __static_yoink in paginate.c does not work"
This reverts commit 38d0728107
.
This commit is contained in:
parent
38d0728107
commit
0eab6a8489
|
@ -19,9 +19,7 @@
|
|||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/syscall_support-nt.internal.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/intrin/kprintf.h"
|
||||
#include "libc/intrin/safemacros.internal.h"
|
||||
#include "libc/intrin/weaken.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/mem/gc.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
|
@ -30,8 +28,6 @@
|
|||
#include "libc/temp.h"
|
||||
#include "libc/x/x.h"
|
||||
|
||||
__static_yoink("__utf16to8");
|
||||
|
||||
static char *get_pagerpath(char *pathbuf, size_t pathbufsz) {
|
||||
char *pagerpath;
|
||||
if (strcmp(nulltoempty(getenv("TERM")), "dumb") && isatty(0) && isatty(1) &&
|
||||
|
@ -47,10 +43,9 @@ static char *get_pagerpath(char *pathbuf, size_t pathbufsz) {
|
|||
static bool run_pager(char *args[hasatleast 3]) {
|
||||
char16_t widepath[PATH_MAX];
|
||||
int n, pid;
|
||||
kprintf("utf16to8 %p\n", _weaken(__utf16to8));
|
||||
if (IsWindows() && !strcasecmp(args[0], "/C/Windows/System32/more.com") &&
|
||||
(!_weaken(__utf16to8) || ((n = __mkntpath(args[1], widepath)) == -1) ||
|
||||
!(args[1] = gc(_weaken(__utf16to8)(widepath, n, 0))))) {
|
||||
(((n = __mkntpath(args[1], widepath)) == -1) ||
|
||||
!(args[1] = gc(utf16to8(widepath, n, 0))))) {
|
||||
return false;
|
||||
}
|
||||
if ((pid = fork()) != -1) {
|
Loading…
Reference in a new issue