bc: Begin line count in 1 - sbase - suckless unix tools
(HTM) git clone git://git.suckless.org/sbase
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit f0438f7a70b1df3b2ac642af5312b138e9899681
(DIR) parent d0750d57c5478e579d91f7a44bd0a9456a0a29e9
(HTM) Author: Roberto E. Vargas Caballero <k0ga@shike2.net>
Date: Sun, 23 Nov 2025 17:09:14 +0100
bc: Begin line count in 1
Diffstat:
M bc.y | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
(DIR) diff --git a/bc.y b/bc.y
@@ -690,7 +690,8 @@ run(void)
static void
bc(char *fname)
{
- nested = lineno = 0;
+ lineno = 1;
+ nested = 0;
if (fname) {
filename = fname;