Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/stdio.h

    r4e6a610 r55092672  
    11/*
    22 * Copyright (c) 2005 Martin Decky
    3  * Copyright (c) 2018 Jiri Svoboda
    43 * All rights reserved.
    54 *
     
    3736#define LIBC_STDIO_H_
    3837
    39 #include <offset.h>
    4038#include <stdarg.h>
    4139#include <io/verify.h>
    42 #include <_bits/NULL.h>
    4340#include <_bits/size_t.h>
    4441#include <_bits/wchar_t.h>
    4542#include <_bits/wint_t.h>
    4643
    47 /** Forward declaration */
    48 struct _IO_FILE;
    49 typedef struct _IO_FILE FILE;
    50 
    51 /** File position */
    52 typedef struct {
    53         off64_t pos;
    54 } fpos_t;
    55 
    56 #ifndef _HELENOS_SOURCE
    57 #define _IONBF 0
    58 #define _IOLBF 1
    59 #define _IOFBF 2
    60 #endif
    61 
    62 /** Default size for stream I/O buffers */
    63 #define BUFSIZ  4096
    64 
    6544#define EOF  (-1)
    66 
    67 /** Max number of files that is guaranteed to be able to open at the same time */
    68 #define FOPEN_MAX VFS_MAX_OPEN_FILES
    69 
    70 /** Recommended size of fixed-size array for holding file names. */
    71 #define FILENAME_MAX 4096
    72 
    73 /** Length of "/tmp/tmp.XXXXXX" + 1 */
    74 #define L_tmpnam 16
    7545
    7646#ifndef SEEK_SET
     
    8656#endif
    8757
    88 /** Minimum number of unique temporary file names */
    89 #define TMP_MAX 1000000
     58/** Default size for stream I/O buffers */
     59#define BUFSIZ  4096
     60
     61/** Recommended size of fixed-size array for holding file names. */
     62#define FILENAME_MAX 4096
     63
     64/** Forward declaration */
     65struct _IO_FILE;
     66typedef struct _IO_FILE FILE;
    9067
    9168extern FILE *stdin;
     
    9774extern int fgetc(FILE *);
    9875extern char *fgets(char *, int, FILE *);
    99 extern char *gets(char *, size_t) __attribute__((deprecated));
    10076
    10177extern int getchar(void);
     
    128104extern int vasprintf(char **, const char *, va_list);
    129105extern int asprintf(char **, const char *, ...)
     106#endif
    130107    _HELENOS_PRINTF_ATTRIBUTE(2, 3);
    131 #endif
    132108extern int vsnprintf(char *, size_t, const char *, va_list);
    133 
    134 extern int sprintf(char *, const char *, ...)
    135     __attribute__((deprecated)) _HELENOS_PRINTF_ATTRIBUTE(2, 3);
    136 extern int vsprintf(char *, const char *, va_list) __attribute__((deprecated));
    137109
    138110/* Formatted input */
     
    152124extern size_t fwrite(const void *, size_t, size_t, FILE *);
    153125
    154 extern int fgetpos(FILE *, fpos_t *);
    155 extern int fsetpos(FILE *, const fpos_t *);
    156 
    157126extern int fseek(FILE *, long, int);
    158127extern void rewind(FILE *);
     
    164133extern void clearerr(FILE *);
    165134
    166 extern void perror(const char *);
    167 
    168135extern void setvbuf(FILE *, void *, int, size_t);
    169136extern void setbuf(FILE *, void *);
    170137
    171138/* Misc file functions */
     139extern int rename(const char *, const char *);
    172140extern int remove(const char *);
    173 extern int rename(const char *, const char *);
    174141
    175 extern FILE *tmpfile(void);
    176 extern char *tmpnam(char *s) __attribute__((deprecated));
     142#ifndef _HELENOS_SOURCE
     143#define _IONBF 0
     144#define _IOLBF 1
     145#define _IOFBF 2
     146
     147extern char *gets(char *, size_t);
     148
     149#endif
    177150
    178151#ifdef _HELENOS_SOURCE
Note: See TracChangeset for help on using the changeset viewer.