9front - general discussion about 9front
 help / color / mirror / Atom feed
From: cinap_lenrek@felloff.net
To: 9front@9front.org
Subject: Re: [9front] rc: null list in concatenation line numbers
Date: Mon, 26 Oct 2020 00:18:12 +0100	[thread overview]
Message-ID: <41990F43512FF80F5598EE88078499ED@felloff.net> (raw)
In-Reply-To: <37CF109B904B5F178848E0FADF7E5CAF@eigenstate.org>

+		if(f|l != 0){
+			emitf(Xloc);
+			emiti(f|l);
+		}

you need parentesis there around: f|l

+		/*
+		 * These are small enough that with a ton of sourcing,
+		 * overflow is a realistic risk. If we run out of files,
+		 * set to file 0, which is always '???'
+		 */
+		f = (t->file > LFMAX) ? 0 : t->file << LSHIFT;
+		l = (t->line > LMASK) ? -1 : t->line;

setting line to -1 also implicitely makes the file all ones...

+	if(i == nlexpath){
+		if(nlexpath < LFMAX){
+			lexpath = erealloc(lexpath, (nlexpath + 1)*sizeof(char*));
+			lexpath[nlexpath] = estrdup(zero);
+			lexfile = nlexpath++;
+		}else
+			lexfile = 0;
+	}

might want to use doubling the size for each realloc...

also wonder if the file can even change in the tree...
the file would only change when we source a file, no?

so i wonder if we need to keep track of the file in
the tree at all, and not just update it at runtime
in the thread.

--
cinap


  reply	other threads:[~2020-10-25 23:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-16  1:40 ori
2020-10-16  3:43 ` [9front] " Xiao-Yong Jin
2020-10-17  1:47   ` ori
2020-10-16  5:40 ` Iruatã Souza
2020-10-22  1:18 ` ori
2020-10-22 12:11   ` tlaronde
2020-10-25 20:29   ` ori
2020-10-25 23:18     ` cinap_lenrek [this message]
2020-10-26  1:00       ` ori
2020-10-25 23:41     ` cinap_lenrek
2020-10-26  1:33       ` ori
2020-10-26  7:36         ` cinap_lenrek
2020-10-28  3:16           ` ori
2020-10-28  9:50             ` cinap_lenrek
2020-10-28 17:59               ` ori
2020-10-31  1:55               ` ori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41990F43512FF80F5598EE88078499ED@felloff.net \
    --to=cinap_lenrek@felloff.net \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).