Last change
on this file since 388 was 388, checked in by coas-nagasima, 5 years ago |
Azure IoT Hub Device C SDK を使ったサンプルの追加
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Id
-
Property svn:mime-type
set to
text/x-csrc
|
File size:
253 bytes
|
Rev | Line | |
---|
[388] | 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.