]> git.draconx.ca Git - cdecl99.git/blobdiff - src/parse.y
libcdecl: Make cdecl__emit_specs return value usable directly.
[cdecl99.git] / src / parse.y
index bf2a596b1a4a037fee49fe36cd724454e11d8f27..6faf2d2b8b0d6eb4755491a43952b4659ebea9a4 100644 (file)
@@ -1,7 +1,7 @@
 %code top {
 /*
  *  Parser for C declarations.
- *  Copyright © 2011-2012, 2021 Nick Bowler
+ *  Copyright © 2011-2012, 2021, 2023 Nick Bowler
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -34,6 +34,7 @@
 #include "scan.h"
 #include "cdecl.h"
 #include "cdecl-internal.h"
+#include "errmsg.h"
 
 #define FAIL(msg) do { \
        yyerror(&yylloc, NULL, NULL, msg); \
@@ -43,7 +44,7 @@
 #define ALLOC(ptr, size) do { \
        (ptr) = malloc(size); \
        if (!(ptr)) { \
-               cdecl__err(CDECL_ENOMEM); \
+               cdecl__errmsg(CDECL__ENOMEM); \
                YYERROR; \
        } \
 } while (0)