Changeset 628 for trunk/libs


Ignore:
Timestamp:
May 6, 2019, 1:28:01 PM (6 years ago)
Author:
alain
Message:

Introduce teh page_min / page_max mechanism in the fatfs_release_inode()
function, to avoid to scan all pages in FAT mapper.

File:
1 edited

Legend:

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

    r625 r628  
    5151}
    5252
    53 ///////////////////////////////////////////////////
     53////////////////////////////////////////////////////////////////////////////////////////
     54// This static function analyses the <format> and the <args> to build a formated
     55// string in the buffer defined by <string> and <length>.
     56// It does NOT add a terminating NUL character in the <string buffer>.
     57// If success, it returns the number of bytes actually copied in the string buffer.
     58// It returns -1 in case of illegal format, or if the formated string exceeds the
     59// the length argument.
     60////////////////////////////////////////////////////////////////////////////////////////
    5461static int xprintf( char         * string,
    5562                    int            length,
     
    5764                    va_list      * args )
    5865{
    59     int ps = 0;    // write index to the string buffer
     66    int ps = 0;    // index in the string buffer
    6067
    6168#define TO_STREAM(x) do { string[ps] = (x); ps++; if(ps==length) return -1; } while(0);
     
    8390
    8491    {
    85         char              buf[30];    // buffer to display one number
     92        char              buf[30];    // buffer to store the string for one number
    8693        char *            pbuf;       // pointer on first char to display
    8794        unsigned int      len = 0;    // number of char to display
Note: See TracChangeset for help on using the changeset viewer.