+ yyin = fopen(inc_file, "r");
+ }
+ }
+
+ }
+ else
+ {
+ for (ip = include_paths; yyin == NULL && ip != NULL; ip = ip->next)
+ {
+ if (strlen(ip->path) + strlen(yytext) + 3 > MAXPGPATH)
+ {
+ fprintf(stderr, "Error: Path %s/%s is too long in line %d, skipping.\n", ip->path, yytext, yylineno);
+ continue;
+ }
+ snprintf (inc_file, sizeof(inc_file), "%s/%s", ip->path, yytext);
+ yyin = fopen(inc_file, "r");
+ if (!yyin)
+ {
+ if (strcmp(inc_file + strlen(inc_file) - 2, ".h"))
+ {
+ strcat(inc_file, ".h");
+ yyin = fopen( inc_file, "r" );
+ }