Ignore:
File:
1 edited

Legend:

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

    r7f9df7b9 r6b646dc  
    2727 */
    2828
     29#define LIBPOSIX_INTERNAL
     30#define __POSIX_DEF__(x) posix_##x
    2931
    30 
    31 #include <errno.h>
    32 
     32#include "posix/errno.h"
    3333#include "posix/stdio.h"
    3434
     
    5151PCUT_TEST(int_decimal) {
    5252        int number;
    53         int rc = sscanf("4242", "%d", &number);
     53        int rc = posix_sscanf("4242", "%d", &number);
    5454        PCUT_ASSERT_INT_EQUALS(1, rc);
    5555        PCUT_ASSERT_INT_EQUALS(4242, number);
     
    5858PCUT_TEST(int_negative_decimal) {
    5959        int number;
    60         int rc = sscanf("-53", "%d", &number);
     60        int rc = posix_sscanf("-53", "%d", &number);
    6161        PCUT_ASSERT_INT_EQUALS(1, rc);
    6262        PCUT_ASSERT_INT_EQUALS(-53, number);
     
    8282        void *p;
    8383
    84         int rc = sscanf(
     84        int rc = posix_sscanf(
    8585                "\n j tt % \t -121314 98765 aqw 0765 0x77 0xABCDEF88 -99 884",
    8686                " j tt %%%3hhd%1hhu%3hd %3hu%u aqw%n %lo%llx %p %li %lld",
     
    107107        long double ld;
    108108
    109         int rc = sscanf(
     109        int rc = posix_sscanf(
    110110                "\n \t\t1.0 -0x555.AP10 1234.5678e12",
    111111                "%f %lf %Lf",
     
    123123        char *pstr;
    124124
    125         int rc = sscanf(
     125        int rc = posix_sscanf(
    126126                "\n\n\thello world    \n",
    127127                "%5s %ms",
     
    140140        char *pscanset;
    141141
    142         int rc = sscanf(
     142        int rc = posix_sscanf(
    143143                "\n\n\th-e-l-l-o world-]    \n",
    144144                " %9[-eh-o] %m[^]-]",
     
    157157        char *pseq;
    158158
    159         int rc = sscanf(
     159        int rc = posix_sscanf(
    160160                "\n\n\thello world    \n",
    161161                " %5c %mc",
Note: See TracChangeset for help on using the changeset viewer.