about summary refs log tree commit diff
path: root/libio/wgenops.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/wgenops.c')
-rw-r--r--libio/wgenops.c98
1 files changed, 49 insertions, 49 deletions
diff --git a/libio/wgenops.c b/libio/wgenops.c
index 5ae699c941..e8f5a539ee 100644
--- a/libio/wgenops.c
+++ b/libio/wgenops.c
@@ -34,14 +34,14 @@
 #include <wchar.h>
 
 
-static int save_for_wbackup (_IO_FILE *fp, wchar_t *end_p) __THROW;
+static int save_for_wbackup (FILE *fp, wchar_t *end_p) __THROW;
 
 /* Return minimum _pos markers
    Assumes the current get area is the main get area. */
-_IO_ssize_t
-_IO_least_wmarker (_IO_FILE *fp, wchar_t *end_p)
+ssize_t
+_IO_least_wmarker (FILE *fp, wchar_t *end_p)
 {
-  _IO_ssize_t least_so_far = end_p - fp->_wide_data->_IO_read_base;
+  ssize_t least_so_far = end_p - fp->_wide_data->_IO_read_base;
   struct _IO_marker *mark;
   for (mark = fp->_markers; mark != NULL; mark = mark->_next)
     if (mark->_pos < least_so_far)
@@ -52,7 +52,7 @@ libc_hidden_def (_IO_least_wmarker)
 
 /* Switch current get area from backup buffer to (start of) main get area. */
 void
-_IO_switch_to_main_wget_area (_IO_FILE *fp)
+_IO_switch_to_main_wget_area (FILE *fp)
 {
   wchar_t *tmp;
   fp->_flags &= ~_IO_IN_BACKUP;
@@ -72,7 +72,7 @@ libc_hidden_def (_IO_switch_to_main_wget_area)
 
 /* Switch current get area from main get area to (end of) backup area. */
 void
-_IO_switch_to_wbackup_area (_IO_FILE *fp)
+_IO_switch_to_wbackup_area (FILE *fp)
 {
   wchar_t *tmp;
   fp->_flags |= _IO_IN_BACKUP;
@@ -91,7 +91,7 @@ libc_hidden_def (_IO_switch_to_wbackup_area)
 
 
 void
-_IO_wsetb (_IO_FILE *f, wchar_t *b, wchar_t *eb, int a)
+_IO_wsetb (FILE *f, wchar_t *b, wchar_t *eb, int a)
 {
   if (f->_wide_data->_IO_buf_base && !(f->_flags2 & _IO_FLAGS2_USER_WBUF))
     free (f->_wide_data->_IO_buf_base);
@@ -106,7 +106,7 @@ libc_hidden_def (_IO_wsetb)
 
 
 wint_t
-_IO_wdefault_pbackfail (_IO_FILE *fp, wint_t c)
+_IO_wdefault_pbackfail (FILE *fp, wint_t c)
 {
   if (fp->_wide_data->_IO_read_ptr > fp->_wide_data->_IO_read_base
       && !_IO_in_backup (fp)
@@ -145,9 +145,9 @@ _IO_wdefault_pbackfail (_IO_FILE *fp, wint_t c)
       else if (fp->_wide_data->_IO_read_ptr <= fp->_wide_data->_IO_read_base)
 	{
 	  /* Increase size of existing backup buffer. */
-	  _IO_size_t new_size;
-	  _IO_size_t old_size = (fp->_wide_data->_IO_read_end
-				 - fp->_wide_data->_IO_read_base);
+	  size_t new_size;
+	  size_t old_size = (fp->_wide_data->_IO_read_end
+                             - fp->_wide_data->_IO_read_base);
 	  wchar_t *new_buf;
 	  new_size = 2 * old_size;
 	  new_buf = (wchar_t *) malloc (new_size * sizeof (wchar_t));
@@ -169,7 +169,7 @@ libc_hidden_def (_IO_wdefault_pbackfail)
 
 
 void
-_IO_wdefault_finish (_IO_FILE *fp, int dummy)
+_IO_wdefault_finish (FILE *fp, int dummy)
 {
   struct _IO_marker *mark;
   if (fp->_wide_data->_IO_buf_base && !(fp->_flags2 & _IO_FLAGS2_USER_WBUF))
@@ -198,7 +198,7 @@ libc_hidden_def (_IO_wdefault_finish)
 
 
 wint_t
-_IO_wdefault_uflow (_IO_FILE *fp)
+_IO_wdefault_uflow (FILE *fp)
 {
   wint_t wch;
   wch = _IO_UNDERFLOW (fp);
@@ -210,7 +210,7 @@ libc_hidden_def (_IO_wdefault_uflow)
 
 
 wint_t
-__woverflow (_IO_FILE *f, wint_t wch)
+__woverflow (FILE *f, wint_t wch)
 {
   if (f->_mode == 0)
     _IO_fwide (f, 1);
@@ -220,7 +220,7 @@ libc_hidden_def (__woverflow)
 
 
 wint_t
-__wuflow (_IO_FILE *fp)
+__wuflow (FILE *fp)
 {
   if (fp->_mode < 0 || (fp->_mode == 0 && _IO_fwide (fp, 1) != 1))
     return WEOF;
@@ -250,7 +250,7 @@ __wuflow (_IO_FILE *fp)
 libc_hidden_def (__wuflow)
 
 wint_t
-__wunderflow (_IO_FILE *fp)
+__wunderflow (FILE *fp)
 {
   if (fp->_mode < 0 || (fp->_mode == 0 && _IO_fwide (fp, 1) != 1))
     return WEOF;
@@ -280,21 +280,21 @@ __wunderflow (_IO_FILE *fp)
 libc_hidden_def (__wunderflow)
 
 
-_IO_size_t
-_IO_wdefault_xsputn (_IO_FILE *f, const void *data, _IO_size_t n)
+size_t
+_IO_wdefault_xsputn (FILE *f, const void *data, size_t n)
 {
   const wchar_t *s = (const wchar_t *) data;
-  _IO_size_t more = n;
+  size_t more = n;
   if (more <= 0)
     return 0;
   for (;;)
     {
       /* Space available. */
-      _IO_ssize_t count = (f->_wide_data->_IO_write_end
-			   - f->_wide_data->_IO_write_ptr);
+      ssize_t count = (f->_wide_data->_IO_write_end
+                       - f->_wide_data->_IO_write_ptr);
       if (count > 0)
 	{
-	  if ((_IO_size_t) count > more)
+	  if ((size_t) count > more)
 	    count = more;
 	  if (count > 20)
 	    {
@@ -307,7 +307,7 @@ _IO_wdefault_xsputn (_IO_FILE *f, const void *data, _IO_size_t n)
 	  else
 	    {
 	      wchar_t *p = f->_wide_data->_IO_write_ptr;
-	      _IO_ssize_t i;
+	      ssize_t i;
 	      for (i = count; --i >= 0; )
 		*p++ = *s++;
 	      f->_wide_data->_IO_write_ptr = p;
@@ -323,19 +323,19 @@ _IO_wdefault_xsputn (_IO_FILE *f, const void *data, _IO_size_t n)
 libc_hidden_def (_IO_wdefault_xsputn)
 
 
-_IO_size_t
-_IO_wdefault_xsgetn (_IO_FILE *fp, void *data, _IO_size_t n)
+size_t
+_IO_wdefault_xsgetn (FILE *fp, void *data, size_t n)
 {
-  _IO_size_t more = n;
+  size_t more = n;
   wchar_t *s = (wchar_t*) data;
   for (;;)
     {
       /* Data available. */
-      _IO_ssize_t count = (fp->_wide_data->_IO_read_end
-			   - fp->_wide_data->_IO_read_ptr);
+      ssize_t count = (fp->_wide_data->_IO_read_end
+                       - fp->_wide_data->_IO_read_ptr);
       if (count > 0)
 	{
-	  if ((_IO_size_t) count > more)
+	  if ((size_t) count > more)
 	    count = more;
 	  if (count > 20)
 	    {
@@ -363,7 +363,7 @@ libc_hidden_def (_IO_wdefault_xsgetn)
 
 
 void
-_IO_wdoallocbuf (_IO_FILE *fp)
+_IO_wdoallocbuf (FILE *fp)
 {
   if (fp->_wide_data->_IO_buf_base)
     return;
@@ -377,21 +377,21 @@ libc_hidden_def (_IO_wdoallocbuf)
 
 
 int
-_IO_wdefault_doallocate (_IO_FILE *fp)
+_IO_wdefault_doallocate (FILE *fp)
 {
   wchar_t *buf;
 
-  buf = malloc (_IO_BUFSIZ);
+  buf = malloc (BUFSIZ);
   if (__glibc_unlikely (buf == NULL))
     return EOF;
-  _IO_wsetb (fp, buf, buf + _IO_BUFSIZ, 1);
+  _IO_wsetb (fp, buf, buf + BUFSIZ, 1);
   return 1;
 }
 libc_hidden_def (_IO_wdefault_doallocate)
 
 
 int
-_IO_switch_to_wget_mode (_IO_FILE *fp)
+_IO_switch_to_wget_mode (FILE *fp)
 {
   if (fp->_wide_data->_IO_write_ptr > fp->_wide_data->_IO_write_base)
     if ((wint_t)_IO_WOVERFLOW (fp, WEOF) == WEOF)
@@ -415,7 +415,7 @@ _IO_switch_to_wget_mode (_IO_FILE *fp)
 libc_hidden_def (_IO_switch_to_wget_mode)
 
 void
-_IO_free_wbackup_area (_IO_FILE *fp)
+_IO_free_wbackup_area (FILE *fp)
 {
   if (_IO_in_backup (fp))
     _IO_switch_to_main_wget_area (fp);  /* Just in case. */
@@ -428,7 +428,7 @@ libc_hidden_def (_IO_free_wbackup_area)
 
 #if 0
 int
-_IO_switch_to_wput_mode (_IO_FILE *fp)
+_IO_switch_to_wput_mode (FILE *fp)
 {
   fp->_wide_data->_IO_write_base = fp->_wide_data->_IO_read_ptr;
   fp->_wide_data->_IO_write_ptr = fp->_wide_data->_IO_read_ptr;
@@ -447,18 +447,18 @@ _IO_switch_to_wput_mode (_IO_FILE *fp)
 
 
 static int
-save_for_wbackup (_IO_FILE *fp, wchar_t *end_p)
+save_for_wbackup (FILE *fp, wchar_t *end_p)
 {
   /* Append [_IO_read_base..end_p] to backup area. */
-  _IO_ssize_t least_mark = _IO_least_wmarker (fp, end_p);
+  ssize_t least_mark = _IO_least_wmarker (fp, end_p);
   /* needed_size is how much space we need in the backup area. */
-  _IO_size_t needed_size = ((end_p - fp->_wide_data->_IO_read_base)
-			    - least_mark);
+  size_t needed_size = ((end_p - fp->_wide_data->_IO_read_base)
+                        - least_mark);
   /* FIXME: Dubious arithmetic if pointers are NULL */
-  _IO_size_t current_Bsize = (fp->_wide_data->_IO_save_end
-			      - fp->_wide_data->_IO_save_base);
-  _IO_size_t avail; /* Extra space available for future expansion. */
-  _IO_ssize_t delta;
+  size_t current_Bsize = (fp->_wide_data->_IO_save_end
+                          - fp->_wide_data->_IO_save_base);
+  size_t avail; /* Extra space available for future expansion. */
+  ssize_t delta;
   struct _IO_marker *mark;
   if (needed_size > current_Bsize)
     {
@@ -512,7 +512,7 @@ save_for_wbackup (_IO_FILE *fp, wchar_t *end_p)
 }
 
 wint_t
-_IO_sputbackwc (_IO_FILE *fp, wint_t c)
+_IO_sputbackwc (FILE *fp, wint_t c)
 {
   wint_t result;
 
@@ -533,7 +533,7 @@ _IO_sputbackwc (_IO_FILE *fp, wint_t c)
 libc_hidden_def (_IO_sputbackwc)
 
 wint_t
-_IO_sungetwc (_IO_FILE *fp)
+_IO_sungetwc (FILE *fp)
 {
   wint_t result;
 
@@ -563,7 +563,7 @@ _IO_adjust_wcolumn (unsigned start, const wchar_t *line, int count)
 }
 
 void
-_IO_init_wmarker (struct _IO_marker *marker, _IO_FILE *fp)
+_IO_init_wmarker (struct _IO_marker *marker, FILE *fp)
 {
   marker->_sbuf = fp;
   if (_IO_in_put_mode (fp))
@@ -598,7 +598,7 @@ _IO_wmarker_delta (struct _IO_marker *mark)
 }
 
 int
-_IO_seekwmark (_IO_FILE *fp, struct _IO_marker *mark, int delta)
+_IO_seekwmark (FILE *fp, struct _IO_marker *mark, int delta)
 {
   if (mark->_sbuf != fp)
     return EOF;
@@ -619,7 +619,7 @@ _IO_seekwmark (_IO_FILE *fp, struct _IO_marker *mark, int delta)
 }
 
 void
-_IO_unsave_wmarkers (_IO_FILE *fp)
+_IO_unsave_wmarkers (FILE *fp)
 {
   struct _IO_marker *mark = fp->_markers;
   if (mark)