1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

Merge branch 'master' into xhr

This commit is contained in:
Witold Filipczyk 2022-09-11 15:50:09 +02:00
commit 7a4dc487a5
9 changed files with 30 additions and 20 deletions

View File

@ -11,9 +11,9 @@ FROM fedora:latest
RUN dnf -y update && dnf -y install bash wget \ RUN dnf -y update && dnf -y install bash wget \
rsync vim screen git make automake meson unzip cmake patch rsync vim screen git make automake meson unzip cmake patch
RUN cd /root; wget http://ftp.delorie.com/pub/djgpp/rpms/djcross-gcc-12.1.0/djcross-gcc-12.1.0-1ap.x86_64.rpm ; \ RUN cd /root; wget http://ftp.delorie.com/pub/djgpp/rpms/djcross-gcc-12.2.0/djcross-gcc-12.2.0-1ap.x86_64.rpm ; \
wget http://ftp.delorie.com/pub/djgpp/rpms/djcross-gcc-12.1.0/djcross-gcc-c++-12.1.0-1ap.x86_64.rpm ; \ wget http://ftp.delorie.com/pub/djgpp/rpms/djcross-gcc-12.2.0/djcross-gcc-c++-12.2.0-1ap.x86_64.rpm ; \
wget http://ftp.delorie.com/pub/djgpp/rpms/djcross-gcc-12.1.0/djcross-gcc-tools-12.1.0-1ap.x86_64.rpm ; \ wget http://ftp.delorie.com/pub/djgpp/rpms/djcross-gcc-12.2.0/djcross-gcc-tools-12.2.0-1ap.x86_64.rpm ; \
wget http://ftp.delorie.com/pub/djgpp/rpms/djcross-binutils-2.34-1ap.x86_64.rpm ; \ wget http://ftp.delorie.com/pub/djgpp/rpms/djcross-binutils-2.34-1ap.x86_64.rpm ; \
wget http://ftp.delorie.com/pub/djgpp/rpms/djcrx-2.05-5.x86_64.rpm ; \ wget http://ftp.delorie.com/pub/djgpp/rpms/djcrx-2.05-5.x86_64.rpm ; \
rpm -Uhv *.rpm rpm -Uhv *.rpm
@ -84,14 +84,14 @@ make install; \
rm -rf /root/tmp rm -rf /root/tmp
# libxml++5 # libxml++5
RUN dnf -y install mm-common libtool RUN dnf -y install mm-common libtool xz
# libxml++5 cd # libxml++5 cd
RUN mkdir /root/tmp; cd /root/tmp; \ RUN mkdir /root/tmp; cd /root/tmp; \
git clone https://github.com/libxmlplusplus/libxmlplusplus; \ wget https://github.com/libxmlplusplus/libxmlplusplus/releases/download/5.0.2/libxml++-5.0.2.tar.xz; \
cd libxmlplusplus; tar -xf libxml++-5.0.2.tar.xz;
ADD build_xmlplusplus.sh /root/tmp/libxmlplusplus/build_xmlplusplus.sh ADD build_xmlplusplus.sh /root/tmp/libxml++-5.0.2/build_xmlplusplus.sh
RUN cd /root/tmp/libxmlplusplus; \ RUN cd /root/tmp/libxml++-5.0.2; \
./build_xmlplusplus.sh ./build_xmlplusplus.sh
# quickjs # quickjs
@ -111,7 +111,7 @@ make -f Makefile.dos install
# get elinks source # get elinks source
RUN dnf -y install pkgconf-pkg-config gettext RUN dnf -y install pkgconf-pkg-config gettext
RUN cd /root; git clone https://github.com/rkd77/elinks RUN cd /root; git clone https://github.com/rkd77/elinks
ADD mes_djgpp.sh /root/elinks/mes_djgpp.sh ADD mes_djgpp.sh /root/elinks/mes_djgpp.sh
RUN cd /root/elinks; \ RUN cd /root/elinks; \
./mes_djgpp.sh; ./mes_djgpp.sh;

View File

@ -6,6 +6,7 @@ LIBRARY_PATH="/usr/local/lib" \
PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" \ PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" \
C_INCLUDE_PATH="/usr/local/include" \ C_INCLUDE_PATH="/usr/local/include" \
CFLAGS="-O2 -I/usr/local/include -DWATT32_NO_NAMESPACE" \ CFLAGS="-O2 -I/usr/local/include -DWATT32_NO_NAMESPACE" \
CXXFLAGS="-O2 -I/usr/local/include -DWATT32_NO_NAMESPACE" \
LDFLAGS="-L/usr/local/lib" \ LDFLAGS="-L/usr/local/lib" \
meson /tmp/builddir --cross-file cross/linux-djgpp.txt \ meson /tmp/builddir --cross-file cross/linux-djgpp.txt \
-D88-colors=false \ -D88-colors=false \

View File

@ -7,6 +7,7 @@ LIBRARY_PATH="/usr/local/lib" \
PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" \ PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" \
C_INCLUDE_PATH="/usr/local/include" \ C_INCLUDE_PATH="/usr/local/include" \
CFLAGS="-I/usr/local/include -DWATT32_NO_NAMESPACE" \ CFLAGS="-I/usr/local/include -DWATT32_NO_NAMESPACE" \
CXXFLAGS="-I/usr/local/include -DWATT32_NO_NAMESPACE" \
LDFLAGS="-L/usr/local/lib" \ LDFLAGS="-L/usr/local/lib" \
meson /tmp/builddir2 --cross-file cross/linux-djgpp.txt \ meson /tmp/builddir2 --cross-file cross/linux-djgpp.txt \
-D88-colors=false \ -D88-colors=false \

View File

@ -896,6 +896,7 @@ change_hook_ui_double_esc(struct session *ses, struct option *current, struct op
return 0; return 0;
} }
#ifdef CONFIG_MOUSE
static int static int
change_hook_ui_mouse_disable(struct session *ses, struct option *current, struct option *changed) change_hook_ui_mouse_disable(struct session *ses, struct option *current, struct option *changed)
{ {
@ -911,7 +912,7 @@ change_hook_ui_mouse_disable(struct session *ses, struct option *current, struct
} }
return 0; return 0;
} }
#endif
/** Make option templates visible or invisible in the option manager. /** Make option templates visible or invisible in the option manager.
* This is called once on startup, and then each time the value of the * This is called once on startup, and then each time the value of the
@ -988,7 +989,9 @@ static const struct change_hook_info change_hooks[] = {
{ "ui.colors", change_hook_ui_colors }, { "ui.colors", change_hook_ui_colors },
{ "ui.double_esc", change_hook_ui_double_esc }, { "ui.double_esc", change_hook_ui_double_esc },
{ "ui.language", change_hook_language }, { "ui.language", change_hook_language },
#ifdef CONFIG_MOUSE
{ "ui.mouse_disable", change_hook_ui_mouse_disable }, { "ui.mouse_disable", change_hook_ui_mouse_disable },
#endif
{ "ui", change_hook_ui }, { "ui", change_hook_ui },
{ NULL, NULL }, { NULL, NULL },
}; };

View File

@ -122,9 +122,14 @@ reported:
JS_ClearPendingException(ctx); JS_ClearPendingException(ctx);
} }
static char spidermonkey_version[32];
static void static void
spidermonkey_init(struct module *xxx) spidermonkey_init(struct module *module)
{ {
snprintf(spidermonkey_version, 31, "mozjs %s", JS_GetImplementationVersion());
module->name = spidermonkey_version;
js_module_init_ok = spidermonkey_runtime_addref(); js_module_init_ok = spidermonkey_runtime_addref();
} }

View File

@ -1,6 +1,6 @@
top_builddir=../../.. top_builddir=../../..
include $(top_builddir)/Makefile.config include $(top_builddir)/Makefile.config
OBJS = dos.o OBJS = dos.obj
include $(top_srcdir)/Makefile.lib include $(top_srcdir)/Makefile.lib

View File

@ -345,9 +345,9 @@ static void dos_mouse_enqueue(int x, int y, int b)
overalloc(); overalloc();
} }
if (dos_mouse_queue == NULL) { if (dos_mouse_queue == NULL) {
dos_mouse_queue = mem_alloc((dos_mouse_queue_n + 1) * sizeof(struct interlink_event)); dos_mouse_queue = (struct interlink_event *)mem_alloc((dos_mouse_queue_n + 1) * sizeof(struct interlink_event));
} else { } else {
dos_mouse_queue = mem_realloc(dos_mouse_queue, (dos_mouse_queue_n + 1) * sizeof(struct interlink_event)); dos_mouse_queue = (struct interlink_event *)mem_realloc(dos_mouse_queue, (dos_mouse_queue_n + 1) * sizeof(struct interlink_event));
} }
set_last: set_last:
dos_mouse_queue[dos_mouse_queue_n].ev = EVENT_MOUSE; dos_mouse_queue[dos_mouse_queue_n].ev = EVENT_MOUSE;
@ -510,7 +510,7 @@ void save_terminal(void)
screen_backbuffer = NULL; screen_backbuffer = NULL;
mem_free(sc); mem_free(sc);
} }
sc = mem_alloc(2 * screen_backbuffer_x * screen_backbuffer_y); sc = (unsigned char *)mem_alloc(2 * screen_backbuffer_x * screen_backbuffer_y);
ScreenRetrieve(sc); ScreenRetrieve(sc);
ScreenGetCursor(&saved_cursor_y, &saved_cursor_x); ScreenGetCursor(&saved_cursor_y, &saved_cursor_x);
screen_backbuffer = sc; screen_backbuffer = sc;
@ -779,7 +779,7 @@ int dos_write(int fd, const void *buf, size_t size)
/*printf("dos_write(%d,%d) : %d,%d\n", r, errno, fd, size);*/ /*printf("dos_write(%d,%d) : %d,%d\n", r, errno, fd, size);*/
if (r != -2) return r; if (r != -2) return r;
if (fd == 1) { if (fd == 1) {
ansi_write(buf, size); ansi_write((const unsigned char *)buf, size);
return size; return size;
} }
return write(fd, buf, size); return write(fd, buf, size);
@ -1001,8 +1001,8 @@ void os_seed_random(unsigned char **pool, int *pool_size)
{ {
unsigned *random_pool, *tmp_pool; unsigned *random_pool, *tmp_pool;
int a, i; int a, i;
random_pool = mem_alloc(RANDOM_POOL_SIZE); random_pool = (unsigned *)mem_alloc(RANDOM_POOL_SIZE);
tmp_pool = mem_alloc(RANDOM_POOL_SIZE); tmp_pool = (unsigned *)mem_alloc(RANDOM_POOL_SIZE);
for (a = 0; a <= 640 * 1024 - RANDOM_POOL_SIZE; a += RANDOM_POOL_SIZE) { for (a = 0; a <= 640 * 1024 - RANDOM_POOL_SIZE; a += RANDOM_POOL_SIZE) {
dosmemget(a, RANDOM_POOL_SIZE, tmp_pool); dosmemget(a, RANDOM_POOL_SIZE, tmp_pool);
for (i = 0; i < RANDOM_POOL_SIZE / 4; i++) for (i = 0; i < RANDOM_POOL_SIZE / 4; i++)

View File

@ -1 +1 @@
srcs += files('dos.c') srcs += files('dos.cpp')

View File

@ -147,7 +147,7 @@ static int vpipe_create(int fd[2])
errno = EMFILE; errno = EMFILE;
goto err2; goto err2;
} }
desc = malloc(sizeof(struct virtual_pipe)); desc = (struct virtual_pipe *)malloc(sizeof(struct virtual_pipe));
if (!desc) goto err2; if (!desc) goto err2;
desc->used = 0; desc->used = 0;
desc->n_rd = 1; desc->n_rd = 1;