Skip to content

Commit 962507c

Browse files
authored
[docs] Fix typos (#26021)
This fixes typos in docs, `settings.js` (because the comments here are copied into `settings_reference.rst`), and header strings in `update_settings_docs.py`. Split out of #26014.
1 parent fac2779 commit 962507c

34 files changed

+146
-147
lines changed

docs/emcc.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ Options that are modified or new in *emcc* are listed below:
221221
[link] Make the output suitable for profiling. This means including
222222
function names in the wasm and JS output, and preserving whitespace
223223
in the JS output. It does not affect optimizations (to ensure that
224-
performance profiles reflect production builds). Currenly this is
224+
performance profiles reflect production builds). Currently this is
225225
the same as "-g2".
226226

227227
"--profiling-funcs"
@@ -255,10 +255,11 @@ Options that are modified or new in *emcc* are listed below:
255255
"[name].wasm.js.symbols" (with ASM.js symbols)
256256

257257
"--emit-minification-map <file>"
258-
[link] In cases where emscripten performs import/export minificiton
259-
this option can be used to output a file that maps minified names
260-
back to their original names. The format of this file is single
261-
line per import/export of the form "<minname>:<origname>".
258+
[link] In cases where emscripten performs import/export
259+
minification this option can be used to output a file that maps
260+
minified names back to their original names. The format of this
261+
file is single line per import/export of the form
262+
"<minname>:<origname>".
262263

263264
"-flto"
264265
[compile+link] Enables link-time optimizations (LTO).

site/source/docs/api_reference/Filesystem-API.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ The device node acts as an interface between the device and the file system. Any
171171
Setting up standard I/O devices
172172
===============================
173173

174-
Emscripten standard I/O works by going though the virtual ``/dev/stdin``, ``/dev/stdout`` and ``/dev/stderr`` devices. You can set them up using your own I/O functions by calling :js:func:`FS.init`.
174+
Emscripten standard I/O works by going through the virtual ``/dev/stdin``, ``/dev/stdout`` and ``/dev/stderr`` devices. You can set them up using your own I/O functions by calling :js:func:`FS.init`.
175175

176176
By default:
177177

site/source/docs/api_reference/console.h.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,6 @@ Functions
5151
Prints the string using the `dbg()` JS function, which by will write to the
5252
console (or stdout). Just like the `dbg()` JS function this symbol is
5353
only available in debug builds (i.e. when linking with `-sASSERTIONS` or
54-
equivelently `-O0`).
54+
equivalently `-O0`).
5555
5656
:param utf8String: A string encoded as UTF-8.

site/source/docs/api_reference/emscripten.h.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ Functions
789789
:param int flags: See dlopen flags.
790790
:param void* user_data: User data passed to onsuccess, and onerror callbacks.
791791
:param em_dlopen_callback onsuccess: Called if the library was loaded successfully.
792-
:param em_arg_callback_func onerror: Called if there as an error loading the library.
792+
:param em_arg_callback_func onerror: Called if there is an error loading the library.
793793
794794
795795
Asynchronous IndexedDB API

site/source/docs/api_reference/html5.h.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ Struct
338338
339339
A system and implementation dependent numeric code identifying the unmodified value of the pressed key; this is usually the same as ``keyCode``.
340340

341-
.. warning:: This attribute is deprecated, you should use the field ``key`` instead, if available. Note thought that while this field is deprecated, the cross-browser support for ``which`` may be better than for the other fields, so experimentation is recommended. Read issue https://github.com/emscripten-core/emscripten/issues/2817 for more information.
341+
.. warning:: This attribute is deprecated, you should use the field ``key`` instead, if available. Note though that while this field is deprecated, the cross-browser support for ``which`` may be better than for the other fields, so experimentation is recommended. Read issue https://github.com/emscripten-core/emscripten/issues/2817 for more information.
342342

343343

344344
Callback functions
@@ -458,7 +458,7 @@ Struct
458458
.. c:member:: int canvasX
459459
int canvasY
460460

461-
These fields give the mouse coordinates mapped to the Emscripten canvas client area (Emscripten-specific extension; coordinates are rounded down the nearest integer).
461+
These fields give the mouse coordinates mapped to the Emscripten canvas client area (Emscripten-specific extension; coordinates are rounded down to the nearest integer).
462462

463463

464464
.. c:member:: int padding
@@ -515,7 +515,7 @@ Functions
515515
516516
Returns the most recently received mouse event state.
517517
518-
Note that for this function call to succeed, :c:func:`emscripten_set_xxx_callback <emscripten_set_click_callback>` must have first been called with one of the mouse event types and a non-zero callback function pointer to enable the Mouse state capture.
518+
Note that for this function call to succeed, :c:func:`emscripten_set_xxx_callback <emscripten_set_click_callback>` must have first been called with one of the mouse event types and a non-zero callback function pointer to enable the mouse state capture.
519519
520520
:param EmscriptenMouseEvent* mouseState: The most recently received mouse event state.
521521
:returns: :c:data:`EMSCRIPTEN_RESULT_SUCCESS`, or one of the other result values.
@@ -561,7 +561,7 @@ Struct
561561
double deltaY
562562
double deltaZ
563563
564-
Movement of the wheel on each of the axis. Note that these values may be fractional, so you should avoid simply casting them to integer, or it might result
564+
Movement of the wheel on each of the axes. Note that these values may be fractional, so you should avoid simply casting them to integer, or it might result
565565
in scroll values of 0. The positive Y scroll direction is when scrolling the page downwards (page CSS pixel +Y direction), which corresponds to scrolling
566566
the mouse wheel downwards (away from the screen) on Windows, Linux, and also on macOS when the 'natural scroll' option is disabled.
567567
@@ -794,7 +794,7 @@ Struct
794794
795795
The `orientation <https://developer.mozilla.org/en-US/Apps/Build/gather_and_modify_data/responding_to_device_orientation_changes#Device_Orientation_API>`_ of the device in terms of the transformation from a coordinate frame fixed on the Earth to a coordinate frame fixed in the device.
796796
797-
The image (source: `dev.opera.com <http://dev.opera.com/articles/view/w3c-device-orientation-api/>`_) and definitions below illustrate the co-ordinate frame:
797+
The image (source: `dev.opera.com <http://dev.opera.com/articles/view/w3c-device-orientation-api/>`_) and definitions below illustrate the coordinate frame:
798798
799799
- :c:type:`~EmscriptenDeviceOrientationEvent.alpha`: the rotation of the device around the Z axis.
800800
- :c:type:`~EmscriptenDeviceOrientationEvent.beta`: the rotation of the device around the X axis.
@@ -1767,7 +1767,7 @@ Functions
17671767
.. note::
17681768
17691769
Gamepad API uses an array of gamepad state objects to return the state of
1770-
each device. The devices are identified via the index they are present in in
1770+
each device. The devices are identified via the index they are present in
17711771
this array. Because of that, if one first connects gamepad A, then gamepad
17721772
B, and then disconnects gamepad A, the gamepad B shall not take the place of
17731773
gamepad A, so in this scenario, this function will still keep returning two
@@ -1803,15 +1803,15 @@ Defines
18031803
.. c:macro:: EMSCRIPTEN_EVENT_BATTERYCHARGINGCHANGE
18041804
EMSCRIPTEN_EVENT_BATTERYLEVELCHANGE
18051805
1806-
Emscripten `batterymanager <http://www.w3.org/TR/battery-status/#batterymanager-interface>`_ events.
1806+
Emscripten `BatteryManager <http://www.w3.org/TR/battery-status/#batterymanager-interface>`_ events.
18071807
18081808
18091809
Struct
18101810
------
18111811
18121812
.. c:type:: EmscriptenBatteryEvent
18131813
1814-
The event structure passed in the `batterymanager <http://www.w3.org/TR/battery-status/#batterymanager-interface>`_ events: ``chargingchange`` and ``levelchange``.
1814+
The event structure passed in the `BatteryManager <http://www.w3.org/TR/battery-status/#batterymanager-interface>`_ events: ``chargingchange`` and ``levelchange``.
18151815
18161816
18171817
.. c:member:: double chargingTime
@@ -1836,14 +1836,14 @@ Callback functions
18361836
18371837
.. c:type:: em_battery_callback_func
18381838
1839-
Function pointer for the :c:func:`batterymanager event callback functions <emscripten_set_batterychargingchange_callback>`, defined as:
1839+
Function pointer for the :c:func:`BatteryManager event callback functions <emscripten_set_batterychargingchange_callback>`, defined as:
18401840
18411841
.. code-block:: cpp
18421842
18431843
typedef bool (*em_battery_callback_func)(int eventType, const EmscriptenBatteryEvent *batteryEvent, void *userData);
18441844
1845-
:param int eventType: The type of ``batterymanager`` event (:c:data:`EMSCRIPTEN_EVENT_BATTERYCHARGINGCHANGE`).
1846-
:param batteryEvent: Information about the ``batterymanager`` event that occurred.
1845+
:param int eventType: The type of ``BatteryManager`` event (:c:data:`EMSCRIPTEN_EVENT_BATTERYCHARGINGCHANGE`).
1846+
:param batteryEvent: Information about the ``BatteryManager`` event that occurred.
18471847
:type batteryEvent: const EmscriptenBatteryEvent*
18481848
:param void* userData: The ``userData`` originally passed to the registration function.
18491849
:returns: |callback-handler-return-value-doc|
@@ -1857,7 +1857,7 @@ Functions
18571857
.. c:function:: EMSCRIPTEN_RESULT emscripten_set_batterychargingchange_callback(void *userData, em_battery_callback_func callback)
18581858
EMSCRIPTEN_RESULT emscripten_set_batterylevelchange_callback(void *userData, em_battery_callback_func callback)
18591859
1860-
Registers a callback function for receiving the `batterymanager <http://www.w3.org/TR/battery-status/#batterymanager-interface>`_ events: ``chargingchange`` and ``levelchange``.
1860+
Registers a callback function for receiving the `BatteryManager <http://www.w3.org/TR/battery-status/#batterymanager-interface>`_ events: ``chargingchange`` and ``levelchange``.
18611861
18621862
:param void* userData: |userData-parameter-doc|
18631863
:param em_battery_callback_func callback: |callback-function-parameter-doc|

site/source/docs/api_reference/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ high level it consists of:
1414
Low level glue bindings for interfacing with HTML5 APIs from native code.
1515

1616
- :ref:`console-h`:
17-
Functions to writing to the console and stdout/stderr.
17+
Functions for writing to the console and stdout/stderr.
1818

1919
- :ref:`preamble-js`:
2020
APIs for working with compiled code from JavaScript.

site/source/docs/api_reference/preamble.js.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Calling compiled C functions from JavaScript
8181

8282
Returns a native JavaScript wrapper for a C function.
8383

84-
This is similar to :js:func:`ccall`, but returns a JavaScript function that can be reused as many time as needed. The C function can be defined in a C file, or be a C-compatible C++ function defined using ``extern "C"`` (to prevent name mangling).
84+
This is similar to :js:func:`ccall`, but returns a JavaScript function that can be reused as many times as needed. The C function can be defined in a C file, or be a C-compatible C++ function defined using ``extern "C"`` (to prevent name mangling).
8585

8686

8787
.. code-block:: javascript
@@ -239,7 +239,7 @@ Conversion functions — strings, pointers and arrays
239239

240240
.. js:function:: intArrayFromString(stringy, dontAddNull[, length])
241241

242-
This converts a JavaScript string into a C-line array of numbers, 0-terminated.
242+
This converts a JavaScript string into a C-like array of numbers, 0-terminated.
243243

244244
:param stringy: The string to be converted.
245245
:type stringy: String
@@ -251,7 +251,7 @@ Conversion functions — strings, pointers and arrays
251251

252252
.. js:function:: intArrayToString(array)
253253

254-
This creates a JavaScript string from a zero-terminated C-line array of numbers.
254+
This creates a JavaScript string from a zero-terminated C-like array of numbers.
255255

256256
:param array: The array to convert.
257257
:returns: A ``String``, containing the content of ``array``.

site/source/docs/api_reference/wasm_workers.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,6 @@ If you need to synchronously wait for the posted function to finish from within
117117
the ``emscripten_wasm_worker_*()`` thread synchronization functions to sleep the calling thread until
118118
the callee has finished the operation.
119119

120-
Note that Wasm Workers cannot
121-
122120
Pthreads have cancellation points
123121
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
124122

@@ -371,7 +369,7 @@ Both APIs allow one to spawn Web Workers from the main thread, though the semant
371369

372370
With the Worker API, the user will be able to spawn a Web Worker from a custom URL. This URL can point to a completely separate JS file that was not compiled with Emscripten, to load up Workers from arbitrary URLs. With Wasm Workers, a custom URL is not specified: Wasm Workers will always spawn a Web Worker that computes in the same WebAssembly+JavaScript context as the main program.
373371

374-
The Worker API does not integrate with SharedArrayBuffer, so interaction with the loaded Worker will always be asynchronous. Wasm Workers howerer is built on top of SharedArrayBuffer, and each Wasm Worker shares and computes in the same WebAssembly Memory address space of the main thread.
372+
The Worker API does not integrate with SharedArrayBuffer, so interaction with the loaded Worker will always be asynchronous. Wasm Workers however is built on top of SharedArrayBuffer, and each Wasm Worker shares and computes in the same WebAssembly Memory address space of the main thread.
375373

376374
Both the Worker API and Wasm Workers API provide the user with ability to postMessage() function calls to the Worker. In Worker API, this message posting is restricted to need to originate/initiate from the main thread towards the Worker (using the API ``emscripten_call_worker()`` and ``emscripten_worker_respond()`` in ``<emscripten.h>``). With Wasm Workers however one can also postMessage() function calls to their parent (owning) thread.
377375

site/source/docs/building_from_source/configuring_emscripten_settings.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Locating the compiler configuration file (.emscripten)
4545
======================================================
4646

4747
The settings file (``.emscripten``) is created by default within the emscripten
48-
directory (alongsize ``emcc`` itself). In cases where the emscripten directory
48+
directory (alongside ``emcc`` itself). In cases where the emscripten directory
4949
is read-only the user's home directory will be used:
5050

5151
- On Linux and macOS this file is named **~/.emscripten**, where ~ is the

site/source/docs/building_from_source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ before it can be used (e.g. ``npm install``). The ``bootstrap`` script in the
1313
top level of the repository takes care of running these steps and ``emcc`` will
1414
error out if it detects that ``bootstrap`` needs to be run.
1515

16-
Emscripten comes with its own versions some C/C++ system libaries which ``emcc``
16+
Emscripten comes with its own versions of some C/C++ system libraries which ``emcc``
1717
builds automatically as and when needed (in the emsdk builds, these are precompiled).
1818
You can also build them manually with the ``embuilder`` tool - see ``embuilder --help``
1919
for more information.

0 commit comments

Comments
 (0)