shithub: lpa

Download patch

ref: a70728e1cc959755252df483ef9c755bf03e5a25
parent: 785a9258b6f284d369b8e018e7f9dccf682a4479
author: Peter Mikkelsen <peter@pmikkelsen.com>
date: Tue Jul 23 16:37:35 EDT 2024

Tweaks to filesystem for LPA values

--- a/fs.c
+++ b/fs.c
@@ -199,6 +199,7 @@
 
 	Symbol *s = symbols->items[n];
 	mkfilestat(d, s->name, s->qsymbol, 0666);
+	d->length = strlen(printval(s->value));
 	return 0;
 }
 
@@ -481,6 +482,7 @@
 		break;
 	case Qlpaobj:
 		mkfilestat(&r->d, symb->name, symb->qsymbol, 0444);
+		r->d.length = strlen(printval(symb->value));
 		break;
 	default:
 		err = Enotyet;
--- a/symtab.c
+++ b/symtab.c
@@ -78,6 +78,7 @@
 {
 	wlock(&s->lock);
 	s->symbols[id]->value = newval;
+	s->symbols[id]->qsymbol.vers++;
 	wunlock(&s->lock);
 }