summaryrefslogtreecommitdiff
path: root/libio
diff options
context:
space:
mode:
Diffstat (limited to 'libio')
-rw-r--r--libio/fileops.c2
-rw-r--r--libio/genops.c4
-rw-r--r--libio/iofgetpos.c2
-rw-r--r--libio/iofsetpos.c3
-rw-r--r--libio/iovsprintf.c11
-rw-r--r--libio/iovsscanf.c10
-rw-r--r--libio/libioP.h16
-rw-r--r--libio/strops.c2
8 files changed, 26 insertions, 24 deletions
diff --git a/libio/fileops.c b/libio/fileops.c
index dd1f573400..12b2ead125 100644
--- a/libio/fileops.c
+++ b/libio/fileops.c
@@ -46,7 +46,7 @@ extern int errno;
Putback mode is a variant of get mode.
In a filebuf, there is only one current position, instead of two
- separate get and put pointers. In get mode, the current posistion
+ separate get and put pointers. In get mode, the current position
is that of gptr(); in put mode that of pptr().
The position in the buffer that corresponds to the position
diff --git a/libio/genops.c b/libio/genops.c
index 7679445c2b..3267aa32c9 100644
--- a/libio/genops.c
+++ b/libio/genops.c
@@ -635,7 +635,7 @@ DEFUN_VOID(_IO_cleanup)
/* We currently don't have a reliable mechanism for making sure that
C++ static destructors are executed in the correct order.
- So it is possible that other static destructord might want to
+ So it is possible that other static destructors might want to
write to cout - and they're supposed to be able to do so.
The following will make the standard streambufs be unbuffered,
@@ -691,7 +691,7 @@ DEFUN(_IO_marker_difference, (mark1, mark2),
return mark1->_pos - mark2->_pos;
}
-/* Return difference between MARK and current posistion of MARK's stream. */
+/* Return difference between MARK and current position of MARK's stream. */
int
DEFUN(_IO_marker_delta, (mark),
struct _IO_marker *mark)
diff --git a/libio/iofgetpos.c b/libio/iofgetpos.c
index cae5df7b39..53a359ee76 100644
--- a/libio/iofgetpos.c
+++ b/libio/iofgetpos.c
@@ -24,7 +24,7 @@ the executable file might be covered by the GNU General Public License. */
#include "libioP.h"
#include <errno.h>
-/* ANSI explicily requires setting errno to a positive value on failure. */
+/* ANSI explicitly requires setting errno to a positive value on failure. */
int
_IO_fgetpos (fp, posp)
diff --git a/libio/iofsetpos.c b/libio/iofsetpos.c
index ec913e3e2f..2d29fa7cbb 100644
--- a/libio/iofsetpos.c
+++ b/libio/iofsetpos.c
@@ -36,7 +36,8 @@ _IO_fsetpos (fp, posp)
_IO_flockfile (fp);
if (_IO_seekpos (fp, *posp, _IOS_INPUT|_IOS_OUTPUT) == _IO_pos_BAD)
{
- /*ANSI explicily requires setting errno to a positive value on failure.*/
+ /* ANSI explicitly requires setting errno to a positive value on
+ failure. */
#ifdef EIO
if (errno == 0)
__set_errno (EIO);
diff --git a/libio/iovsprintf.c b/libio/iovsprintf.c
index fc01d82ee0..11904e36b3 100644
--- a/libio/iovsprintf.c
+++ b/libio/iovsprintf.c
@@ -40,13 +40,14 @@ _IO_vsprintf (string, format, args)
#ifdef _IO_MTSAFE_IO
sf._sbf._f._lock = &lock;
#endif
- _IO_init ((_IO_FILE *) &sf, 0);
- _IO_JUMPS ((_IO_FILE *) &sf) = &_IO_str_jumps;
+ _IO_init (&sf._sbf._f, 0);
+ _IO_JUMPS (&sf._sbf._f) = &_IO_str_jumps;
+ _IO_str_init_static (&sf._sbf._f, string, -1, string);
_IO_str_init_static ((_IO_FILE *) &sf, string, -1, string);
_IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, &sf);
- _IO_flockfile ((_IO_FILE *) &sf);
- ret = _IO_vfprintf ((_IO_FILE *) &sf, format, args);
- _IO_putc_unlocked ('\0', (_IO_FILE *) &sf);
+ _IO_flockfile (&sf._sbf._f);
+ ret = _IO_vfprintf (&sf._sbf._f, format, args);
+ _IO_putc_unlocked ('\0', &sf._sbf._f);
_IO_cleanup_region_end (1);
return ret;
}
diff --git a/libio/iovsscanf.c b/libio/iovsscanf.c
index 4a21cce4b0..c0c2ef0bf1 100644
--- a/libio/iovsscanf.c
+++ b/libio/iovsscanf.c
@@ -35,12 +35,12 @@ DEFUN(_IO_vsscanf, (string, format, args),
_IO_lock_t lock;
sf._sbf._f._lock = &lock;
#endif
- _IO_init((_IO_FILE*)&sf, 0);
- _IO_JUMPS((_IO_FILE*)&sf) = &_IO_str_jumps;
- _IO_str_init_static ((_IO_FILE*)&sf, (char*)string, 0, NULL);
+ _IO_init(&sf._sbf._f, 0);
+ _IO_JUMPS(&sf._sbf._f) = &_IO_str_jumps;
+ _IO_str_init_static (&sf._sbf._f, (char*)string, 0, NULL);
_IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, &sf);
- _IO_flockfile ((_IO_FILE *) &sf);
- ret = _IO_vfscanf((_IO_FILE*)&sf, format, args, NULL);
+ _IO_flockfile (&sf._sbf._f);
+ ret = _IO_vfscanf(&sf._sbf._f, format, args, NULL);
_IO_cleanup_region_end (1);
return ret;
}
diff --git a/libio/libioP.h b/libio/libioP.h
index 4fa3fd911c..c80bdf30c6 100644
--- a/libio/libioP.h
+++ b/libio/libioP.h
@@ -66,11 +66,11 @@ extern "C" {
* a jump table (of pointers to functions). The pointer is accessed
* with the _IO_JUMPS macro. The jump table has a eccentric format,
* so as to be compatible with the layout of a C++ virtual function table.
- * (as implemented by g++). When a pointer to a steambuf object is
+ * (as implemented by g++). When a pointer to a streambuf object is
* coerced to an (_IO_FILE*), then _IO_JUMPS on the result just
* happens to point to the virtual function table of the streambuf.
* Thus the _IO_JUMPS function table used for C stdio/libio does
- * double duty as the virtual functiuon table for C++ streambuf.
+ * double duty as the virtual function table for C++ streambuf.
*
* The entries in the _IO_JUMPS function table (and hence also the
* virtual functions of a streambuf) are described below.
@@ -112,7 +112,7 @@ typedef int (*_IO_overflow_t) __P((_IO_FILE*, int));
/* The 'underflow' hook tries to fills the get buffer.
It returns the next character (as an unsigned char) or EOF. The next
- character remains in the get buffer, and the get postion is not changed.
+ character remains in the get buffer, and the get position is not changed.
It matches the streambuf::underflow virtual function. */
typedef int (*_IO_underflow_t) __P((_IO_FILE*));
#define _IO_UNDERFLOW(FP) JUMP0(__underflow, FP)
@@ -178,7 +178,7 @@ typedef int (*_IO_doallocate_t) __P((_IO_FILE*));
/* The following four hooks (sysread, syswrite, sysclose, sysseek, and
sysstat) are low-level hooks specific to this implementation.
- There is no correspondance in the ANSI/ISO C++ standard library.
+ There is no correspondence in the ANSI/ISO C++ standard library.
The hooks basically correspond to the Unix system functions
(read, write, close, lseek, and stat) except that a _IO_FILE*
parameter is used instead of a integer file descriptor; the default
@@ -190,21 +190,21 @@ typedef int (*_IO_doallocate_t) __P((_IO_FILE*));
/* The 'sysread' hook is used to read data from the external file into
an existing buffer. It generalizes the Unix read(2) function.
It matches the streambuf::sys_read virtual function, which is
- specific to this implementaion. */
+ specific to this implementation. */
typedef _IO_ssize_t (*_IO_read_t) __P((_IO_FILE*, void*, _IO_ssize_t));
#define _IO_SYSREAD(FP, DATA, LEN) JUMP2(__read, FP, DATA, LEN)
/* The 'syswrite' hook is used to write data from an existing buffer
to an external file. It generalizes the Unix write(2) function.
It matches the streambuf::sys_write virtual function, which is
- specific to this implementaion. */
+ specific to this implementation. */
typedef _IO_ssize_t (*_IO_write_t) __P((_IO_FILE*,const void*,_IO_ssize_t));
#define _IO_SYSWRITE(FP, DATA, LEN) JUMP2(__write, FP, DATA, LEN)
/* The 'sysseek' hook is used to re-position an external file.
It generalizes the Unix lseek(2) function.
It matches the streambuf::sys_seek virtual function, which is
- specific to this implementaion. */
+ specific to this implementation. */
typedef _IO_fpos_t (*_IO_seek_t) __P((_IO_FILE*, _IO_off_t, int));
#define _IO_SYSSEEK(FP, OFFSET, MODE) JUMP2(__seek, FP, OFFSET, MODE)
@@ -218,7 +218,7 @@ typedef int (*_IO_close_t) __P((_IO_FILE*)); /* finalize */
/* The 'sysstat' hook is used to get information about an external file
into a struct stat buffer. It generalizes the Unix fstat(2) call.
It matches the streambuf::sys_stat virtual function, which is
- specific to this implementaion. */
+ specific to this implementation. */
typedef int (*_IO_stat_t) __P((_IO_FILE*, void*));
#define _IO_SYSSTAT(FP, BUF) JUMP1(__stat, FP, BUF)
diff --git a/libio/strops.c b/libio/strops.c
index 281141eba7..31c5df4e80 100644
--- a/libio/strops.c
+++ b/libio/strops.c
@@ -28,7 +28,7 @@ the executable file might be covered by the GNU General Public License. */
#if 0
/* The following definitions are for exposition only.
- They map the terminlogy used in the ANSI/ISO C++ draft standard
+ They map the terminology used in the ANSI/ISO C++ draft standard
to the implementation. */
/* allocated: set when a dynamic array object has been allocated, and