mirror of
https://github.com/bellard/quickjs.git
synced 2025-10-01 07:17:41 +03:00
Strip trailing spaces
This commit is contained in:
12
qjs.c
12
qjs.c
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* QuickJS stand alone interpreter
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2017-2021 Fabrice Bellard
|
||||
* Copyright (c) 2017-2021 Charlie Gordon
|
||||
*
|
||||
@@ -83,7 +83,7 @@ static int eval_file(JSContext *ctx, const char *filename, int module)
|
||||
uint8_t *buf;
|
||||
int ret, eval_flags;
|
||||
size_t buf_len;
|
||||
|
||||
|
||||
buf = js_load_file(ctx, &buf_len, filename);
|
||||
if (!buf) {
|
||||
perror(filename);
|
||||
@@ -315,7 +315,7 @@ int main(int argc, char **argv)
|
||||
int load_jscalc;
|
||||
#endif
|
||||
size_t stack_size = 0;
|
||||
|
||||
|
||||
#ifdef CONFIG_BIGNUM
|
||||
/* load jscalc runtime if invoked as 'qjscalc' */
|
||||
{
|
||||
@@ -327,7 +327,7 @@ int main(int argc, char **argv)
|
||||
load_jscalc = !strcmp(exename, "qjscalc");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* cannot use getopt because we want to pass the command line to
|
||||
the script */
|
||||
optind = 1;
|
||||
@@ -478,7 +478,7 @@ int main(int argc, char **argv)
|
||||
JS_SetHostPromiseRejectionTracker(rt, js_std_promise_rejection_tracker,
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
||||
if (!empty_run) {
|
||||
#ifdef CONFIG_BIGNUM
|
||||
if (load_jscalc) {
|
||||
@@ -519,7 +519,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
js_std_loop(ctx);
|
||||
}
|
||||
|
||||
|
||||
if (dump_memory) {
|
||||
JSMemoryUsage stats;
|
||||
JS_ComputeMemoryUsage(rt, &stats);
|
||||
|
Reference in New Issue
Block a user