Skip to content

Commit 37bd4ae

Browse files
committed
Strip trailing spaces
1 parent 6f480ab commit 37bd4ae

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1191
-1191
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
QuickJS Javascript Engine
2-
2+
33
Copyright (c) 2017-2021 Fabrice Bellard
44
Copyright (c) 2017-2021 Charlie Gordon
55

Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#
22
# QuickJS Javascript Engine
3-
#
3+
#
44
# Copyright (c) 2017-2021 Fabrice Bellard
55
# Copyright (c) 2017-2021 Charlie Gordon
66
#
@@ -187,7 +187,7 @@ endif
187187

188188
all: $(OBJDIR) $(OBJDIR)/quickjs.check.o $(OBJDIR)/qjs.check.o $(PROGS)
189189

190-
QJS_LIB_OBJS=$(OBJDIR)/quickjs.o $(OBJDIR)/libregexp.o $(OBJDIR)/libunicode.o $(OBJDIR)/cutils.o $(OBJDIR)/quickjs-libc.o $(OBJDIR)/libbf.o
190+
QJS_LIB_OBJS=$(OBJDIR)/quickjs.o $(OBJDIR)/libregexp.o $(OBJDIR)/libunicode.o $(OBJDIR)/cutils.o $(OBJDIR)/quickjs-libc.o $(OBJDIR)/libbf.o
191191

192192
QJS_OBJS=$(OBJDIR)/qjs.o $(OBJDIR)/repl.o $(QJS_LIB_OBJS)
193193
ifdef CONFIG_BIGNUM
@@ -375,11 +375,11 @@ examples/point.so: $(OBJDIR)/examples/point.pic.o
375375
###############################################################################
376376
# documentation
377377

378-
DOCS=doc/quickjs.pdf doc/quickjs.html doc/jsbignum.pdf doc/jsbignum.html
378+
DOCS=doc/quickjs.pdf doc/quickjs.html doc/jsbignum.pdf doc/jsbignum.html
379379

380380
build_doc: $(DOCS)
381381

382-
clean_doc:
382+
clean_doc:
383383
rm -f $(DOCS)
384384

385385
doc/%.pdf: doc/%.texi

cutils.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* C utilities
3-
*
3+
*
44
* Copyright (c) 2017 Fabrice Bellard
55
* Copyright (c) 2018 Charlie Gordon
66
*
@@ -172,7 +172,7 @@ int __attribute__((format(printf, 2, 3))) dbuf_printf(DynBuf *s,
172172
va_list ap;
173173
char buf[128];
174174
int len;
175-
175+
176176
va_start(ap, fmt);
177177
len = vsnprintf(buf, sizeof(buf), fmt, ap);
178178
va_end(ap);

cutils.h

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* C utilities
3-
*
3+
*
44
* Copyright (c) 2017 Fabrice Bellard
55
* Copyright (c) 2018 Charlie Gordon
66
*
@@ -223,13 +223,13 @@ static inline uint32_t bswap32(uint32_t v)
223223

224224
static inline uint64_t bswap64(uint64_t v)
225225
{
226-
return ((v & ((uint64_t)0xff << (7 * 8))) >> (7 * 8)) |
227-
((v & ((uint64_t)0xff << (6 * 8))) >> (5 * 8)) |
228-
((v & ((uint64_t)0xff << (5 * 8))) >> (3 * 8)) |
229-
((v & ((uint64_t)0xff << (4 * 8))) >> (1 * 8)) |
230-
((v & ((uint64_t)0xff << (3 * 8))) << (1 * 8)) |
231-
((v & ((uint64_t)0xff << (2 * 8))) << (3 * 8)) |
232-
((v & ((uint64_t)0xff << (1 * 8))) << (5 * 8)) |
226+
return ((v & ((uint64_t)0xff << (7 * 8))) >> (7 * 8)) |
227+
((v & ((uint64_t)0xff << (6 * 8))) >> (5 * 8)) |
228+
((v & ((uint64_t)0xff << (5 * 8))) >> (3 * 8)) |
229+
((v & ((uint64_t)0xff << (4 * 8))) >> (1 * 8)) |
230+
((v & ((uint64_t)0xff << (3 * 8))) << (1 * 8)) |
231+
((v & ((uint64_t)0xff << (2 * 8))) << (3 * 8)) |
232+
((v & ((uint64_t)0xff << (1 * 8))) << (5 * 8)) |
233233
((v & ((uint64_t)0xff << (0 * 8))) << (7 * 8));
234234
}
235235

doc/jsbignum.texi

+1-1
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ precision.
289289
Otherwise, the number is rounded to nearest with ties to even using
290290
the global precision. It is then converted to string using the minimum
291291
number of digits so that its conversion back to a floating point using
292-
the global precision and round to nearest gives the same number.
292+
the global precision and round to nearest gives the same number.
293293

294294
@end itemize
295295

doc/quickjs.texi

+7-7
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ Options are:
160160
@table @code
161161
@item -c
162162
Only output bytecode in a C file. The default is to output an executable file.
163-
@item -e
163+
@item -e
164164
Output @code{main()} and bytecode in a C file. The default is to output an
165165
executable file.
166166
@item -o output
@@ -489,7 +489,7 @@ optional properties:
489489
to be UTF-8 encoded.
490490

491491
@item full
492-
492+
493493
Boolean (default = false). If true, return the an object contains
494494
the properties @code{response} (response content),
495495
@code{responseHeaders} (headers separated by CRLF), @code{status}
@@ -596,7 +596,7 @@ Available exports:
596596
Open a file. Return a handle or < 0 if error.
597597

598598
@item O_RDONLY
599-
@item O_WRONLY
599+
@item O_WRONLY
600600
@item O_RDWR
601601
@item O_APPEND
602602
@item O_CREAT
@@ -734,7 +734,7 @@ object containing optional parameters:
734734
terminated. In this case, @code{exec} return the exit code if positive
735735
or the negated signal number if the process was interrupted by a
736736
signal. If false, do not block and return the process id of the child.
737-
737+
738738
@item usePath
739739
Boolean (default = true). If true, the file is searched in the
740740
@code{PATH} environment variable.
@@ -758,7 +758,7 @@ object containing optional parameters:
758758
@item uid
759759
Integer. If present, the process uid with @code{setuid}.
760760

761-
@item gid
761+
@item gid
762762
Integer. If present, the process gid with @code{setgid}.
763763

764764
@end table
@@ -829,7 +829,7 @@ The worker instances have the following properties:
829829

830830
@table @code
831831
@item postMessage(msg)
832-
832+
833833
Send a message to the corresponding worker. @code{msg} is cloned in
834834
the destination worker using an algorithm similar to the @code{HTML}
835835
structured clone algorithm. @code{SharedArrayBuffer} are shared
@@ -972,7 +972,7 @@ The compiler generates bytecode directly with no intermediate
972972
representation such as a parse tree, hence it is very fast. Several
973973
optimizations passes are done over the generated bytecode.
974974

975-
A stack-based bytecode was chosen because it is simple and generates
975+
A stack-based bytecode was chosen because it is simple and generates
976976
compact code.
977977

978978
For each function, the maximum stack size is computed at compile time so that

examples/fib.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* QuickJS: Example of C module
3-
*
3+
*
44
* Copyright (c) 2017-2018 Fabrice Bellard
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy

examples/pi_bigdecimal.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function calc_pi(prec) {
1111
const CHUD_C = 640320m;
1212
const CHUD_C3 = 10939058860032000m; /* C^3/24 */
1313
const CHUD_DIGITS_PER_TERM = 14.18164746272548; /* log10(C/12)*3 */
14-
14+
1515
/* return [P, Q, G] */
1616
function chud_bs(a, b, need_G) {
1717
var c, P, Q, G, P1, Q1, G1, P2, Q2, G2, b1;

examples/pi_bigfloat.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function calc_pi() {
1111
const CHUD_C = 640320n;
1212
const CHUD_C3 = 10939058860032000n; /* C^3/24 */
1313
const CHUD_BITS_PER_TERM = 47.11041313821584202247; /* log2(C/12)*3 */
14-
14+
1515
/* return [P, Q, G] */
1616
function chud_bs(a, b, need_G) {
1717
var c, P, Q, G, P1, Q1, G1, P2, Q2, G2;

examples/pi_bigint.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ function calc_pi(prec) {
5454
const CHUD_C = 640320n;
5555
const CHUD_C3 = 10939058860032000n; /* C^3/24 */
5656
const CHUD_BITS_PER_TERM = 47.11041313821584202247; /* log2(C/12)*3 */
57-
57+
5858
/* return [P, Q, G] */
5959
function chud_bs(a, b, need_G) {
6060
var c, P, Q, G, P1, Q1, G1, P2, Q2, G2;

examples/point.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* QuickJS: Example of C module with a class
3-
*
3+
*
44
* Copyright (c) 2019 Fabrice Bellard
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -49,7 +49,7 @@ static JSValue js_point_ctor(JSContext *ctx,
4949
JSPointData *s;
5050
JSValue obj = JS_UNDEFINED;
5151
JSValue proto;
52-
52+
5353
s = js_mallocz(ctx, sizeof(*s));
5454
if (!s)
5555
return JS_EXCEPTION;
@@ -112,7 +112,7 @@ static JSValue js_point_norm(JSContext *ctx, JSValueConst this_val,
112112
static JSClassDef js_point_class = {
113113
"Point",
114114
.finalizer = js_point_finalizer,
115-
};
115+
};
116116

117117
static const JSCFunctionListEntry js_point_proto_funcs[] = {
118118
JS_CGETSET_MAGIC_DEF("x", js_point_get_xy, js_point_set_xy, 0),
@@ -123,19 +123,19 @@ static const JSCFunctionListEntry js_point_proto_funcs[] = {
123123
static int js_point_init(JSContext *ctx, JSModuleDef *m)
124124
{
125125
JSValue point_proto, point_class;
126-
126+
127127
/* create the Point class */
128128
JS_NewClassID(&js_point_class_id);
129129
JS_NewClass(JS_GetRuntime(ctx), js_point_class_id, &js_point_class);
130130

131131
point_proto = JS_NewObject(ctx);
132132
JS_SetPropertyFunctionList(ctx, point_proto, js_point_proto_funcs, countof(js_point_proto_funcs));
133-
133+
134134
point_class = JS_NewCFunction2(ctx, js_point_ctor, "Point", 2, JS_CFUNC_constructor, 0);
135135
/* set proto.constructor and ctor.prototype */
136136
JS_SetConstructor(ctx, point_class, point_proto);
137137
JS_SetClassProto(ctx, js_point_class_id, point_proto);
138-
138+
139139
JS_SetModuleExport(ctx, m, "Point", point_class);
140140
return 0;
141141
}

0 commit comments

Comments
 (0)