Skip to content
Closed
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
2 changes: 1 addition & 1 deletion emcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1822,7 +1822,7 @@ def parse_args(newargs):
should_exit = False

for i in range(len(newargs)):
# On Windows Vista (and possibly others), excessive spaces in the command line
# On Windows Vista (and possibly others), excessive spaces in the command line
# leak into the items in this array, so trim e.g. 'foo.cpp ' -> 'foo.cpp'
newargs[i] = newargs[i].strip()
if newargs[i].startswith('-O'):
Expand Down
2 changes: 1 addition & 1 deletion site/source/api_items.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,4 +268,4 @@ def get_mapped_items():
mapped_wiki_inline_code['HEAPU32']=':js:data:`HEAPU32`'
mapped_wiki_inline_code['EMSCRIPTEN_VISIBILITY_HIDDEN']=':c:macro:`EMSCRIPTEN_VISIBILITY_HIDDEN`'
mapped_wiki_inline_code['addRunDependency']=':js:func:`addRunDependency`'
return mapped_wiki_inline_code
return mapped_wiki_inline_code
2 changes: 1 addition & 1 deletion site/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@


#Build "Todo" notes into the source
#todo_include_todos = 'True'
#todo_include_todos = 'True'

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down
194 changes: 97 additions & 97 deletions site/source/docs/api_reference/Filesystem-API.rst

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions site/source/docs/api_reference/advanced-apis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This section lists APIs that are not suitable for general use, but which may be
settings.js
============

`settings.js <https://github.com/kripken/emscripten/blob/master/src/settings.js>`_ contains default values and options used in various places by the compiler.
`settings.js <https://github.com/kripken/emscripten/blob/master/src/settings.js>`_ contains default values and options used in various places by the compiler.

.. Warning :: Many **settings.js** options are highly brittle - certain combinations of options, and combinations of certain options used with some source code, can cause Emscripten to fail badly. This is intended for use by "advanced users", and possibly even only people developing Emscripten itself.

Expand All @@ -32,7 +32,7 @@ The small number of options that developers may have cause to change should be m

./emcc tests/hello_function.cpp -o function.html -s EXPORTED_FUNCTIONS="['_int_sqrt']"


preamble.js
===========

Expand All @@ -41,13 +41,13 @@ The following advanced APIs are documented in `preamble.js <https://github.com/k
.. js:function:: allocate(slab, types, allocator, ptr)

This is marked as *internal* because it is difficult to use (it has been optimized for multiple syntaxes to save space in generated code). Normally developers should instead allocate memory using ``_malloc()``, initialize it with :js:func:`setValue`, etc., but this function may be useful for advanced developers in certain cases.
:param slab: An array of data, or a number. If a number, then the size of the block to allocate, in *bytes*.

:param slab: An array of data, or a number. If a number, then the size of the block to allocate, in *bytes*.
:param types: Either an array of types, one for each byte (or 0 if no type at that position), or a single type which is used for the entire block. This only matters if there is initial data - if ``slab`` is a number, then this value does not matter at all and is ignored.
:param allocator: How to allocate memory, see ALLOC_*



Module.Runtime
================

Expand Down Expand Up @@ -95,7 +95,7 @@ Advanced File System API
FS.DB_NAME()
FS.saveFilesToDB(paths, onload, onerror)
FS.loadFilesFromDB(paths, onload, onerror)

For advanced users only.


Expand Down
564 changes: 282 additions & 282 deletions site/source/docs/api_reference/emscripten.h.rst

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions site/source/docs/api_reference/fetch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,14 @@ All types of Emscripten Fetch API operations (XHRs, IndexedDB accesses) can be p
printf("Finished downloading %llu bytes from URL %s.\n", fetch->numBytes, fetch->url);
// The data is now available at fetch->data[0] through fetch->data[fetch->numBytes-1];
} else {
printf("Downloading %s failed, HTTP failure status code: %d.\n", fetch->url, fetch->status);
printf("Downloading %s failed, HTTP failure status code: %d.\n", fetch->url, fetch->status);
}
emscripten_fetch_close(fetch);
}

In the above code sample, the success and failure callback functions are not used. However, if specified, they will be synchronously called before emscripten_fetch() returns.

.. note::
.. note::

Synchronous Emscripten Fetch operations are subject to a number of restrictions, depending on which Emscripten build mode (linker flags) is used:

Expand Down Expand Up @@ -183,14 +183,14 @@ Emscripten Fetch operations can also run in a third mode, called a *waitable* fe
printf("Finished downloading %llu bytes from URL %s.\n", fetch->numBytes, fetch->url);
// The data is now available at fetch->data[0] through fetch->data[fetch->numBytes-1];
} else {
printf("Downloading %s failed, HTTP failure status code: %d.\n", fetch->url, fetch->status);
printf("Downloading %s failed, HTTP failure status code: %d.\n", fetch->url, fetch->status);
}
emscripten_fetch_close(fetch);
}

Waitable fetches allow interleaving multiple tasks in one thread so that the issuing thread can perform some other work until the fetch completes.

.. note::
.. note::

Waitable fetches are available only in certain build modes:

Expand Down Expand Up @@ -249,7 +249,7 @@ If the application does not need random seek access to the file, but is able to

void downloadProgress(emscripten_fetch_t *fetch) {
printf("Downloading %s.. %.2f%%s complete. HTTP readyState: %d. HTTP status: %d.\n"
"HTTP statusText: %s. Received chunk [%llu, %llu[\n",
"HTTP statusText: %s. Received chunk [%llu, %llu[\n",
fetch->url, fetch->totalBytes > 0 ? (fetch->dataOffset + fetch->numBytes) * 100.0 / fetch->totalBytes : (fetch->dataOffset + fetch->numBytes),
fetch->totalBytes > 0 ? "%" : " bytes",
fetch->readyState, fetch->status, fetch->statusText,
Expand Down
Loading