wok diff linld/stuff/src/ISO9660.CPP @ rev 20538
linld: _fastcall calls
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Nov 28 19:46:10 2018 +0100 (2018-11-28) |
parents | af959ebf1305 |
children | 16d1d23aefee |
line diff
1.1 --- a/linld/stuff/src/ISO9660.CPP Mon Nov 26 09:46:23 2018 +0100 1.2 +++ b/linld/stuff/src/ISO9660.CPP Wed Nov 28 19:46:10 2018 +0100 1.3 @@ -9,9 +9,10 @@ 1.4 { 1.5 static const unsigned long root = 16UL * 2048; 1.6 struct isostate *x=&isostate; 1.7 - if (name) 1.8 + if (name) { 1.9 //x->fd = open(name, O_RDONLY); 1.10 x->fd = open(name); 1.11 + } 1.12 if (isoreadsector(&root) < 0 || strhead(x->buffer+1,"CD001")) { 1.13 //close(x->fd); 1.14 return -1; 1.15 @@ -36,8 +37,8 @@ 1.16 goto restarted; 1.17 } 1.18 if (x->curpos >= SECTORSZ || * (short *) (x->buffer + x->curpos) == 0) { 1.19 + restarted: 1.20 if (x->curdirsize < DIRSECTORSZ) return -1; 1.21 - restarted: 1.22 isoreadsector(&x->curdirofs); 1.23 //x->curdirofs += SECTORSZ; 1.24 *(int *)((char *) &x->curdirofs+1) += SECTORSZ/256; 1.25 @@ -45,8 +46,9 @@ 1.26 x->curpos = 0; 1.27 } 1.28 p = x->buffer; p += x->curpos; 1.29 - if ((size = * (short *) p) == 0) 1.30 + if ((size = * (short *) p) == 0) { 1.31 return -1; 1.32 + } 1.33 x->fileofs = (* (unsigned long *) (p + 2)) << SECTORBITS; 1.34 x->filesize = * (unsigned long *) (p + 10); 1.35 x->filemod = (p[25] & 2) ? 0040755 : 0100755;