Last change
on this file since 445 was 444, checked in by coas-nagasima, 4 years ago |
muslのソースコードを追加
|
-
Property svn:eol-style
set to
native
-
Property svn:mime-type
set to
text/x-csrc;charset=UTF-8
|
File size:
253 bytes
|
Line | |
---|
1 | void __procfdname(char *buf, unsigned fd)
|
---|
2 | {
|
---|
3 | unsigned i, j;
|
---|
4 | for (i=0; (buf[i] = "/proc/self/fd/"[i]); i++);
|
---|
5 | if (!fd) {
|
---|
6 | buf[i] = '0';
|
---|
7 | buf[i+1] = 0;
|
---|
8 | return;
|
---|
9 | }
|
---|
10 | for (j=fd; j; j/=10, i++);
|
---|
11 | buf[i] = 0;
|
---|
12 | for (; fd; fd/=10) buf[--i] = '0' + fd%10;
|
---|
13 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.