Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset f47a905 in mainline


Ignore:
Timestamp:
2018-06-13T11:16:01Z (3 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
5a6c28d1
Parents:
01cc7b4
git-author:
Jiri Svoboda <jiri@…> (2018-06-12 17:14:36)
git-committer:
Jiri Svoboda <jiri@…> (2018-06-13 11:16:01)
Message:

scanf, vscanf, vsscanf.

Location:
uspace/lib/c
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/Makefile

    r01cc7b4 rf47a905  
    132132        generic/malloc.c \
    133133        generic/stdio/scanf.c \
     134        generic/stdio/sscanf.c \
    134135        generic/stdio/sstream.c \
    135136        generic/sysinfo.c \
  • uspace/lib/c/generic/stdio/scanf.c

    r01cc7b4 rf47a905  
    4646#include <stdio.h>
    4747#include <stdlib.h>
    48 #include "../private/stdio.h"
    49 #include "../private/sstream.h"
    5048
    5149typedef enum {
     
    12681266}
    12691267
    1270 static int xxvfscanf(FILE *f, const char *fmt, va_list ap)
     1268int xxvfscanf(FILE *f, const char *fmt, va_list ap)
    12711269{
    12721270        const char *cp;
     
    13371335}
    13381336
    1339 int xxsscanf(const char *s, const char *fmt, ...)
     1337int xxvscanf(const char *fmt, va_list ap)
     1338{
     1339        return xxvfscanf(stdin, fmt, ap);
     1340}
     1341
     1342int xxscanf(const char *fmt, ...)
    13401343{
    13411344        va_list args;
    1342         FILE f;
    13431345        int rc;
    13441346
    1345         __sstream_init(s, &f);
    1346 
    13471347        va_start(args, fmt);
    1348         rc = xxvfscanf(&f, fmt, args);
     1348        rc = xxvscanf(fmt, args);
    13491349        va_end(args);
    13501350
    13511351        return rc;
    13521352}
     1353
     1354/** @}
     1355 */
  • uspace/lib/c/include/stdio.h

    r01cc7b4 rf47a905  
    101101extern int vsnprintf(char *, size_t, const char *, va_list);
    102102
     103extern int xxscanf(const char *, ...);
     104extern int xxvscanf(const char *, va_list);
    103105extern int xxfscanf(FILE *, const char *, ...);
     106extern int xxvfscanf(FILE *, const char *, va_list);
    104107extern int xxsscanf(const char *, const char *, ...);
     108extern int xxvsscanf(const char *, const char *, va_list);
    105109
    106110/* File stream functions */
Note: See TracChangeset for help on using the changeset viewer.