wok-current rev 21747

tazboot: spare 2k
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Jun 14 17:17:16 2019 +0200 (2019-06-14)
parents 41fed2f82beb
children ef3a79e3c3a4
files linld/stuff/src/CRTL.ASM linld/stuff/src/ISO9660.CPP linld/stuff/src/pipehole.awk
line diff
     1.1 --- a/linld/stuff/src/CRTL.ASM	Fri Jun 14 16:14:44 2019 +0100
     1.2 +++ b/linld/stuff/src/CRTL.ASM	Fri Jun 14 17:17:16 2019 +0200
     1.3 @@ -31,6 +31,27 @@
     1.4  
     1.5          segment _BSS byte public use16 'BSS'
     1.6  
     1.7 +		ifdef EXTRA
     1.8 +;typedef unsigned dirsizetype;
     1.9 +struc		isostate		; struct isostate {
    1.10 +fd		dw	?		; 0	int fd;
    1.11 +filemod		dw	?		; 2	unsigned short filemod;
    1.12 +fileofs		dd	?		; 4	unsigned long fileofs;
    1.13 +filesize	dd	?		; 8	unsigned long filesize;
    1.14 +filename	dw	?		;12	char *filename;
    1.15 +curdirsize	dw	?		;14	dirsizetype curdirsize;
    1.16 +dirsize		dw	?		;16	dirsizetype dirsize;
    1.17 +curdirofs	dd	?		;18	unsigned long curdirofs;
    1.18 +dirofs		dd	?		;22	unsigned long dirofs;
    1.19 +curpos		dw	?		;26	unsigned curpos;
    1.20 +filename2open	dw	?		;28	char *filename2open;
    1.21 +entrysize	dw	?		;30	int entrysize;
    1.22 +tmp		dw	?		;32	const char *tmp;
    1.23 +;buffer		label			;34	char buffer[2048+512];
    1.24 +ends					; } isostate;
    1.25 +		public	_isostate
    1.26 +_isostate	isostate	<?>
    1.27 +		endif
    1.28  _xfer_buf	db	4096	dup (?)
    1.29          global  _no_exit:byte
    1.30  _no_exit	db	?
    1.31 @@ -321,24 +342,6 @@
    1.32          endp    @lseekcur$qii
    1.33  
    1.34  		ifdef EXTRA
    1.35 -
    1.36 -;typedef unsigned dirsizetype;
    1.37 -struc		isostate		; struct isostate {
    1.38 -fd		dw	?		; 0	int fd;
    1.39 -filemod		dw	?		; 2	unsigned short filemod;
    1.40 -fileofs		dd	?		; 4	unsigned long fileofs;
    1.41 -filesize	dd	?		; 8	unsigned long filesize;
    1.42 -filename	dw	?		;12	char *filename;
    1.43 -curdirsize	dw	?		;14	dirsizetype curdirsize;
    1.44 -dirsize		dw	?		;16	dirsizetype dirsize;
    1.45 -curdirofs	dd	?		;18	unsigned long curdirofs;
    1.46 -dirofs		dd	?		;22	unsigned long dirofs;
    1.47 -curpos		dw	?		;26	unsigned curpos;
    1.48 -filename2open	dw	?		;28	char *filename2open;
    1.49 -entrysize	dw	?		;30	int entrysize;
    1.50 -tmp		dw	?		;32	const char *tmp;
    1.51 -buffer		db	2560	dup(?)	;34	char buffer[2048+512];
    1.52 -ends					; } isostate;
    1.53  ;***************************************************************
    1.54  ;_fastcall long isolseek(bx:const unsigned long *offset);
    1.55  ;_fastcall long lseekset2(ax:int fd, bx:unsigned long* whence);
    1.56 @@ -347,7 +350,6 @@
    1.57          proc    @isolseek$qpxul near
    1.58  
    1.59  isolseek:
    1.60 -		extrn	_isostate:isostate
    1.61  		mov	ax,[_isostate.fd]
    1.62  	global	@lseekset2$qipul:near
    1.63  @lseekset2$qipul:
    1.64 @@ -367,7 +369,8 @@
    1.65  		call	isolseek
    1.66  		jc	doret
    1.67  		mov	dx,2560
    1.68 -		mov	bx,offset _isostate.buffer
    1.69 +		;mov	bx,offset _isostate.buffer
    1.70 +		mov	bx,offset _xfer_buf
    1.71  		mov	ax,[_isostate.fd]
    1.72  		jmp	@read$dxbxax		; read(fd,buffer,2560)
    1.73  
     2.1 --- a/linld/stuff/src/ISO9660.CPP	Fri Jun 14 16:14:44 2019 +0100
     2.2 +++ b/linld/stuff/src/ISO9660.CPP	Fri Jun 14 17:17:16 2019 +0200
     2.3 @@ -3,8 +3,6 @@
     2.4  #include "iso9660.h"
     2.5  #define __ROCKRIDGE
     2.6  
     2.7 -struct isostate isostate;
     2.8 -
     2.9  #if 1
    2.10  #define setdirofs(to,sec)	(*(int*)((char*)&(to)+1) = *(int*)&(sec)<<(SECTORBITS-8))
    2.11  #define cpydirofs(to,from)	(*(int*)((char*)&(to)+1) = *(int*)((char*)&(from)+1))
     3.1 --- a/linld/stuff/src/pipehole.awk	Fri Jun 14 16:14:44 2019 +0100
     3.2 +++ b/linld/stuff/src/pipehole.awk	Fri Jun 14 17:17:16 2019 +0200
     3.3 @@ -16,10 +16,9 @@
     3.4  	}
     3.5  	if (/x->curdirsize == 0xFFFF/) isiso=4
     3.6  	if (isiso == 4) { # ISO9660.LST
     3.7 -		if (/DGROUP:_isostate\+14,-1/) {
     3.8 -			sub(/DGROUP:_isostate\+14/,"[si+14]")
     3.9 -			isiso=0
    3.10 -		}
    3.11 +		sub(/DGROUP:_isostate\+14/,"[si+14]")
    3.12 +		sub(/DGROUP:_isostate\+16/,"[si+16]")
    3.13 +		if (/goto restarted/) isiso=0
    3.14  	}
    3.15  	if (/c = \*s;/) isiso=3
    3.16  	if (isiso == 3) { # ISO9660.LST
    3.17 @@ -36,6 +35,7 @@
    3.18  	if (isiso == 2) { # ISO9660.LST
    3.19  		if (/mov	bx,cx/) next
    3.20  		gsub(/cx/,"bx")
    3.21 +		sub(/DGROUP:_isostate\+31/,"[si+31]")
    3.22  	}
    3.23  	if (/const char \*n = name/) isiso=1
    3.24  	if (isiso == 1) { # ISO9660.LST