diff options
author | Andreas Schwab <schwab@linux-m68k.org> | 2012-05-23 13:33:15 +0200 |
---|---|---|
committer | Andreas Schwab <schwab@linux-m68k.org> | 2012-05-24 23:06:20 +0200 |
commit | d18ea0c5e669dd48ccceccfc90ff458dc333a81f (patch) | |
tree | c983ef90b2cf0abb23a33e704d0a2b7200142ab6 /libio/genops.c | |
parent | c14874927b499ddfdbb03745bb32bfc778b8595f (diff) | |
download | glibc-d18ea0c5e669dd48ccceccfc90ff458dc333a81f.tar glibc-d18ea0c5e669dd48ccceccfc90ff458dc333a81f.tar.gz glibc-d18ea0c5e669dd48ccceccfc90ff458dc333a81f.tar.bz2 glibc-d18ea0c5e669dd48ccceccfc90ff458dc333a81f.zip |
Remove use of INTDEF/INTUSE in libio
Diffstat (limited to 'libio/genops.c')
-rw-r--r-- | libio/genops.c | 85 |
1 files changed, 42 insertions, 43 deletions
diff --git a/libio/genops.c b/libio/genops.c index 272b94d22c..b7dd863626 100644 --- a/libio/genops.c +++ b/libio/genops.c @@ -68,16 +68,15 @@ _IO_un_link (fp) run_fp = (_IO_FILE *) fp; _IO_flockfile ((_IO_FILE *) fp); #endif - if (INTUSE(_IO_list_all) == NULL) + if (_IO_list_all == NULL) ; - else if (fp == INTUSE(_IO_list_all)) + else if (fp == _IO_list_all) { - INTUSE(_IO_list_all) - = (struct _IO_FILE_plus *) INTUSE(_IO_list_all)->file._chain; + _IO_list_all = (struct _IO_FILE_plus *) _IO_list_all->file._chain; ++_IO_list_all_stamp; } else - for (f = &INTUSE(_IO_list_all)->file._chain; *f; f = &(*f)->_chain) + for (f = &_IO_list_all->file._chain; *f; f = &(*f)->_chain) if (*f == (_IO_FILE *) fp) { *f = fp->file._chain; @@ -93,7 +92,7 @@ _IO_un_link (fp) #endif } } -INTDEF(_IO_un_link) +libc_hidden_def (_IO_un_link) void _IO_link_in (fp) @@ -108,8 +107,8 @@ _IO_link_in (fp) run_fp = (_IO_FILE *) fp; _IO_flockfile ((_IO_FILE *) fp); #endif - fp->file._chain = (_IO_FILE *) INTUSE(_IO_list_all); - INTUSE(_IO_list_all) = fp; + fp->file._chain = (_IO_FILE *) _IO_list_all; + _IO_list_all = fp; ++_IO_list_all_stamp; #ifdef _IO_MTSAFE_IO _IO_funlockfile ((_IO_FILE *) fp); @@ -119,7 +118,7 @@ _IO_link_in (fp) #endif } } -INTDEF(_IO_link_in) +libc_hidden_def (_IO_link_in) /* Return minimum _pos markers Assumes the current get area is the main get area. */ @@ -200,7 +199,7 @@ _IO_switch_to_get_mode (fp) fp->_flags &= ~_IO_CURRENTLY_PUTTING; return 0; } -INTDEF(_IO_switch_to_get_mode) +libc_hidden_def (_IO_switch_to_get_mode) void _IO_free_backup_area (fp) @@ -213,7 +212,7 @@ _IO_free_backup_area (fp) fp->_IO_save_end = NULL; fp->_IO_backup_base = NULL; } -INTDEF(_IO_free_backup_area) +libc_hidden_def (_IO_free_backup_area) #if 0 int @@ -338,7 +337,7 @@ __underflow (fp) if (fp->_mode == 0) _IO_fwide (fp, -1); if (_IO_in_put_mode (fp)) - if (INTUSE(_IO_switch_to_get_mode) (fp) == EOF) + if (_IO_switch_to_get_mode (fp) == EOF) return EOF; if (fp->_IO_read_ptr < fp->_IO_read_end) return *(unsigned char *) fp->_IO_read_ptr; @@ -354,7 +353,7 @@ __underflow (fp) return EOF; } else if (_IO_have_backup (fp)) - INTUSE(_IO_free_backup_area) (fp); + _IO_free_backup_area (fp); return _IO_UNDERFLOW (fp); } libc_hidden_def (__underflow) @@ -371,7 +370,7 @@ __uflow (fp) if (fp->_mode == 0) _IO_fwide (fp, -1); if (_IO_in_put_mode (fp)) - if (INTUSE(_IO_switch_to_get_mode) (fp) == EOF) + if (_IO_switch_to_get_mode (fp) == EOF) return EOF; if (fp->_IO_read_ptr < fp->_IO_read_end) return *(unsigned char *) fp->_IO_read_ptr++; @@ -387,7 +386,7 @@ __uflow (fp) return EOF; } else if (_IO_have_backup (fp)) - INTUSE(_IO_free_backup_area) (fp); + _IO_free_backup_area (fp); return _IO_UFLOW (fp); } libc_hidden_def (__uflow) @@ -408,7 +407,7 @@ _IO_setb (f, b, eb, a) else f->_flags |= _IO_USER_BUF; } -INTDEF(_IO_setb) +libc_hidden_def (_IO_setb) void _IO_doallocbuf (fp) @@ -419,9 +418,9 @@ _IO_doallocbuf (fp) if (!(fp->_flags & _IO_UNBUFFERED) || fp->_mode > 0) if (_IO_DOALLOCATE (fp) != EOF) return; - INTUSE(_IO_setb) (fp, fp->_shortbuf, fp->_shortbuf+1, 0); + _IO_setb (fp, fp->_shortbuf, fp->_shortbuf+1, 0); } -INTDEF(_IO_doallocbuf) +libc_hidden_def (_IO_doallocbuf) int _IO_default_underflow (fp) @@ -439,7 +438,7 @@ _IO_default_uflow (fp) return EOF; return *(unsigned char *) fp->_IO_read_ptr++; } -INTDEF(_IO_default_uflow) +libc_hidden_def (_IO_default_uflow) _IO_size_t _IO_default_xsputn (f, data, n) @@ -485,7 +484,7 @@ _IO_default_xsputn (f, data, n) } return n - more; } -INTDEF(_IO_default_xsputn) +libc_hidden_def (_IO_default_xsputn) _IO_size_t _IO_sgetn (fp, data, n) @@ -496,7 +495,7 @@ _IO_sgetn (fp, data, n) /* FIXME handle putback buffer here! */ return _IO_XSGETN (fp, data, n); } -INTDEF(_IO_sgetn) +libc_hidden_def (_IO_sgetn) _IO_size_t _IO_default_xsgetn (fp, data, n) @@ -539,7 +538,7 @@ _IO_default_xsgetn (fp, data, n) } return n - more; } -INTDEF(_IO_default_xsgetn) +libc_hidden_def (_IO_default_xsgetn) #if 0 /* Seems not to be needed. --drepper */ @@ -562,12 +561,12 @@ _IO_default_setbuf (fp, p, len) if (p == NULL || len == 0) { fp->_flags |= _IO_UNBUFFERED; - INTUSE(_IO_setb) (fp, fp->_shortbuf, fp->_shortbuf+1, 0); + _IO_setb (fp, fp->_shortbuf, fp->_shortbuf+1, 0); } else { fp->_flags &= ~_IO_UNBUFFERED; - INTUSE(_IO_setb) (fp, p, p+len, 0); + _IO_setb (fp, p, p+len, 0); } fp->_IO_write_base = fp->_IO_write_ptr = fp->_IO_write_end = 0; fp->_IO_read_base = fp->_IO_read_ptr = fp->_IO_read_end = 0; @@ -590,10 +589,10 @@ _IO_default_doallocate (fp) char *buf; ALLOC_BUF (buf, _IO_BUFSIZ, EOF); - INTUSE(_IO_setb) (fp, buf, buf+_IO_BUFSIZ, 1); + _IO_setb (fp, buf, buf+_IO_BUFSIZ, 1); return 1; } -INTDEF(_IO_default_doallocate) +libc_hidden_def (_IO_default_doallocate) void _IO_init (fp, flags) @@ -602,7 +601,7 @@ _IO_init (fp, flags) { _IO_no_init (fp, flags, -1, NULL, NULL); } -INTDEF(_IO_init) +libc_hidden_def (_IO_init) void _IO_old_init (fp, flags) @@ -698,14 +697,14 @@ _IO_default_finish (fp, dummy) fp->_IO_save_base = NULL; } - INTUSE(_IO_un_link) ((struct _IO_FILE_plus *) fp); + _IO_un_link ((struct _IO_FILE_plus *) fp); #ifdef _IO_MTSAFE_IO if (fp->_lock != NULL) _IO_lock_fini (*fp->_lock); #endif } -INTDEF(_IO_default_finish) +libc_hidden_def (_IO_default_finish) _IO_off64_t _IO_default_seekoff (fp, offset, dir, mode) @@ -738,7 +737,7 @@ _IO_sputbackc (fp, c) return result; } -INTDEF(_IO_sputbackc) +libc_hidden_def (_IO_sputbackc) int _IO_sungetc (fp) @@ -798,7 +797,7 @@ _IO_adjust_column (start, line, count) return line + count - ptr - 1; return start + count; } -INTDEF(_IO_adjust_column) +libc_hidden_def (_IO_adjust_column) #if 0 /* Seems not to be needed. --drepper */ @@ -829,7 +828,7 @@ _IO_flush_all_lockp (int do_lock) #endif last_stamp = _IO_list_all_stamp; - fp = (_IO_FILE *) INTUSE(_IO_list_all); + fp = (_IO_FILE *) _IO_list_all; while (fp != NULL) { run_fp = fp; @@ -853,7 +852,7 @@ _IO_flush_all_lockp (int do_lock) if (last_stamp != _IO_list_all_stamp) { /* Something was added to the list. Start all over again. */ - fp = (_IO_FILE *) INTUSE(_IO_list_all); + fp = (_IO_FILE *) _IO_list_all; last_stamp = _IO_list_all_stamp; } else @@ -876,7 +875,7 @@ _IO_flush_all () /* We want locking. */ return _IO_flush_all_lockp (1); } -INTDEF(_IO_flush_all) +libc_hidden_def (_IO_flush_all) void _IO_flush_all_linebuffered () @@ -890,7 +889,7 @@ _IO_flush_all_linebuffered () #endif last_stamp = _IO_list_all_stamp; - fp = (_IO_FILE *) INTUSE(_IO_list_all); + fp = (_IO_FILE *) _IO_list_all; while (fp != NULL) { run_fp = fp; @@ -905,7 +904,7 @@ _IO_flush_all_linebuffered () if (last_stamp != _IO_list_all_stamp) { /* Something was added to the list. Start all over again. */ - fp = (_IO_FILE *) INTUSE(_IO_list_all); + fp = (_IO_FILE *) _IO_list_all; last_stamp = _IO_list_all_stamp; } else @@ -917,7 +916,7 @@ _IO_flush_all_linebuffered () _IO_cleanup_region_end (0); #endif } -INTDEF(_IO_flush_all_linebuffered) +libc_hidden_def (_IO_flush_all_linebuffered) #ifdef _LIBC weak_alias (_IO_flush_all_linebuffered, _flushlbf) #endif @@ -945,7 +944,7 @@ static void _IO_unbuffer_write (void) { struct _IO_FILE *fp; - for (fp = (_IO_FILE *) INTUSE(_IO_list_all); fp; fp = fp->_chain) + for (fp = (_IO_FILE *) _IO_list_all; fp; fp = fp->_chain) { if (! (fp->_flags & _IO_UNBUFFERED) && (! (fp->_flags & _IO_NO_WRITES) @@ -1026,7 +1025,7 @@ _IO_init_marker (marker, fp) { marker->_sbuf = fp; if (_IO_in_put_mode (fp)) - INTUSE(_IO_switch_to_get_mode) (fp); + _IO_switch_to_get_mode (fp); if (_IO_in_backup (fp)) marker->_pos = fp->_IO_read_ptr - fp->_IO_read_end; else @@ -1132,9 +1131,9 @@ _IO_unsave_markers (fp) } if (_IO_have_backup (fp)) - INTUSE(_IO_free_backup_area) (fp); + _IO_free_backup_area (fp); } -INTDEF(_IO_unsave_markers) +libc_hidden_def (_IO_unsave_markers) #if 0 /* Seems not to be needed. --drepper */ @@ -1208,7 +1207,7 @@ _IO_default_pbackfail (fp, c) } return (unsigned char) c; } -INTDEF(_IO_default_pbackfail) +libc_hidden_def (_IO_default_pbackfail) _IO_off64_t _IO_default_seek (fp, offset, dir) @@ -1262,7 +1261,7 @@ _IO_default_imbue (fp, locale) _IO_ITER _IO_iter_begin() { - return (_IO_ITER) INTUSE(_IO_list_all); + return (_IO_ITER) _IO_list_all; } libc_hidden_def (_IO_iter_begin) |