MCPcopy Create free account
hub / github.com/apache/httpd / input

Function input

server/util_expr_scan.c:1860–1928  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1858 static int yyinput (yyscan_t yyscanner)
1859#else
1860 static int input (yyscan_t yyscanner)
1861#endif
1862
1863{
1864 int c;
1865 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1866
1867 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1868
1869 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1870 {
1871 /* yy_c_buf_p now points to the character we want to return.
1872 * If this occurs *before* the EOB characters, then it's a
1873 * valid NUL; if not, then we've hit the end of the buffer.
1874 */
1875 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1876 /* This was really a NUL. */
1877 *yyg->yy_c_buf_p = '\0';
1878
1879 else
1880 { /* need more input */
1881 int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
1882 ++yyg->yy_c_buf_p;
1883
1884 switch ( yy_get_next_buffer( yyscanner ) )
1885 {
1886 case EOB_ACT_LAST_MATCH:
1887 /* This happens because yy_g_n_b()
1888 * sees that we've accumulated a
1889 * token and flags that we need to
1890 * try matching the token before
1891 * proceeding. But for input(),
1892 * there's no matching to consider.
1893 * So convert the EOB_ACT_LAST_MATCH
1894 * to EOB_ACT_END_OF_FILE.
1895 */
1896
1897 /* Reset buffer status. */
1898 ap_expr_yyrestart(yyin ,yyscanner);
1899
1900 /*FALLTHROUGH*/
1901
1902 case EOB_ACT_END_OF_FILE:
1903 {
1904 if ( ap_expr_yywrap(yyscanner ) )
1905 return EOF;
1906
1907 if ( ! yyg->yy_did_buffer_switch_on_eof )
1908 YY_NEW_FILE;
1909#ifdef __cplusplus
1910 return yyinput(yyscanner);
1911#else
1912 return input(yyscanner);
1913#endif
1914 }
1915
1916 case EOB_ACT_CONTINUE_SCAN:
1917 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;

Callers

nothing calls this directly

Calls 2

yy_get_next_bufferFunction · 0.85
ap_expr_yyrestartFunction · 0.85

Tested by

no test coverage detected