]> git.draconx.ca Git - cdecl99.git/commitdiff
libcdecl: Remove unused YY_INPUT from scanner.
authorNick Bowler <nbowler@draconx.ca>
Sun, 7 Jan 2024 14:54:31 +0000 (09:54 -0500)
committerNick Bowler <nbowler@draconx.ca>
Sun, 7 Jan 2024 21:00:07 +0000 (16:00 -0500)
We only scan strings so the code that uses YY_INPUT is never actually
executed, but it still takes space in the library and creates symbol
references to various file I/O functions that have to be resolved at
runtime.

We can provide a stub YY_INPUT to suppress all of this.

lib/local/modules/dx-nls
src/scan.l

index b150d30a4d8a6c5641cfaae6db576ff23606711a..9a1a6fb6071661b82a4f4750c9c756e82f44c5b9 100644 (file)
@@ -1,5 +1,5 @@
 Description:
-blargh
+Conditionally pull in various gnulib modules for NLS support.
 
 Files:
 
index 48314d4e00df2203cdba59f2aac0ca5c67009307..bd1c5c5b267189f04dd13df3af3366391be5683a 100644 (file)
@@ -1,7 +1,7 @@
 %top{
 /*
  *  Scanner for C declarations.
- *  Copyright © 2011, 2021, 2023 Nick Bowler
+ *  Copyright © 2011, 2021, 2023-2024 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
@@ -20,6 +20,8 @@
 #include <config.h>
 #include "parse.h"
 
+/* Disable various generated code we don't use */
+#define YY_INPUT(a, b, c) do {} while (0)
 #define YY_NO_INPUT 1
 #define YY_NO_UNPUT 1
 }