Ignore:
Timestamp:
Nov 20, 2020, 12:18:00 AM (3 years ago)
Author:
alain
Message:

Introduce the fgetc() and fputc() functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libs/mini-libc/stdio.h

    r647 r677  
    2727/*********************************************************************************************
    2828 * This file defines the user level, TXT related <stdio> library.
     29 *
    2930 * These functions call the read() and write() functions defined in the <unistd> library
    3031 * to access the TXT terminal.
     
    3839/*********************************************************************************************
    3940 * This defines the user level FILE structure.
     41 * The open_file_array[] of files is a global variable allocated in the <stdio.c> file
    4042 ********************************************************************************************/
    4143
     
    6466
    6567/*********************************************************************************************
    66  * This function writes one single character to the standard "stdout" stream.
     68 * This function writes the <c> character to the standard "stdout" stream.
    6769 *********************************************************************************************
    6870 * @ returns written character code if success / returns 0 (EOF) if failure.
     
    8587 * @ length    : max bumber of characters in target buffer.
    8688 * @ format    : formated string.
    87  * @ returns number of characters written if success / returns -1 if failure.
     89 * @ returns string length (not including NUL) if success / returns -1 if failure.
    8890 ********************************************************************************************/
    8991int snprintf( char         * string,
    9092              unsigned int   length,
    9193              const char   * format, ... );
     94
     95
     96
     97
     98
    9299
    93100/*********************************************************************************************
     
    131138
    132139/*********************************************************************************************
     140 * This function returns one single character from the FILE identified by <stream>.
     141 *********************************************************************************************
     142 * @ returns read character code if success / returns 0 (EOF) if failure.
     143 ********************************************************************************************/
     144int fgetc( FILE * stream );
     145
     146/*********************************************************************************************
     147 * This function writes the <c> character to the FILE identified by <stream>.
     148 *********************************************************************************************
     149 * @ returns written character code if success / returns 0 (EOF) if failure.
     150 ********************************************************************************************/
     151int fputc( int c,
     152           FILE * stream);
     153
     154/*********************************************************************************************
    133155 * This function copies a formated string to an output stream identified by the <stream>
    134156 * argument. It can be a  regular file or a character oriented output device.
Note: See TracChangeset for help on using the changeset viewer.