wok diff linld/stuff/src/ISO9660.CPP @ rev 21735

vlgothic-fonts: use archive.org as web_site
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Jun 13 15:52:10 2019 +0200 (2019-06-13)
parents 861efbf7a5de
children f9e283da869a
line diff
     1.1 --- a/linld/stuff/src/ISO9660.CPP	Wed Jun 12 18:55:55 2019 +0200
     1.2 +++ b/linld/stuff/src/ISO9660.CPP	Thu Jun 13 15:52:10 2019 +0200
     1.3 @@ -28,7 +28,6 @@
     1.4  
     1.5  int isoreaddir(void)
     1.6  {
     1.7 -	int size;
     1.8  	char *p;
     1.9  #ifdef __ROCKRIDGE
    1.10  	char *endname;
    1.11 @@ -50,7 +49,7 @@
    1.12  		x->curpos = 0;
    1.13  	}
    1.14  	p = x->buffer; p += x->curpos;
    1.15 -	if ((size = * (short *) p) == 0) {
    1.16 +	if ((x->entrysize = * (short *) p) == 0) {
    1.17  		return -1;
    1.18  	}
    1.19  	x->fileofs = (* (unsigned long *) (p + 2)) << SECTORBITS;
    1.20 @@ -77,7 +76,7 @@
    1.21  			endname = p + len;
    1.22  		}
    1.23  		p += len;
    1.24 -	} while (x->buffer + x->curpos + size - 2 > p);
    1.25 +	} while (x->buffer + x->curpos + x->entrysize - 2 > p);
    1.26  	if (endname)
    1.27  		*endname = 0;
    1.28  	else
    1.29 @@ -99,7 +98,7 @@
    1.30  			*p = 0;
    1.31  		}
    1.32  	}
    1.33 -	x->curpos += size;
    1.34 +	x->curpos += x->entrysize;
    1.35  	return 0;
    1.36  }
    1.37  
    1.38 @@ -109,10 +108,15 @@
    1.39  #define IS_DIR(x)( (*((char*) &x + 1) & (char)0676) == (char)0)
    1.40  int _isoopen(void)
    1.41  {
    1.42 -	char *name, *s, c;
    1.43 -	char _64bits = cpuhaslm();
    1.44 +//	char *name, *s, c;
    1.45 +//	char _64bits = cpuhaslm();
    1.46  	struct isostate *x=&isostate;
    1.47 +#define name (x->filename2open)
    1.48 +#define c (((char *)&x->entrysize)[0])
    1.49 +#define _64bits (((char *)&x->entrysize)[1])
    1.50 +	char *s;
    1.51  
    1.52 +	_64bits = cpuhaslm();
    1.53      do {
    1.54  	for (s = (char *) x->filename2open; *s == '/' ; s++) {
    1.55  		isoroot();
    1.56 @@ -123,7 +127,9 @@
    1.57  	c = *s;
    1.58  	*s = 0;
    1.59  	for (x->curdirsize = 0xFFFF; isoreaddir() != -1;) {
    1.60 -		const char *n = name, *i = x->filename;
    1.61 +		const char *n = name;
    1.62 +#define i (x->tmp)
    1.63 +		i = x->filename;
    1.64  		if (_64bits) {
    1.65  			if (strhead(i, n) == -1) continue;
    1.66  			n = "64";