Skip to content

Commit 15428ee

Browse files
committed
fix doc errors
1 parent cb4644b commit 15428ee

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

docs/api/api-c-con.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ void io_end_draw(twr_ioconsole_t* io);
349349
This function has been removed. Use `stderr` or `twr_conlog`.
350350

351351
~~~c
352-
#include "twr-wasm.h"
352+
#include "twr-crt.h"
353353

354354
twr_conlog("hello 99 in hex: %x", 99);
355355
~~~

docs/api/api-c-general.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ The current implementation does not wait for the debug string to output to the c
107107
## twr_epoch_timems
108108
Returns the number of milliseconds since the start of the epoch.
109109
~~~
110-
#include "twr-wasm.h"
110+
#include "twr-crt.h"
111111
112112
uint64_t twr_epoch_timems();
113113
~~~
@@ -213,7 +213,7 @@ size_t twr_mbslen_l(const char *str, locale_t locale);
213213
`twr_sleep` is a traditional blocking sleep function. This function is blocking, and so is only available if you use `twrWasmModuleAsync`.
214214

215215
~~~
216-
#include "twr-wasm.h"
216+
#include "twr-crt.h"
217217
218218
void twr_sleep(int ms);
219219
~~~
@@ -224,6 +224,8 @@ Returns a new event ID that is paired with the specified C function. This event
224224
The callback function's first argument will be the event ID. Subsequent arguments are event specific. It is legal to register the same callback for multiple event IDs.
225225

226226
~~~c
227+
#include "twr-crt.h"
228+
227229
int twr_register_callback(const char* func_name);
228230
~~~
229231
@@ -267,7 +269,7 @@ void twr_timer_cancel(int timerID);
267269
## twr_tofixed
268270
This function is identical to its JavaScript version.
269271
~~~
270-
#include "twr-wasm.h"
272+
#include "twr-crt.h"
271273
272274
void twr_tofixed(char* buffer, int buffer_size, double value, int dec_digits);
273275
~~~
@@ -278,7 +280,7 @@ The functions to convert double to text are `snprintf`, `fcvt_s`,`twr_dtoa`, `tw
278280
This function is identical to its JavaScript version.
279281

280282
~~~
281-
#include "twr-wasm.h"
283+
#include "twr-crt.h"
282284
283285
void twr_toexponential(char* buffer, int buffer_size, double value, int dec_digits);
284286
~~~

docs/api/api-c-stdlib.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ void srand(int seed);
5656
#define __min(a,b) (((a) < (b)) ? (a) : (b))
5757
#define __max(a,b) (((a) > (b)) ? (a) : (b))
5858
59+
int abs(int n);
60+
5961
int _fcvt_s(
6062
char* buffer,
6163
size_t sizeInBytes,
@@ -103,7 +105,6 @@ void assert(int expression);
103105

104106
## math.h
105107
~~~
106-
int abs(int n);
107108
double acos(double arg);
108109
double asin(double arg);
109110
double atan(double arg);

docs/gettingstarted/debugging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ If you are having issues with import resolution, [see this section.](../more/imp
3131
## Useful twr-wasm Debug Functions
3232
Use `twr_conlog` to print to the JavaScript console from C (see API ref section).
3333
~~~c
34-
#include "twr-wasm.h"
34+
#include "twr-crt.h"
3535

3636
twr_conlog("hello 99 in hex: %x",99);
3737
~~~

examples/maze/winemu.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#include <stddef.h>
66

77
#include "twr-draw2d.h"
8-
#include "twr-wasm.h"
98

109
#ifndef BOOL
1110
#define BOOL bool

0 commit comments

Comments
 (0)