Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/test/scanf.c

    r0d0b319 r7f9df7b9  
    2727 */
    2828
    29 #define LIBPOSIX_INTERNAL
    30 #define __POSIX_DEF__(x) posix_##x
     29
    3130
    3231#include <errno.h>
     
    5251PCUT_TEST(int_decimal) {
    5352        int number;
    54         int rc = posix_sscanf("4242", "%d", &number);
     53        int rc = sscanf("4242", "%d", &number);
    5554        PCUT_ASSERT_INT_EQUALS(1, rc);
    5655        PCUT_ASSERT_INT_EQUALS(4242, number);
     
    5958PCUT_TEST(int_negative_decimal) {
    6059        int number;
    61         int rc = posix_sscanf("-53", "%d", &number);
     60        int rc = sscanf("-53", "%d", &number);
    6261        PCUT_ASSERT_INT_EQUALS(1, rc);
    6362        PCUT_ASSERT_INT_EQUALS(-53, number);
     
    8382        void *p;
    8483
    85         int rc = posix_sscanf(
     84        int rc = sscanf(
    8685                "\n j tt % \t -121314 98765 aqw 0765 0x77 0xABCDEF88 -99 884",
    8786                " j tt %%%3hhd%1hhu%3hd %3hu%u aqw%n %lo%llx %p %li %lld",
     
    108107        long double ld;
    109108
    110         int rc = posix_sscanf(
     109        int rc = sscanf(
    111110                "\n \t\t1.0 -0x555.AP10 1234.5678e12",
    112111                "%f %lf %Lf",
     
    124123        char *pstr;
    125124
    126         int rc = posix_sscanf(
     125        int rc = sscanf(
    127126                "\n\n\thello world    \n",
    128127                "%5s %ms",
     
    141140        char *pscanset;
    142141
    143         int rc = posix_sscanf(
     142        int rc = sscanf(
    144143                "\n\n\th-e-l-l-o world-]    \n",
    145144                " %9[-eh-o] %m[^]-]",
     
    158157        char *pseq;
    159158
    160         int rc = posix_sscanf(
     159        int rc = sscanf(
    161160                "\n\n\thello world    \n",
    162161                " %5c %mc",
Note: See TracChangeset for help on using the changeset viewer.