sam/{address.c, sam.h}: bump STRSIZE to 512MB (thanks, Ori_B)

This commit is contained in:
sl 2021-02-19 21:15:15 -05:00
parent bc1cc79225
commit 29e8ea26f2
2 changed files with 7 additions and 4 deletions

View file

@ -143,14 +143,16 @@ matchfile(String *r)
int
filematch(File *f, String *r)
{
char *c, buf[STRSIZE+100];
char *c, *s;
String *t;
c = Strtoc(&f->name);
sprint(buf, "%c%c%c %s\n", " '"[f->mod],
s = smprint("%c%c%c %s\n", " '"[f->mod],
"-+"[f->rasp!=0], " ."[f==curfile], c);
if(s == nil)
error(Etoolong);
free(c);
t = tmpcstr(buf);
t = tmpcstr(s);
Strduplstr(&genstr, t);
freetmpstr(t);
/* A little dirty... */
@ -159,6 +161,7 @@ filematch(File *f, String *r)
bufreset(menu);
bufinsert(menu, 0, genstr.s, genstr.n);
compile(r);
free(s);
return execute(menu, 0, menu->nc);
}

View file

@ -18,7 +18,7 @@
#define INFINITY 0x7FFFFFFFL
#define INCR 25
#define STRSIZE (2*BLOCKSIZE)
#define STRSIZE (512<<20)
typedef long Posn; /* file position or address */
typedef ushort Mod; /* modification number */