Skip to content

Commit a9bda68

Browse files
authored
Merge pull request svaarala#1897 from svaarala/ecmascript-spelling-examples-extras
Use 'ECMAScript' spelling in extras/ and examples/
2 parents dea8178 + f25225d commit a9bda68

11 files changed

Lines changed: 22 additions & 22 deletions

File tree

examples/cmdline/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
Duktape command line
33
====================
44

5-
Ecmascript command line execution tool, useful for running Ecmascript code
5+
ECMAScript command line execution tool, useful for running ECMAScript code
66
from a file, stdin, or interactively. Also used by automatic testing.

examples/eventloop/README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ built otherwise).
1212
To test (Linux only, perhaps other Unix)::
1313

1414
$ make
15-
$ ./evloop curses-timers.js # run with Ecmascript eventloop
15+
$ ./evloop curses-timers.js # run with ECMAScript eventloop
1616
$ ./evloop -c curses-timers.js # run with C eventloop
1717

1818
Implementation approaches
@@ -25,8 +25,8 @@ two main approaches:
2525
like timers, sockets, etc, is held in C structures.
2626
(See ``c_eventloop.c`` and ``c_eventloop.js``.)
2727

28-
2. Using an Ecmascript eventloop which never returns. All the event loop state
29-
can be managed with Ecmascript code instead of C structures. The Ecmascript
28+
2. Using an ECMAScript eventloop which never returns. All the event loop state
29+
can be managed with ECMAScript code instead of C structures. The ECMAScript
3030
eventloop calls a Duktape/C helper to do the lowest level poll() call.
3131
(See ``ecma_eventloop.js``.)
3232

examples/eventloop/c_eventloop.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ duk_ret_t eventloop_run(duk_context *ctx, void *udata) {
272272

273273
(void) udata;
274274

275-
/* The Ecmascript poll handler is passed through EventLoop.fdPollHandler
275+
/* The ECMAScript poll handler is passed through EventLoop.fdPollHandler
276276
* which c_eventloop.js sets before we come here.
277277
*/
278278
duk_push_global_object(ctx);
@@ -356,7 +356,7 @@ duk_ret_t eventloop_run(duk_context *ctx, void *udata) {
356356

357357
/*
358358
* Check socket activity, handle all sockets. Handling is offloaded to
359-
* Ecmascript code (fd + revents).
359+
* ECMAScript code (fd + revents).
360360
*
361361
* If FDs are removed from the poll list while we're processing callbacks,
362362
* the entries are simply marked unused (fd set to 0) without actually

examples/eventloop/c_eventloop.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* C eventloop example (c_eventloop.c).
33
*
4-
* Ecmascript code to initialize the exposed API (setTimeout() etc) when
4+
* ECMAScript code to initialize the exposed API (setTimeout() etc) when
55
* using the C eventloop.
66
*
77
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Timers

examples/eventloop/ecma_eventloop.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Pure Ecmascript eventloop example.
2+
* Pure ECMAScript eventloop example.
33
*
44
* Timer state handling is inefficient in this trivial example. Timers are
55
* kept in an array sorted by their expiry time which works well for expiring

examples/eventloop/main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,14 +229,14 @@ int main(int argc, char *argv[]) {
229229
fileio_register(ctx);
230230

231231
if (c_evloop) {
232-
fprintf(stderr, "Using C based eventloop (omit -c to use Ecmascript based eventloop)\n");
232+
fprintf(stderr, "Using C based eventloop (omit -c to use ECMAScript based eventloop)\n");
233233
fflush(stderr);
234234

235235
eventloop_register(ctx);
236236
fileio_push_file_string(ctx, "c_eventloop.js");
237237
duk_eval(ctx);
238238
} else {
239-
fprintf(stderr, "Using Ecmascript based eventloop (give -c to use C based eventloop)\n");
239+
fprintf(stderr, "Using ECMAScript based eventloop (give -c to use C based eventloop)\n");
240240
fflush(stderr);
241241

242242
fileio_push_file_string(ctx, "ecma_eventloop.js");
@@ -268,7 +268,7 @@ int main(int argc, char *argv[]) {
268268
usage:
269269
fprintf(stderr, "Usage: evloop [-c] <filename>\n");
270270
fprintf(stderr, "\n");
271-
fprintf(stderr, "Uses an Ecmascript based eventloop (ecma_eventloop.js) by default.\n");
271+
fprintf(stderr, "Uses an ECMAScript based eventloop (ecma_eventloop.js) by default.\n");
272272
fprintf(stderr, "If -c option given, uses a C based eventloop (c_eventloop.{c,js}).\n");
273273
fprintf(stderr, "If <filename> is '-', the entire STDIN executed.\n");
274274
fflush(stderr);

examples/guide/prime.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
// prime.js
22

3-
// Pure Ecmascript version of low level helper
4-
function primeCheckEcmascript(val, limit) {
3+
// Pure ECMAScript version of low level helper
4+
function primeCheckECMAScript(val, limit) {
55
for (var i = 2; i <= limit; i++) {
66
if ((val % i) == 0) { return false; }
77
}
88
return true;
99
}
1010

1111
// Select available helper at load time
12-
var primeCheckHelper = (this.primeCheckNative || primeCheckEcmascript);
12+
var primeCheckHelper = (this.primeCheckNative || primeCheckECMAScript);
1313

1414
// Check 'val' for primality
1515
function primeCheck(val) {
@@ -23,7 +23,7 @@ function primeCheck(val) {
2323
function primeTest() {
2424
var res = [];
2525

26-
print('Have native helper: ' + (primeCheckHelper !== primeCheckEcmascript));
26+
print('Have native helper: ' + (primeCheckHelper !== primeCheckECMAScript));
2727
for (var i = 1; i < 1000000; i++) {
2828
if (primeCheck(i) && (i % 10000) == 9999) { res.push(i); }
2929
}

extras/cbor/README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ To integrate CBOR into your application:
1414
is enough.
1515

1616
* Call ``duk_cbor_init()`` to register a global ``CBOR`` object with
17-
Ecmascript bindings ``CBOR.encode()`` and ``CBOR.decode()``, roughly
17+
ECMAScript bindings ``CBOR.encode()`` and ``CBOR.decode()``, roughly
1818
matching https://github.com/paroga/cbor-js.
1919

2020
Basic usage of the ``jsoncbor`` conversion tool::
@@ -24,7 +24,7 @@ Basic usage of the ``jsoncbor`` conversion tool::
2424
$ cat test.json | ./jsoncbor -e # writes CBOR to stdout
2525
$ cat test.cbor | ./jsoncbor -d # writes JSON to stdout
2626

27-
CBOR objects are decoded into Ecmascript objects, with non-string keys
27+
CBOR objects are decoded into ECMAScript objects, with non-string keys
2828
coerced into strings.
2929

3030
Direct support for CBOR is likely to be included in the Duktape API in the
@@ -45,7 +45,7 @@ Some CBOR shortcomings for preserving information:
4545
- Array objects with properties lose their non-index properties.
4646
- Array objects with gaps lose their gaps as they read back as undefined.
4747
- Buffer objects and views lose much of their detail besides the raw data.
48-
- Ecmascript strings cannot be fully represented; strings must be UTF-8.
48+
- ECMAScript strings cannot be fully represented; strings must be UTF-8.
4949
- Functions and native objects lose most of their detail.
5050
- CBOR tags are useful to provide soft decoding information, but the tags
5151
are just integers from an IANA controlled space with no space for custom

extras/cbor/jsoncbor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ static void usage_and_exit(void) {
5151
"\n"
5252
" Input is read from stdin, output is written to stdout.\n"
5353
" 'jx' is a Duktape custom JSON extension.\n"
54-
" 'js' means evaluate input as an Ecmascript expression.\n");
54+
" 'js' means evaluate input as an ECMAScript expression.\n");
5555
exit(1);
5656
}
5757

extras/module-duktape/duk_module_duktape.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ static duk_ret_t duk__require(duk_context *ctx) {
263263
* done with Object.defineProperty().
264264
*
265265
* XXX: require.id could also be just made non-configurable, as there
266-
* is no practical reason to touch it (at least from Ecmascript code).
266+
* is no practical reason to touch it (at least from ECMAScript code).
267267
*/
268268
duk_push_c_function(ctx, duk__require, 1 /*nargs*/);
269269
duk_push_string(ctx, "name");
@@ -307,7 +307,7 @@ static duk_ret_t duk__require(duk_context *ctx) {
307307
* Call user provided module search function and build the wrapped
308308
* module source code (if necessary). The module search function
309309
* can be used to implement pure Ecmacsript, pure C, and mixed
310-
* Ecmascript/C modules.
310+
* ECMAScript/C modules.
311311
*
312312
* The module search function can operate on the exports table directly
313313
* (e.g. DLL code can register values to it). It can also return a

0 commit comments

Comments
 (0)