return FAILURE;
}
file_handle->filename = script_file;
- /* #!php support */
- c = fgetc(file_handle->handle.fp);
- if (c == '#') {
- while (c != '\n' && c != '\r') {
- c = fgetc(file_handle->handle.fp); /* skip to end of line */
- }
- /* handle situations where line is terminated by \r\n */
- if (c == '\r') {
- if (fgetc(file_handle->handle.fp) != '\n') {
- long pos = ftell(file_handle->handle.fp);
- fseek(file_handle->handle.fp, pos - 1, SEEK_SET);
- }
- }
- *lineno = 2;
- } else {
- rewind(file_handle->handle.fp);
- }
return SUCCESS;
}
/* }}} */