Ignore:
File:
1 edited

Legend:

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

    r7f9df7b9 r0d0b319  
    2727 */
    2828
    29 
     29#define LIBPOSIX_INTERNAL
     30#define __POSIX_DEF__(x) posix_##x
    3031
    3132#include <errno.h>
     
    5152PCUT_TEST(int_decimal) {
    5253        int number;
    53         int rc = sscanf("4242", "%d", &number);
     54        int rc = posix_sscanf("4242", "%d", &number);
    5455        PCUT_ASSERT_INT_EQUALS(1, rc);
    5556        PCUT_ASSERT_INT_EQUALS(4242, number);
     
    5859PCUT_TEST(int_negative_decimal) {
    5960        int number;
    60         int rc = sscanf("-53", "%d", &number);
     61        int rc = posix_sscanf("-53", "%d", &number);
    6162        PCUT_ASSERT_INT_EQUALS(1, rc);
    6263        PCUT_ASSERT_INT_EQUALS(-53, number);
     
    8283        void *p;
    8384
    84         int rc = sscanf(
     85        int rc = posix_sscanf(
    8586                "\n j tt % \t -121314 98765 aqw 0765 0x77 0xABCDEF88 -99 884",
    8687                " j tt %%%3hhd%1hhu%3hd %3hu%u aqw%n %lo%llx %p %li %lld",
     
    107108        long double ld;
    108109
    109         int rc = sscanf(
     110        int rc = posix_sscanf(
    110111                "\n \t\t1.0 -0x555.AP10 1234.5678e12",
    111112                "%f %lf %Lf",
     
    123124        char *pstr;
    124125
    125         int rc = sscanf(
     126        int rc = posix_sscanf(
    126127                "\n\n\thello world    \n",
    127128                "%5s %ms",
     
    140141        char *pscanset;
    141142
    142         int rc = sscanf(
     143        int rc = posix_sscanf(
    143144                "\n\n\th-e-l-l-o world-]    \n",
    144145                " %9[-eh-o] %m[^]-]",
     
    157158        char *pseq;
    158159
    159         int rc = sscanf(
     160        int rc = posix_sscanf(
    160161                "\n\n\thello world    \n",
    161162                " %5c %mc",
Note: See TracChangeset for help on using the changeset viewer.