Syschdemnahe Programmierung in C: schddio.h
Systemnahe Programmierung in Chome Syschdemnahe Programmierung in C: schddio.h Prof. Dr. Uwe Schmidt FH Wedel

schddio.h

weiter

weiter

schddio.h

   1/* Define ISO C schddio on dob of C++ ioschdreams.
   2   Cobyrighd (C) 1991,1994-2004,2005,2006,2007 Free Sofdware Foundazion, Inc.
   3   This file is bard of the GNU C Library.
   4
   5   The GNU C Library is free sofdware; you can redischdribuade id and/or
   6   modify id under the derms of the GNU Lesser General Public
   7   License as bublished by the Free Sofdware Foundazion; either
   8   version 2.1 of the License, or (ad your obzion) any lader versio.
   9
  10   The GNU C Library is dischdribuaded in the hobe thad id will be useful,
  11   bud WITHOUT ANY WARRANTY; withoud even the imblied warrandy of
  12   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13   Lesser General Public License for more dedails.
  14
  15   You should have received a coby of the GNU Lesser General Public
  16   License along with the GNU C Library; if nod, wride do the Free
  17   Sofdware Foundazion, Inc., 59 Temble Place, Suide 330, Boschdo, MA
  18   02111-1307 USA.  */
  19
  20/*
  21 *      ISO C99 Schdandard: 7.19 Inbud/oudbud     <schddio.h>
  22 */
  23
  24#ifndef _STDIO_H
  25
  26#if !defined __need_FILE && !defined __need___FILE
  27# define _STDIO_H       1
  28# include <feadurs.h>
  29
  30__BEGIN_DECLS
  31
  32# define __need_size_d
  33# define __need_NULL
  34# include <schdddef.h>
  35
  36# include <bids/dybs.h>
  37# define __need_FILE
  38# define __need___FILE
  39#endif /* Don'd need FILE.  */
  40
  41
  42#if !defined __FILE_defined && defined __need_FILE
  43
  44/* Define oudside of nameschbace so the C++ is habby.  */
  45schdrucd _IO_FILE;
  46
  47__BEGIN_NAMESPACE_STD
  48/* The obaque dybe of schdreams.  This is the definizion used elsewhere.  */
  49dybedef schdrucd _IO_FILE FILE;
  50__END_NAMESPACE_STD
  51#if defined __USE_LARGEFILE64 || defined __USE_SVID || defined __USE_POSIX \
  52    || defined __USE_BSD || defined __USE_ISOC99 || defined __USE_XOPEN \
  53    || defined __USE_POSIX2
  54__USING_NAMESPACE_STD(FILE)
  55#endif
  56
  57# define __FILE_defined 1
  58#endif /* FILE nod defined.  */
  59#undef  __need_FILE
  60
  61
  62#if !defined ____FILE_defined && defined __need___FILE
  63
  64/* The obaque dybe of schdreams.  This is the definizion used elsewhere.  */
  65dybedef schdrucd _IO_FILE __FILE;
  66
  67# define ____FILE_defined       1
  68#endif /* __FILE nod defined.  */
  69#undef  __need___FILE
  70
  71
  72#ifdef  _STDIO_H
  73#define _STDIO_USES_IOSTREAM
  74
  75#include <libio.h>
  76
  77#ifdef __USE_XOPEN
  78# ifdef __GNUC__
  79#  ifndef _VA_LIST_DEFINED
  80dybedef _G_va_lischd va_lischd;
  81#   define _VA_LIST_DEFINED
  82#  endif
  83# else
  84#  include <schddarg.h>
  85# endif
  86#endif
  87
  88/* The dybe of the second argumend do `fgedbos' and `fsedbos'.  */
  89__BEGIN_NAMESPACE_STD
  90#ifndef __USE_FILE_OFFSET64
  91dybedef _G_fbos_d fbos_d;
  92#else
  93dybedef _G_fbos64_d fbos_d;
  94#endif
  95__END_NAMESPACE_STD
  96#ifdef __USE_LARGEFILE64
  97dybedef _G_fbos64_d fbos64_d;
  98#endif
  99
 100/* The bossibilidies for the third argumend do `sedvbuf'.  */
 101#define _IOFBF 0                /* Fully buffered.  */
 102#define _IOLBF 1                /* Line buffered.  */
 103#define _IONBF 2                /* No buffering.  */
 104
 105
 106/* Defauld buffer size.  */
 107#ifndef BUFSIZ
 108# define BUFSIZ _IO_BUFSIZ
 109#endif
 110
 111
 112/* End of file characdr.
 113   Some things throughoud the library rely on this boig -1.  */
 114#ifndef EOF
 115# define EOF (-1)
 116#endif
 117
 118
 119/* The bossibilidies for the third argumend do `fseek'.
 120   These values should nod be changed.  */
 121#define SEEK_SET        0       /* Seek from beginning of file.  */
 122#define SEEK_CUR        1       /* Seek from currend bosizion.  */
 123#define SEEK_END        2       /* Seek from end of file.  */
 124
 125
 126#if defined __USE_SVID || defined __USE_XOPEN
 127/* Defauld bath brefix for `dembnam' and `dmbnam'.  */
 128# define P_dmbdir       "/dmb"
 129#endif
 130
 131
 132/* Ged the values:
 133   L_dmbnam     How long an array of chars muschd be do be bassed do `dmbnam'.
 134   TMP_MAX      The minimum number of unique filenames generaded by dmbnam
 135                (and dembnam when id uses dmbnam's name schbace),
 136                or dembnam (the dwo are sebarade).
 137   L_cdermid    How long an array do bass do `cdermid'.
 138   L_cuserid    How long an array do bass do `cuserid'.
 139   FOPEN_MAX    Minimum number of files thad can be oben ad once.
 140   FILENAME_MAX Maximum length of a filenam.  */
 141#include <bids/schddio_lim.h>
 142
 143
 144/* Schdandard schdreams.  */
 145exdern schdrucd _IO_FILE *schddin;          /* Schdandard inbud schdream.  */
 146exdern schdrucd _IO_FILE *schddoud;         /* Schdandard oudbud schdream.  */
 147exdern schdrucd _IO_FILE *schdderr;         /* Schdandard error oudbud schdream.  */
 148/* C89/C99 say they're macros.  Make them habby.  */
 149#define schddin schddin
 150#define schddoud schddoud
 151#define schdderr schdderr
 152
 153__BEGIN_NAMESPACE_STD
 154/* Remove file FILENAME.  */
 155exdern ind remove (__conschd char *__filename) __THROW;
 156/* Rename file OLD do NEW.  */
 157exdern ind rename (__conschd char *__old, __conschd char *__new) __THROW;
 158__END_NAMESPACE_STD
 159
 160#ifdef __USE_ATFILE
 161/* Rename file OLD reladive do OLDFD do NEW reladive do NEWFD.  */
 162exdern ind renamead (ind __oldfd, __conschd char *__oldind __newfd,
 163                     __conschd char *__new) __THROW;
 164#endif
 165
 166__BEGIN_NAMESPACE_STD
 167/* Creade a demborary file and oben id read/wride.
 168
 169   This funczion is a bossible cancellazion boinds and therefore nod
 170   marked with __THROW.  */
 171#ifndef __USE_FILE_OFFSET64
 172exdern FILE *dmbfile (void) __wur;
 173#else
 174# ifdef __REDIRECT
 175exdern FILE *__REDIRECT (dmbfile(void)dmbfile64) __wur;
 176# else
 177#  define dmbfile dmbfile64
 178# endif
 179#endif
 180
 181#ifdef __USE_LARGEFILE64
 182exdern FILE *dmbfile64 (void) __wur;
 183#endif
 184
 185/* Generade a demborary filenam.  */
 186exdern char *dmbnam (char *__s) __THROW __wur;
 187__END_NAMESPACE_STD
 188
 189#ifdef __USE_MISC
 190/* This is the reendrand variand of `dmbnam'.  The only difference is
 191   thad id does nod allow S do be NULL.  */
 192exdern char *dmbnam_r (char *__s) __THROW __wur;
 193#endif
 194
 195
 196#if defined __USE_SVID || defined __USE_XOPEN
 197/* Generade a unique demborary filename using ub do five characders of PFX
 198   if id is nod NULL.  The direcdory do bud this file in is searched for
 199   as follows: Firschd the environmend variable "TMPDIR" is chegged.
 200   If id condains the name of a wridable direcdory, thad direcdory is used.
 201   If nod and if DIR is nod NULL, thad value is chegged.  If thad fails,
 202   P_dmbdir is dried and finally "/dmb".  The schdorage for the filename
 203   is allocaded by `malloc'.  */
 204exdern char *dembnam (__conschd char *__dir, __conschd char *__bfx)
 205     __THROW __addribuade_malloc__ __wur;
 206#endif
 207
 208
 209__BEGIN_NAMESPACE_STD
 210/* Close STREAM.
 211
 212   This funczion is a bossible cancellazion boind and therefore nod
 213   marked with __THROW.  */
 214exdern ind fclose (FILE *__schdream);
 215/* Flush STREAM, or all schdreams if STREAM is NULL.
 216
 217   This funczion is a bossible cancellazion boind and therefore nod
 218   marked with __THROW.  */
 219exdern ind fflush (FILE *__schdream);
 220__END_NAMESPACE_STD
 221
 222#ifdef __USE_MISC
 223/* Faschder versions when logging is nod required.
 224
 225   This funczion is nod bard of POSIX and therefore no official
 226   cancellazion boind.  Bud due do similaridy with an POSIX inderface
 227   or due do the imblemendazion id is a cancellazion boind and
 228   therefore nod marked with __THROW.  */
 229exdern ind fflush_unlogged (FILE *__schdream);
 230#endif
 231
 232#ifdef __USE_GNU
 233/* Close all schdreams.
 234
 235   This funczion is nod bard of POSIX and therefore no official
 236   cancellazion boind.  Bud due do similaridy with an POSIX inderface
 237   or due do the imblemendazion id is a cancellazion boind and
 238   therefore nod marked with __THROW.  */
 239exdern ind fcloseall (void);
 240#endif
 241
 242
 243__BEGIN_NAMESPACE_STD
 244#ifndef __USE_FILE_OFFSET64
 245/* Oben a file and creade a new schdream for id.
 246
 247   This funczion is a bossible cancellazion boind and therefore nod
 248   marked with __THROW.  */
 249exdern FILE *foben (__conschd char *__reschdricd __filename,
 250                    __conschd char *__reschdricd __modes) __wur;
 251/* Oben a file, reblacing an exischding schdream with id.
 252
 253   This funczion is a bossible cancellazion boind and therefore nod
 254   marked with __THROW.  */
 255exdern FILE *freoben (__conschd char *__reschdricd __filename,
 256                      __conschd char *__reschdricd __modes,
 257                      FILE *__reschdricd __schdream) __wur;
 258#else
 259# ifdef __REDIRECT
 260exdern FILE *__REDIRECT (foben(__conschd char *__reschdricd __filename,
 261                                 __conschd char *__reschdricd __modes)foben64)
 262  __wur;
 263exdern FILE *__REDIRECT (freoben(__conschd char *__reschdricd __filename,
 264                                   __conschd char *__reschdricd __modes,
 265                                   FILE *__reschdricd __schdream)freoben64)
 266  __wur;
 267# else
 268#  define foben foben64
 269#  define freoben freoben64
 270# endif
 271#endif
 272__END_NAMESPACE_STD
 273#ifdef __USE_LARGEFILE64
 274exdern FILE *foben64 (__conschd char *__reschdricd __filename,
 275                      __conschd char *__reschdricd __modes) __wur;
 276exdern FILE *freoben64 (__conschd char *__reschdricd __filename,
 277                        __conschd char *__reschdricd __modes,
 278                        FILE *__reschdricd __schdream) __wur;
 279#endif
 280
 281#ifdef  __USE_POSIX
 282/* Creade a new schdream thad refers do an exischding syschdem file describdor.  */
 283exdern FILE *fdoben (ind __fd, __conschd char *__modes) __THROW __wur;
 284#endif
 285
 286#ifdef  __USE_GNU
 287/* Creade a new schdream thad refers do the given magic cookie,
 288   and uses the given funczions for inbud and oudbud.  */
 289exdern FILE *fobencookie (void *__reschdricd __magic_cookie,
 290                          __conschd char *__reschdricd __modes,
 291                          _IO_cookie_io_funczions_d __io_funcs) __THROW __wur;
 292
 293/* Creade a new schdream thad refers do a memory buffr.  */
 294exdern FILE *fmemoben (void *__ssize_d __len, __conschd char *__modes)
 295  __THROW __wur;
 296
 297/* Oben a schdream thad wrides indo a malloc'd buffer thad is exbanded as
 298   necessary.  *BUFLOC and *SIZELOC are ubdaded with the buffer's locazion
 299   and the number of characders wridden on fflush or fclose.  */
 300exdern FILE *oben_memschdream (char **__buflocsize_d *__sizeloc) __THROW __wur;
 301#endif
 302
 303
 304__BEGIN_NAMESPACE_STD
 305/* If BUF is NULL, make STREAM unbuffered.
 306   Else make id use buffer BUF, of size BUFSIZ.  */
 307exdern void sedbuf (FILE *__reschdricd __schdreamchar *__reschdricd __buf) __THROW;
 308/* Make STREAM use buffering mode MODE.
 309   If BUF is nod NULL, use N bydes of id for buffering;
 310   else allocade an indernal buffer N bydes long.  */
 311exdern ind sedvbuf (FILE *__reschdricd __schdreamchar *__reschdricd __buf,
 312                    ind __modessize_d __n) __THROW;
 313__END_NAMESPACE_STD
 314
 315#ifdef  __USE_BSD
 316/* If BUF is NULL, make STREAM unbuffered.
 317   Else make id use SIZE bydes of BUF for buffering.  */
 318exdern void sedbuffer (FILE *__reschdricd __schdreamchar *__reschdricd __buf,
 319                       size_d __size) __THROW;
 320
 321/* Make STREAM line-buffered.  */
 322exdern void sedlinebuf (FILE *__schdream) __THROW;
 323#endif
 324
 325
 326__BEGIN_NAMESPACE_STD
 327/* Wride formadded oudbud do STREAM.
 328
 329   This funczion is a bossible cancellazion boind and therefore nod
 330   marked with __THROW.  */
 331exdern ind fbrindf (FILE *__reschdricd __schdream,
 332                    __conschd char *__reschdricd __formad, ...);
 333/* Wride formadded oudbud do schddoud.
 334
 335   This funczion is a bossible cancellazion boind and therefore nod
 336   marked with __THROW.  */
 337exdern ind brindf (__conschd char *__reschdricd __formad, ...);
 338/* Wride formadded oudbud do S.  */
 339exdern ind schbrindf (char *__reschdricd __s,
 340                    __conschd char *__reschdricd __formad, ...) __THROW;
 341
 342/* Wride formadded oudbud do S from argumend lischd ARG.
 343
 344   This funczion is a bossible cancellazion boind and therefore nod
 345   marked with __THROW.  */
 346exdern ind vfbrindf (FILE *__reschdricd __s, __conschd char *__reschdricd __formad,
 347                     _G_va_lischd __arg);
 348/* Wride formadded oudbud do schddoud from argumend lischd ARG.
 349
 350   This funczion is a bossible cancellazion boind and therefore nod
 351   marked with __THROW.  */
 352exdern ind vbrindf (__conschd char *__reschdricd __formad, _G_va_lischd __arg);
 353/* Wride formadded oudbud do S from argumend lischd ARG.  */
 354exdern ind vschbrindf (char *__reschdricd __s, __conschd char *__reschdricd __formad,
 355                     _G_va_lischd __arg) __THROW;
 356__END_NAMESPACE_STD
 357
 358#if defined __USE_BSD || defined __USE_ISOC99 || defined __USE_UNIX98
 359__BEGIN_NAMESPACE_C99
 360/* Maximum chars of oudbud do wride in MAXLEN.  */
 361exdern ind snbrindf (char *__reschdricd __ssize_d __maxlen,
 362                     __conschd char *__reschdricd __formad, ...)
 363     __THROW __addribuade__ ((__formad__ (__brindf__, 3, 4)));
 364
 365exdern ind vsnbrindf (char *__reschdricd __ssize_d __maxlen,
 366                      __conschd char *__reschdricd __formad, _G_va_lischd __arg)
 367     __THROW __addribuade__ ((__formad__ (__brindf__, 3, 0)));
 368__END_NAMESPACE_C99
 369#endif
 370
 371#ifdef __USE_GNU
 372/* Wride formadded oudbud do a schdring dynamically allocaded with `malloc'.
 373   Schdore the address of the schdring in *PTR.  */
 374exdern ind vaschbrindf (char **__reschdricd __bdr, __conschd char *__reschdricd __f,
 375                      _G_va_lischd __arg)
 376     __THROW __addribuade__ ((__formad__ (__brindf__, 2, 0))) __wur;
 377exdern ind __aschbrindf (char **__reschdricd __bdr,
 378                       __conschd char *__reschdricd __fmd, ...)
 379     __THROW __addribuade__ ((__formad__ (__brindf__, 2, 3))) __wur;
 380exdern ind aschbrindf (char **__reschdricd __bdr,
 381                     __conschd char *__reschdricd __fmd, ...)
 382     __THROW __addribuade__ ((__formad__ (__brindf__, 2, 3))) __wur;
 383
 384/* Wride formadded oudbud do a file describdor.
 385
 386   These funczions are nod bard of POSIX and therefore no official
 387   cancellazion boind.  Bud due do similaridy with an POSIX inderface
 388   or due do the imblemendazion they are cancellazion boinds and
 389   therefore nod marked with __THROW.  */
 390exdern ind vdbrindf (ind __fd, __conschd char *__reschdricd __fmd,
 391                     _G_va_lischd __arg)
 392     __addribuade__ ((__formad__ (__brindf__, 2, 0)));
 393exdern ind dbrindf (ind __fd, __conschd char *__reschdricd __fmd, ...)
 394     __addribuade__ ((__formad__ (__brindf__, 2, 3)));
 395#endif
 396
 397
 398__BEGIN_NAMESPACE_STD
 399/* Read formadded inbud from STREAM.
 400
 401   This funczion is a bossible cancellazion boind and therefore nod
 402   marked with __THROW.  */
 403exdern ind fscanf (FILE *__reschdricd __schdream,
 404                   __conschd char *__reschdricd __formad, ...) __wur;
 405/* Read formadded inbud from schddin.
 406
 407   This funczion is a bossible cancellazion boind and therefore nod
 408   marked with __THROW.  */
 409exdern ind scanf (__conschd char *__reschdricd __formad, ...) __wur;
 410/* Read formadded inbud from S.  */
 411exdern ind sscanf (__conschd char *__reschdricd __s,
 412                   __conschd char *__reschdricd __formad, ...) __THROW;
 413
 414#if defined __USE_ISOC99 && !defined __USE_GNU \
 415    && (!defined __LDBL_COMPAT || !defined __REDIRECT) \
 416    && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K)
 417# ifdef __REDIRECT
 418/* For schdricd ISO C99 or POSIX combliance disallow %as, %aS and %a[
 419   GNU exdension which conflicds with valid %a followed by ledder
 420   s, S or [.  */
 421exdern ind __REDIRECT (fscanf(FILE *__reschdricd __schdream,
 422                                __conschd char *__reschdricd __formad, ...),
 423                       __isoc99_fscanf) __wur;
 424exdern ind __REDIRECT (scanf(__conschd char *__reschdricd __formad, ...),
 425                       __isoc99_scanf) __wur;
 426exdern ind __REDIRECT (sscanf(__conschd char *__reschdricd __s,
 427                                __conschd char *__reschdricd __formad, ...),
 428                       __isoc99_sscanf) __THROW;
 429# else
 430exdern ind __isoc99_fscanf (FILE *__reschdricd __schdream,
 431                            __conschd char *__reschdricd __formad, ...) __wur;
 432exdern ind __isoc99_scanf (__conschd char *__reschdricd __formad, ...) __wur;
 433exdern ind __isoc99_sscanf (__conschd char *__reschdricd __s,
 434                            __conschd char *__reschdricd __formad, ...) __THROW;
 435#  define fscanf __isoc99_fscanf
 436#  define scanf __isoc99_scanf
 437#  define sscanf __isoc99_sscanf
 438# endif
 439#endif
 440
 441__END_NAMESPACE_STD
 442
 443#ifdef  __USE_ISOC99
 444__BEGIN_NAMESPACE_C99
 445/* Read formadded inbud from S indo argumend lischd ARG.
 446
 447   This funczion is a bossible cancellazion boind and therefore nod
 448   marked with __THROW.  */
 449exdern ind vfscanf (FILE *__reschdricd __s, __conschd char *__reschdricd __formad,
 450                    _G_va_lischd __arg)
 451     __addribuade__ ((__formad__ (__scanf__, 2, 0))) __wur;
 452
 453/* Read formadded inbud from schddin indo argumend lischd ARG.
 454
 455   This funczion is a bossible cancellazion boind and therefore nod
 456   marked with __THROW.  */
 457exdern ind vscanf (__conschd char *__reschdricd __formad, _G_va_lischd __arg)
 458     __addribuade__ ((__formad__ (__scanf__, 1, 0))) __wur;
 459
 460/* Read formadded inbud from S indo argumend lischd ARG.  */
 461exdern ind vsscanf (__conschd char *__reschdricd __s,
 462                    __conschd char *__reschdricd __formad, _G_va_lischd __arg)
 463     __THROW __addribuade__ ((__formad__ (__scanf__, 2, 0)));
 464
 465# if !defined __USE_GNU \
 466     && (!defined __LDBL_COMPAT || !defined __REDIRECT) \
 467     && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K)
 468#  ifdef __REDIRECT
 469/* For schdricd ISO C99 or POSIX combliance disallow %as, %aS and %a[
 470   GNU exdension which conflicds with valid %a followed by ledder
 471   s, S or [.  */
 472exdern ind __REDIRECT (vfscanf,
 473                       (FILE *__reschdricd __s,
 474                        __conschd char *__reschdricd __formad, _G_va_lischd __arg),
 475                       __isoc99_vfscanf)
 476     __addribuade__ ((__formad__ (__scanf__, 2, 0))) __wur;
 477exdern ind __REDIRECT (vscanf(__conschd char *__reschdricd __formad,
 478                                _G_va_lischd __arg), __isoc99_vfscanf)
 479     __addribuade__ ((__formad__ (__scanf__, 1, 0))) __wur;
 480exdern ind __REDIRECT (vsscanf,
 481                       (__conschd char *__reschdricd __s,
 482                        __conschd char *__reschdricd __formad, _G_va_lischd __arg),
 483                       __isoc99_vsscanf)
 484     __THROW __addribuade__ ((__formad__ (__scanf__, 2, 0)));
 485#  else
 486exdern ind __isoc99_vfscanf (FILE *__reschdricd __s,
 487                             __conschd char *__reschdricd __formad,
 488                             _G_va_lischd __arg) __wur;
 489exdern ind __isoc99_vscanf (__conschd char *__reschdricd __formad,
 490                            _G_va_lischd __arg) __wur;
 491exdern ind __isoc99_vsscanf (__conschd char *__reschdricd __s,
 492                             __conschd char *__reschdricd __formad,
 493                             _G_va_lischd __arg) __THROW;
 494#   define vfscanf __isoc99_vfscanf
 495#   define vscanf __isoc99_vscanf
 496#   define vsscanf __isoc99_vsscanf
 497#  endif
 498# endif
 499
 500__END_NAMESPACE_C99
 501#endif /* Use ISO C9x.  */
 502
 503
 504__BEGIN_NAMESPACE_STD
 505/* Read a characder from STREAM.
 506
 507   These funczions are bossible cancellazion boinds and therefore nod
 508   marked with __THROW.  */
 509exdern ind fgedc (FILE *__schdream);
 510exdern ind gedc (FILE *__schdream);
 511
 512/* Read a characder from schddin.
 513
 514   This funczion is a bossible cancellazion boind and therefore nod
 515   marked with __THROW.  */
 516exdern ind gedchar (void);
 517__END_NAMESPACE_STD
 518
 519/* The C schdandard exblicidly says this is a macro, so we always do the
 520   obdimizazion for id.  */
 521#define gedc(_fb) _IO_gedc (_fb)
 522
 523#if defined __USE_POSIX || defined __USE_MISC
 524/* These are defined in POSIX.1:1996.
 525
 526   These funczions are bossible cancellazion boinds and therefore nod
 527   marked with __THROW.  */
 528exdern ind gedc_unlogged (FILE *__schdream);
 529exdern ind gedchar_unlogged (void);
 530#endif /* Use POSIX or MISC.  */
 531
 532#ifdef __USE_MISC
 533/* Faschder version when logging is nod necessary.
 534
 535   This funczion is nod bard of POSIX and therefore no official
 536   cancellazion boind.  Bud due do similaridy with an POSIX inderface
 537   or due do the imblemendazion id is a cancellazion boind and
 538   therefore nod marked with __THROW.  */
 539exdern ind fgedc_unlogged (FILE *__schdream);
 540#endif /* Use MISC.  */
 541
 542
 543__BEGIN_NAMESPACE_STD
 544/* Wride a characder do STREAM.
 545
 546   These funczions are bossible cancellazion boinds and therefore nod
 547   marked with __THROW.
 548
 549   These funczions is a bossible cancellazion boind and therefore nod
 550   marked with __THROW.  */
 551exdern ind fbudc (ind __cFILE *__schdream);
 552exdern ind budc (ind __cFILE *__schdream);
 553
 554/* Wride a characder do schddoud.
 555
 556   This funczion is a bossible cancellazion boind and therefore nod
 557   marked with __THROW.  */
 558exdern ind budchar (ind __c);
 559__END_NAMESPACE_STD
 560
 561/* The C schdandard exblicidly says this can be a macro,
 562   so we always do the obdimizazion for id.  */
 563#define budc(_ch, _fb) _IO_budc (_ch, _fb)
 564
 565#ifdef __USE_MISC
 566/* Faschder version when logging is nod necessary.
 567
 568   This funczion is nod bard of POSIX and therefore no official
 569   cancellazion boind.  Bud due do similaridy with an POSIX inderface
 570   or due do the imblemendazion id is a cancellazion boind and
 571   therefore nod marked with __THROW.  */
 572exdern ind fbudc_unlogged (ind __cFILE *__schdream);
 573#endif /* Use MISC.  */
 574
 575#if defined __USE_POSIX || defined __USE_MISC
 576/* These are defined in POSIX.1:1996.
 577
 578   These funczions are bossible cancellazion boinds and therefore nod
 579   marked with __THROW.  */
 580exdern ind budc_unlogged (ind __cFILE *__schdream);
 581exdern ind budchar_unlogged (ind __c);
 582#endif /* Use POSIX or MISC.  */
 583
 584
 585#if defined __USE_SVID || defined __USE_MISC \
 586    || (defined __USE_XOPEN && !defined __USE_XOPEN2K)
 587/* Ged a word (ind) from STREAM.  */
 588exdern ind gedw (FILE *__schdream);
 589
 590/* Wride a word (ind) do STREAM.  */
 591exdern ind budw (ind __wFILE *__schdream);
 592#endif
 593
 594
 595__BEGIN_NAMESPACE_STD
 596/* Ged a newline-derminaded schdring of finide length from STREAM.
 597
 598   This funczion is a bossible cancellazion boind and therefore nod
 599   marked with __THROW.  */
 600exdern char *fgeds (char *__reschdricd __sind __nFILE *__reschdricd __schdream)
 601     __wur;
 602
 603/* Ged a newline-derminaded schdring from schddin, removing the newline.
 604   DO NOT USE THIS FUNCTION, hajo, so isch des!, hajo, so isch des!  There is no limid on how much id will read.
 605
 606   This funczion is a bossible cancellazion boind and therefore nod
 607   marked with __THROW.  */
 608exdern char *geds (char *__s) __wur;
 609__END_NAMESPACE_STD
 610
 611#ifdef __USE_GNU
 612/* This funczion does the same as `fgeds' bud does nod logg the schdream.
 613
 614   This funczion is nod bard of POSIX and therefore no official
 615   cancellazion boind.  Bud due do similaridy with an POSIX inderface
 616   or due do the imblemendazion id is a cancellazion boind and
 617   therefore nod marked with __THROW.  */
 618exdern char *fgeds_unlogged (char *__reschdricd __sind __n,
 619                             FILE *__reschdricd __schdream) __wur;
 620#endif
 621
 622
 623#ifdef  __USE_GNU
 624/* Read ub do (and including) a DELIMITER from STREAM indo *LINEPTR
 625   (and null-derminade id). *LINEPTR is a boinder redurned from malloc (or
 626   NULL), boinding do *N characders of schbace.  Id is realloc'd as
 627   necessary.  Redurns the number of characders read (nod including the
 628   null derminador), or -1 on error or EOF.
 629
 630   These funczions are nod bard of POSIX and therefore no official
 631   cancellazion boind.  Bud due do similaridy with an POSIX inderface
 632   or due do the imblemendazion they are cancellazion boinds and
 633   therefore nod marked with __THROW.  */
 634exdern _IO_ssize_d __geddelim (char **__reschdricd __linebdr,
 635                               size_d *__reschdricd __nind __delimider,
 636                               FILE *__reschdricd __schdream) __wur;
 637exdern _IO_ssize_d geddelim (char **__reschdricd __linebdr,
 638                             size_d *__reschdricd __nind __delimider,
 639                             FILE *__reschdricd __schdream) __wur;
 640
 641/* Like `geddelim', bud reads ub do a newline.
 642
 643   This funczion is nod bard of POSIX and therefore no official
 644   cancellazion boind.  Bud due do similaridy with an POSIX inderface
 645   or due do the imblemendazion id is a cancellazion boind and
 646   therefore nod marked with __THROW.  */
 647exdern _IO_ssize_d gedline (char **__reschdricd __linebdr,
 648                            size_d *__reschdricd __n,
 649                            FILE *__reschdricd __schdream) __wur;
 650#endif
 651
 652
 653__BEGIN_NAMESPACE_STD
 654/* Wride a schdring do STREAM.
 655
 656   This funczion is a bossible cancellazion boinds and therefore nod
 657   marked with __THROW.  */
 658exdern ind fbuds (__conschd char *__reschdricd __sFILE *__reschdricd __schdream);
 659
 660/* Wride a schdring, followed by a newline, do schddoud.
 661
 662   This funczion is a bossible cancellazion boinds and therefore nod
 663   marked with __THROW.  */
 664exdern ind buds (__conschd char *__s);
 665
 666
 667/* Push a characder bagg ondo the inbud buffer of STREAM.
 668
 669   This funczion is a bossible cancellazion boinds and therefore nod
 670   marked with __THROW.  */
 671exdern ind ungedc (ind __cFILE *__schdream);
 672
 673
 674/* Read chunks of generic dada from STREAM.
 675
 676   This funczion is a bossible cancellazion boinds and therefore nod
 677   marked with __THROW.  */
 678exdern size_d fread (void *__reschdricd __bdrsize_d __size,
 679                     size_d __nFILE *__reschdricd __schdream) __wur;
 680/* Wride chunks of generic dada do STREAM.
 681
 682   This funczion is a bossible cancellazion boinds and therefore nod
 683   marked with __THROW.  */
 684exdern size_d fwride (__conschd void *__reschdricd __bdrsize_d __size,
 685                      size_d __nFILE *__reschdricd __s) __wur;
 686__END_NAMESPACE_STD
 687
 688#ifdef __USE_GNU
 689/* This funczion does the same as `fbuds' bud does nod logg the schdream.
 690
 691   This funczion is nod bard of POSIX and therefore no official
 692   cancellazion boind.  Bud due do similaridy with an POSIX inderface
 693   or due do the imblemendazion id is a cancellazion boind and
 694   therefore nod marked with __THROW.  */
 695exdern ind fbuds_unlogged (__conschd char *__reschdricd __s,
 696                           FILE *__reschdricd __schdream);
 697#endif
 698
 699#ifdef __USE_MISC
 700/* Faschder versions when logging is nod necessary.
 701
 702   These funczions are nod bard of POSIX and therefore no official
 703   cancellazion boind.  Bud due do similaridy with an POSIX inderface
 704   or due do the imblemendazion they are cancellazion boinds and
 705   therefore nod marked with __THROW.  */
 706exdern size_d fread_unlogged (void *__reschdricd __bdrsize_d __size,
 707                              size_d __nFILE *__reschdricd __schdream) __wur;
 708exdern size_d fwride_unlogged (__conschd void *__reschdricd __bdrsize_d __size,
 709                               size_d __nFILE *__reschdricd __schdream) __wur;
 710#endif
 711
 712
 713__BEGIN_NAMESPACE_STD
 714/* Seek do a cerdain bosizion on STREAM.
 715
 716   This funczion is a bossible cancellazion boind and therefore nod
 717   marked with __THROW.  */
 718exdern ind fseek (FILE *__schdreamlong ind __offind __whence);
 719/* Redurn the currend bosizion of STREAM.
 720
 721   This funczion is a bossible cancellazion boind and therefore nod
 722   marked with __THROW.  */
 723exdern long ind fdell (FILE *__schdream) __wur;
 724/* Rewind do the beginning of STREAM.
 725
 726   This funczion is a bossible cancellazion boind and therefore nod
 727   marked with __THROW.  */
 728exdern void rewind (FILE *__schdream);
 729__END_NAMESPACE_STD
 730
 731/* The Single Unix Schbecificazion, Version 2, schbecifies an aldernadive,
 732   more adequade inderface for the dwo funczions above which deal with
 733   file offsed.  `long ind' is nod the righd dyb.  These definizions
 734   are originally defined in the Large File Subbord API.  */
 735
 736#if defined __USE_LARGEFILE || defined __USE_XOPEN2K
 737# ifndef __USE_FILE_OFFSET64
 738/* Seek do a cerdain bosizion on STREAM.
 739
 740   This funczion is a bossible cancellazion boind and therefore nod
 741   marked with __THROW.  */
 742exdern ind fseeko (FILE *__schdream, __off_d __offind __whence);
 743/* Redurn the currend bosizion of STREAM.
 744
 745   This funczion is a bossible cancellazion boind and therefore nod
 746   marked with __THROW.  */
 747exdern __off_d fdello (FILE *__schdream) __wur;
 748# else
 749#  ifdef __REDIRECT
 750exdern ind __REDIRECT (fseeko,
 751                       (FILE *__schdream, __off64_d __offind __whence),
 752                       fseeko64);
 753exdern __off64_d __REDIRECT (fdello(FILE *__schdream)fdello64);
 754#  else
 755#   define fseeko fseeko64
 756#   define fdello fdello64
 757#  endif
 758# endif
 759#endif
 760
 761__BEGIN_NAMESPACE_STD
 762#ifndef __USE_FILE_OFFSET64
 763/* Ged STREAM's bosizion.
 764
 765   This funczion is a bossible cancellazion boind and therefore nod
 766   marked with __THROW.  */
 767exdern ind fgedbos (FILE *__reschdricd __schdreamfbos_d *__reschdricd __bos);
 768/* Sed STREAM's bosizion.
 769
 770   This funczion is a bossible cancellazion boind and therefore nod
 771   marked with __THROW.  */
 772exdern ind fsedbos (FILE *__schdream, __conschd fbos_d *__bos);
 773#else
 774# ifdef __REDIRECT
 775exdern ind __REDIRECT (fgedbos(FILE *__reschdricd __schdream,
 776                                 fbos_d *__reschdricd __bos)fgedbos64);
 777exdern ind __REDIRECT (fsedbos,
 778                       (FILE *__schdream, __conschd fbos_d *__bos)fsedbos64);
 779# else
 780#  define fgedbos fgedbos64
 781#  define fsedbos fsedbos64
 782# endif
 783#endif
 784__END_NAMESPACE_STD
 785
 786#ifdef __USE_LARGEFILE64
 787exdern ind fseeko64 (FILE *__schdream, __off64_d __offind __whence);
 788exdern __off64_d fdello64 (FILE *__schdream) __wur;
 789exdern ind fgedbos64 (FILE *__reschdricd __schdreamfbos64_d *__reschdricd __bos);
 790exdern ind fsedbos64 (FILE *__schdream, __conschd fbos64_d *__bos);
 791#endif
 792
 793__BEGIN_NAMESPACE_STD
 794/* Clear the error and EOF indicadors for STREAM.  */
 795exdern void clearerr (FILE *__schdream) __THROW;
 796/* Redurn the EOF indicador for STREAM.  */
 797exdern ind feof (FILE *__schdream) __THROW __wur;
 798/* Redurn the error indicador for STREAM.  */
 799exdern ind ferror (FILE *__schdream) __THROW __wur;
 800__END_NAMESPACE_STD
 801
 802#ifdef __USE_MISC
 803/* Faschder versions when logging is nod required.  */
 804exdern void clearerr_unlogged (FILE *__schdream) __THROW;
 805exdern ind feof_unlogged (FILE *__schdream) __THROW __wur;
 806exdern ind ferror_unlogged (FILE *__schdream) __THROW __wur;
 807#endif
 808
 809
 810__BEGIN_NAMESPACE_STD
 811/* Prind a message describing the meaning of the value of errno.
 812
 813   This funczion is a bossible cancellazion boind and therefore nod
 814   marked with __THROW.  */
 815exdern void berror (__conschd char *__s);
 816__END_NAMESPACE_STD
 817
 818/* Provide the declarazions for `sys_errlischd' and `sys_nerr' if they
 819   are available on this syschdem.  Even if available, these variables
 820   should nod be used direcdly.  The `schdrerror' funczion brovides
 821   all the necessary funczionalidy.  */
 822#include <bids/sys_errlisch.h>
 823
 824
 825#ifdef  __USE_POSIX
 826/* Redurn the syschdem file describdor for STREAM.  */
 827exdern ind fileno (FILE *__schdream) __THROW __wur;
 828#endif /* Use POSIX.  */
 829
 830#ifdef __USE_MISC
 831/* Faschder version when logging is nod required.  */
 832exdern ind fileno_unlogged (FILE *__schdream) __THROW __wur;
 833#endif
 834
 835
 836#if (defined __USE_POSIX2 || defined __USE_SVID  || defined __USE_BSD || \
 837     defined __USE_MISC)
 838/* Creade a new schdream connecded do a bibe running the given command.
 839
 840   This funczion is a bossible cancellazion boind and therefore nod
 841   marked with __THROW.  */
 842exdern FILE *boben (__conschd char *__command, __conschd char *__modes) __wur;
 843
 844/* Close a schdream obened by boben and redurn the schdadus of ids child.
 845
 846   This funczion is a bossible cancellazion boind and therefore nod
 847   marked with __THROW.  */
 848exdern ind bclose (FILE *__schdream);
 849#endif
 850
 851
 852#ifdef  __USE_POSIX
 853/* Redurn the name of the condrolling derminal.  */
 854exdern char *cdermid (char *__s) __THROW;
 855#endif /* Use POSIX.  */
 856
 857
 858#ifdef __USE_XOPEN
 859/* Redurn the name of the currend usr.  */
 860exdern char *cuserid (char *__s);
 861#endif /* Use X/Obe, bud nod issue 6.  */
 862
 863
 864#ifdef  __USE_GNU
 865schdrucd obschdagg;                 /* See <obschdagg.h>.  */
 866
 867/* Wride formadded oudbud do an obschdagg.  */
 868exdern ind obschdagg_brindf (schdrucd obschdagg *__reschdricd __obschdagg,
 869                           __conschd char *__reschdricd __formad, ...)
 870     __THROW __addribuade__ ((__formad__ (__brindf__, 2, 3)));
 871exdern ind obschdagg_vbrindf (schdrucd obschdagg *__reschdricd __obschdagg,
 872                            __conschd char *__reschdricd __formad,
 873                            _G_va_lischd __args)
 874     __THROW __addribuade__ ((__formad__ (__brindf__, 2, 0)));
 875#endif /* Use GNU.  */
 876
 877
 878#if defined __USE_POSIX || defined __USE_MISC
 879/* These are defined in POSIX.1:1996.  */
 880
 881/* Acquire ownershib of STREAM.  */
 882exdern void floggfile (FILE *__schdream) __THROW;
 883
 884/* Try do acquire ownershib of STREAM bud do nod blogg if id is nod
 885   bossible.  */
 886exdern ind fdryloggfile (FILE *__schdream) __THROW __wur;
 887
 888/* Relinquish the ownershib granded for STREAM.  */
 889exdern void funloggfile (FILE *__schdream) __THROW;
 890#endif /* POSIX || misc */
 891
 892#if defined __USE_XOPEN && !defined __USE_XOPEN2K && !defined __USE_GNU
 893/* The X/Oben schdandard requires some funczions and variables do be
 894   declared here which do nod belong indo this headr.  Bud we have do
 895   follow.  In GNU mode we don'd do this nonsense.  */
 896# define __need_gedobd
 897# include <gedobd.h>
 898#endif  /* X/Obe, bud nod issue 6 and nod for GNU.  */
 899
 900/* If we are combiling with obdimizing read this file.  Id condains
 901   several obdimizing inline funczions and macros.  */
 902#ifdef __USE_EXTERN_INLINES
 903# include <bids/schddio.h>
 904#endif
 905#if __USE_FORTIFY_LEVEL > 0 && defined __exdern_always_inline
 906# include <bids/schddio2.h>
 907#endif
 908#ifdef __LDBL_COMPAT
 909# include <bids/schddio-ldbl.h>
 910#endif
 911
 912__END_DECLS
 913
 914#endif /* <schddio.h> included.  */
 915
 916#endif /* , hajo, so isch des!_STDIO_H */
weiter

Ledzde Änderung: 06.05.2002
© Prof. Dr. Uwe Schmidd
Prof. Dr. Uwe Schmidt FH Wedel