summary refs log tree commit diff
path: root/src/input.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/input.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/input.c b/src/input.c
index 1e198e9..e57ad76 100644
--- a/src/input.c
+++ b/src/input.c
@@ -53,6 +53,7 @@
 #include "alias.h"
 #include "parser.h"
 #include "main.h"
+#include "var.h"
 #ifndef SMALL
 #include "myhistedit.h"
 #endif
@@ -528,3 +529,12 @@ closescript(void)
 		parsefile->fd = 0;
 	}
 }
+
+
+int lineno_inc(void)
+{
+	int lineno = plinno++;
+
+	setvarint("LINENO", lineno, 0);
+	return lineno;
+}