Skip to content

Commit abf18ac

Browse files
committed
Add sscanf
1 parent bfcde0e commit abf18ac

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

docs/tcc-wasm.wasm

1.61 KB
Binary file not shown.

tcc-wasm.wasm

1.61 KB
Binary file not shown.

zig/tcc-wasm.zig

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ export fn sem_wait(sem: *sem_t) c_int {
6868

6969
const sem_t = opaque {};
7070

71+
///////////////////////////////////////////////////////////////////////////////
72+
// sscanf
73+
74+
export fn sscanf(str: [*:0]const u8, format: [*:0]const u8, ...) c_int {
75+
debug("TODO: sscanf: str={s}, format={s}", .{ str, format });
76+
return 0;
77+
}
78+
7179
///////////////////////////////////////////////////////////////////////////////
7280
// Memory Allocator for malloc
7381

@@ -350,9 +358,6 @@ pub export fn snprintf(_: c_int) c_int {
350358
pub export fn sprintf(_: c_int) c_int {
351359
@panic("TODO: sprintf");
352360
}
353-
pub export fn sscanf(_: c_int) c_int {
354-
@panic("TODO: sscanf");
355-
}
356361
pub export fn strcat(_: c_int) c_int {
357362
@panic("TODO: strcat");
358363
}

0 commit comments

Comments
 (0)