Back to index

php5  5.3.10
scanf.h
Go to the documentation of this file.
00001 /* 
00002    +----------------------------------------------------------------------+
00003    | PHP Version 5                                                        |
00004    +----------------------------------------------------------------------+
00005    | Copyright (c) 1997-2012 The PHP Group                                |
00006    +----------------------------------------------------------------------+
00007    | This source file is subject to version 3.01 of the PHP license,      |
00008    | that is bundled with this package in the file LICENSE, and is        |
00009    | available through the world-wide-web at the following url:           |
00010    | http://www.php.net/license/3_01.txt                                  |
00011    | If you did not receive a copy of the PHP license and are unable to   |
00012    | obtain it through the world-wide-web, please send a note to          |
00013    | license@php.net so we can mail you a copy immediately.               |
00014    +----------------------------------------------------------------------+
00015    | Author: Clayton Collie <clcollie@mindspring.com>                     |
00016    +----------------------------------------------------------------------+
00017 */
00018 
00019 /* $Id: scanf.h 321634 2012-01-01 13:15:04Z felipe $ */
00020 
00021 #ifndef  SCANF_H
00022 #define  SCANF_H
00023 
00024 
00025 #define SCAN_MAX_ARGS   0xFF    /* Maximum number of variable which can be      */
00026                                 /* passed to (f|s)scanf. This is an artifical   */
00027                                 /* upper limit to keep resources in check and   */
00028                                 /* minimize the possibility of exploits         */
00029 
00030 #define SCAN_SUCCESS               SUCCESS       
00031 #define SCAN_ERROR_EOF                    -1     /* indicates premature termination of scan       */
00032                                                                /* can be caused by bad parameters or format*/
00033                                                                /* string.                                                            */
00034 #define SCAN_ERROR_INVALID_FORMAT         (SCAN_ERROR_EOF - 1)
00035 #define SCAN_ERROR_VAR_PASSED_BYVAL              (SCAN_ERROR_INVALID_FORMAT - 1)
00036 #define SCAN_ERROR_WRONG_PARAM_COUNT      (SCAN_ERROR_VAR_PASSED_BYVAL - 1)
00037 #define SCAN_ERROR_INTERNAL             (SCAN_ERROR_WRONG_PARAM_COUNT - 1)
00038 
00039 
00040 /*  
00041  * The following are here solely for the benefit of the scanf type functions
00042  * e.g. fscanf
00043  */
00044 PHPAPI int ValidateFormat(char *format, int numVars, int *totalVars);
00045 PHPAPI int php_sscanf_internal(char *string,char *format,int argCount,zval ***args,
00046                             int varStart, zval **return_value TSRMLS_DC);
00047 
00048 
00049 #endif /* SCANF_H */