TRIO_SCANF(3)

NAME
trio_scanf, trio_vscanf, trio_fscanf, trio_vfscanf, trio_dscanf, trio_vdscanf, trio_sscanf, trio_vsscanf - formatted input conversion

SYNOPSIS

cc ... -ltrio -lm

#include <trio.h>

int trio_scanf(const char *format, ...);
int trio_vscanf(const char *format, va_list args);
int trio_fscanf(FILE *file, const char *format, ...);
int trio_vfscanf(FILE *file, const char *format, va_list args);
int trio_dscanf(int fd, const char *format, ...);
int trio_vdscanf(int fd, const char *format, va_list args);
int trio_sscanf(const char *buffer, const char *format, ...);
int trio_vsscanf(const char *buffer, const char *format, va_list args);

DESCRIPTION
This documentation is incomplete. The documentation of the scanf family in [C99] and [UNIX98] also applies to the trio counterparts.

SCANNING

The scanning is controlled by the format string. The format string can contain normal text and conversion indicators. The normal text can be any character except the nil character (ASCII 000 = '\0') and the percent character (ASCII 045 = '%'). Conversion indicators consists of an indication character (%), followed by zero or more conversion modifiers, and exactly one conversion specifier.

  MODIFIERS

Positional (9$) [UNIX98]
    See trio_printf (3).

  SPECIFIERS

    Percent (%)

    Character (c)

    Decimal (d)

    Floating-point (a, e, E, f, F, g, G)

    Integer (i)

    Count (n)

    Octal (o)

    Pointer (p)

    String (s)

    Unsigned (u)

    Hex (x, X)

    Scanlist ([])

        Exclusion (^)

        Range (-) [TRIO]

            *   Only increasing ranges, i.e. [a-b], but not [b-a].

            *   Transitive ranges, ie. [a-b-c] equals [a-c].

            *   Trailing minus, ie. [a-] is interpreted as an 'a' and a '-'.

            *   Duplicates are ignored.

        Class Expression (::) [TRIO]
            Locale dependent (LC_CTYPE)

            :alnum:
                :alpha: and :digit:

            :alpha:
                :lower: and :upper:

            :cntrl:
                Control characters

            :digit:
                Decimal digits

            :graph:
                Printable characters except space

            :lower:
                Lower case alphabetic letters

            :print:
                Printable characters

            :punct:
                Punctuation

            :space:
                Whitespace characters

            :upper:
                Upper case alphabetic letters

            :xdigit:
                Hexadecimal digits

RETURN VALUES

SEE ALSO
trio_printf (3)

CONFORMING TO
See the description of trio_printf (3).

LEGAL ISSUES
Copyright (C) 1998-2000 Bjorn Reese and Daniel Stenberg.

Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.