+#include <stddef.h>
#include <stdio.h>
#include <assert.h>
+#include <errno.h>
+#include <string.h>
#include "parser.h"
#include "parser_proc.h"
{
FILE *fp;
- if (!P) {
- P = malloc(sizeof(*P));
- }
- memset(P, 0, sizeof(*P));
-
fp = fopen(filename, "r");
if (!fp) {
- perror(filename);
+ error(NULL, PSI_WARNING, "Could not open '%s' for reading: %s",
+ filename, strerror(errno));
return NULL;
}