mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-03 17:58:30 +00:00
Add x86_64-linux-gnu emulator
I wanted a tiny scriptable meltdown proof way to run userspace programs and visualize how program execution impacts memory. It helps to explain how things like Actually Portable Executable works. It can show you how the GCC generated code is going about manipulating matrices and more. I didn't feel fully comfortable with Qemu and Bochs because I'm not smart enough to understand them. I wanted something like gVisor but with much stronger levels of assurances. I wanted a single binary that'll run, on all major operating systems with an embedded GPL barrier ZIP filesystem that is tiny enough to transpile to JavaScript and run in browsers too. https://justine.storage.googleapis.com/emulator625.mp4
This commit is contained in:
parent
467504308a
commit
f4f4caab0e
1052 changed files with 65667 additions and 7825 deletions
|
@ -32,6 +32,7 @@
|
|||
#include "dsp/mpeg/idct.h"
|
||||
#include "dsp/mpeg/mpeg.h"
|
||||
#include "dsp/mpeg/video.h"
|
||||
#include "libc/bits/initializer.h"
|
||||
#include "libc/conv/conv.h"
|
||||
#include "libc/log/log.h"
|
||||
#include "libc/macros.h"
|
||||
|
@ -455,18 +456,6 @@ long plmpegdecode_latency_;
|
|||
static plm_vlc_t *PLM_VIDEO_MACROBLOCK_TYPE[4];
|
||||
static plm_vlc_t *PLM_VIDEO_DCT_SIZE[3];
|
||||
|
||||
static textstartup void __init_mpeg1(void) {
|
||||
PLM_VIDEO_MACROBLOCK_TYPE[0] = NULL;
|
||||
PLM_VIDEO_MACROBLOCK_TYPE[1] = PLM_VIDEO_MACROBLOCK_TYPE_INTRA;
|
||||
PLM_VIDEO_MACROBLOCK_TYPE[2] = PLM_VIDEO_MACROBLOCK_TYPE_PREDICTIVE,
|
||||
PLM_VIDEO_MACROBLOCK_TYPE[3] = PLM_VIDEO_MACROBLOCK_TYPE_B;
|
||||
PLM_VIDEO_DCT_SIZE[0] = PLM_VIDEO_DCT_SIZE_LUMINANCE;
|
||||
PLM_VIDEO_DCT_SIZE[1] = PLM_VIDEO_DCT_SIZE_CHROMINANCE;
|
||||
PLM_VIDEO_DCT_SIZE[2] = PLM_VIDEO_DCT_SIZE_CHROMINANCE;
|
||||
}
|
||||
|
||||
INITIALIZER(300, _init_mpeg1, __init_mpeg1());
|
||||
|
||||
#define plm_clamp(n) MIN(255, MAX(0, n))
|
||||
|
||||
void plm_video_destroy(plm_video_t *self) {
|
||||
|
@ -1113,3 +1102,15 @@ plm_video_t *plm_video_create_with_buffer(plm_buffer_t *buffer,
|
|||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
static textstartup void plm_video_init(void) {
|
||||
PLM_VIDEO_MACROBLOCK_TYPE[0] = NULL;
|
||||
PLM_VIDEO_MACROBLOCK_TYPE[1] = PLM_VIDEO_MACROBLOCK_TYPE_INTRA;
|
||||
PLM_VIDEO_MACROBLOCK_TYPE[2] = PLM_VIDEO_MACROBLOCK_TYPE_PREDICTIVE,
|
||||
PLM_VIDEO_MACROBLOCK_TYPE[3] = PLM_VIDEO_MACROBLOCK_TYPE_B;
|
||||
PLM_VIDEO_DCT_SIZE[0] = PLM_VIDEO_DCT_SIZE_LUMINANCE;
|
||||
PLM_VIDEO_DCT_SIZE[1] = PLM_VIDEO_DCT_SIZE_CHROMINANCE;
|
||||
PLM_VIDEO_DCT_SIZE[2] = PLM_VIDEO_DCT_SIZE_CHROMINANCE;
|
||||
}
|
||||
|
||||
const void *const plm_video_init_ctor[] initarray = {plm_video_init};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef COSMOPOLITAN_DSP_MPEG_YCBCRIO_H_
|
||||
#define COSMOPOLITAN_DSP_MPEG_YCBCRIO_H_
|
||||
#include "dsp/mpeg/mpeg.h"
|
||||
#include "libc/bits/bits.h"
|
||||
#include "libc/bits/bswap.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#include "libc/mem/mem.h"
|
||||
#include "libc/nexgen32e/bsr.h"
|
||||
#include "libc/runtime/gc.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/testlib/testlib.h"
|
||||
#include "libc/x/x.h"
|
||||
|
@ -44,7 +43,7 @@
|
|||
* @see Magikarp
|
||||
*/
|
||||
|
||||
#define M 14
|
||||
#define M 15
|
||||
#define SQR(X) ((X) * (X))
|
||||
|
||||
struct SamplingSolution {
|
||||
|
@ -148,9 +147,9 @@ static int Sharpen(int ax, int bx, int cx) {
|
|||
|
||||
static void GyaradosImpl(long dyw, long dxw, int dst[dyw][dxw], long syw,
|
||||
long sxw, const int src[syw][sxw], long dyn, long dxn,
|
||||
long syn, long sxn, int tmp0[restrict dyn][sxn],
|
||||
int tmp1[restrict dyn][sxn],
|
||||
int tmp2[restrict dyn][dxn], long yfn, long xfn,
|
||||
long syn, long sxn, short tmp0[restrict dyn][sxn],
|
||||
short tmp1[restrict dyn][sxn],
|
||||
short tmp2[restrict dyn][dxn], long yfn, long xfn,
|
||||
const short fyi[dyn][yfn], const short fyw[dyn][yfn],
|
||||
const short fxi[dxn][xfn], const short fxw[dxn][xfn],
|
||||
bool sharpen) {
|
||||
|
@ -165,7 +164,6 @@ static void GyaradosImpl(long dyw, long dxw, int dst[dyw][dxw], long syw,
|
|||
}
|
||||
}
|
||||
for (dy = 0; dy < dyn; ++dy) {
|
||||
/* TODO: pmulhrsw() would probably make this much faster */
|
||||
for (sx = 0; sx < sxn; ++sx) {
|
||||
tmp1[dy][sx] = sharpen ? Sharpen(tmp0[MIN(dyn - 1, MAX(0, dy - 1))][sx],
|
||||
tmp0[dy][sx],
|
||||
|
@ -218,9 +216,9 @@ void *Gyarados(long dyw, long dxw, int dst[dyw][dxw], long syw, long sxw,
|
|||
CHECK_LE(syn, 0x7fff);
|
||||
CHECK_LE(sxn, 0x7fff);
|
||||
GyaradosImpl(dyw, dxw, dst, syw, sxw, src, dyn, dxn, syn, sxn,
|
||||
gc(xmemalign(64, sizeof(int) * dyn * sxn)),
|
||||
gc(xmemalign(64, sizeof(int) * dyn * sxn)),
|
||||
gc(xmemalign(64, sizeof(int) * dyn * dxn)), cy->s, cx->s,
|
||||
gc(xmemalign(64, sizeof(short) * dyn * sxn)),
|
||||
gc(xmemalign(64, sizeof(short) * dyn * sxn)),
|
||||
gc(xmemalign(64, sizeof(short) * dyn * dxn)), cy->s, cx->s,
|
||||
cy->indices, cy->weights, cx->indices, cx->weights, sharpen);
|
||||
} else {
|
||||
ZeroMatrix(dyw, dxw, dst, dyn, dxn);
|
||||
|
|
|
@ -47,6 +47,13 @@ $(DSP_SCALE_A).pkg: \
|
|||
$(DSP_SCALE_A_OBJS) \
|
||||
$(foreach x,$(DSP_SCALE_A_DIRECTDEPS),$($(x)_A).pkg)
|
||||
|
||||
o/$(MODE)/dsp/scale/cdecimate2xuint8x8.o \
|
||||
o/$(MODE)/dsp/scale/gyarados.o \
|
||||
o/$(MODE)/dsp/scale/magikarp.o \
|
||||
o/$(MODE)/dsp/scale/scale.o: \
|
||||
OVERRIDE_CFLAGS += \
|
||||
$(MATHEMATICAL)
|
||||
|
||||
DSP_SCALE_LIBS = $(foreach x,$(DSP_SCALE_ARTIFACTS),$($(x)))
|
||||
DSP_SCALE_SRCS = $(foreach x,$(DSP_SCALE_ARTIFACTS),$($(x)_SRCS))
|
||||
DSP_SCALE_HDRS = $(foreach x,$(DSP_SCALE_ARTIFACTS),$($(x)_HDRS))
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "dsp/tty/tty.h"
|
||||
#include "libc/bits/bits.h"
|
||||
#include "libc/bits/safemacros.h"
|
||||
#include "libc/bits/weaken.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/termios.h"
|
||||
#include "libc/fmt/fmt.h"
|
||||
|
|
|
@ -19,15 +19,15 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "dsp/tty/itoa8.h"
|
||||
#include "libc/bits/bits.h"
|
||||
#include "libc/bits/initializer.h"
|
||||
#include "libc/str/str.h"
|
||||
|
||||
struct Itoa8 kItoa8;
|
||||
|
||||
static nooptimize textstartup void itoa8init(void) {
|
||||
size_t i;
|
||||
static textstartup void itoa8_init(void) {
|
||||
int i;
|
||||
uint8_t z;
|
||||
char p[4];
|
||||
/*102*/
|
||||
for (i = 0; i < 256; ++i) {
|
||||
memset(p, 0, sizeof(p));
|
||||
if (i < 10) {
|
||||
|
@ -48,4 +48,4 @@ static nooptimize textstartup void itoa8init(void) {
|
|||
}
|
||||
}
|
||||
|
||||
INITIALIZER(301, _init_itoa8, itoa8init());
|
||||
const void *const itoa8_init_ctor[] initarray = {itoa8_init};
|
||||
|
|
|
@ -64,9 +64,10 @@ extern double g_xterm256_gamma;
|
|||
extern struct TtyRgb g_ansi2rgb_[256];
|
||||
extern struct TtyQuant g_ttyquant_;
|
||||
extern const uint8_t kXtermXlat[2][256];
|
||||
extern const uint8_t kXtermCube[6];
|
||||
|
||||
void ttyquantinit(enum TtyQuantizationAlgorithm, enum TtyQuantizationChannels,
|
||||
enum TtyBlocksSelection);
|
||||
void ttyquantsetup(enum TtyQuantizationAlgorithm, enum TtyQuantizationChannels,
|
||||
enum TtyBlocksSelection);
|
||||
|
||||
extern char *ttyraster(char *, const struct TtyRgb *, size_t, size_t,
|
||||
struct TtyRgb, struct TtyRgb);
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "dsp/core/core.h"
|
||||
#include "dsp/tty/quant.h"
|
||||
#include "libc/assert.h"
|
||||
#include "libc/bits/initializer.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/log/log.h"
|
||||
#include "libc/macros.h"
|
||||
|
@ -32,12 +33,8 @@
|
|||
#define SQR(X) ((X) * (X))
|
||||
#define SUM(X, Y, Z) ((X) + (Y) + (Z))
|
||||
|
||||
static const uint8_t kXtermCube[] = {0, 0137, 0207, 0257, 0327, 0377};
|
||||
const uint8_t kXtermCube[6] = {0, 0137, 0207, 0257, 0327, 0377};
|
||||
struct TtyRgb g_ansi2rgb_[256];
|
||||
static uint8_t g_quant[256];
|
||||
static uint8_t g_rindex[256];
|
||||
static uint8_t g_gindex[256];
|
||||
static uint8_t g_bindex[256];
|
||||
double g_xterm256_gamma;
|
||||
|
||||
struct TtyRgb tty2rgb_(struct TtyRgb rgbxt) {
|
||||
|
@ -101,17 +98,10 @@ static int uncube(int x) {
|
|||
return x < 48 ? 0 : x < 115 ? 1 : (x - 35) / 40;
|
||||
}
|
||||
|
||||
static optimizesize textstartup void xterm2rgbsetup_(void) {
|
||||
static textstartup void rgb2ansi_init(void) {
|
||||
uint8_t c, y;
|
||||
uint32_t i, j;
|
||||
memcpy(g_ansi2rgb_, &kCgaPalette, sizeof(kCgaPalette));
|
||||
for (i = 0; i < 256; ++i) {
|
||||
j = uncube(i);
|
||||
g_quant[i] = kXtermCube[j];
|
||||
g_rindex[i] = j * 36;
|
||||
g_gindex[i] = j * 6;
|
||||
g_bindex[i] = j + 16;
|
||||
}
|
||||
for (i = 16; i < 232; ++i) {
|
||||
g_ansi2rgb_[i].r = kXtermCube[((i - 020) / 044) % 06];
|
||||
g_ansi2rgb_[i].g = kXtermCube[((i - 020) / 06) % 06];
|
||||
|
@ -126,4 +116,4 @@ static optimizesize textstartup void xterm2rgbsetup_(void) {
|
|||
}
|
||||
}
|
||||
|
||||
INITIALIZER(301, _init_ansi2rgb, xterm2rgbsetup_());
|
||||
const void *const rgb2ansi_init_ctor[] initarray = {rgb2ansi_init};
|
||||
|
|
|
@ -1,71 +0,0 @@
|
|||
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│
|
||||
│vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│
|
||||
╞══════════════════════════════════════════════════════════════════════════════╡
|
||||
│ Copyright 2020 Justine Alexandra Roberts Tunney │
|
||||
│ │
|
||||
│ This program is free software; you can redistribute it and/or modify │
|
||||
│ it under the terms of the GNU General Public License as published by │
|
||||
│ the Free Software Foundation; version 2 of the License. │
|
||||
│ │
|
||||
│ This program is distributed in the hope that it will be useful, but │
|
||||
│ WITHOUT ANY WARRANTY; without even the implied warranty of │
|
||||
│ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU │
|
||||
│ General Public License for more details. │
|
||||
│ │
|
||||
│ You should have received a copy of the GNU General Public License │
|
||||
│ along with this program; if not, write to the Free Software │
|
||||
│ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA │
|
||||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "dsp/tty/rgb2xterm256.h"
|
||||
|
||||
/* 1bc */
|
||||
forceinline int sqr(int x) { return x * x; }
|
||||
/* forceinline int dst6(int x) { return x * x; } */
|
||||
int rgb2xterm256v2(int r, int g, int b) {
|
||||
static const int i2cv[] = {0, 0137, 0207, 0257, 0327, 0377, 0377};
|
||||
#define v2ci(v) (v < 060 ? 0 : v < 0163 ? 01 : (v - 043) / 050)
|
||||
#define dst6(A, B, C, a, b, c) (sqr(A - a) + sqr(B - b) + sqr(C - c))
|
||||
int ir = v2ci(r);
|
||||
int ig = v2ci(g);
|
||||
int ib = v2ci(b);
|
||||
int avg = (r + g + b) / 3;
|
||||
int cr = i2cv[ir];
|
||||
int cg = i2cv[ig];
|
||||
int cb = i2cv[ib];
|
||||
int gidx = avg > 238 ? 23 : (avg - 3) / 10;
|
||||
int gv = 8 + 10 * gidx;
|
||||
int cerr = dst6(cr, cg, cb, r, g, b);
|
||||
int gerr = dst6(gv, gv, gv, r, g, b);
|
||||
return cerr <= gerr ? 16 + (36 * ir + 6 * ig + ib) : 232 + gidx;
|
||||
#undef dst6
|
||||
#undef cidx
|
||||
#undef v2ci
|
||||
}
|
||||
|
||||
/* 1e3 */
|
||||
// Convert RGB24 to xterm-256 8-bit value
|
||||
// For simplicity, assume RGB space is perceptually uniform.
|
||||
// There are 5 places where one of two outputs needs to be chosen when
|
||||
// input is the exact middle:
|
||||
// - The r/g/b channels and the gray value: choose higher value output
|
||||
// - If gray and color have same distance from input - choose color
|
||||
int rgb2xterm256(uint8_t r, uint8_t g, uint8_t b) {
|
||||
// Calculate the nearest 0-based color index at 16 .. 231
|
||||
#define v2ci(v) (v < 48 ? 0 : v < 115 ? 1 : (v - 35) / 40)
|
||||
int ir = v2ci(r), ig = v2ci(g), ib = v2ci(b); // 0..5 each
|
||||
#define color_index() (36 * ir + 6 * ig + ib) /* 0..215, lazy eval */
|
||||
// Calculate the nearest 0-based gray index at 232 .. 255
|
||||
int average = (r + g + b) / 3;
|
||||
int gray_index = average > 238 ? 23 : (average - 3) / 10; // 0..23
|
||||
// Calculate the represented colors back from the index
|
||||
static const int i2cv[6] = {0, 0x5f, 0x87, 0xaf, 0xd7, 0xff};
|
||||
int cr = i2cv[ir], cg = i2cv[ig], cb = i2cv[ib]; // r/g/b, 0..255 each
|
||||
int gv = 8 + 10 * gray_index; // same value for r/g/b, 0..255
|
||||
// Return the one which is nearer to the original input rgb value
|
||||
#define dist_square(A, B, C, a, b, c) \
|
||||
((A - a) * (A - a) + (B - b) * (B - b) + (C - c) * (C - c))
|
||||
int color_err = dist_square(cr, cg, cb, r, g, b);
|
||||
int gray_err = dist_square(gv, gv, gv, r, g, b);
|
||||
return color_err <= gray_err ? 16 + color_index() : 232 + gray_index;
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
#ifndef COSMOPOLITAN_DSP_TTY_RGB2XTERM256_H_
|
||||
#define COSMOPOLITAN_DSP_TTY_RGB2XTERM256_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
int rgb2xterm256(uint8_t, uint8_t, uint8_t);
|
||||
int rgb2xterm256v2(int, int, int);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_DSP_TTY_RGB2XTERM256_H_ */
|
|
@ -19,6 +19,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "dsp/tty/internal.h"
|
||||
#include "dsp/tty/quant.h"
|
||||
#include "libc/bits/initializer.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
|
@ -29,9 +30,9 @@ struct TtyQuant g_ttyquant_;
|
|||
/**
|
||||
* Chooses xterm quantization mode.
|
||||
*/
|
||||
optimizesize textstartup void ttyquantinit(enum TtyQuantizationAlgorithm alg,
|
||||
enum TtyQuantizationChannels chans,
|
||||
enum TtyBlocksSelection blocks) {
|
||||
textstartup void ttyquantsetup(enum TtyQuantizationAlgorithm alg,
|
||||
enum TtyQuantizationChannels chans,
|
||||
enum TtyBlocksSelection blocks) {
|
||||
switch (alg) {
|
||||
case kTtyQuantAnsi:
|
||||
TTYQUANT()->rgb2tty = rgb2ansi_;
|
||||
|
@ -74,5 +75,8 @@ optimizesize textstartup void ttyquantinit(enum TtyQuantizationAlgorithm alg,
|
|||
TTYQUANT()->blocks = blocks;
|
||||
}
|
||||
|
||||
INITIALIZER(400, _init_ttyquant,
|
||||
ttyquantinit(kTtyQuantXterm256, kTtyQuantRgb, kTtyBlocksUnicode));
|
||||
textstartup void ttyquant_init(void) {
|
||||
ttyquantsetup(kTtyQuantXterm256, kTtyQuantRgb, kTtyBlocksUnicode);
|
||||
}
|
||||
|
||||
const void *const ttyquant_init_ctor[] initarray = {ttyquant_init};
|
|
@ -42,6 +42,7 @@
|
|||
|
||||
static struct TtyRaw {
|
||||
bool setup;
|
||||
bool hasold;
|
||||
bool noreentry;
|
||||
bool initialized;
|
||||
enum TtyRawFlags flags;
|
||||
|
@ -51,12 +52,15 @@ static struct TtyRaw {
|
|||
} g_ttyraw;
|
||||
|
||||
static textstartup int ttyraw_setup(void) {
|
||||
if (isatty(FD) &&
|
||||
ttyconfig(FD, ttysetrawmode, g_ttyraw.flags, &g_ttyraw.old) != -1) {
|
||||
return 0;
|
||||
} else {
|
||||
return -1;
|
||||
struct termios *old;
|
||||
if (isatty(FD)) {
|
||||
old = !g_ttyraw.hasold ? &g_ttyraw.old : NULL;
|
||||
if (ttyconfig(FD, ttysetrawmode, g_ttyraw.flags, old) != -1) {
|
||||
g_ttyraw.hasold = true;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
static textstartup int ttyraw_enable(void) {
|
||||
|
|
282
dsp/tty/xtermname.c
Normal file
282
dsp/tty/xtermname.c
Normal file
|
@ -0,0 +1,282 @@
|
|||
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│
|
||||
│vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│
|
||||
╞══════════════════════════════════════════════════════════════════════════════╡
|
||||
│ Copyright 2020 Justine Alexandra Roberts Tunney │
|
||||
│ │
|
||||
│ This program is free software; you can redistribute it and/or modify │
|
||||
│ it under the terms of the GNU General Public License as published by │
|
||||
│ the Free Software Foundation; version 2 of the License. │
|
||||
│ │
|
||||
│ This program is distributed in the hope that it will be useful, but │
|
||||
│ WITHOUT ANY WARRANTY; without even the implied warranty of │
|
||||
│ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU │
|
||||
│ General Public License for more details. │
|
||||
│ │
|
||||
│ You should have received a copy of the GNU General Public License │
|
||||
│ along with this program; if not, write to the Free Software │
|
||||
│ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA │
|
||||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "dsp/tty/xtermname.h"
|
||||
|
||||
/**
|
||||
* 256-entry double-nul-terminated list of XTERM256 names.
|
||||
*/
|
||||
const char kXtermName[] = "\
|
||||
Black\0\
|
||||
Maroon\0\
|
||||
Green\0\
|
||||
Olive\0\
|
||||
Navy\0\
|
||||
Purple\0\
|
||||
Teal\0\
|
||||
Silver\0\
|
||||
Grey\0\
|
||||
Red\0\
|
||||
Lime\0\
|
||||
Yellow\0\
|
||||
Blue\0\
|
||||
Fuchsia\0\
|
||||
Aqua\0\
|
||||
White\0\
|
||||
Grey0\0\
|
||||
NavyBlue\0\
|
||||
DarkBlue\0\
|
||||
Blue3\0\
|
||||
Blue3\0\
|
||||
Blue1\0\
|
||||
DarkGreen\0\
|
||||
DeepSkyBlue4\0\
|
||||
DeepSkyBlue4\0\
|
||||
DeepSkyBlue4\0\
|
||||
DodgerBlue3\0\
|
||||
DodgerBlue2\0\
|
||||
Green4\0\
|
||||
SpringGreen4\0\
|
||||
Turquoise4\0\
|
||||
DeepSkyBlue3\0\
|
||||
DeepSkyBlue3\0\
|
||||
DodgerBlue1\0\
|
||||
Green3\0\
|
||||
SpringGreen3\0\
|
||||
DarkCyan\0\
|
||||
LightSeaGreen\0\
|
||||
DeepSkyBlue2\0\
|
||||
DeepSkyBlue1\0\
|
||||
Green3\0\
|
||||
SpringGreen3\0\
|
||||
SpringGreen2\0\
|
||||
Cyan3\0\
|
||||
DarkTurquoise\0\
|
||||
Turquoise2\0\
|
||||
Green1\0\
|
||||
SpringGreen2\0\
|
||||
SpringGreen1\0\
|
||||
MediumSpringGreen\0\
|
||||
Cyan2\0\
|
||||
Cyan1\0\
|
||||
DarkRed\0\
|
||||
DeepPink4\0\
|
||||
Purple4\0\
|
||||
Purple4\0\
|
||||
Purple3\0\
|
||||
BlueViolet\0\
|
||||
Orange4\0\
|
||||
Grey37\0\
|
||||
MediumPurple4\0\
|
||||
SlateBlue3\0\
|
||||
SlateBlue3\0\
|
||||
RoyalBlue1\0\
|
||||
Chartreuse4\0\
|
||||
DarkSeaGreen4\0\
|
||||
PaleTurquoise4\0\
|
||||
SteelBlue\0\
|
||||
SteelBlue3\0\
|
||||
CornflowerBlue\0\
|
||||
Chartreuse3\0\
|
||||
DarkSeaGreen4\0\
|
||||
CadetBlue\0\
|
||||
CadetBlue\0\
|
||||
SkyBlue3\0\
|
||||
SteelBlue1\0\
|
||||
Chartreuse3\0\
|
||||
PaleGreen3\0\
|
||||
SeaGreen3\0\
|
||||
Aquamarine3\0\
|
||||
MediumTurquoise\0\
|
||||
SteelBlue1\0\
|
||||
Chartreuse2\0\
|
||||
SeaGreen2\0\
|
||||
SeaGreen1\0\
|
||||
SeaGreen1\0\
|
||||
Aquamarine1\0\
|
||||
DarkSlateGray2\0\
|
||||
DarkRed\0\
|
||||
DeepPink4\0\
|
||||
DarkMagenta\0\
|
||||
DarkMagenta\0\
|
||||
DarkViolet\0\
|
||||
Purple\0\
|
||||
Orange4\0\
|
||||
LightPink4\0\
|
||||
Plum4\0\
|
||||
MediumPurple3\0\
|
||||
MediumPurple3\0\
|
||||
SlateBlue1\0\
|
||||
Yellow4\0\
|
||||
Wheat4\0\
|
||||
Grey53\0\
|
||||
LightSlateGrey\0\
|
||||
MediumPurple\0\
|
||||
LightSlateBlue\0\
|
||||
Yellow4\0\
|
||||
DarkOliveGreen3\0\
|
||||
DarkSeaGreen\0\
|
||||
LightSkyBlue3\0\
|
||||
LightSkyBlue3\0\
|
||||
SkyBlue2\0\
|
||||
Chartreuse2\0\
|
||||
DarkOliveGreen3\0\
|
||||
PaleGreen3\0\
|
||||
DarkSeaGreen3\0\
|
||||
DarkSlateGray3\0\
|
||||
SkyBlue1\0\
|
||||
Chartreuse1\0\
|
||||
LightGreen\0\
|
||||
LightGreen\0\
|
||||
PaleGreen1\0\
|
||||
Aquamarine1\0\
|
||||
DarkSlateGray1\0\
|
||||
Red3\0\
|
||||
DeepPink4\0\
|
||||
MediumVioletRed\0\
|
||||
Magenta3\0\
|
||||
DarkViolet\0\
|
||||
Purple\0\
|
||||
DarkOrange3\0\
|
||||
IndianRed\0\
|
||||
HotPink3\0\
|
||||
MediumOrchid3\0\
|
||||
MediumOrchid\0\
|
||||
MediumPurple2\0\
|
||||
DarkGoldenrod\0\
|
||||
LightSalmon3\0\
|
||||
RosyBrown\0\
|
||||
Grey63\0\
|
||||
MediumPurple2\0\
|
||||
MediumPurple1\0\
|
||||
Gold3\0\
|
||||
DarkKhaki\0\
|
||||
NavajoWhite3\0\
|
||||
Grey69\0\
|
||||
LightSteelBlue3\0\
|
||||
LightSteelBlue\0\
|
||||
Yellow3\0\
|
||||
DarkOliveGreen3\0\
|
||||
DarkSeaGreen3\0\
|
||||
DarkSeaGreen2\0\
|
||||
LightCyan3\0\
|
||||
LightSkyBlue1\0\
|
||||
GreenYellow\0\
|
||||
DarkOliveGreen2\0\
|
||||
PaleGreen1\0\
|
||||
DarkSeaGreen2\0\
|
||||
DarkSeaGreen1\0\
|
||||
PaleTurquoise1\0\
|
||||
Red3\0\
|
||||
DeepPink3\0\
|
||||
DeepPink3\0\
|
||||
Magenta3\0\
|
||||
Magenta3\0\
|
||||
Magenta2\0\
|
||||
DarkOrange3\0\
|
||||
IndianRed\0\
|
||||
HotPink3\0\
|
||||
HotPink2\0\
|
||||
Orchid\0\
|
||||
MediumOrchid1\0\
|
||||
Orange3\0\
|
||||
LightSalmon3\0\
|
||||
LightPink3\0\
|
||||
Pink3\0\
|
||||
Plum3\0\
|
||||
Violet\0\
|
||||
Gold3\0\
|
||||
LightGoldenrod3\0\
|
||||
Tan\0\
|
||||
MistyRose3\0\
|
||||
Thistle3\0\
|
||||
Plum2\0\
|
||||
Yellow3\0\
|
||||
Khaki3\0\
|
||||
LightGoldenrod2\0\
|
||||
LightYellow3\0\
|
||||
Grey84\0\
|
||||
LightSteelBlue1\0\
|
||||
Yellow2\0\
|
||||
DarkOliveGreen1\0\
|
||||
DarkOliveGreen1\0\
|
||||
DarkSeaGreen1\0\
|
||||
Honeydew2\0\
|
||||
LightCyan1\0\
|
||||
Red1\0\
|
||||
DeepPink2\0\
|
||||
DeepPink1\0\
|
||||
DeepPink1\0\
|
||||
Magenta2\0\
|
||||
Magenta1\0\
|
||||
OrangeRed1\0\
|
||||
IndianRed1\0\
|
||||
IndianRed1\0\
|
||||
HotPink\0\
|
||||
HotPink\0\
|
||||
MediumOrchid1\0\
|
||||
DarkOrange\0\
|
||||
Salmon1\0\
|
||||
LightCoral\0\
|
||||
PaleVioletRed1\0\
|
||||
Orchid2\0\
|
||||
Orchid1\0\
|
||||
Orange1\0\
|
||||
SandyBrown\0\
|
||||
LightSalmon1\0\
|
||||
LightPink1\0\
|
||||
Pink1\0\
|
||||
Plum1\0\
|
||||
Gold1\0\
|
||||
LightGoldenrod2\0\
|
||||
LightGoldenrod2\0\
|
||||
NavajoWhite1\0\
|
||||
MistyRose1\0\
|
||||
Thistle1\0\
|
||||
Yellow1\0\
|
||||
LightGoldenrod1\0\
|
||||
Khaki1\0\
|
||||
Wheat1\0\
|
||||
Cornsilk1\0\
|
||||
Grey100\0\
|
||||
Grey3\0\
|
||||
Grey7\0\
|
||||
Grey11\0\
|
||||
Grey15\0\
|
||||
Grey19\0\
|
||||
Grey23\0\
|
||||
Grey27\0\
|
||||
Grey30\0\
|
||||
Grey35\0\
|
||||
Grey39\0\
|
||||
Grey42\0\
|
||||
Grey46\0\
|
||||
Grey50\0\
|
||||
Grey54\0\
|
||||
Grey58\0\
|
||||
Grey62\0\
|
||||
Grey66\0\
|
||||
Grey70\0\
|
||||
Grey74\0\
|
||||
Grey78\0\
|
||||
Grey82\0\
|
||||
Grey85\0\
|
||||
Grey89\0\
|
||||
Grey93\0\
|
||||
\0";
|
10
dsp/tty/xtermname.h
Normal file
10
dsp/tty/xtermname.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
#ifndef COSMOPOLITAN_DSP_TTY_XTERMNAME_H_
|
||||
#define COSMOPOLITAN_DSP_TTY_XTERMNAME_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
extern const char kXtermName[];
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_DSP_TTY_XTERMNAME_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue