Clean up some naming: fd vs. fildes vs. filedes and filep vs filp

This commit is contained in:
Gregory Nutt
2013-09-28 16:50:07 -06:00
parent 5c6d8b75fa
commit fb993ca794
2 changed files with 310 additions and 310 deletions
+8 -8
View File
@@ -12,7 +12,7 @@
<h1><big><font color="#3c34ec"> <h1><big><font color="#3c34ec">
<i>NuttX RTOS Porting Guide</i> <i>NuttX RTOS Porting Guide</i>
</font></big></h1> </font></big></h1>
<p>Last Updated: August 13, 2013</p> <p>Last Updated: September 28, 2013</p>
</td> </td>
</tr> </tr>
</table> </table>
@@ -2806,13 +2806,13 @@ extern void up_ledoff(int led);
Each character device driver must implement an instance of <code>struct file_operations</code>. Each character device driver must implement an instance of <code>struct file_operations</code>.
That structure defines a call table with the following methods: That structure defines a call table with the following methods:
<ul> <ul>
<p><code>int open(FAR struct file *filp);</code><br> <p><code>int open(FAR struct file *filep);</code><br>
<code>int close(FAR struct file *filp);</code><br> <code>int close(FAR struct file *filep);</code><br>
<code>ssize_t read(FAR struct file *filp, FAR char *buffer, size_t buflen);</code><br> <code>ssize_t read(FAR struct file *filep, FAR char *buffer, size_t buflen);</code><br>
<code>ssize_t write(FAR struct file *filp, FAR const char *buffer, size_t buflen);</code><br> <code>ssize_t write(FAR struct file *filep, FAR const char *buffer, size_t buflen);</code><br>
<code>off_t seek(FAR struct file *filp, off_t offset, int whence);</code><br> <code>off_t seek(FAR struct file *filep, off_t offset, int whence);</code><br>
<code>int ioctl(FAR struct file *filp, int cmd, unsigned long arg);</code><br> <code>int ioctl(FAR struct file *filep, int cmd, unsigned long arg);</code><br>
<code>int poll(FAR struct file *filp, struct pollfd *fds, bool setup);</code></p> <code>int poll(FAR struct file *filep, struct pollfd *fds, bool setup);</code></p>
</ul> </ul>
</p> </p>
</li> </li>
+8 -8
View File
@@ -13,7 +13,7 @@
<h1><big><font color="#3c34ec"><i>NuttX Operating System<p>User's Manual</i></font></big></h1> <h1><big><font color="#3c34ec"><i>NuttX Operating System<p>User's Manual</i></font></big></h1>
<p><small>by</small></p> <p><small>by</small></p>
<p>Gregory Nutt<p> <p>Gregory Nutt<p>
<p>Last Updated: June 4, 2013</p> <p>Last Updated: September 28, 2013</p>
</td> </td>
</tr> </tr>
</table> </table>
@@ -7937,8 +7937,8 @@ interface of the same name.
<ul><pre> <ul><pre>
#include &lt;unistd.h&gt; #include &lt;unistd.h&gt;
int close(int fd); int close(int fd);
int dup(int fildes); int dup(int fd);
int dup2(int fildes1, int fildes2); int dup2(int fd1, int fd2);
off_t lseek(int fd, off_t offset, int whence); off_t lseek(int fd, off_t offset, int whence);
ssize_t read(int fd, void *buf, size_t nbytes); ssize_t read(int fd, void *buf, size_t nbytes);
int unlink(const char *path); int unlink(const char *path);
@@ -8103,7 +8103,7 @@ off_t lseek(int fd, off_t offset, int whence);
ssize_t read(int fd, FAR void *buf, size_t nbytes); ssize_t read(int fd, FAR void *buf, size_t nbytes);
ssize_t write(int fd, FAR const void *buf, size_t nbytes); ssize_t write(int fd, FAR const void *buf, size_t nbytes);
int pipe(int filedes[2]); int pipe(int fd[2]);
int chdir(FAR const char *path); int chdir(FAR const char *path);
FAR char *getcwd(FAR char *buf, size_t size); FAR char *getcwd(FAR char *buf, size_t size);
@@ -8224,22 +8224,22 @@ void *memmove(void *dest, const void *src, size_t count);
</p> </p>
<ul><pre> <ul><pre>
#include &lt;unistd.h&gt; #include &lt;unistd.h&gt;
int pipe(int filedes[2]); int pipe(int fd[2]);
</pre></ul> </pre></ul>
<p> <p>
<b>Description:</b> <b>Description:</b>
<ul> <ul>
<p> <p>
<code>pipe()</code> creates a pair of file descriptors, pointing to a pipe inode, and <code>pipe()</code> creates a pair of file descriptors, pointing to a pipe inode, and
places them in the array pointed to by <code>filedes</code>. places them in the array pointed to by <code>fd</code>.
<code>filedes[0]</code> is for reading, <code>filedes[1]</code> is for writing. <code>fd[0]</code> is for reading, <code>fd[1]</code> is for writing.
</p> </p>
</ul> </ul>
</p> </p>
<p> <p>
<b>Input Parameters:</b> <b>Input Parameters:</b>
<ul> <ul>
<li><code>filedes[2]</code>. The user provided array in which to catch the pipe file descriptors.</li> <li><code>fd[2]</code>. The user provided array in which to catch the pipe file descriptors.</li>
</ul> </ul>
</p> </p>
</p> </p>