FreeBSD kernel kern code
subr_scanf.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/ctype.h>
#include <sys/limits.h>
#include <machine/stdarg.h>
Include dependency graph for subr_scanf.c:

Go to the source code of this file.

Macros

#define BUF   32 /* Maximum length of numeric string. */
 
#define LONG   0x01 /* l: long or double */
 
#define SHORT   0x04 /* h: short */
 
#define SUPPRESS   0x08 /* suppress assignment */
 
#define POINTER   0x10 /* weird %p pointer (`fake hex') */
 
#define NOSKIP   0x20 /* do not skip blanks */
 
#define QUAD   0x400
 
#define SHORTSHORT   0x4000 /** hh: char */
 
#define SIGNOK   0x40 /* +/- is (still) legal */
 
#define NDIGITS   0x80 /* no digits detected */
 
#define DPTOK   0x100 /* (float) decimal point is still legal */
 
#define EXPOK   0x200 /* (float) exponent (e+3, etc) still legal */
 
#define PFXOK   0x100 /* 0x prefix is (still) legal */
 
#define NZDIGITS   0x200 /* no zero digits detected */
 
#define CT_CHAR   0 /* %c conversion */
 
#define CT_CCL   1 /* %[...] conversion */
 
#define CT_STRING   2 /* %s conversion */
 
#define CT_INT   3 /* integer, i.e., strtoq or strtouq */
 

Typedefs

typedef u_quad_t(* ccfntype) (const char *, char **, int)
 

Functions

 __FBSDID ("$BSDSUniX$")
 
static const u_char * __sccl (char *, const u_char *)
 
int sscanf (const char *ibuf, const char *fmt,...)
 
int vsscanf (const char *inp, char const *fmt0, va_list ap)
 

Macro Definition Documentation

#define BUF   32 /* Maximum length of numeric string. */

Definition at line 51 of file subr_scanf.c.

Referenced by vsscanf().

#define CT_CCL   1 /* %[...] conversion */

Definition at line 82 of file subr_scanf.c.

Referenced by vsscanf().

#define CT_CHAR   0 /* %c conversion */

Definition at line 81 of file subr_scanf.c.

Referenced by vsscanf().

#define CT_INT   3 /* integer, i.e., strtoq or strtouq */

Definition at line 84 of file subr_scanf.c.

Referenced by vsscanf().

#define CT_STRING   2 /* %s conversion */

Definition at line 83 of file subr_scanf.c.

Referenced by vsscanf().

#define DPTOK   0x100 /* (float) decimal point is still legal */

Definition at line 72 of file subr_scanf.c.

#define EXPOK   0x200 /* (float) exponent (e+3, etc) still legal */

Definition at line 73 of file subr_scanf.c.

#define LONG   0x01 /* l: long or double */

Definition at line 56 of file subr_scanf.c.

Referenced by vsscanf().

#define NDIGITS   0x80 /* no digits detected */

Definition at line 70 of file subr_scanf.c.

Referenced by vsscanf().

#define NOSKIP   0x20 /* do not skip blanks */

Definition at line 60 of file subr_scanf.c.

Referenced by vsscanf().

#define NZDIGITS   0x200 /* no zero digits detected */

Definition at line 76 of file subr_scanf.c.

Referenced by vsscanf().

#define PFXOK   0x100 /* 0x prefix is (still) legal */

Definition at line 75 of file subr_scanf.c.

Referenced by vsscanf().

#define POINTER   0x10 /* weird %p pointer (`fake hex') */

Definition at line 59 of file subr_scanf.c.

#define QUAD   0x400

Definition at line 61 of file subr_scanf.c.

Referenced by vsscanf().

#define SHORT   0x04 /* h: short */

Definition at line 57 of file subr_scanf.c.

Referenced by vsscanf().

#define SHORTSHORT   0x4000 /** hh: char */

Definition at line 62 of file subr_scanf.c.

Referenced by vsscanf().

#define SIGNOK   0x40 /* +/- is (still) legal */

Definition at line 69 of file subr_scanf.c.

Referenced by vsscanf().

#define SUPPRESS   0x08 /* suppress assignment */

Definition at line 58 of file subr_scanf.c.

Referenced by vsscanf().

Typedef Documentation

typedef u_quad_t(* ccfntype) (const char *, char **, int)

Definition at line 85 of file subr_scanf.c.

Function Documentation

__FBSDID ( "$BSDSUniX$"  )
static const u_char * __sccl ( char *  tab,
const u_char *  fmt 
)
static

Definition at line 557 of file subr_scanf.c.

Referenced by vsscanf().

Here is the caller graph for this function:

int sscanf ( const char *  ibuf,
const char *  fmt,
  ... 
)

Definition at line 90 of file subr_scanf.c.

References vsscanf().

Referenced by cpusetobj_strscan(), parse_uuid(), res_find(), and sys_unmount().

Here is the call graph for this function:

Here is the caller graph for this function:

int vsscanf ( const char *  inp,
char const *  fmt0,
va_list  ap 
)

Definition at line 102 of file subr_scanf.c.

References __sccl(), BUF, buf, CT_CCL, CT_CHAR, CT_INT, CT_STRING, LONG, NDIGITS, NOSKIP, NZDIGITS, PFXOK, QUAD, SHORT, SHORTSHORT, SIGNOK, and SUPPRESS.

Referenced by sscanf(), and vfs_scanopt().

Here is the call graph for this function:

Here is the caller graph for this function: