Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions emrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -832,12 +832,12 @@ def find_gpu_model(model):
VideoCardString = winreg.QueryValueEx(hVideoReg, '\\Device\\Video' + str(i))[0]
# Get Rid of Registry/Machine from the string
VideoCardStringSplit = VideoCardString.split('\\')
ClearnVideoCardString = "\\".join(VideoCardStringSplit[3:])
CleanVideoCardString = "\\".join(VideoCardStringSplit[3:])
# Go up one level for detailed
# VideoCardStringRoot = "\\".join(VideoCardStringSplit[3:len(VideoCardStringSplit)-1])

# Get the graphics card information
hVideoCardReg = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, ClearnVideoCardString)
hVideoCardReg = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, CleanVideoCardString)
try:
VideoCardDescription = winreg.QueryValueEx(hVideoCardReg, 'Device Description')[0]
except WindowsError:
Expand Down
4 changes: 2 additions & 2 deletions src/lib/libglut.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,14 @@ var LibraryGLUT = {
var key = GLUT.getSpecialKey(event['keyCode']);
if (key !== null) {
if (GLUT.specialUpFunc) {
event.preventDefault ();
event.preventDefault();
GLUT.saveModifiers(event);
{{{ makeDynCall('viii', 'GLUT.specialUpFunc') }}}(key, Browser.mouseX, Browser.mouseY);
}
} else {
key = GLUT.getASCIIKey(event);
if (key !== null && GLUT.keyboardUpFunc) {
event.preventDefault ();
event.preventDefault();
GLUT.saveModifiers(event);
{{{ makeDynCall('viii', 'GLUT.keyboardUpFunc') }}}(key, Browser.mouseX, Browser.mouseY);
}
Expand Down
4 changes: 2 additions & 2 deletions src/lib/libhtml5.js
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,7 @@ var LibraryHTML5 = {
var eventSize = {{{ C_STRUCTS.EmscriptenFullscreenChangeEvent.__size__ }}};
JSEvents.fullscreenChangeEvent ||= _malloc(eventSize);

var fullscreenChangeEventhandlerFunc = (e) => {
var fullscreenChangeEventHandlerFunc = (e) => {
var fullscreenChangeEvent = JSEvents.fullscreenChangeEvent;
fillFullscreenChangeEventData(fullscreenChangeEvent);

Expand All @@ -1061,7 +1061,7 @@ var LibraryHTML5 = {
eventTypeId,
userData,
callbackfunc,
handlerFunc: fullscreenChangeEventhandlerFunc,
handlerFunc: fullscreenChangeEventHandlerFunc,
useCapture
};
return JSEvents.registerOrRemoveHandler(eventHandler);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/libwasi.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ var WasiLibrary = {
path_open__sig: 'iiiiiiiiii',
path_open__deps: ['$wasiRightsToMuslOFlags', '$wasiOFlagsToMuslOFlags', '$preopens'],
path_open: (fd, dirflags, path, path_len, oflags,
fs_rights_base, fs_rights_inherting,
fs_rights_base, fs_rights_inheriting,
fdflags, opened_fd) => {
if (!(fd in preopens)) {
return {{{ cDefs.EBADF }}};
Expand Down
2 changes: 1 addition & 1 deletion system/include/wasi/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -2408,7 +2408,7 @@ __wasi_errno_t __wasi_path_open(
*/
__wasi_rights_t fs_rights_base,

__wasi_rights_t fs_rights_inherting,
__wasi_rights_t fs_rights_inheriting,

__wasi_fdflags_t fdflags,

Expand Down
8 changes: 4 additions & 4 deletions system/lib/html5/offscreencanvas.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

#include "emscripten_internal.h"

typedef struct set_cavas_size_t {
typedef struct set_canvas_size_t {
const char* target;
int width;
int height;
} set_cavas_size_t;
} set_canvas_size_t;

static void do_set_size(void* arg) {
set_cavas_size_t* args = (set_cavas_size_t*)arg;
set_canvas_size_t* args = (set_canvas_size_t*)arg;
emscripten_set_canvas_element_size(args->target, args->width, args->height);
free((char *) args->target);
free(arg);
Expand All @@ -20,7 +20,7 @@ void _emscripten_set_offscreencanvas_size_on_thread(pthread_t t,
const char* target,
int width,
int height) {
set_cavas_size_t* arg = malloc(sizeof(set_cavas_size_t));
set_canvas_size_t* arg = malloc(sizeof(set_canvas_size_t));
arg->target = target; // taking ownership: will be freed in do_set_size
arg->width = width;
arg->height = height;
Expand Down
4 changes: 2 additions & 2 deletions system/lib/libc/musl/arch/emscripten/syscall_arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ int __syscall_symlinkat(intptr_t target, int newdirfd, intptr_t linkpath);
int __syscall_readlinkat(int dirfd, intptr_t path, intptr_t buf, size_t bufsize);
int __syscall_fchmodat2(int dirfd, intptr_t path, int mode, int flags);
int __syscall_faccessat(int dirfd, intptr_t path, int amode, int flags);
int __syscall_pselect6(int nfds, intptr_t readfds, intptr_t writefds, intptr_t exceptfds, intptr_t timeout, intptr_t sigmaks);
int __syscall_pselect6(int nfds, intptr_t readfds, intptr_t writefds, intptr_t exceptfds, intptr_t timeout, intptr_t sigmask);
int __syscall_utimensat(int dirfd, intptr_t path, intptr_t times, int flags);
int __syscall_fallocate(int fd, int mode, off_t offset, off_t len);
int __syscall_dup3(int fd, int suggestfd, int flags);
Expand All @@ -102,7 +102,7 @@ int __syscall_socket(int domain, int type, int protocol, int dummy1, int dummy2,
int __syscall_socketpair(int domain, int type, int protocol, intptr_t fds, int dummy, int dummy2);
int __syscall_bind(int sockfd, intptr_t addr, size_t alen, int dummy, int dummy2, int dummy3);
int __syscall_connect(int sockfd, intptr_t addr, size_t len, int dummy, int dummy2, int dummy3);
int __syscall_listen(int sockfd, int backlock, int dummy1, int dummy2, int dummy3, int dummy4);
int __syscall_listen(int sockfd, int backlog, int dummy1, int dummy2, int dummy3, int dummy4);
int __syscall_accept4(int sockfd, intptr_t addr, intptr_t addrlen, int flags, int dummy1, int dummy2);
int __syscall_getsockopt(int sockfd, int level, int optname, intptr_t optval, intptr_t optlen, int dummy);
int __syscall_setsockopt(int sockfd, int level, int optname, intptr_t optval, size_t optlen, int dummy);
Expand Down
10 changes: 5 additions & 5 deletions system/lib/update_llvm_libc.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ def main():
upstream_dir = os.path.join(libc_upstream_dir, dirname)
local_dir = os.path.join(libc_local_dir, dirname)
copy_tree(upstream_dir, local_dir)

# Certain llvm-libc files that are incompatible in Emscripten
for excludsion_pattern in libc_exclusion_patterns:
files_to_exclude = glob.glob(os.path.join(libc_local_dir, excludsion_pattern))
for exclusion_pattern in libc_exclusion_patterns:
files_to_exclude = glob.glob(os.path.join(libc_local_dir, exclusion_pattern))
for file in files_to_exclude:
os.remove(file)
os.remove(file)

if __name__ == '__main__':
main()
main()
2 changes: 1 addition & 1 deletion system/lib/wasmfs/syscalls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1716,7 +1716,7 @@ int __syscall_socket(
}

int __syscall_listen(
int sockfd, int backlock, int dummy1, int dummy2, int dummy3, int dummy4) {
int sockfd, int backlog, int dummy1, int dummy2, int dummy3, int dummy4) {
return -ENOSYS;
}

Expand Down
2 changes: 1 addition & 1 deletion system/lib/wasmfs/wasmfs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
namespace wasmfs {

#ifdef WASMFS_CASE_INSENSITIVE
backend_t createIgnoreCaseBackend(std::function<backend_t()> createBacken);
backend_t createIgnoreCaseBackend(std::function<backend_t()> createBackend);
#endif

// The below lines are included to make the compiler believe that the global
Expand Down
4 changes: 2 additions & 2 deletions test/browser/test_glfw3.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ int main() {
}

{
assert(glfwExtensionSupported("nonexistant") == 0);
assert(glfwGetProcAddress("nonexistant") == NULL);
assert(glfwExtensionSupported("nonexistent") == 0);
assert(glfwGetProcAddress("nonexistent") == NULL);
}
#endif

Expand Down
8 changes: 4 additions & 4 deletions test/browser/test_sdl2_canvas_palette_2.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
static SDL_Surface *screen;
static SDL_Color pal[COLOR_COUNT +1];

void pallete(int red, int green, int blue) {
void palette(int red, int green, int blue) {
// initialize sdl palette
// with gradient colors
pal[0].r = 0;
Expand Down Expand Up @@ -65,15 +65,15 @@ int main(int argc, char** argv) {
printf("%s\n", argv[1]);
if (strcmp(argv[1], "-r") == 0) {
printf("set [red]\n");
pallete(255, 0, 0);
palette(255, 0, 0);
}
if (strcmp(argv[1], "-g") == 0) {
printf("set [green]\n");
pallete(0, 255, 0);
palette(0, 255, 0);
}
if (strcmp(argv[1], "-b") == 0) {
printf("set [blue]\n");
pallete(0, 0, 255);
palette(0, 0, 255);
}
}

Expand Down
8 changes: 4 additions & 4 deletions test/browser/test_sdl_canvas_palette_2.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
static SDL_Surface *screen;
static SDL_Color pal[COLOR_COUNT +1];

void pallete(int red, int green, int blue) {
void palette(int red, int green, int blue) {
// initialize sdl palette
// with gradient colors
pal[0].r = 0;
Expand Down Expand Up @@ -59,15 +59,15 @@ int main(int argc, char** argv) {
printf("%s\n", argv[1]);
if (strcmp(argv[1], "-r") == 0) {
printf("set [red]\n");
pallete(255, 0, 0);
palette(255, 0, 0);
}
if (strcmp(argv[1], "-g") == 0) {
printf("set [green]\n");
pallete(0, 255, 0);
palette(0, 255, 0);
}
if (strcmp(argv[1], "-b") == 0) {
printf("set [blue]\n");
pallete(0, 0, 255);
palette(0, 0, 255);
}
}

Expand Down
4 changes: 2 additions & 2 deletions test/clang_native.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ def highest_version_subdir(path):
vc_root = os.path.join(visual_studio_path, 'VC')
vc_code_root = highest_version_subdir(os.path.join(vc_root, 'Tools', 'MSVC'))
if not vc_code_root:
raise Exception ('Unable to find Visual Studio INCLUDE root directory. Run in Visual Studio command prompt to avoid the need to autoguess this location.')
raise Exception('Unable to find Visual Studio INCLUDE root directory. Run in Visual Studio command prompt to avoid the need to autoguess this location.')

windows_sdk_dir = highest_version_subdir(os.path.join(prog_files_x86, 'Windows Kits'))
if not windows_sdk_dir:
raise Exception ('Unable to find Windows SDK root directory. Run in Visual Studio command prompt to avoid the need to autoguess this location.')
raise Exception('Unable to find Windows SDK root directory. Run in Visual Studio command prompt to avoid the need to autoguess this location.')

env.setdefault('VSINSTALLDIR', visual_studio_path)
env.setdefault('VCINSTALLDIR', os.path.join(visual_studio_path, 'VC'))
Expand Down
2 changes: 1 addition & 1 deletion test/core/FS_exports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

int main() {
#ifdef USE_FILES
if (fopen("nonexistend", "r")) {
if (fopen("nonexistent", "r")) {
puts("that was bad");
return 1;
}
Expand Down
4 changes: 2 additions & 2 deletions test/core/test_promise_await.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <stdbool.h>
#include <stdio.h>

void fulfill_from_timout(void* arg) {
void fulfill_from_timeout(void* arg) {
emscripten_promise_resolve((em_promise_t)arg, EM_PROMISE_FULFILL, (void*)43);
}

Expand All @@ -25,7 +25,7 @@ void test_already_fulfilled() {

void test_not_yet_fulfilled() {
em_promise_t p = emscripten_promise_create();
emscripten_async_call(fulfill_from_timout, p, 0);
emscripten_async_call(fulfill_from_timeout, p, 0);

printf("waiting on promise: %p\n", p);
em_settled_result_t res = emscripten_promise_await(p);
Expand Down
4 changes: 2 additions & 2 deletions test/core/test_signals.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void test_raise_sigusr1() {
}
}

void test_sigpenging() {
void test_sigpending() {
printf("test_sigpending\n");
recieved1 = false;

Expand Down Expand Up @@ -157,7 +157,7 @@ int main() {
test_sigaction();
test_bad_signal();
test_raise_sigusr1();
test_sigpenging();
test_sigpending();
test_sigwaitinfo();
test_sigemptyset();
return 0;
Expand Down
10 changes: 5 additions & 5 deletions test/core/test_varargs.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ void varargs_listoffsets_list_evaluate(int count, va_list ap, int vaIteration) {
printf("\n");
}

void varags_listoffsets_list_copy(int count, va_list ap, int iteration) {
void varargs_listoffsets_list_copy(int count, va_list ap, int iteration) {
va_list ap_copy;
va_copy(ap_copy, ap);
varargs_listoffsets_list_evaluate(count, ap_copy, iteration);
Expand All @@ -55,10 +55,10 @@ void varargs_listoffsets_args(int type, int count, ...) {
va_start(ap, count);

// evaluate a copied list
varags_listoffsets_list_copy(count, ap, 1);
varags_listoffsets_list_copy(count, ap, 2);
varags_listoffsets_list_copy(count, ap, 3);
varags_listoffsets_list_copy(count, ap, 4);
varargs_listoffsets_list_copy(count, ap, 1);
varargs_listoffsets_list_copy(count, ap, 2);
varargs_listoffsets_list_copy(count, ap, 3);
varargs_listoffsets_list_copy(count, ap, 4);
}

void varargs_listoffsets_main() {
Expand Down
6 changes: 3 additions & 3 deletions test/emscripten_set_timeout_loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <assert.h>
#include <stdlib.h>

double previousSetTimeouTime = 0;
double previousSetTimeoutTime = 0;
int funcExecuted = 0;

void testDone(void *userData) {
Expand All @@ -14,8 +14,8 @@ void testDone(void *userData) {
}

bool tick(double time, void *userData) {
assert(time >= previousSetTimeouTime);
previousSetTimeouTime = time;
assert(time >= previousSetTimeoutTime);
previousSetTimeoutTime = time;
assert((long)userData == 1);
++funcExecuted;
if (funcExecuted == 10)
Expand Down
2 changes: 0 additions & 2 deletions test/fs/test_fs_symlink_resolution.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#include <unistd.h>
#include <fcntl.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/stat.h>
#include <assert.h>
#include <stdio.h>
Expand Down
4 changes: 2 additions & 2 deletions test/other/test_dlopen_promise.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <emscripten/emscripten.h>
#include <emscripten/promise.h>

em_promise_result_t on_fullfilled(void **result, void* data, void *handle) {
em_promise_result_t on_fulfilled(void **result, void* data, void *handle) {
printf("onsuccess\n");
int* foo = (int*)dlsym(handle, "foo");
assert(foo);
Expand All @@ -22,7 +22,7 @@ em_promise_result_t on_rejected(void **result, void* data, void *value) {

int main() {
em_promise_t inner = emscripten_dlopen_promise("libside.so", RTLD_NOW);
em_promise_t outer = emscripten_promise_then(inner, on_fullfilled, on_rejected, NULL);
em_promise_t outer = emscripten_promise_then(inner, on_fulfilled, on_rejected, NULL);
emscripten_promise_destroy(outer);
emscripten_promise_destroy(inner);
printf("returning from main\n");
Expand Down
4 changes: 2 additions & 2 deletions test/test_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -5592,7 +5592,7 @@ def test_cross_origin(self, args, port):
create_file('subdir/foo.txt', 'hello')
self.compile_btest('hello_world.c', ['-o', 'subdir/hello.js', '-sRUNTIME_DEBUG', '-sCROSS_ORIGIN', '-sPROXY_TO_PTHREAD', '-pthread', '-sEXIT_RUNTIME'] + args)

class MyReqestHandler(SimpleHTTPRequestHandler):
class MyRequestHandler(SimpleHTTPRequestHandler):
def __init__(self, *args, **kwargs):
super().__init__(*args, directory='subdir', **kwargs)

Expand All @@ -5616,7 +5616,7 @@ def end_headers(self):
else:
create_file('test.html', f'<script src="http://localhost:{port}/hello.js"></script>')

server = HttpServerThread(ThreadingHTTPServer(('localhost', port), MyReqestHandler))
server = HttpServerThread(ThreadingHTTPServer(('localhost', port), MyRequestHandler))
server.start()
try:
self.run_browser('test.html', '/report_result?exit:0')
Expand Down
8 changes: 4 additions & 4 deletions test/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -8731,16 +8731,16 @@ def test_no_declare_asm_module_exports(self):
self.maybe_closure()
self.do_runf('declare_asm_module_exports.c', 'jsFunction: 1')
js = read_file('declare_asm_module_exports.js')
occurances = js.count('cFunction')
occurrences = js.count('cFunction')
if self.is_optimizing() and '-g' not in self.cflags:
# In optimized builds only the single reference cFunction that exists in the EM_ASM should exist
if self.is_wasm():
self.assertEqual(occurances, 1)
self.assertEqual(occurrences, 1)
else:
# With js the asm module itself also contains a reference for the cFunction name
self.assertEqual(occurances, 2)
self.assertEqual(occurrences, 2)
else:
print(occurances)
print(occurrences)

# Tests that -sMINIMAL_RUNTIME works well in different build modes
@no_wasmfs('https://github.com/emscripten-core/emscripten/issues/16816')
Expand Down
Loading