raising the head after a three-weeks refactoring
[m6w6/ext-psi] / src / token.c
index 5f56e75d8780dc453122cc1ddd26ca1cb3b4596d..01c45f10e0b1932e5a5bbcdf5920c290c0fe6fab 100644 (file)
  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *******************************************************************************/
 
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#else
-# include "php_config.h"
-#endif
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-#include <sys/param.h>
-
-#include "parser_proc.h"
+#include "php_psi_stdinc.h"
+
 #include "token.h"
 #include "parser.h"
 
@@ -54,7 +43,7 @@ struct psi_token *psi_token_alloc(struct psi_parser *P) {
 
        token_typ = P->num;
        token_len = P->cur - P->tok;
-       fname_len = strlen(P->psi.file.fn);
+       fname_len = strlen(P->file.fn);
 
        T = calloc(1, psi_token_alloc_size(token_len, fname_len));
        T->type = token_typ;
@@ -65,7 +54,7 @@ struct psi_token *psi_token_alloc(struct psi_parser *P) {
        T->col = P->col;
 
        memcpy(T->text, P->tok, token_len);
-       memcpy(T->file, P->psi.file.fn, fname_len);
+       memcpy(T->file, P->file.fn, fname_len);
 
        return T;
 }