@@ -28,12 +28,8 @@ fn C.exit(code int)
28
28
29
29
fn C.qsort (base voidptr , items usize, item_size usize, cb C.qsort_callback_func)
30
30
31
- fn C.sprintf (a ...voidptr) int
32
-
33
31
fn C.strlen (s & char) int
34
32
35
- fn C.sscanf (& u8 , & u8 , ...& u8 ) int
36
-
37
33
@[trusted]
38
34
fn C.isdigit (c int ) bool
39
35
@@ -43,21 +39,31 @@ fn C.popen(c &char, t &char) voidptr
43
39
// <libproc.h>
44
40
pub fn proc_pidpath (int , voidptr , int ) int
45
41
46
- fn C.realpath (& char, & char) & char
42
+ fn C.realpath (const_path & char, resolved_path & char) & char
47
43
48
44
// fn C.chmod(byteptr, mode_t) int
49
- fn C.chmod (& char, u32 ) int
45
+ fn C.chmod (path & char, mode u32 ) int
50
46
51
- fn C.printf (& char, ...voidptr) int
47
+ fn C.printf (const_format & char, opt ...voidptr) int
48
+ fn C.dprintf (fd int , const_format & char, opt ...voidptr) int
49
+ fn C.fprintf (fstream & C.FILE, const_format & char, opt ...voidptr) int
50
+ fn C.sprintf (str & char, const_format & char, opt ...voidptr) int
51
+ fn C.snprintf (str & char, size usize, const_format & char, opt ...voidptr) int
52
+ fn C.wprintf (const_format & u16 , opt ...voidptr) int
53
+
54
+ // used by Android for (e)println to output to the Android log system / logcat
55
+ pub fn C.android_print (fstream voidptr , format & char, opt ...voidptr)
52
56
53
- fn C.scanf (& char, ...voidptr) int
57
+ fn C.sscanf (str & char, const_format & char, opt ...voidptr) int
58
+ fn C.scanf (const_format & char, opt ...voidptr) int
54
59
55
- fn C.puts (& char) int
60
+ fn C.puts (msg & char) int
61
+ @[trusted]
56
62
fn C.abs (f64 ) f64
57
63
58
- fn C.fputs (str & char, stream & C.FILE) int
64
+ fn C.fputs (msg & char, fstream & C.FILE) int
59
65
60
- fn C.fflush (& C.FILE) int
66
+ fn C.fflush (fstream & C.FILE) int
61
67
62
68
// TODO: define args in these functions
63
69
fn C.fseek (stream & C.FILE, offset int , whence int ) int
@@ -81,8 +87,10 @@ fn C.strchr(s &char, c int) &char
81
87
@[trusted]
82
88
fn C.getpid () int
83
89
90
+ @[trusted]
84
91
fn C.getuid () int
85
92
93
+ @[trusted]
86
94
fn C.geteuid () int
87
95
88
96
fn C.system (cmd & char) int
@@ -203,10 +211,6 @@ fn C.strncmp(s &char, s2 &char, n int) int
203
211
@[trusted]
204
212
fn C.strerror (int ) & char
205
213
206
- fn C.snprintf (str & char, size usize, format & char, opt ...voidptr) int
207
-
208
- fn C.fprintf (voidptr , & char, ...voidptr)
209
-
210
214
@[trusted]
211
215
fn C.WIFEXITED (status int ) bool
212
216
@@ -295,8 +299,6 @@ fn C.GetConsoleMode(voidptr, &u32) bool
295
299
@[trusted]
296
300
fn C.GetCurrentProcessId () u32
297
301
298
- fn C.wprintf ()
299
-
300
302
// fn C.setbuf()
301
303
fn C.setbuf (voidptr , & char)
302
304
@@ -504,8 +506,6 @@ fn C.glTexImage2D()
504
506
// used by ios for println
505
507
fn C.WrappedNSLog (str & u8 )
506
508
507
- // used by Android for (e)println to output to the Android log system / logcat
508
- pub fn C.android_print (voidptr , & char, ...voidptr)
509
-
510
509
// absolute value
510
+ @[trusted]
511
511
fn C.abs (number int ) int
0 commit comments