You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(208) |
Jun
(43) |
Jul
|
Aug
(2) |
Sep
(17) |
Oct
|
Nov
(4) |
Dec
(9) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
|
Feb
(11) |
Mar
(3) |
Apr
(2) |
May
|
Jun
(3) |
Jul
(29) |
Aug
(29) |
Sep
(48) |
Oct
|
Nov
|
Dec
(5) |
| 2004 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2005 |
Jan
(12) |
Feb
(1) |
Mar
(1) |
Apr
|
May
(1) |
Jun
(2) |
Jul
|
Aug
|
Sep
(4) |
Oct
(3) |
Nov
(1) |
Dec
(2) |
| 2006 |
Jan
(1) |
Feb
(2) |
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
(2) |
Oct
(21) |
Nov
(25) |
Dec
(16) |
| 2007 |
Jan
(26) |
Feb
(26) |
Mar
(18) |
Apr
(51) |
May
(45) |
Jun
(26) |
Jul
(6) |
Aug
(85) |
Sep
(161) |
Oct
(111) |
Nov
(83) |
Dec
(18) |
| 2008 |
Jan
(31) |
Feb
(27) |
Mar
|
Apr
(16) |
May
(142) |
Jun
(136) |
Jul
(51) |
Aug
(21) |
Sep
(47) |
Oct
(428) |
Nov
(19) |
Dec
(6) |
| 2009 |
Jan
(11) |
Feb
(37) |
Mar
(17) |
Apr
(15) |
May
(13) |
Jun
(61) |
Jul
(127) |
Aug
(15) |
Sep
(22) |
Oct
(28) |
Nov
(37) |
Dec
(10) |
| 2010 |
Jan
(18) |
Feb
(22) |
Mar
(10) |
Apr
(41) |
May
|
Jun
(48) |
Jul
(61) |
Aug
(54) |
Sep
(34) |
Oct
(15) |
Nov
(49) |
Dec
(11) |
| 2011 |
Jan
|
Feb
(24) |
Mar
(10) |
Apr
(9) |
May
|
Jun
(33) |
Jul
(41) |
Aug
(20) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
(86) |
Mar
(12) |
Apr
|
May
(10) |
Jun
|
Jul
(9) |
Aug
(4) |
Sep
(11) |
Oct
(3) |
Nov
(3) |
Dec
(10) |
| 2013 |
Jan
(1) |
Feb
(23) |
Mar
(15) |
Apr
(7) |
May
(20) |
Jun
(3) |
Jul
(15) |
Aug
|
Sep
(29) |
Oct
(16) |
Nov
(69) |
Dec
(18) |
| 2014 |
Jan
|
Feb
(8) |
Mar
|
Apr
|
May
(16) |
Jun
(7) |
Jul
|
Aug
(5) |
Sep
(2) |
Oct
(4) |
Nov
(25) |
Dec
(8) |
| 2015 |
Jan
(6) |
Feb
(6) |
Mar
|
Apr
(1) |
May
(2) |
Jun
(1) |
Jul
(7) |
Aug
|
Sep
(2) |
Oct
(1) |
Nov
(6) |
Dec
|
| 2016 |
Jan
(12) |
Feb
(97) |
Mar
(57) |
Apr
(52) |
May
(33) |
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
(3) |
Nov
(3) |
Dec
|
| 2017 |
Jan
(4) |
Feb
|
Mar
(23) |
Apr
(5) |
May
|
Jun
(2) |
Jul
(3) |
Aug
(2) |
Sep
|
Oct
(6) |
Nov
(3) |
Dec
(3) |
| 2018 |
Jan
(4) |
Feb
(11) |
Mar
|
Apr
(1) |
May
(3) |
Jun
(6) |
Jul
|
Aug
(5) |
Sep
(5) |
Oct
(36) |
Nov
(128) |
Dec
(18) |
| 2019 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(24) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <deb...@us...> - 2002-05-09 21:23:58
|
Update of /cvsroot/nasm/nasm/doc
In directory usw-pr-cvs1:/tmp/cvs-serv31884/nasm/doc
Modified Files:
nasmdoc.src
Log Message:
Index: nasmdoc.src
===================================================================
RCS file: /cvsroot/nasm/nasm/doc/nasmdoc.src,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- nasmdoc.src 6 May 2002 22:04:10 -0000 1.27
+++ nasmdoc.src 9 May 2002 21:23:55 -0000 1.28
@@ -253,38 +253,38 @@
If you want to report a bug, please read \k{bugs} first.
NASM has a \i{WWW page} at
-\W{http://www.web-sites.co.uk/nasm}\c{http://www.web-sites.co.uk/nasm}.
+\W{http://www.web-sites.co.uk/nasm}\c{http://www.web-sites.co.uk/nasm},
+and another, with additional information, at
+\W{http://nasm.2y.net/}\c{http://nasm.2y.net/}
The original authors are \i{e\-mail}able as
\W{mailto:ju...@ds...}\c{ju...@ds...} and
\W{mailto:an...@po...}\c{an...@po...}.
The latter is no longer involved in the development team.
-\i{New releases} of NASM are uploaded to the official site
-\W{http://www.web-sites.co.uk/nasm}\c{http://www.web-sites.co.uk/nasm},
+\i{New releases} of NASM are uploaded to the official sites
+\W{http://www.web-sites.co.uk/nasm}\c{http://www.web-sites.co.uk/nasm}
and to
\W{ftp://ftp.kernel.org/pub/software/devel/nasm/}\i\c{ftp.kernel.org}
and
\W{ftp://ibiblio.org/pub/Linux/devel/lang/assemblers/}\i\c{ibiblio.org}.
-\# \W{ftp://ftp.simtel.net/pub/simtelnet/msdos/asmutl/}\i\c{ftp.simtel.net}
-\# and
-\# \W{ftp://ftp.coast.net/coast/msdos/asmutil/}\i\c{ftp.coast.net}.
Announcements are posted to
\W{news:comp.lang.asm.x86}\i\c{comp.lang.asm.x86},
\W{news:alt.lang.asm}\i\c{alt.lang.asm} and
\W{news:comp.os.linux.announce}\i\c{comp.os.linux.announce}
-\# and
-\# \W{news:comp.archives.msdos.announce}\i\c{comp.archives.msdos.announce}
-\# (the last one is done automagically by uploading to
-\# \W{ftp://ftp.simtel.net/pub/simtelnet/msdos/asmutl/}\c{ftp.simtel.net}).
If you want information about NASM beta releases, and the current
-development status, please subscribe to the \i\c{nasm-devel} email lists
+development status, please subscribe to the \i\c{nasm-devel} email list
by registering at
-\W{http://groups.yahoo.com/group/nasm-devel}\c{http://groups.yahoo.com/group/nasm-devel}
-and
+\W{http://groups.yahoo.com/group/nasm-devel}\c{http://groups.yahoo.com/group/nasm-devel},
\W{http://www.pairlist.net/mailman/listinfo/nasm-devel}\c{http://www.pairlist.net/mailman/listinfo/nasm-devel}
+and
+\W{http://sourceforge.net/projects/nasm}\c{http://sourceforge.net/projects/nasm}.
+
+The preferred list is the list at Sourceforge, which is also the home to
+the latest nasm source code and releases. The other lists are open, but
+may not continue to be supported in the long term.
\H{install} Installation
@@ -784,9 +784,9 @@
value \c{!-s!-ic:\\nasmlib} is equivalent to setting it to \c{-s
-ic:\\nasmlib}, but \c{!-dNAME="my name"} will work.
-This variable was called \c{NASM} in earlier versions of NASM,
-however, this caused problems with makefiles which used a \c{$(NASM)}
-variable.
+This environment variable was previously called \c{NASM}. This was
+changed with version 0.98.31.
+
\H{qstart} \i{Quick Start} for \i{MASM} Users
@@ -1676,14 +1676,52 @@
the NASM command line: see \k{opt-d}.
+\S{concat%+} Concatenating Single Line Macro Tokens: \i\c{%+}
+
+Individual tokens in single line macros can be concatenated, to produce
+longer tokens for later processing. This can be useful if there are
+several similar macros that perform simlar functions.
+
+As an example, consider the following:
+
+\c %define BDASTART 400h ; Start of BIOS data area
+
+\c struc tBIOSDA ; its structure
+\c .COM1addr RESW 1
+\c .COM2addr RESW 1
+\c ; ..and so on
+\c endstruc
+
+Now, if we need to access the elements of tBIOSDA in different places,
+we can end up with:
+
+\c mov ax,BDASTART + tBIOSDA.COM1addr
+\c mov bx,BDASTART + tBIOSDA.COM2addr
+
+This will become pretty ugly (and tedious) if used in many places, and
+can be reduced in size significantly by using the following macro:
+
+\c ; Macro to access BIOS variables by their names (from tBDA):
+
+\c %define BDA(x) BDASTART + tBIOSDA. %+ x
+
+Now the above code can be written as:
+
+\c mov ax,BDA(COM1addr)
+\c mov bx,BDA(COM2addr)
+
+Using this feature, we can simplify references to a lot of macros (and,
+in turn, reduce typing errors).
+
+
\S{undef} Undefining macros: \i\c{%undef}
Single-line macros can be removed with the \c{%undef} command. For
example, the following sequence:
\c %define foo bar
-\c %undef foo
-\c mov eax, foo
+\c %undef foo
+\c mov eax, foo
will expand to the instruction \c{mov eax, foo}, since after
\c{%undef} the macro \c{foo} is no longer defined.
@@ -1776,8 +1814,8 @@
\c %macro prologue 1
\c push ebp
-\c mov ebp,esp
-\c sub esp,%1
+\c mov ebp,esp
+\c sub esp,%1
\c %endmacro
This defines a C-like function prologue as a macro: so you would
@@ -1788,8 +1826,8 @@
which would expand to the three lines of code
\c myfunc: push ebp
-\c mov ebp,esp
-\c sub esp,12
+\c mov ebp,esp
+\c sub esp,12
The number \c{1} after the macro name in the \c{%macro} line defines
the number of parameters the macro \c{prologue} expects to receive.
@@ -5631,8 +5669,9 @@
bugs. That doesn't usually stop there being plenty we didn't know
about, though. Any that you find should be reported firstly via the
\i\c{bugtracker} at
-\W{http://nasm.2y.net/bugtracker/}\c{http://nasm.2y.net/bugtracker/},
-or if that fails then through one of the contacts in \k{contact}
+\W{https://sourceforge.net/projects/nasm/}\c{https://sourceforge.net/projects/nasm/}
+(click on "Bugs"), or if that fails then through one of the
+contacts in \k{contact}.
Please read \k{qstart} first, and don't report the bug if it's
listed in there as a deliberate feature. (If you think the feature
@@ -5909,7 +5948,7 @@
one anyway. You have been warned.
-\A{iref} Intel x86 Instruction Reference
+\A{iref} x86 Instruction Reference
This appendix provides a complete list of the machine instructions
which NASM will assemble, and a short description of the function of
@@ -5918,7 +5957,7 @@
It is not intended to be exhaustive documentation on the fine
details of the instructions' function, such as which exceptions they
can trigger: for such documentation, you should go to Intel's Web
-site, \W{http://www.intel.com/}\c{http://www.intel.com/}.
+site, \W{http://developer.intel.com/design/Pentium4/manuals/}\c{http://developer.intel.com/design/Pentium4/manuals/}.
Instead, this appendix is intended primarily to provide
documentation on the way the instructions may be used within NASM.
@@ -12065,13 +12104,13 @@
\b The \c{EIP} register is copied into the \c{ECX} register.
-\b Bits [310] of the 64-bit SYSCALL/SYSRET Target Address Register
+\b Bits [31-0] of the 64-bit SYSCALL/SYSRET Target Address Register
(\c{STAR}) are copied into the \c{EIP} register.
-\b Bits [4732] of the \c{STAR} register specify the selector that is
+\b Bits [47-32] of the \c{STAR} register specify the selector that is
copied into the \c{CS} register.
-\b Bits [4732]+1000b of the \c{STAR} register specify the selector that
+\b Bits [47-32]+1000b of the \c{STAR} register specify the selector that
is copied into the SS register.
The \c{CS} and \c{SS} registers should not be modified by the operating
@@ -12126,7 +12165,7 @@
\c{CS} or \c{(E)IP}. If you need to return to the calling code, you
need to write your code to cater for this.
-For more information, see the Intel Architecture Software Developers
+For more information, see the Intel Architecture Software Developer's
Manual, Volume 2.
@@ -12184,14 +12223,14 @@
after the corresponding \c{SYSCALL} instruction, is copied into the \c{EIP}
register.
-\b Bits [6348] of the \c{STAR} register specify the selector that is copied
+\b Bits [63-48] of the \c{STAR} register specify the selector that is copied
into the \c{CS} register.
-\b Bits [6348]+1000b of the \c{STAR} register specify the selector that is
+\b Bits [63-48]+1000b of the \c{STAR} register specify the selector that is
copied into the \c{SS} register.
-\b Bits [10] of the \c{SS} register are set to 11b (RPL of 3) regardless of
-the value of bits [4948] of the \c{STAR} register.
+\b Bits [1-0] of the \c{SS} register are set to 11b (RPL of 3) regardless of
+the value of bits [49-48] of the \c{STAR} register.
The \c{CS} and \c{SS} registers should not be modified by the operating
system between the execution of the \c{SYSCALL} instruction and its
|
|
From: <deb...@us...> - 2002-05-09 21:23:57
|
Update of /cvsroot/nasm/nasm In directory usw-pr-cvs1:/tmp/cvs-serv31884/nasm Modified Files: insns.dat Log Message: Index: insns.dat =================================================================== RCS file: /cvsroot/nasm/nasm/insns.dat,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- insns.dat 9 May 2002 20:55:50 -0000 1.34 +++ insns.dat 9 May 2002 21:23:55 -0000 1.35 @@ -139,9 +139,9 @@ CALL imm16 \320\1\xE8\64 8086 CALL imm16|near \320\1\xE8\64 8086 CALL imm16|far \320\1\x9A\34\37 8086,ND -CALL imm32 \321\1\xE8\64 8086 -CALL imm32|near \321\1\xE8\64 8086 -CALL imm32|far \321\1\x9A\34\37 8086,ND +CALL imm32 \321\1\xE8\64 386 +CALL imm32|near \321\1\xE8\64 386 +CALL imm32|far \321\1\x9A\34\37 386,ND CALL imm:imm \322\1\x9A\35\30 8086 CALL imm16:imm \320\1\x9A\31\30 8086 CALL imm:imm16 \320\1\x9A\31\30 8086 |
|
From: <hp...@us...> - 2002-05-09 20:55:53
|
Update of /cvsroot/nasm/nasm In directory usw-pr-cvs1:/tmp/cvs-serv24735 Modified Files: insns.dat Log Message: Processor level fixes from John Coffman Index: insns.dat =================================================================== RCS file: /cvsroot/nasm/nasm/insns.dat,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- insns.dat 30 Apr 2002 21:09:13 -0000 1.33 +++ insns.dat 9 May 2002 20:55:50 -0000 1.34 @@ -486,9 +486,9 @@ JMP imm16 \320\1\xE9\64 8086 JMP imm16|near \320\1\xE9\64 8086,ND JMP imm16|far \320\1\xEA\34\37 8086,ND -JMP imm32 \321\1\xE9\64 8086 -JMP imm32|near \321\1\xE9\64 8086,ND -JMP imm32|far \321\1\xEA\34\37 8086,ND +JMP imm32 \321\1\xE9\64 386 +JMP imm32|near \321\1\xE9\64 386,ND +JMP imm32|far \321\1\xEA\34\37 386,ND JMP imm:imm \322\1\xEA\35\30 8086 JMP imm16:imm \320\1\xEA\31\30 8086 JMP imm:imm16 \320\1\xEA\31\30 8086 @@ -508,15 +508,15 @@ LAHF void \1\x9F 8086 LAR reg16,mem \320\301\2\x0F\x02\110 286,PROT,SM LAR reg16,reg16 \320\301\2\x0F\x02\110 286,PROT -LAR reg32,mem \321\301\2\x0F\x02\110 286,PROT,SM -LAR reg32,reg32 \321\301\2\x0F\x02\110 286,PROT +LAR reg32,mem \321\301\2\x0F\x02\110 386,PROT,SM +LAR reg32,reg32 \321\301\2\x0F\x02\110 386,PROT LDS reg16,mem \320\301\1\xC5\110 8086 -LDS reg32,mem \321\301\1\xC5\110 8086 +LDS reg32,mem \321\301\1\xC5\110 386 LEA reg16,mem \320\301\1\x8D\110 8086 -LEA reg32,mem \321\301\1\x8D\110 8086 +LEA reg32,mem \321\301\1\x8D\110 386 LEAVE void \1\xC9 186 LES reg16,mem \320\301\1\xC4\110 8086 -LES reg32,mem \321\301\1\xC4\110 8086 +LES reg32,mem \321\301\1\xC4\110 386 LFS reg16,mem \320\301\2\x0F\xB4\110 386 LFS reg32,mem \321\301\2\x0F\xB4\110 386 LGDT mem \300\2\x0F\x01\202 286,PRIV @@ -551,8 +551,8 @@ LOOPZ imm,reg_ecx \311\1\xE1\50 386 LSL reg16,mem \320\301\2\x0F\x03\110 286,PROT,SM LSL reg16,reg16 \320\301\2\x0F\x03\110 286,PROT -LSL reg32,mem \321\301\2\x0F\x03\110 286,PROT,SM -LSL reg32,reg32 \321\301\2\x0F\x03\110 286,PROT +LSL reg32,mem \321\301\2\x0F\x03\110 386,PROT,SM +LSL reg32,reg32 \321\301\2\x0F\x03\110 386,PROT LSS reg16,mem \320\301\2\x0F\xB2\110 386 LSS reg32,mem \321\301\2\x0F\xB2\110 386 LTR mem \300\1\x0F\17\203 286,PROT,PRIV @@ -564,14 +564,14 @@ MOV reg16,reg_cs \320\300\1\x8C\201 8086 MOV reg16,reg_dess \320\300\1\x8C\101 8086 MOV reg16,reg_fsgs \320\300\1\x8C\101 386 -MOV reg32,reg_cs \321\300\1\x8C\201 8086 -MOV reg32,reg_dess \321\300\1\x8C\101 8086 +MOV reg32,reg_cs \321\300\1\x8C\201 386 +MOV reg32,reg_dess \321\300\1\x8C\101 386 MOV reg32,reg_fsgs \321\300\1\x8C\101 386 MOV reg_dess,mem \301\1\x8E\110 8086,SM MOV reg_fsgs,mem \301\1\x8E\110 386,SM MOV reg_dess,reg16 \301\1\x8E\110 8086 MOV reg_fsgs,reg16 \301\1\x8E\110 386 -MOV reg_dess,reg32 \301\1\x8E\110 8086 +MOV reg_dess,reg32 \301\1\x8E\110 386 MOV reg_fsgs,reg32 \301\1\x8E\110 386 MOV reg_al,mem_offs \301\1\xA0\35 8086,SM MOV reg_ax,mem_offs \301\320\1\xA1\35 8086,SM @@ -777,9 +777,9 @@ POPA void \322\1\x61 186 POPAD void \321\1\x61 386 POPAW void \320\1\x61 186 -POPF void \322\1\x9D 186 +POPF void \322\1\x9D 8086 POPFD void \321\1\x9D 386 -POPFW void \320\1\x9D 186 +POPFW void \320\1\x9D 8086 POR mmxreg,mem \301\2\x0F\xEB\110 PENT,MMX,SM POR mmxreg,mmxreg \2\x0F\xEB\110 PENT,MMX PREFETCH mem \2\x0F\x0D\200 PENT,3DNOW,SM @@ -850,9 +850,9 @@ PUSHA void \322\1\x60 186 PUSHAD void \321\1\x60 386 PUSHAW void \320\1\x60 186 -PUSHF void \322\1\x9C 186 +PUSHF void \322\1\x9C 8086 PUSHFD void \321\1\x9C 386 -PUSHFW void \320\1\x9C 186 +PUSHFW void \320\1\x9C 8086 PXOR mmxreg,mem \301\2\x0F\xEF\110 PENT,MMX,SM PXOR mmxreg,mmxreg \2\x0F\xEF\110 PENT,MMX RCL rm8,unity \300\1\xD0\202 8086 |
|
From: <hp...@us...> - 2002-05-09 05:35:26
|
Update of /cvsroot/nasm/nasm/output
In directory usw-pr-cvs1:/tmp/cvs-serv18777
Modified Files:
outobj.c
Log Message:
Fix from John Coffman to 16-bit OBJ format output.
Index: outobj.c
===================================================================
RCS file: /cvsroot/nasm/nasm/output/outobj.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- outobj.c 30 Apr 2002 21:09:18 -0000 1.1
+++ outobj.c 9 May 2002 05:35:23 -0000 1.2
@@ -76,7 +76,7 @@
* next operation.
*/
-#define RECORD_MAX 1024-3 /* maximal size of any record except type+reclen */
+#define RECORD_MAX (1024-3) /* maximal size of any record except type+reclen */
#define OBJ_PARMS 3 /* maximum .parm used by any .ori routine */
#define FIX_08_LOW 0x8000 /* location type for various fixup subrecords */
@@ -133,7 +133,7 @@
ObjRecord **up; /* Master pointer to this ObjRecord */
ObjRecord *back; /* Previous part of this record */
unsigned long parm[OBJ_PARMS]; /* Parameters for ori routine */
- unsigned char buf[RECORD_MAX];
+ unsigned char buf[RECORD_MAX+3];
};
static void obj_fwrite(ObjRecord *orp);
@@ -843,7 +843,19 @@
ext->name = name;
/* Place by default all externs into the current segment */
ext->defwrt_type = DEFWRT_NONE;
+
+/* 28-Apr-2002 - John Coffman
+ The following code was introduced on 12-Aug-2000, and breaks fixups
+ on code passed thru the MSC 5.1 linker (3.66) and MSC 6.00A linker
+ (5.10). It was introduced after FIXUP32 was added, and may be needed
+ for 32-bit segments. The following will get 16-bit segments working
+ again, and maybe someone can correct the 'if' condition which is
+ actually needed.
+*/
+#if 0
if (current_seg) {
+#else
+ if (current_seg && current_seg->use32) {
if (current_seg->grp) {
ext->defwrt_type = DEFWRT_GROUP;
ext->defwrt_ptr.grp = current_seg->grp;
@@ -852,6 +864,8 @@
ext->defwrt_ptr.seg = current_seg;
}
}
+#endif
+
if (is_global == 2) {
ext->commonsize = offset;
ext->commonelem = 1; /* default FAR */
|
|
From: <hp...@us...> - 2002-05-07 05:50:17
|
Update of /cvsroot/nasm/nasm/doc
In directory usw-pr-cvs1:/tmp/cvs-serv23094
Modified Files:
rdsrc.pl
Log Message:
Fix the positioning of the page number in the table of contents
Index: rdsrc.pl
===================================================================
RCS file: /cvsroot/nasm/nasm/doc/rdsrc.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- rdsrc.pl 4 May 2002 14:16:20 -0000 1.4
+++ rdsrc.pl 7 May 2002 05:50:14 -0000 1.5
@@ -959,6 +959,9 @@
$lnamei = "idx" . $lname;
@lnames = @ltypes = ();
+ $linewidth = 468; # ADJUSTABLE: width of a normal text line
+ $bulletadj = 12; # ADJUSTABLE: space for a bullet
+
for ($para = 0; $para <= $#pnames; $para++) {
$pname = $pnames[$para];
$pflags = $pflags[$para];
@@ -1033,13 +1036,13 @@
# 75-char right margin and either 7 or 11 char left margin
# depending on bullets.
if ($ptype eq "bull") {
- $width = 456; # leave 12-pt left indent for the bullet
+ $width = $linewidth - $bulletadj;
$type = $begtype = "bbeg";
$bodytype = "bbdy";
$onetype = "bone";
$endtype = "bend";
} else {
- $width = 468;
+ $width = $linewidth;
$type = $begtype = "nbeg";
$bodytype = "nbdy";
$onetype = "none";
@@ -1457,7 +1460,7 @@
i yy moveto (.) linkshow
} if
} for
- ss linkshow
+ ex yy moveto ss linkshow
linkend
} def
/just { /w exch def /y exch def /a exch def
|
|
From: <hp...@us...> - 2002-05-07 04:31:32
|
Update of /cvsroot/nasm/nasm/test In directory usw-pr-cvs1:/tmp/cvs-serv6529 Added Files: ifmacro.asm Log Message: Tests for the %ifmacro directives --- NEW FILE: ifmacro.asm --- ; ; ifmacro.asm ; ; Test of the new ifmacro directive ; ; This file produces a human-readable text file when compiled ; with -f bin ; %define LF 10 %macro dummy 2 db 'This is a dummy macro, ' db 'arg1 = ', %1, ', ' db 'arg2 = ', %2, LF %endmacro dummy 'this', 'that' %ifdef CR db '%ifdef CR', LF %endif %ifdef LF db '%ifdef LF', LF %endif %ifmacro dummy 1 db '%ifmacro dummy 1', LF %endif %ifmacro dummy 2 db '%ifmacro dummy 2', LF %endif %ifmacro dummy 3 db '%ifmacro dummy 3', LF %endif %ifmacro dummy 1+ db '%ifmacro dummy 1+', LF %endif %ifmacro dummy 2+ db '%ifmacro dummy 2+', LF %endif %ifmacro dummy 3+ db '%ifmacro dummy 3+', LF %endif %ifmacro dummy db '%ifmacro dummy', LF %endif %ifmacro dummy 0-1 db '%ifmacro dummy 0-1', LF %endif %ifmacro dummy 1-2 db '%ifmacro dummy 1-2', LF %endif %ifmacro dummy 2-3 db '%ifmacro dummy 2-3', LF %endif %ifmacro dummy 3-4 db '%ifmacro dummy 3-4', LF %endif %ifmacro LF db '%ifmacro LF', LF %endif %ifndef CR db '%ifndef CR', LF %endif %ifndef LF db '%ifndef LF', LF %endif %ifnmacro dummy 1 db '%ifnmacro dummy 1', LF %endif %ifnmacro dummy 2 db '%ifnmacro dummy 2', LF %endif %ifnmacro dummy 3 db '%ifnmacro dummy 3', LF %endif %ifnmacro dummy 1+ db '%ifnmacro dummy 1+', LF %endif %ifnmacro dummy 2+ db '%ifnmacro dummy 2+', LF %endif %ifnmacro dummy 3+ db '%ifnmacro dummy 3+', LF %endif %ifnmacro dummy db '%ifnmacro dummy', LF %endif %ifnmacro dummy 0-1 db '%ifnmacro dummy 0-1', LF %endif %ifnmacro dummy 1-2 db '%ifnmacro dummy 1-2', LF %endif %ifnmacro dummy 2-3 db '%ifnmacro dummy 2-3', LF %endif %ifnmacro dummy 3-4 db '%ifnmacro dummy 3-4', LF %endif %ifnmacro LF db '%ifnmacro LF', LF %endif %if 0 %elifdef CR db '%elifdef CR', CR %endif %if 0 %elifdef LF db '%elifdef LF', LF %endif %if 0 %elifmacro dummy 1 db '%elifmacro dummy 1', LF %endif %if 0 %elifmacro dummy 2 db '%elifmacro dummy 2', LF %endif %if 0 %elifmacro dummy 3 db '%elifmacro dummy 3', LF %endif %if 0 %elifmacro dummy 1+ db '%elifmacro dummy 1+', LF %endif %if 0 %elifmacro dummy 2+ db '%elifmacro dummy 2+', LF %endif %if 0 %elifmacro dummy 3+ db '%elifmacro dummy 3+', LF %endif %if 0 %elifmacro dummy db '%elifmacro dummy', LF %endif %if 0 %elifmacro dummy 0-1 db '%elifmacro dummy 0-1', LF %endif %if 0 %elifmacro dummy 1-2 db '%elifmacro dummy 1-2', LF %endif %if 0 %elifmacro dummy 2-3 db '%elifmacro dummy 2-3', LF %endif %if 0 %elifmacro dummy 3-4 db '%elifmacro dummy 3-4', LF %endif %if 0 %elifmacro LF db '%elifmacro LF', LF %endif %if 0 %elifndef CR db '%elifndef CR', LF %endif %if 0 %elifndef LF db '%elifndef LF', LF %endif %if 0 %elifnmacro dummy 1 db '%elifnmacro dummy 1', LF %endif %if 0 %elifnmacro dummy 2 db '%elifnmacro dummy 2', LF %endif %if 0 %elifnmacro dummy 3 db '%elifnmacro dummy 3', LF %endif %if 0 %elifnmacro dummy 1+ db '%elifnmacro dummy 1+', LF %endif %if 0 %elifnmacro dummy 2+ db '%elifnmacro dummy 2+', LF %endif %if 0 %elifnmacro dummy 3+ db '%elifnmacro dummy 3+', LF %endif %if 0 %elifnmacro dummy db '%elifnmacro dummy', LF %endif %if 0 %elifnmacro dummy 0-1 db '%elifnmacro dummy 0-1', LF %endif %if 0 %elifnmacro dummy 1-2 db '%elifnmacro dummy 1-2', LF %endif %if 0 %elifnmacro dummy 2-3 db '%elifnmacro dummy 2-3', LF %endif %if 0 %elifnmacro dummy 3-4 db '%elifnmacro dummy 3-4', LF %endif %if 0 %elifnmacro LF db '%elifnmacro LF', LF %endif %if 1 %elifdef CR db 'bad %elifdef CR', LF %endif %if 1 %elifdef LF db 'bad %elifdef LF', LF %endif %if 1 %elifmacro dummy 1 db 'bad %elifmacro dummy 1', LF %endif %if 1 %elifmacro dummy 2 db 'bad %elifmacro dummy 2', LF %endif %if 1 %elifmacro dummy 3 db 'bad %elifmacro dummy 3', LF %endif %if 1 %elifmacro dummy 1+ db 'bad %elifmacro dummy 1+', LF %endif %if 1 %elifmacro dummy 2+ db 'bad %elifmacro dummy 2+', LF %endif %if 1 %elifmacro dummy 3+ db 'bad %elifmacro dummy 3+', LF %endif %if 1 %elifmacro dummy db 'bad %elifmacro dummy', LF %endif %if 1 %elifmacro dummy 0-1 db 'bad %elifmacro dummy 0-1', LF %endif %if 1 %elifmacro dummy 1-2 db 'bad %elifmacro dummy 1-2', LF %endif %if 1 %elifmacro dummy 2-3 db 'bad %elifmacro dummy 2-3', LF %endif %if 1 %elifmacro dummy 3-4 db 'bad %elifmacro dummy 3-4', LF %endif %if 1 %elifmacro LF db 'bad %elifmacro LF', LF %endif %if 1 %elifndef CR db 'bad %elifndef CR', LF %endif %if 1 %elifndef LF db 'bad %elifndef LF', LF %endif %if 1 %elifnmacro dummy 1 db 'bad %elifnmacro dummy 1', LF %endif %if 1 %elifnmacro dummy 2 db 'bad %elifnmacro dummy 2', LF %endif %if 1 %elifnmacro dummy 3 db 'bad %elifnmacro dummy 3', LF %endif %if 1 %elifnmacro dummy 1+ db 'bad %elifnmacro dummy 1+', LF %endif %if 1 %elifnmacro dummy 2+ db 'bad %elifnmacro dummy 2+', LF %endif %if 1 %elifnmacro dummy 3+ db 'bad %elifnmacro dummy 3+', LF %endif %if 1 %elifnmacro dummy db 'bad %elifnmacro dummy', LF %endif %if 1 %elifnmacro dummy 0-1 db 'bad %elifnmacro dummy 0-1', LF %endif %if 1 %elifnmacro dummy 1-2 db 'bad %elifnmacro dummy 1-2', LF %endif %if 1 %elifnmacro dummy 2-3 db 'bad %elifnmacro dummy 2-3', LF %endif %if 1 %elifnmacro dummy 3-4 db 'bad %elifnmacro dummy 3-4', LF %endif %if 1 %elifnmacro LF db 'bad %elifnmacro LF', LF %endif |
|
From: <hp...@us...> - 2002-05-07 00:10:13
|
Update of /cvsroot/nasm/nasm
In directory usw-pr-cvs1:/tmp/cvs-serv15227
Modified Files:
preproc.c
Log Message:
Add %ifmacro and friends, and fix two minor bugs:
a) The argument to %elif* is handled different than the one to %if*
b) Incorrect error messages for the %ifdef variants
Index: preproc.c
===================================================================
RCS file: /cvsroot/nasm/nasm/preproc.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- preproc.c 30 Apr 2002 21:08:11 -0000 1.18
+++ preproc.c 7 May 2002 00:10:05 -0000 1.19
@@ -1,3 +1,4 @@
+/* -*- mode: c; c-file-style: "bsd" -*- */
/* preproc.c macro preprocessor for the Netwide Assembler
*
* The Netwide Assembler is copyright (C) 1996 Simon Tatham and
@@ -276,12 +277,12 @@
static char *directives[] = {
"%arg",
"%assign", "%clear", "%define", "%elif", "%elifctx", "%elifdef",
- "%elifid", "%elifidn", "%elifidni", "%elifnctx", "%elifndef",
- "%elifnid", "%elifnidn", "%elifnidni", "%elifnnum", "%elifnstr",
+ "%elifid", "%elifidn", "%elifidni", "%elifmacro", "%elifnctx", "%elifndef",
+ "%elifnid", "%elifnidn", "%elifnidni", "%elifnmacro", "%elifnnum", "%elifnstr",
"%elifnum", "%elifstr", "%else", "%endif", "%endm", "%endmacro",
"%endrep", "%error", "%exitrep", "%iassign", "%idefine", "%if",
- "%ifctx", "%ifdef", "%ifid", "%ifidn", "%ifidni", "%ifnctx",
- "%ifndef", "%ifnid", "%ifnidn", "%ifnidni", "%ifnnum",
+ "%ifctx", "%ifdef", "%ifid", "%ifidn", "%ifidni", "%ifmacro", "%ifnctx",
+ "%ifndef", "%ifnid", "%ifnidn", "%ifnidni", "%ifnmacro", "%ifnnum",
"%ifnstr", "%ifnum", "%ifstr", "%imacro", "%include",
"%ixdefine", "%line",
"%local",
@@ -293,12 +294,12 @@
{
PP_ARG,
PP_ASSIGN, PP_CLEAR, PP_DEFINE, PP_ELIF, PP_ELIFCTX, PP_ELIFDEF,
- PP_ELIFID, PP_ELIFIDN, PP_ELIFIDNI, PP_ELIFNCTX, PP_ELIFNDEF,
- PP_ELIFNID, PP_ELIFNIDN, PP_ELIFNIDNI, PP_ELIFNNUM, PP_ELIFNSTR,
+ PP_ELIFID, PP_ELIFIDN, PP_ELIFIDNI, PP_ELIFMACRO, PP_ELIFNCTX, PP_ELIFNDEF,
+ PP_ELIFNID, PP_ELIFNIDN, PP_ELIFNIDNI, PP_ELIFNMACRO, PP_ELIFNNUM, PP_ELIFNSTR,
PP_ELIFNUM, PP_ELIFSTR, PP_ELSE, PP_ENDIF, PP_ENDM, PP_ENDMACRO,
PP_ENDREP, PP_ERROR, PP_EXITREP, PP_IASSIGN, PP_IDEFINE, PP_IF,
- PP_IFCTX, PP_IFDEF, PP_IFID, PP_IFIDN, PP_IFIDNI, PP_IFNCTX,
- PP_IFNDEF, PP_IFNID, PP_IFNIDN, PP_IFNIDNI, PP_IFNNUM,
+ PP_IFCTX, PP_IFDEF, PP_IFID, PP_IFIDN, PP_IFIDNI, PP_IFMACRO, PP_IFNCTX,
+ PP_IFNDEF, PP_IFNID, PP_IFNIDN, PP_IFNIDNI, PP_IFNMACRO, PP_IFNNUM,
PP_IFNSTR, PP_IFNUM, PP_IFSTR, PP_IMACRO, PP_INCLUDE,
PP_IXDEFINE, PP_LINE,
PP_LOCAL,
@@ -307,6 +308,12 @@
PP_STRLEN, PP_SUBSTR, PP_UNDEF, PP_XDEFINE
};
+/* If this is a an IF, ELIF, ELSE or ENDIF keyword */
+static int is_condition(int arg)
+{
+ return ((arg >= PP_ELIF) && (arg <= PP_ENDIF)) ||
+ ((arg >= PP_IF) && (arg <= PP_IFSTR));
+}
/* For TASM compatibility we need to be able to recognise TASM compatible
* conditional compilation directives. Using the NASM pre-processor does
@@ -1471,8 +1478,8 @@
tline->text[1] != '$')))
{
error(ERR_NONFATAL,
- "`%%if%sdef' expects macro identifiers",
- (i == PP_ELIFNDEF ? "n" : ""));
+ "`%s' expects macro identifiers",
+ directives[i]);
free_tlist(origline);
return -1;
}
@@ -1549,6 +1556,98 @@
free_tlist(tline);
return j;
+ case PP_IFMACRO:
+ case PP_ELIFMACRO:
+ case PP_IFNMACRO:
+ case PP_ELIFNMACRO:
+ {
+ int found = 0;
+ MMacro searching, *mmac;
+
+ tline = tline->next;
+ skip_white_(tline);
+ tline = expand_id(tline);
+ if (!tok_type_(tline, TOK_ID))
+ {
+ error(ERR_NONFATAL,
+ "`%s' expects a macro name",
+ directives[i]);
+ return -1;
+ }
+ searching.name = nasm_strdup(tline->text);
+ searching.casesense = (i == PP_MACRO);
+ searching.plus = FALSE;
+ searching.nolist = FALSE;
+ searching.in_progress = FALSE;
+ searching.rep_nest = NULL;
+ searching.nparam_min = 0;
+ searching.nparam_max = INT_MAX;
+ tline = expand_smacro(tline->next);
+ skip_white_(tline);
+ if (!tline)
+ {
+ } else if (!tok_type_(tline, TOK_NUMBER))
+ {
+ error(ERR_NONFATAL,
+ "`%s' expects a parameter count or nothing",
+ directives[i]);
+ }
+ else
+ {
+ searching.nparam_min = searching.nparam_max =
+ readnum(tline->text, &j);
+ if (j)
+ error(ERR_NONFATAL,
+ "unable to parse parameter count `%s'",
+ tline->text);
+ }
+ if (tline && tok_is_(tline->next, "-"))
+ {
+ tline = tline->next->next;
+ if (tok_is_(tline, "*"))
+ searching.nparam_max = INT_MAX;
+ else if (!tok_type_(tline, TOK_NUMBER))
+ error(ERR_NONFATAL,
+ "`%s' expects a parameter count after `-'",
+ directives[i]);
+ else
+ {
+ searching.nparam_max = readnum(tline->text, &j);
+ if (j)
+ error(ERR_NONFATAL,
+ "unable to parse parameter count `%s'",
+ tline->text);
+ if (searching.nparam_min > searching.nparam_max)
+ error(ERR_NONFATAL,
+ "minimum parameter count exceeds maximum");
+ }
+ }
+ if (tline && tok_is_(tline->next, "+"))
+ {
+ tline = tline->next;
+ searching.plus = TRUE;
+ }
+ mmac = mmacros[hash(searching.name)];
+ while (mmac)
+ {
+ if (!strcmp(mmac->name, searching.name) &&
+ (mmac->nparam_min <= searching.nparam_max
+ || searching.plus)
+ && (searching.nparam_min <= mmac->nparam_max
+ || mmac->plus))
+ {
+ found = TRUE;
+ break;
+ }
+ mmac = mmac->next;
+ }
+ nasm_free(searching.name);
+ free_tlist(origline);
+ if (i == PP_IFNMACRO || i == PP_ELIFNMACRO)
+ found = !found;
+ return found;
+ }
+
case PP_IFID:
case PP_ELIFID:
case PP_IFNID:
@@ -1704,22 +1803,8 @@
* directives.
*/
if (((istk->conds && !emitting(istk->conds->state)) ||
- (istk->mstk && !istk->mstk->in_progress)) &&
- i != PP_IF && i != PP_ELIF &&
- i != PP_IFCTX && i != PP_ELIFCTX &&
- i != PP_IFDEF && i != PP_ELIFDEF &&
- i != PP_IFID && i != PP_ELIFID &&
- i != PP_IFIDN && i != PP_ELIFIDN &&
- i != PP_IFIDNI && i != PP_ELIFIDNI &&
- i != PP_IFNCTX && i != PP_ELIFNCTX &&
- i != PP_IFNDEF && i != PP_ELIFNDEF &&
- i != PP_IFNID && i != PP_ELIFNID &&
- i != PP_IFNIDN && i != PP_ELIFNIDN &&
- i != PP_IFNIDNI && i != PP_ELIFNIDNI &&
- i != PP_IFNNUM && i != PP_ELIFNNUM &&
- i != PP_IFNSTR && i != PP_ELIFNSTR &&
- i != PP_IFNUM && i != PP_ELIFNUM &&
- i != PP_IFSTR && i != PP_ELIFSTR && i != PP_ELSE && i != PP_ENDIF)
+ (istk->mstk && !istk->mstk->in_progress)) &&
+ !is_condition(i))
{
return 0;
}
@@ -2135,11 +2220,13 @@
case PP_IFID:
case PP_IFIDN:
case PP_IFIDNI:
+ case PP_IFMACRO:
case PP_IFNCTX:
case PP_IFNDEF:
case PP_IFNID:
case PP_IFNIDN:
case PP_IFNIDNI:
+ case PP_IFNMACRO:
case PP_IFNNUM:
case PP_IFNSTR:
case PP_IFNUM:
@@ -2165,11 +2252,13 @@
case PP_ELIFID:
case PP_ELIFIDN:
case PP_ELIFIDNI:
+ case PP_ELIFMACRO:
case PP_ELIFNCTX:
case PP_ELIFNDEF:
case PP_ELIFNID:
case PP_ELIFNIDN:
case PP_ELIFNIDNI:
+ case PP_ELIFNMACRO:
case PP_ELIFNNUM:
case PP_ELIFNSTR:
case PP_ELIFNUM:
@@ -2181,7 +2270,7 @@
istk->conds->state = COND_NEVER;
else
{
- j = if_condition(expand_mmac_params(tline->next), i);
+ j = if_condition(tline->next, i);
tline->next = NULL; /* it got freed */
free_tlist(origline);
istk->conds->state =
|
|
From: <hp...@us...> - 2002-05-06 22:04:13
|
Update of /cvsroot/nasm/nasm/doc
In directory usw-pr-cvs1:/tmp/cvs-serv17236
Modified Files:
nasmdoc.src
Log Message:
Fix more instance of "NASM environment variable" -> NASMENV
Index: nasmdoc.src
===================================================================
RCS file: /cvsroot/nasm/nasm/doc/nasmdoc.src,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- nasmdoc.src 6 May 2002 19:41:57 -0000 1.26
+++ nasmdoc.src 6 May 2002 22:04:10 -0000 1.27
@@ -778,7 +778,7 @@
nonsensical words \c{-dNAME="my} and \c{name"}.
To get round this, NASM provides a feature whereby, if you begin the
-\c{NASM} environment variable with some character that isn't a minus
+\c{NASMENV} environment variable with some character that isn't a minus
sign, then NASM will treat this character as the \i{separator
character} for options. So setting the \c{NASMENV} variable to the
value \c{!-s!-ic:\\nasmlib} is equivalent to setting it to \c{-s
|
|
From: <hp...@us...> - 2002-05-06 19:59:55
|
Update of /cvsroot/nasm/nasm
In directory usw-pr-cvs1:/tmp/cvs-serv4778
Modified Files:
nasm.c
Log Message:
Change NASMOPT to NASMENV
Index: nasm.c
===================================================================
RCS file: /cvsroot/nasm/nasm/nasm.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- nasm.c 4 May 2002 04:11:00 -0000 1.19
+++ nasm.c 6 May 2002 19:41:57 -0000 1.20
@@ -683,9 +683,9 @@
*inname = *outname = *listname = '\0';
/*
- * First, process the NASMOPT environment variable.
+ * First, process the NASMENV environment variable.
*/
- envreal = getenv("NASMOPT");
+ envreal = getenv("NASMENV");
arg = NULL;
if (envreal) {
envcopy = nasm_strdup(envreal);
|
|
From: <hp...@us...> - 2002-05-06 19:59:55
|
Update of /cvsroot/nasm/nasm/doc
In directory usw-pr-cvs1:/tmp/cvs-serv4778/doc
Modified Files:
nasmdoc.src
Log Message:
Change NASMOPT to NASMENV
Index: nasmdoc.src
===================================================================
RCS file: /cvsroot/nasm/nasm/doc/nasmdoc.src,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- nasmdoc.src 4 May 2002 05:52:42 -0000 1.25
+++ nasmdoc.src 6 May 2002 19:41:57 -0000 1.26
@@ -561,7 +561,7 @@
If you want to define a \e{standard} \i{include search path},
similar to \c{/usr/include} on Unix systems, you should place one or
-more \c{-i} directives in the \c{NASMOPT} environment variable (see
+more \c{-i} directives in the \c{NASMENV} environment variable (see
\k{nasmenv}).
For Makefile compatibility with many C compilers, this option can also
@@ -762,13 +762,13 @@
You will need the version number if you report a bug.
-\S{nasmenv} The \c{NASMOPT} \i{Environment} Variable
+\S{nasmenv} The \c{NASMENV} \i{Environment} Variable
-If you define an environment variable called \c{NASMOPT}, the program
+If you define an environment variable called \c{NASMENV}, the program
will interpret it as a list of extra command-line options, which are
processed before the real command line. You can use this to define
standard search directories for include files, by putting \c{-i}
-options in the \c{NASMOPT} variable.
+options in the \c{NASMENV} variable.
The value of the variable is split up at white space, so that the
value \c{-s -ic:\\nasmlib} will be treated as two separate options.
@@ -780,7 +780,7 @@
To get round this, NASM provides a feature whereby, if you begin the
\c{NASM} environment variable with some character that isn't a minus
sign, then NASM will treat this character as the \i{separator
-character} for options. So setting the \c{NASMOPT} variable to the
+character} for options. So setting the \c{NASMENV} variable to the
value \c{!-s!-ic:\\nasmlib} is equivalent to setting it to \c{-s
-ic:\\nasmlib}, but \c{!-dNAME="my name"} will work.
@@ -5658,7 +5658,7 @@
\b Which version of NASM you're using, and exactly how you invoked
it. Give us the precise command line, and the contents of the
-\c{NASMOPT} environment variable if any.
+\c{NASMENV} environment variable if any.
\b Which versions of any supplementary programs you're using, and
how you invoked them. If the problem only becomes visible at link
|
|
From: <hp...@us...> - 2002-05-06 07:07:28
|
Update of /cvsroot/nasm/nasm
In directory usw-pr-cvs1:/tmp/cvs-serv28208
Modified Files:
nasm.spec.in
Log Message:
Make RPM itself cycle through the necessary "architectures" to produce
the doc package as noarch and the rest as the default arch.
Index: nasm.spec.in
===================================================================
RCS file: /cvsroot/nasm/nasm/nasm.spec.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- nasm.spec.in 6 May 2002 06:46:14 -0000 1.3
+++ nasm.spec.in 6 May 2002 07:07:25 -0000 1.4
@@ -1,8 +1,3 @@
-#
-# This RPM file should be built twice: once normally, to build the
-# nasm and nasm-rdoff packages, and once with --target=noarch to build
-# the nasm-doc RPM.
-#
Summary: The Netwide Assembler, a portable x86 assembler with Intel-like syntax
Name: nasm
Version: @@VERSION@@
@@ -14,6 +9,7 @@
BuildRoot: /tmp/rpm-build-nasm
Prefix: /usr
BuildPrereq: perl
+BuildArchitectures: noarch %{_arch}
%package doc
Summary: Extensive documentation for NASM
|
|
From: <hp...@us...> - 2002-05-06 06:46:17
|
Update of /cvsroot/nasm/nasm
In directory usw-pr-cvs1:/tmp/cvs-serv22474
Modified Files:
nasm.spec.in
Log Message:
Build the nasm-doc RPM as a noarch RPM. Unfortunately that has to be
built using a separate invocation of rpm :(
Index: nasm.spec.in
===================================================================
RCS file: /cvsroot/nasm/nasm/nasm.spec.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- nasm.spec.in 6 May 2002 06:32:23 -0000 1.2
+++ nasm.spec.in 6 May 2002 06:46:14 -0000 1.3
@@ -1,3 +1,8 @@
+#
+# This RPM file should be built twice: once normally, to build the
+# nasm and nasm-rdoff packages, and once with --target=noarch to build
+# the nasm-doc RPM.
+#
Summary: The Netwide Assembler, a portable x86 assembler with Intel-like syntax
Name: nasm
Version: @@VERSION@@
@@ -68,16 +73,20 @@
/sbin/install-info --delete "$RPM_INSTALL_PREFIX"/info/nasm.info.gz "$RPM_INSTALL_PREFIX"/info/dir
fi
+%ifarch noarch
+
+%files doc
+%attr(-,root,root) %doc /usr/info/nasm.info*.gz
+%attr(-,root,root) %doc /usr/doc/nasm-%{version}/*
+
+%else
+
%files
%attr(-,root,root) /usr/bin/nasm
%attr(-,root,root) /usr/bin/ndisasm
%attr(-,root,root) %doc /usr/man/man1/nasm.1*
%attr(-,root,root) %doc /usr/man/man1/ndisasm.1*
-%files doc
-%attr(-,root,root) %doc /usr/info/nasm.info*.gz
-%attr(-,root,root) %doc /usr/doc/nasm-%{version}/*
-
%files rdoff
%attr(-,root,root) /usr/bin/ldrdf
%attr(-,root,root) /usr/bin/rdf2bin
@@ -86,3 +95,5 @@
%attr(-,root,root) /usr/bin/rdflib
%attr(-,root,root) /usr/bin/rdx
%attr(-,root,root) %doc /usr/doc/nasm-%{version}/rdoff/*
+
+%endif
|
|
From: <hp...@us...> - 2002-05-06 06:32:26
|
Update of /cvsroot/nasm/nasm In directory usw-pr-cvs1:/tmp/cvs-serv17777 Modified Files: nasm.spec.in Log Message: Remove reference to now obsolete patch Index: nasm.spec.in =================================================================== RCS file: /cvsroot/nasm/nasm/nasm.spec.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- nasm.spec.in 4 May 2002 05:14:03 -0000 1.1 +++ nasm.spec.in 6 May 2002 06:32:23 -0000 1.2 @@ -8,7 +8,6 @@ URL: http://nasm.2y.net/ BuildRoot: /tmp/rpm-build-nasm Prefix: /usr -Patch0: nasm-0.98.25alt-nasmopt.diff BuildPrereq: perl %package doc @@ -36,7 +35,6 @@ %prep %setup -%patch0 -p1 %build CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr |
|
From: <hp...@us...> - 2002-05-06 00:42:09
|
Update of /cvsroot/nasm/nasm/misc
In directory usw-pr-cvs1:/tmp/cvs-serv19361
Modified Files:
release
Log Message:
Don't include the .hpj and .rtf files in the bundles -- noone wants
those files except the person who has to build the .hlp files, which has
to be done separately anyway.
Remove dire warning at the top; we're now using a working directory.
Index: release
===================================================================
RCS file: /cvsroot/nasm/nasm/misc/release,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- release 6 May 2002 00:27:15 -0000 1.1
+++ release 6 May 2002 00:42:07 -0000 1.2
@@ -4,9 +4,6 @@
#
# Usage: release {test|real} [branch]
#
-# *** WARNING WARNING WARNING ***
-# Make sure to execute this in an empty directory
-#
if [ -z "$SFUSER" ]; then
if [ -f "$HOME/.sfuser" ]; then
@@ -107,6 +104,9 @@
cd nasm-${version}
./configure --prefix=/usr/local
make doc
+# The .hpj and .rtf files are used to generate a Windows .hlp file.
+# That requires Windows tools, so that has to be done separately anyway.
+rm -f doc/nasmdoc.hpj doc/nasmdoc.rtf
cd ..
# Remove non-documentation
|
|
From: <hp...@us...> - 2002-05-06 00:27:18
|
Update of /cvsroot/nasm/nasm In directory usw-pr-cvs1:/tmp/cvs-serv17017 Removed Files: makedist.sh Log Message: Move the "makedist.sh" script to "misc"; label it with an "obsolete" warning, and create new "release" script --- makedist.sh DELETED --- |
|
From: <hp...@us...> - 2002-05-06 00:27:18
|
Update of /cvsroot/nasm/nasm/misc
In directory usw-pr-cvs1:/tmp/cvs-serv17017/misc
Added Files:
makedist.sh release
Log Message:
Move the "makedist.sh" script to "misc"; label it with an "obsolete"
warning, and create new "release" script
--- NEW FILE: makedist.sh ---
#!/bin/sh
# * THIS SCRIPT IS OBSOLETE DO NOT USE *
MAJORVER=`grep NASM_MAJOR_VER nasm.h | head -1 | cut -f3 -d' '`
MINORVER=`grep NASM_MINOR_VER nasm.h | head -1 | cut -f3 -d' '`
VERSION=`grep NASM_VER nasm.h | head -1 | cut -f3 -d' ' | sed s/\"//g`
DOSVERSION="${MAJORVER}${MINORVER}"
NASM_TAR_GZ=dist/nasm-${VERSION}.tar.gz
NASM_ZIP=dist/nasm${DOSVERSION}s.zip
NASM_DOS_ZIP=dist/nasm${DOSVERSION}.zip
NASM_DOC_ZIP=dist/nasm${DOSVERSION}d.zip
if [ -d dist ]; then rm -rf dist; fi
if [ -d nasm-${VERSION} ]; then rm -rf nasm-${VERSION}; fi
if [ ! -d dist ]; then mkdir dist; fi
if [ -f dist/nasm.tar.gz ]; then rm dist/nasm.tar.gz; fi
mkdir nasm-${VERSION}
(cd nasm-${VERSION}; ln -s ../* .;
rm -f nasm-${VERSION} dist Checklist GNUmakefile)
find nasm-${VERSION}/ -follow -name GNUmakefile > tar-exclude
find nasm-${VERSION}/ -follow -name RCS >> tar-exclude
find nasm-${VERSION}/ -follow -name '*.exe' >> tar-exclude
find nasm-${VERSION}/ -follow -name '*.uu' >> tar-exclude
find nasm-${VERSION}/ -follow -name '*,v' >> tar-exclude
for i in nasm-${VERSION}/doc/{nasmdoc.hpj,nasmdoc.rtf,nasmdoc.texi,Readme};
do echo $i; done >> tar-exclude
tar chvfX dist/nasm-${VERSION}.tar tar-exclude nasm-${VERSION}
rm -f tar-exclude
tar tf dist/nasm-${VERSION}.tar | (echo nasm.doc; sed \
-e 's:^nasm-[^/]*/::' \
-e 's:/$::' \
-e '/install-sh/d' \
-e '/makedist\.sh/d' \
-e '/exasm\.zip/d' \
-e '/config/d' \
-e '/doc\/.*\.html/d' \
-e '/doc\/Readme/d' \
-e '/doc\/nasmdoc\.ps/d' \
-e '/doc\/nasmdoc\.txt/d' \
-e '/doc\/nasmdoc\.rtf/d' \
-e '/doc\/nasmdoc\.hpj/d' \
-e '/doc\/nasmdoc\.texi/d' \
-e '/doc\/nasmdoc\.hlp/d' \
-e '/doc\/nasm\.info/d' \
) | sort > zipfiles
sed \
-e '/^[^\/]*\.\(c\|h\|pl\|bas\|dat\)$/d' \
-e '/^doc\(\/.*\)\?/d' \
-e '/standard\.mac/d' \
-e '/Makefile/d' \
-e '/rdoff/d' \
< zipfiles > zipfiles.dos
gzip -9 dist/nasm-${VERSION}.tar
rm -rf nasm-${VERSION}
ln -s doc/nasmdoc.src nasm.doc
zip -l -k ${NASM_ZIP} `cat zipfiles`
zip -k ${NASM_ZIP} *.exe misc/exasm.zip
zip -l -k ${NASM_DOS_ZIP} `cat zipfiles.dos`
zip -k ${NASM_DOS_ZIP} *.exe misc/exasm.zip
rm -f nasm.doc
(cd doc; zip -l -k ../${NASM_DOC_ZIP} \
Readme \
nasmdoc.src rdsrc.pl \
nasmdoc.txt \
nasmdoc.ps \
*.html
zip -k ../${NASM_DOC_ZIP} \
nasmdoc.hlp \
nasm.info)
rm -f zipfiles zipfiles.dos
echo Distributions complete.
--- NEW FILE: release ---
#!/bin/bash -xe
#
# Generate a NASM release
#
# Usage: release {test|real} [branch]
#
# *** WARNING WARNING WARNING ***
# Make sure to execute this in an empty directory
#
if [ -z "$SFUSER" ]; then
if [ -f "$HOME/.sfuser" ]; then
sfuser=`cat "$HOME/.sfuser"`
else
sfuser=`whoami`
fi
fi
if [ -z "$1" ]; then
echo "Usage: $0 {test|real}" 1>&2
exit 1
fi
if [ "$1" eq "real" ]; then
real=true
else
real=false
fi
work=`pwd`/nasm-release.$$
mkdir "$work"
cd "$work"
if $real; then
# Need to tag the tree, use real account
CVS="cvs -z3 -d ${SFUSER}@cvs.nasm.sourceforge.net:/cvsroot/nasm"
else
# Don't need to tag the tree, can use anonymous
echo ':pserver:ano...@cv...:/cvsroot/nasm A' > "$work"/cvspass
export CVS_PASSFILE="$work"/cvspass
CVS="cvs -z3 -d :pserver:ano...@cv...:/cvsroot/nasm"
fi
if [ -n "$2" ]; then
branchopt="-r $2"
fi
rm -rf nasm*
$CVS co $branchopt nasm
version=`cat nasm/version`
v1=`echo $version | cut -d. -f1`
v2=`echo $version | cut -d. -f2`
v3=`echo $version | cut -d. -f3`
# Tag the tree as a release
if $real; then
cd nasm && $CVS tag -F -a nasm-`echo $version | sed -e 's/\./_/g'`
fi
# Extract file names which have the -kb flag set, meaning they
# are binary files
bins="$work"/binaries
rm -f "$bins"
cd nasm
find . -type d -name CVS -print | (
while read dir; do
xdir=`echo "$dir" | sed -e 's|^\./||' -e 's|/CVS$||'`
egrep '^/[^/]*/[^/]*/[^/]*/[^/]*-kb[^/]*/' < $dir/Entries | \
cut -d/ -f2 | sed -e "s|^|$xdir/|" >> "$bins"
done
)
cd ..
# We did "co" instead of "export" -- remove CVS directories
find nasm -type d -name CVS -print | xargs rm -rf
# Create files which are in the release but automatically generated
cd nasm
autoconf
./configure --prefix=/usr/local
make dist
cd ..
# Clean up any previous attempt
rm -f ../nasm-${version}.tar.gz ../nasm-${version}-xdoc.tar.gz
rm -f ../nasm-${version}.tar.bz2 ../nasm-${version}-xdoc.tar.bz2
rm -f ../nasm-${version}.zip ../nasm-${version}-xdoc.zip
# Create tarfile (Unix convention: file includes prefix)
mv nasm nasm-$version
tar cvvf nasm-${version}.tar nasm-${version}
bzip2 -9k nasm-${version}.tar
gzip -9 nasm-${version}.tar
mv nasm-${version}.tar.gz nasm-${version}.tar.bz2 ..
# Create zipfile (DOS convention: no prefix, convert file endings)
cd nasm-$version
zip -9Dlr ../../nasm-${version}.zip -x@"$bins" * # Text files
zip -9Dgr ../../nasm-${version}.zip -i@"$bins" * # Binary files
cd ..
# Record what we have already generated
find nasm-$version -not -type d -print > main
# Create documentation
cd nasm-${version}
./configure --prefix=/usr/local
make doc
cd ..
# Remove non-documentation
cat main | xargs rm -f
# Create doc tarfile
tar cvvf nasm-${version}-xdoc.tar nasm-${version}/doc
bzip2 -9k nasm-${version}-xdoc.tar
gzip -9 nasm-${version}-xdoc.tar
mv nasm-${version}-xdoc.tar.gz nasm-${version}-xdoc.tar.bz2 ..
# Create doc zipfile (DOS convention: no prefix, convert file endings)
# (Note: generating Win .hlp files requires additional tools)
cd nasm-${version}
zip -9Dlr ../../nasm-${version}-xdoc.zip doc -x \*.pdf
zip -9Dgr ../../nasm-${version}-xdoc.zip doc -i \*.pdf
# Clean up
cd ..
rm -rf "$work"
|
|
From: <hp...@us...> - 2002-05-05 23:48:10
|
Update of /cvsroot/nasm/nasm In directory usw-pr-cvs1:/tmp/cvs-serv9059 Modified Files: Makefile.in Log Message: Separate out the "tar" operation from the "make dist" operation This is necessary for the release script (still in progress) Index: Makefile.in =================================================================== RCS file: /cvsroot/nasm/nasm/Makefile.in,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- Makefile.in 4 May 2002 05:14:03 -0000 1.31 +++ Makefile.in 5 May 2002 23:48:07 -0000 1.32 @@ -159,6 +159,8 @@ dist: spotless perlreq autoconf rm -rf ./autom4te.cache + +tar: dist tar cvjf ../nasm-`cat version`-`date +%Y%m%d`.tar.bz2 ../`./nasm-dir` nasm.spec: nasm.spec.in version |
|
From: <hp...@us...> - 2002-05-04 23:54:37
|
Update of /cvsroot/nasm/nasm In directory usw-pr-cvs1:/tmp/cvs-serv13590 Removed Files: dummy Log Message: syncmail seems to work ok... --- dummy DELETED --- |
|
From: <hp...@us...> - 2002-05-04 23:51:31
|
Update of /cvsroot/nasm/nasm In directory usw-pr-cvs1:/tmp/cvs-serv13209 Added Files: dummy Log Message: Dummy checkin to test new version of "syncmail" |
|
From: <hp...@us...> - 2002-05-04 14:16:23
|
Update of /cvsroot/nasm/nasm/doc
In directory usw-pr-cvs1:/tmp/cvs-serv7212
Modified Files:
Makefile.in rdsrc.pl
Log Message:
Support generating PDF using ps2pdf with special annotations in the
PostScript output of rdsrc.pl.
Index: Makefile.in
===================================================================
RCS file: /cvsroot/nasm/nasm/doc/Makefile.in,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- Makefile.in 30 Apr 2002 21:09:16 -0000 1.21
+++ Makefile.in 4 May 2002 14:16:20 -0000 1.22
@@ -18,29 +18,44 @@
PERL = perl
MAKEINFO = makeinfo
+TEXI2DVI = texi2dvi
+PS2PDF = ps2pdf # Part of GhostScript
SRCS = nasmdoc.src
-OUT = nasm.info
+OUT = nasm.info nasmdoc.ps nasmdoc.pdf
all: $(OUT)
os2: nasm.inf
-.SUFFIXES: .src .texi .info .ps .rtf .hpj .dvi .ps .txt .pl .ipf .inf
+.SUFFIXES: .src .texi .info .ps .rtf .hpj .dvi .pdf .txt .pl .ipf .inf
-# Consider html, txt and src output a side effect
-.src.texi:
+# Consider html, txt and ps output a side effect
+nasmdoc.texi: nasmdoc.src rdsrc.pl
mkdir -p html
- $(PERL) ./rdsrc.pl < $<
+ $(PERL) $(srcdir)/rdsrc.pl < $<
mv -f *.html html
-nasm.info: nasmdoc.texi
+nasmdoc.ps: nasmdoc.texi
+ : Generated by side effect
+
+nasm.info: info/nasm.info
+
+info/nasm.info: nasmdoc.texi
mkdir -p info
$(MAKEINFO) $<
mv -f *.info *.info-* info
+# DVI output from texinfo (optional)
+nasmdoc.dvi: nasmdoc.texi
+ $(TEXI2DVI) nasmdoc.texi
+
+# PDF output
+nasmdoc.pdf: nasmdoc.ps
+ $(PS2PDF) nasmdoc.ps nasmdoc.pdf
+
# Rules for building an OS/2 book
-.texi.ipf:
+nasmdoc.ipf: nasmdoc.texi
texi2ipf $< >$@
nasm.inf: nasmdoc.ipf
@@ -48,12 +63,13 @@
clean:
-rm -f *.rtf *.hpj *.texi *.ph *.gid *.ipf
+ -rm -f *.aux *.cp *.fn *.ky *.pg *.log *.toc *.tp *.vr
spotless: clean
- -rm -rf html info *.hlp *.txt *.ps *.inf
+ -rm -rf html info *.hlp *.txt *.ps *.inf *.pdf *.dvi
install: all
$(INSTALL_DATA) info/* $(INSTALLROOT)$(infodir)
mkdir -p $(INSTALLROOT)$(docdir)/html
$(INSTALL_DATA) html/* $(INSTALLROOT)$(docdir)/html
- $(INSTALL_DATA) nasmdoc.ps nasmdoc.txt $(INSTALLROOT)$(docdir)
+ $(INSTALL_DATA) nasmdoc.ps nasmdoc.pdf nasmdoc.txt $(INSTALLROOT)$(docdir)
Index: rdsrc.pl
===================================================================
RCS file: /cvsroot/nasm/nasm/doc/rdsrc.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- rdsrc.pl 30 Apr 2002 21:00:38 -0000 1.3
+++ rdsrc.pl 4 May 2002 14:16:20 -0000 1.4
@@ -858,6 +858,63 @@
}
}
+sub ref_ps {
+ my($r) = @_;
+ $r =~ s/\./_/g;
+ return 'n'.$r;
+}
+
+sub ps_write_bookmarks {
+ my $para;
+ my %nchildren = ();
+ my %titles = ();
+ my @reflist = ();
+ my $ref, $pref, $i, $title;
+
+ for ($para = 0; $para <= $#pnames; $para++) {
+ my $pname = $pnames[$para];
+ my $pflags = $pflags[$para];
+ my $ptype = substr($pflags,0,4);
+
+ if ($ptype eq "chap" || $ptype eq "appn") {
+ # Chapter/appendix heading. "Chapter N: Title" followed by a line of
+ # minus signs.
+
+ $pflags =~ /(chap|appn) (.*) :(.*)/;
+ $ref = &ref_ps($2);
+ $title = '';
+ foreach $i (@$pname) {
+ $title .= &word_ps_title($i);
+ }
+ $titles{$ref} = $title;
+ push @reflist, $ref;
+ } elsif ($ptype eq "head" || $ptype eq "subh") {
+ # Heading/subheading. Just a number and some text.
+ $pflags =~ /.... (.*) :(.*)/;
+ $ref = &ref_ps($1);
+ $ref =~ /^(n[0-9A-Za-z_]+)\_[0-9A-Za-z]+$/;
+ $pref = $1;
+
+ $title = '';
+ foreach $i (@$pname) {
+ $title .= &word_ps_title($i);
+ }
+ $titles{$ref} = $title;
+ push @reflist, $ref;
+ $nchildren{$pref}++;
+ }
+ }
+
+ # Now we should have enough data to generate the bookmarks
+ print "[/Title (Contents) /Dest /nContents /OUT pdfmark";
+ foreach $i ( @reflist ) {
+ print '[/Title (', $titles{$i}, ")\n";
+ print '/Count -', $nchildren{$i}, ' ' if ( $nchildren{$i} );
+ print "/Dest /$i /OUT pdfmark\n";
+ }
+ print "[/Title (Index) /Dest /nIndex /OUT pdfmark\n";
+}
+
sub write_ps {
# This is called from the top level, so I won't bother using
# my or local.
@@ -915,7 +972,7 @@
# Chapter heading. "Chapter N: Title" followed by a line of
# minus signs.
$pflags =~ /chap (.*) :(.*)/;
- push @line, "nChapter", " ", "n$1:", " ";
+ push @line, "B".&ref_ps($1), "nChapter", " ", "n$1:", " ";
foreach $i (@$pname) {
$ww = &word_ps($i);
push @line, $ww unless $ww eq "x";
@@ -928,7 +985,7 @@
# Appendix heading. "Appendix N: Title" followed by a line of
# minus signs.
$pflags =~ /appn (.*) :(.*)/;
- push @line, "nAppendix", " ", "n$1:", " ";
+ push @line, "B".&ref_ps($1), "nAppendix", " ", "n$1:", " ";
foreach $i (@$pname) {
$ww = &word_ps($i);
push @line, $ww unless $ww eq "x";
@@ -940,7 +997,7 @@
} elsif ($ptype eq "head") {
# Heading. Just a number and some text.
$pflags =~ /.... (.*) :(.*)/;
- push @line, "n$1";
+ push @line, "B".&ref_ps($1), "n$1";
foreach $i (@$pname) {
$ww = &word_ps($i);
push @line, $ww unless $ww eq "x";
@@ -952,7 +1009,7 @@
} elsif ($ptype eq "subh") {
# Subheading. Just a number and some text.
$pflags =~ /subh (.*) :(.*)/;
- push @line, "n$1";
+ push @line, "B".&ref_ps($1), "n$1";
foreach $i (@$pname) {
push @line, &word_ps($i);
}
@@ -1034,20 +1091,20 @@
print "building contents...";
@clnames = @cltypes = ();
$clname = "pscont000000";
- @$clname = ("nContents"); # "chapter heading" for TOC
+ @$clname = ("BnContents", "nContents"); # "chapter heading" for TOC
push @clnames,$clname++;
push @cltypes,"chap";
for ($i=0; $i<=$#lnames; $i++) {
$lname = $lnames[$i];
if ($ltypes[$i] =~ /^(chap|head|subh)/) {
@$clname = @$lname;
- splice @$clname,1,0," " if ($ltypes[$i] !~ /chap/);
+ splice @$clname,2,0," " if ($ltypes[$i] !~ /chap/);
push @$clname,$i; # placeholder for page number
push @clnames,$clname++;
push @cltypes,"C" . substr($ltypes[$i],0,3);
}
}
- @$clname = ("nIndex"); # contents entry for Index
+ @$clname = ("BnIndex", "nIndex"); # contents entry for Index
push @$clname,$i; # placeholder for page number
$idx_clname = $clname;
push @clnames,$clname++;
@@ -1174,9 +1231,10 @@
@pp = ();
$inums = join(',',sort { $a <=> $b } keys %{$psidxpp{$k}});
while (length $inums) {
- $inums =~ /^([^,]+,?)(.*)$/;
- $inums = $2, $inum = $1;
- @pnum = (" ", "n$inum");
+ $inums =~ /^([^,]+)(,?)(.*)$/;
+ $inums = $3, $inumc = $2; $inum = $1;
+ @pnum = (" ", "Bp$inum", "n$inum", "E");
+ push(@pnum, "n$inumc") if ( $inumc ne '' );
$pnumlen = &len_ps(@pnum);
if ($pnumlen > $len) {
&ps_idxout($cmd,\@line,\@pp);
@@ -1199,6 +1257,7 @@
select PS;
$page = $lpages[0];
&ps_header;
+ &ps_write_bookmarks;
for ($i=0; $i<=$#lnames; $i++) {
&ps_throw_pg($page,$lpages[$i]) if $page != $lpages[$i];
$page = $lpages[$i];
@@ -1209,7 +1268,7 @@
&ps_throw_pg($page, $pnum) if $page != $pnum;
$page = $pnum++;
$ypos = 0;
- $ypos = 100, &ps_out_line(0, "chap", ["nIndex"]) if !$i;
+ $ypos = 100, &ps_out_line(0, "chap", ["BnIndex", "nIndex"]) if !$i;
$lines = ($pmax - $ypos) / $textht;
my $col; # ps_out_line hits this variable
PAGE:for ($col = 1; $col <= 2; $col++) {
@@ -1244,123 +1303,201 @@
}
sub ps_header {
- @pshdr = (
- '/sp (n ) def', # here it's sure not to get wrapped inside ()
- '/nf /Times-Roman findfont 11 scalefont def',
- '/ef /Times-Italic findfont 11 scalefont def',
- '/cf /Courier findfont 11 scalefont def',
- '/nc /Helvetica-Bold findfont 18 scalefont def',
- '/ec /Helvetica-Oblique findfont 18 scalefont def',
- '/cc /Courier-Bold findfont 18 scalefont def',
- '/nh /Helvetica-Bold findfont 14 scalefont def',
- '/eh /Helvetica-Oblique findfont 14 scalefont def',
- '/ch /Courier-Bold findfont 14 scalefont def',
- '/ns /Helvetica-Bold findfont 12 scalefont def',
- '/es /Helvetica-Oblique findfont 12 scalefont def',
- '/cs /Courier-Bold findfont 12 scalefont def',
- '/n 16#6E def /e 16#65 def /c 16#63 def',
- '/pageodd {',
- ' 550 50 moveto ns setfont dup stringwidth pop neg 0 rmoveto show',
- '} def',
- '/pageeven { 50 50 moveto ns setfont show } def',
- '/chapter {',
- ' 100 620 moveto',
- ' {',
- ' dup 0 get',
- ' dup n eq {pop nc setfont} {',
- ' e eq {ec setfont} {cc setfont} ifelse',
- ' } ifelse',
- ' dup length 1 sub 1 exch getinterval show',
- ' } forall',
- ' 0 setlinecap 3 setlinewidth',
- ' newpath 100 610 moveto 468 0 rlineto stroke',
- '} def',
- '/heading {',
- ' 686 exch sub /y exch def /a exch def',
- ' 90 y moveto a 0 get dup length 1 sub 1 exch getinterval',
- ' nh setfont dup stringwidth pop neg 0 rmoveto show',
- ' 100 y moveto',
- ' a dup length 1 sub 1 exch getinterval {',
- ' /s exch def',
- ' s 0 get',
- ' dup n eq {pop nh setfont} {',
- ' e eq {eh setfont} {ch setfont} ifelse',
- ' } ifelse',
- ' s s length 1 sub 1 exch getinterval show',
- ' } forall',
- '} def',
- '/subhead {',
- ' 688 exch sub /y exch def /a exch def',
- ' 90 y moveto a 0 get dup length 1 sub 1 exch getinterval',
- ' ns setfont dup stringwidth pop neg 0 rmoveto show',
- ' 100 y moveto',
- ' a dup length 1 sub 1 exch getinterval {',
- ' /s exch def',
- ' s 0 get',
- ' dup n eq {pop ns setfont} {',
- ' e eq {es setfont} {cs setfont} ifelse',
- ' } ifelse',
- ' s s length 1 sub 1 exch getinterval show',
- ' } forall',
- '} def',
- '/disp { /j exch def',
- ' 568 exch sub exch 689 exch sub moveto',
- ' {',
- ' /s exch def',
- ' s 0 get',
- ' dup n eq {pop nf setfont} {',
- ' e eq {ef setfont} {cf setfont} ifelse',
- ' } ifelse',
- ' s s length 1 sub 1 exch getinterval show',
- ' s sp eq {j 0 rmoveto} if',
- ' } forall',
- '} def',
- '/contents { /w exch def /y exch def /a exch def',
- ' /yy 689 y sub def',
- ' a a length 1 sub get dup length 1 sub 1 exch getinterval /s exch def',
- ' nf setfont 568 s stringwidth pop sub /ex exch def',
- ' ex yy moveto s show',
- ' a 0 a length 1 sub getinterval y w 0 disp',
- ' /sx currentpoint pop def nf setfont',
- ' 100 10 568 { /i exch def',
- ' i 5 sub sx gt i 5 add ex lt and {',
- ' i yy moveto (.) show',
- ' } if',
- ' } for',
- '} def',
- '/just { /w exch def /y exch def /a exch def',
- ' /jj w def /spaces 0 def',
- ' a {',
- ' /s exch def',
- ' s 0 get',
- ' dup n eq {pop nf setfont} {',
- ' e eq {ef setfont} {cf setfont} ifelse',
- ' } ifelse',
- ' s s length 1 sub 1 exch getinterval stringwidth pop',
- ' jj exch sub /jj exch def',
- ' s sp eq {/spaces spaces 1 add def} if',
- ' } forall',
- ' a y w jj spaces spaces 0 eq {pop pop 0} {div} ifelse disp',
- '} def',
- '/idl { 468 exch sub 0 disp } def',
- '/ldl { 436 exch sub 0 disp } def',
- '/idr { 222 add 468 exch sub /x exch def /y exch def /a exch def',
- ' a {',
- ' /s exch def',
- ' s 0 get',
- ' dup n eq {pop nf setfont} {',
- ' e eq {ef setfont} {cf setfont} ifelse',
- ' } ifelse',
- ' s s length 1 sub 1 exch getinterval stringwidth pop',
- ' x add /x exch def',
- ' } forall',
- ' a y x 0 disp',
- '} def',
- '/left {0 disp} def',
- '/bullet {',
- ' nf setfont dup 100 exch 689 exch sub moveto (\267) show',
- '} def'
- );
+ $pshdr = <<'EOF';
+/sp (n ) def
+/nf /Times-Roman findfont 11 scalefont def
+/ef /Times-Italic findfont 11 scalefont def
+/cf /Courier findfont 11 scalefont def
+/nc /Helvetica-Bold findfont 18 scalefont def
+/ec /Helvetica-Oblique findfont 18 scalefont def
+/cc /Courier-Bold findfont 18 scalefont def
+/nh /Helvetica-Bold findfont 14 scalefont def
+/eh /Helvetica-Oblique findfont 14 scalefont def
+/ch /Courier-Bold findfont 14 scalefont def
+/ns /Helvetica-Bold findfont 12 scalefont def
+/es /Helvetica-Oblique findfont 12 scalefont def
+/cs /Courier-Bold findfont 12 scalefont def
+/n 16#6E def /e 16#65 def /c 16#63 def
+/B 16#42 def /E 16#45 def /D 16#44 def
+/min { 2 copy gt { exch } if pop } def
+/max { 2 copy lt { exch } if pop } def
+/lkbegun 0 def
+/lkury 0 def
+/lkurx 0 def
+/lklly 0 def
+/lkllx 0 def
+/lktarget () def
+/linkbegin {
+ /lkbegun 1 def
+ /lktarget exch cvn def
+} def
+/linkshow {
+ lkbegun 0 ne {
+ gsave dup true charpath pathbbox grestore
+ lkbegun 1 eq {
+ /lkury exch def
+ /lkurx exch def
+ /lklly exch def
+ /lkllx exch def
+ /lkbegun 2 def
+ } {
+ lkury max /lkury exch def
+ lkurx max /lkurx exch def
+ lklly min /lklly exch def
+ lkllx min /lkllx exch def
+ } ifelse
+ } if
+ show
+} def
+/linkend {
+ [/Rect [ lkllx lklly lkurx lkury ]
+ /Color [ 1.0 0.0 0.0 ]
+ /Border [0 0 0]
+ /Dest lktarget
+ /Subtype /Link
+ /ANN pdfmark
+ /lkbegun 0 def
+} def
+/linkdest {
+ /lkdest exch cvn def
+ [ /Dest lkdest
+ /View [ /XYZ currentpoint 0 ]
+ /DEST pdfmark
+} def
+/handlelink {
+ dup 0 get
+ dup B eq {
+ pop dup length 1 sub 1 exch getinterval linkbegin
+ } {
+ E eq {
+ pop linkend
+ } {
+ dup length 1 sub 1 exch getinterval linkdest
+ } ifelse
+ } ifelse
+} def
+/pageodd {
+ 550 50 moveto ns setfont dup stringwidth pop neg 0 rmoveto show
+} def
+/pageeven { 50 50 moveto ns setfont show } def
+/destmark {
+ dup length 1 sub 1 exch getinterval linkdest
+} def
+/chapter {
+ 100 620 moveto
+ dup 0 get destmark
+ dup length 1 sub 1 exch getinterval
+ {
+ dup 0 get
+ dup n eq {pop nc setfont} {
+ e eq {ec setfont} {cc setfont} ifelse
+ } ifelse
+ dup length 1 sub 1 exch getinterval show
+ } forall
+ 0 setlinecap 3 setlinewidth
+ newpath 100 610 moveto 468 0 rlineto stroke
+} def
+/heading {
+ 686 exch sub /y exch def /a exch def
+ 90 y moveto
+ a 0 get destmark
+ a 1 get dup length 1 sub 1 exch getinterval
+ nh setfont dup stringwidth pop neg 0 rmoveto show
+ 100 y moveto
+ a dup length 2 sub 2 exch getinterval {
+ /s exch def
+ s 0 get
+ dup n eq {pop nh setfont} {
+ e eq {eh setfont} {ch setfont} ifelse
+ } ifelse
+ s s length 1 sub 1 exch getinterval show
+ } forall
+} def
+/subhead {
+ 688 exch sub /y exch def /a exch def
+ 90 y moveto
+ a 0 get destmark
+ a 1 get dup length 1 sub 1 exch getinterval
+ ns setfont dup stringwidth pop neg 0 rmoveto show
+ 100 y moveto
+ a dup length 2 sub 2 exch getinterval {
+ /s exch def
+ s 0 get
+ dup n eq {pop ns setfont} {
+ e eq {es setfont} {cs setfont} ifelse
+ } ifelse
+ s s length 1 sub 1 exch getinterval show
+ } forall
+} def
+/disp { /j exch def
+ 568 exch sub exch 689 exch sub moveto
+ {
+ /s exch def
+ s 0 get
+ dup E le {
+ pop s handlelink
+ } {
+ dup n eq {pop nf setfont} {
+ e eq {ef setfont} {cf setfont} ifelse
+ } ifelse
+ s s length 1 sub 1 exch getinterval linkshow
+ s sp eq {j 0 rmoveto} if
+ } ifelse
+ } forall
+} def
+/contents { /w exch def /y exch def /a exch def
+ /yy 689 y sub def
+ a a length 1 sub get dup length 1 sub 1 exch getinterval
+ /ss exch def
+ nf setfont 568 ss stringwidth pop sub /ex exch def
+ a 0 a length 1 sub getinterval y w 0 disp
+ /sx currentpoint pop def nf setfont
+ 100 10 568 { /i exch def
+ i 5 sub sx gt i 5 add ex lt and {
+ i yy moveto (.) linkshow
+ } if
+ } for
+ ss linkshow
+ linkend
+} def
+/just { /w exch def /y exch def /a exch def
+ /jj w def /spaces 0 def
+ a {
+ /s exch def
+ s 0 get
+ dup n eq {pop nf setfont} {
+ e eq {ef setfont} {cf setfont} ifelse
+ } ifelse
+ s s length 1 sub 1 exch getinterval stringwidth pop
+ jj exch sub /jj exch def
+ s sp eq {/spaces spaces 1 add def} if
+ } forall
+ a y w jj spaces spaces 0 eq {pop pop 0} {div} ifelse disp
+} def
+/idl { 468 exch sub 0 disp } def
+/ldl { 436 exch sub 0 disp } def
+/idr { 222 add 468 exch sub /x exch def /y exch def /a exch def
+ a {
+ /s exch def
+ s 0 get
+ dup E le {
+ pop
+ } {
+ dup n eq {pop nf setfont} {
+ e eq {ef setfont} {cf setfont} ifelse
+ } ifelse
+ s s length 1 sub 1 exch getinterval stringwidth pop
+ x add /x exch def
+ } ifelse
+ } forall
+ a y x 0 disp
+} def
+/left {0 disp} def
+/bullet {
+ nf setfont dup 100 exch 689 exch sub moveto (\267) show
+} def
+[/PageMode /UseOutlines /DOCVIEW pdfmark
+EOF
print "%!PS-Adobe-3.0\n";
print "%%BoundingBox: 95 95 590 705\n";
print "%%Creator: a nasty Perl script\n";
@@ -1369,8 +1506,15 @@
print "%%Pages: $lpages[$#lpages]\n";
print "%%DocumentNeededResources: font Times-Roman Times-Italic\n";
print "%%+ font Helvetica-Bold Courier Courier-Bold\n";
- print "%%EndComments\n%%BeginProlog\n%%EndProlog\n%%BeginSetup\nsave\n";
- $pshdr = join(' ',@pshdr);
+ print "%%EndComments\n";
+ print "%%BeginProlog\n";
+ # This makes sure non-PDF PostScript interpreters don't choke on
+ # pdfmarks in the output
+ print "/pdfmark where\n";
+ print "{pop} {userdict /pdfmark /cleartomark load put} ifelse\n";
+ print "%%EndProlog\n";
+ print "%%BeginSetup\n";
+ print "save\n";
$pshdr =~ s/\s+/ /g;
while ($pshdr =~ /\S/) {
last if length($pshdr) < 72 || $pshdr !~ /^(.{0,72}\S)\s(.*)$/;
@@ -1401,6 +1545,7 @@
my ($pgnum) = @_;
print "%%Page: $pgnum $pgnum\n";
print "%%BeginPageSetup\nsave\n%%EndPageSetup\n";
+ print "95 705 moveto (p$pgnum) linkdest\n";
}
sub ps_donepg {
@@ -1423,7 +1568,7 @@
$c = "n\261" if $c eq "-";
$d = '';
while (length $c) {
- $d .= $1, $c = $2 while $c =~ /^([ -'\*-\[\]-~]+)(.*)$/;
+ $d .= $1, $c = $2 while $c =~ /^([ -\'\*-\[\]-~]+)(.*)$/;
while (1) {
$d .= "\\$1", $c = $2, next if $c =~ /^([\\\(\)])(.*)$/;
($d .= sprintf "\\%3o",unpack("C",$1)), $c = $2, next
@@ -1495,6 +1640,35 @@
}
}
+sub word_ps_title {
+ my ($w) = @_;
+ my $wtype, $wmajt;
+
+ return undef if $w eq '' || $w eq undef;
+
+ $wtype = substr($w,0,2);
+ $wmajt = substr($wtype,0,1);
+ $w = substr($w,2);
+ $w =~ s/<.*>// if $wmajt eq "w"; # remove web links
+ if ($wmajt eq "n" || $wtype eq "w ") {
+ return $w;
+ } elsif ($wtype eq "sp") {
+ return ' ';
+ } elsif ($wtype eq "da") {
+ return '-';
+ } elsif ($wmajt eq "c" || $wtype eq "wc") {
+ return $w;
+ } elsif ($wmajt eq "e") {
+ return $w;
+ } elsif ($wmajt eq "x") {
+ return '';
+ } elsif ($wtype eq "i ") {
+ return '';
+ } else {
+ die "panic in word_ps_title: $wtype$w\n";
+ }
+}
+
sub len_ps {
my (@line) = @_;
my $l = 0;
@@ -1505,11 +1679,13 @@
$w = "n " if $w eq " ";
$w = "n\261" if $w eq "-";
$f = substr($w,0,1);
- $f = "timesr" if $f eq "n";
- $f = "timesi" if $f eq "e";
- $f = "courr" if $f eq "c";
- foreach $c (unpack 'C*',substr($w,1)) {
- $l += $size * $$f[$c];
+ if ( $f !~ /^[BDE]$/ ) {
+ $f = "timesr" if $f eq "n";
+ $f = "timesi" if $f eq "e";
+ $f = "courr" if $f eq "c";
+ foreach $c (unpack 'C*',substr($w,1)) {
+ $l += $size * $$f[$c];
+ }
}
}
return $l;
@@ -1959,7 +2135,7 @@
$w =~ s/\{/\\\{/g;
$w =~ s/\}/\\\}/g;
$w =~ s/<.*>// if $wmajt eq "w"; # remove web links
- substr($w,0,length($w)-1) =~ s/-/\\'AD/g if $wmajt ne "x"; #nonbreakhyphens
+ substr($w,0,length($w)-1) =~ s/-/\\\'AD/g if $wmajt ne "x"; #nonbreakhyphens
if ($wmajt eq "n" || $wtype eq "e " || $wtype eq "w ") {
return $w;
} elsif ($wtype eq "sp") {
@@ -1967,7 +2143,7 @@
} elsif ($wtype eq "da") {
return "\\'96";
} elsif ($wmajt eq "c" || $wtype eq "wc") {
- $w =~ s/ /\\'A0/g; # make spaces non-breaking
+ $w =~ s/ /\\\'A0/g; # make spaces non-breaking
return $docode ? "{\\f1 ${w}}" : $w;
} elsif ($wtype eq "es") {
return "{\\i ${w}";
|
|
From: <hp...@us...> - 2002-05-04 05:52:45
|
Update of /cvsroot/nasm/nasm/doc
In directory usw-pr-cvs1:/tmp/cvs-serv8187
Modified Files:
nasmdoc.src
Log Message:
Update nasmdoc.src to the current version from debs.
Index: nasmdoc.src
===================================================================
RCS file: /cvsroot/nasm/nasm/doc/nasmdoc.src,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- nasmdoc.src 4 May 2002 04:11:00 -0000 1.24
+++ nasmdoc.src 4 May 2002 05:52:42 -0000 1.25
@@ -778,7 +778,7 @@
nonsensical words \c{-dNAME="my} and \c{name"}.
To get round this, NASM provides a feature whereby, if you begin the
-\c{NASMOPT} environment variable with some character that isn't a minus
+\c{NASM} environment variable with some character that isn't a minus
sign, then NASM will treat this character as the \i{separator
character} for options. So setting the \c{NASMOPT} variable to the
value \c{!-s!-ic:\\nasmlib} is equivalent to setting it to \c{-s
@@ -7206,7 +7206,7 @@
compares the 64-bit (eight-byte) value stored at \c{[mem]} with the
value in \c{EDX:EAX}. If they are equal, it sets the zero flag and
stores \c{ECX:EBX} into the memory area. If they are unequal, it
-clears the zero flag and leaves the memory area untouched.
+clears the zero flag and stores the memory contents into \c{EDX:EAX}.
\c{CMPXCHG8B} can be used with the \c{LOCK} prefix, to allow atomic
execution. This is useful in multi-processor and multi-tasking
|
|
From: <hp...@us...> - 2002-05-04 05:42:33
|
Update of /cvsroot/nasm/nasm/rdoff
In directory usw-pr-cvs1:/tmp/cvs-serv6253/rdoff
Modified Files:
ldrdf.c rdflib.c rdlib.c rdoff.c rdoff.h symtab.c
Log Message:
RDOFF patch from Yuri Zaporogets:
- Panos Minos's LDRDF fix (correct export of relocation records);
- Panos Minos's symtab.c verbose dump fix;
- Librarian (rdflib) now puts a signature block when creating a library
(instead of creating an empty file). In theory it doesn't break binary
compatibility, but due to a bug in the original 'rdlib.c' you can't
use old LDRDF with new libraries. Fix this bug as well.
- Other minor changes in LDRDF.
Index: ldrdf.c
===================================================================
RCS file: /cvsroot/nasm/nasm/rdoff/ldrdf.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- ldrdf.c 30 Apr 2002 21:06:17 -0000 1.10
+++ ldrdf.c 4 May 2002 05:42:30 -0000 1.11
@@ -7,13 +7,9 @@
*/
/*
- * TODO: actually get this new version working!
- * - finish off write_output() - appears to be done
- * - implement library searching - appears to be done
- * - maybe we only want to do one pass, for performance reasons?
- * this makes things a little harder, but unix 'ld' copes...
- * - implement command line options - appears to be done
- * - improve symbol table implementation - done, thanks to Graeme Defty
+ * TODO:
+ * enhance search of required export symbols in libraries (now depends
+ * on modules order in library)
* - keep a cache of symbol names in each library module so
* we don't have to constantly recheck the file
* - general performance improvements
@@ -21,11 +17,8 @@
* BUGS & LIMITATIONS: this program doesn't support multiple code, data
* or bss segments, therefore for 16 bit programs whose code, data or BSS
* segment exceeds 64K in size, it will not work. This program probably
- * wont work if compiled by a 16 bit compiler. Try DJGPP if you're running
+ * won't work if compiled by a 16 bit compiler. Try DJGPP if you're running
* under DOS. '#define STINGY_MEMORY' may help a little.
- *
- * TO FIX: enhance search of required export symbols in libraries (now depends
- * on modules order in library).
*/
#include <stdio.h>
@@ -39,7 +32,7 @@
#include "rdlib.h"
#include "segtab.h"
-#define LDRDF_VERSION "1.03"
+#define LDRDF_VERSION "1.04"
#define RDF_MAXSEGS 64
/* #define STINGY_MEMORY */
@@ -104,35 +97,6 @@
/* error file */
static FILE * error_file;
-#ifdef _MULTBOOT_H
-
-/* loading address for multiboot header */
-unsigned MBHloadAddr;
-
-/*
- * Tiny code that moves RDF loader to its working memory region:
- * mov esi,SOURCE_ADDR ; BE xx xx xx xx
- * mov edi,DEST_ADDR ; BF xx xx xx xx
- * mov esp,edi ; 89 FC
- * push edi ; 57
- * mov ecx,RDFLDR_LENGTH/4 ; B9 xx xx xx xx
- * cld ; FC
- * rep movsd ; F3 A5
- * ret ; C3
- */
-
-#define RDFLDR_LENGTH 4096 /* Loader will be moved to unused */
-#define RDFLDR_DESTLOC 0xBF000 /* video page */
-
-unsigned char RDFloaderMover[]={
- 0xBE, 0, 0, 0, 0, 0xBF, 0, 0xF0, 0xB, 0,
- 0x89, 0xFC, 0x57,
- 0xB9, 0, 4, 0, 0,
- 0xFC, 0xF3, 0xA5, 0xC3
-};
-
-#endif
-
/* the header of the output file, built up stage by stage */
rdf_headerbuf * newheader = NULL;
@@ -160,6 +124,29 @@
int errorcount = 0; /* determines main program exit status */
+/*
+ * Multiboot header support.
+ */
+
+/* loading address for multiboot header */
+unsigned MBHloadAddr;
+
+#define RDFLDR_LENGTH 4096 /* Loader size is 4K */
+#define RDFLDR_DESTLOC 0x100000 /* and its absolute address */
+
+/*
+ * Tiny code that moves RDF setup code to its working memory region
+ */
+unsigned char trampoline_code[] = {
+ 0xBE, 0, 0, 0, 0, /* mov esi,SOURCE_ADDR */
+ 0xBF, 0, 0, 0, 0, /* mov edi,DEST_ADDR */
+ 0x89, 0xFA, /* mov edx,edi */
+ 0xB9, 0, 4, 0, 0, /* mov ecx,RDFLDR_LENGTH/4 */
+ 0xFC, /* cld */
+ 0xF3, 0xA5, /* rep movsd */
+ 0xFF, 0xE2 /* jmp edx */
+};
+
/* =========================================================================
* Utility functions
*/
@@ -736,7 +723,7 @@
hr = (rdfheaderrec *) malloc(sizeof(struct MultiBootHdrRec));
hr->mbh.type = 9;
- hr->mbh.reclen = sizeof(struct tMultiBootHeader)+RDFLDRMOVER_SIZE;
+ hr->mbh.reclen = sizeof(struct tMultiBootHeader)+TRAMPOLINESIZE;
hr->mbh.mb.Magic = MB_MAGIC;
hr->mbh.mb.Flags = MB_FL_KLUDGE;
@@ -745,7 +732,7 @@
hr->mbh.mb.LoadAddr = MBHloadAddr;
hr->mbh.mb.Entry = MBHloadAddr+16+sizeof(struct tMultiBootHeader);
- memcpy(hr->mbh.mover,RDFloaderMover,RDFLDRMOVER_SIZE);
+ memcpy(hr->mbh.trampoline,trampoline_code,TRAMPOLINESIZE);
rdfaddheader(rdfheader,hr);
free(hr);
@@ -931,8 +918,17 @@
* Otherwise, we need to output a new relocation record
* with the references updated segment and offset...
*/
- if (! isrelative
- || cur->seginfo[localseg].dest_seg != seg)
+
+ if (isrelative && cur->seginfo[localseg].dest_seg != seg)
+ {
+ hr->r.segment = cur->seginfo[localseg].dest_seg+64;
+ hr->r.offset += cur->seginfo[localseg].reloc;
+ hr->r.refseg = seg;
+ rdfaddheader(rdfheader, hr);
+ break;
+ }
+
+ if (! isrelative || cur->seginfo[localseg].dest_seg != seg)
{
hr->r.segment = cur->seginfo[localseg].dest_seg;
hr->r.offset += cur->seginfo[localseg].reloc;
@@ -1094,11 +1090,14 @@
struct MultiBootHdrRec *mbhrec = (struct MultiBootHdrRec *)(rdfheader->buf->buffer);
unsigned l = membuflength(rdfheader->buf) + 14 +
10*rdfheader->nsegments + rdfheader->seglength;
- unsigned *ldraddr = (unsigned *)(mbhrec->mover+1);
+ unsigned *ldraddr = (unsigned *)(mbhrec->trampoline+1);
+ unsigned *ldrdest = (unsigned *)(mbhrec->trampoline+6);
mbhrec->mb.LoadEndAddr = MBHloadAddr+l+10+RDFLDR_LENGTH;
mbhrec->mb.BSSendAddr = mbhrec->mb.LoadEndAddr;
+
*ldraddr = MBHloadAddr+l+10;
+ *ldrdest = RDFLDR_DESTLOC;
}
rdfwriteheader(f, rdfheader);
Index: rdflib.c
===================================================================
RCS file: /cvsroot/nasm/nasm/rdoff/rdflib.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- rdflib.c 30 Apr 2002 21:06:17 -0000 1.5
+++ rdflib.c 4 May 2002 05:42:30 -0000 1.6
@@ -3,7 +3,13 @@
/*
* an rdoff library is simply a sequence of RDOFF object files, each
* preceded by the name of the module, an ASCII string of up to 255
- * characters, terminated by a zero.
+ * characters, terminated by a zero.
+ *
+ * When a library is being created, special signature block is placed
+ * in the beginning of the file. It is a string 'RDLIB' followed by a
+ * version number, then long content size and a long time stamp.
+ * The module name of the signature block is '.sig'.
+ *
*
* There may be an optional directory placed on the end of the file.
* The format of the directory will be 'RDLDD' followed by a version
@@ -11,16 +17,17 @@
* directory, the format of which has not yet been designed.
* The module name of the directory must be '.dir'.
*
- * All module names beginning with '.' are reserved
- * for possible future extensions. The linker ignores all such modules,
- * assuming they have the format of a six byte type & version identifier
- * followed by long content size, followed by data.
+ * All module names beginning with '.' are reserved for possible future
+ * extensions. The linker ignores all such modules, assuming they have
+ * the format of a six byte type & version identifier followed by long
+ * content size, followed by data.
*/
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
+#include <time.h>
/* functions supported:
* create a library (no extra operands required)
@@ -41,6 +48,9 @@
" r - replace (module-name filename)\n"
" d - delete (module-name)\n"
" t - list\n";
+
+/* Library signature */
+const char *rdl_signature = "RDLIB2", *sig_modname = ".sig";
char **_argv;
@@ -114,10 +124,11 @@
int main(int argc, char **argv)
{
- FILE *fp, *fp2, *fptmp;
+ FILE *fp, *fp2 = NULL, *fptmp;
char *p, buf[256], c;
int i;
long l;
+ time_t t;
char tmptempl[L_tmpnam], rdbuf[10];
_argv = argv;
@@ -137,6 +148,11 @@
perror("rdflib");
exit(1);
}
+ fwrite(sig_modname, 1, strlen(sig_modname)+1, fp);
+ fwrite(rdl_signature, 1, strlen(rdl_signature), fp);
+ l = sizeof(t = time(NULL));
+ fwrite(&l, sizeof(l), 1, fp);
+ fwrite(&t, 1, l, fp);
fclose(fp);
break;
Index: rdlib.c
===================================================================
RCS file: /cvsroot/nasm/nasm/rdoff/rdlib.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- rdlib.c 30 Apr 2002 20:58:20 -0000 1.2
+++ rdlib.c 4 May 2002 05:42:30 -0000 1.3
@@ -6,11 +6,13 @@
#include "rdlib.h"
/*
- * format of rdoff library files:
+ * format of RDOFF library files:
+ * optional signature ('.sig')
* repeat
* null terminated module name (max 255 chars)
* RDOFF module
* until eof
+ * optional directory ('.dir')
*/
/*
@@ -54,26 +56,27 @@
i++;
if (feof(fp)) break;
- fread(buf, 6, 1, fp);
- buf[6] = 0;
if (buf[0] == '.') {
/*
- * a special module, eg a directory.
+ * A special module, eg a signature block or a directory.
* Format of such a module is defined to be:
- * six char type identifier (which we've already read)
+ * six char type identifier
* long count bytes content
* content
- * so we can handle it uniformaly with RDOFF2 modules...
- * do nothing here. :-)
+ * so we can handle it uniformaly with RDOFF2 modules.
*/
+ fread(buf, 6, 1, fp);
+ buf[6] = 0;
+ /* Currently, nothing useful to do with signature block.. */
+ } else {
+ fread(buf, 6, 1, fp);
+ buf[6] = 0;
+ if (strncmp(buf, "RDOFF", 5)) {
+ return rdl_error = lastresult = 2;
+ } else if (buf[5] != '2') {
+ return rdl_error = lastresult = 3;
+ }
}
- else if (strncmp(buf, "RDOFF", 5)) {
- return rdl_error = lastresult = 2;
- }
- else if (buf[5] != '2') {
- return rdl_error = lastresult = 3;
- }
-
fread(&length, 4, 1, fp);
fseek(fp, length, SEEK_CUR); /* skip over the module */
}
Index: rdoff.c
===================================================================
RCS file: /cvsroot/nasm/nasm/rdoff/rdoff.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- rdoff.c 30 Apr 2002 21:06:17 -0000 1.5
+++ rdoff.c 4 May 2002 05:42:30 -0000 1.6
@@ -481,7 +481,7 @@
#ifdef _MULTBOOT_H
case 9: /* MultiBoot header */
- membufwrite(h->buf,&r->mbh.mb,sizeof(struct tMultiBootHeader)+RDFLDRMOVER_SIZE);
+ membufwrite(h->buf,&r->mbh.mb,sizeof(struct tMultiBootHeader)+TRAMPOLINESIZE);
break ;
#endif
Index: rdoff.h
===================================================================
RCS file: /cvsroot/nasm/nasm/rdoff/rdoff.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- rdoff.h 30 Apr 2002 21:06:17 -0000 1.7
+++ rdoff.h 4 May 2002 05:42:30 -0000 1.8
@@ -77,9 +77,11 @@
#define SYM_FUNCTION 0x02
#define SYM_GLOBAL 0x04
+/* Multiboot record */
+
#ifdef _MULTBOOT_H
-#define RDFLDRMOVER_SIZE 22
+#define TRAMPOLINESIZE 22
struct MultiBootHdrRec {
byte type; /* must be 9 */
@@ -88,9 +90,10 @@
struct tMultiBootHeader mb __attribute__ ((packed)); /* MultiBoot header */
#else
struct tMultiBootHeader mb;
-#endif
- byte mover[RDFLDRMOVER_SIZE]; /* Mover of RDF loader */
+#endif
+ byte trampoline[TRAMPOLINESIZE];
};
+
#endif
/* GenericRec - contains the type and length field, plus a 128 byte
Index: symtab.c
===================================================================
RCS file: /cvsroot/nasm/nasm/rdoff/symtab.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- symtab.c 30 Apr 2002 21:00:40 -0000 1.4
+++ symtab.c 4 May 2002 05:42:30 -0000 1.5
@@ -117,10 +117,14 @@
fprintf(of, " ... slot %d ...\n", i);
}
while(l) {
- fprintf(of, "%-32s %s:%08lx (%ld)\n",l->ent.name,
- SegNames[l->ent.segment],
- l->ent.offset, l->ent.flags);
- l = l->next;
+ if ((l->ent.segment) == -1) {
+ fprintf(of,"%-32s Unresolved reference\n",l->ent.name);
+ } else {
+ fprintf(of, "%-32s %s:%08lx (%ld)\n",l->ent.name,
+ SegNames[l->ent.segment],
+ l->ent.offset, l->ent.flags);
+ }
+ l = l->next;
}
}
fprintf(of, "........... end of Symbol table.\n");
|
|
From: <hp...@us...> - 2002-05-04 05:42:33
|
Update of /cvsroot/nasm/nasm/rdoff/test
In directory usw-pr-cvs1:/tmp/cvs-serv6253/rdoff/test
Modified Files:
makelib.sh
Log Message:
RDOFF patch from Yuri Zaporogets:
- Panos Minos's LDRDF fix (correct export of relocation records);
- Panos Minos's symtab.c verbose dump fix;
- Librarian (rdflib) now puts a signature block when creating a library
(instead of creating an empty file). In theory it doesn't break binary
compatibility, but due to a bug in the original 'rdlib.c' you can't
use old LDRDF with new libraries. Fix this bug as well.
- Other minor changes in LDRDF.
Index: makelib.sh
===================================================================
RCS file: /cvsroot/nasm/nasm/rdoff/test/makelib.sh,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- makelib.sh 30 Apr 2002 21:09:18 -0000 1.2
+++ makelib.sh 4 May 2002 05:42:30 -0000 1.3
@@ -1,5 +1,5 @@
#! /bin/sh
-
+
[ $1 ] || {
echo "Usage: $0 <library name> <module> [...]"
exit 1
|
|
From: <hp...@us...> - 2002-05-04 05:14:06
|
Update of /cvsroot/nasm/nasm In directory usw-pr-cvs1:/tmp/cvs-serv2658 Modified Files: Makefile.in Added Files: nasm.spec.in Removed Files: nasm.spec Log Message: Update nasm.spec; preprocess it to use the version number from the "version" file. --- NEW FILE: nasm.spec.in --- Summary: The Netwide Assembler, a portable x86 assembler with Intel-like syntax Name: nasm Version: @@VERSION@@ Release: 1 Copyright: LGPL Group: Development/Languages Source: ftp://download.sourceforge.net/pub/sourceforge/nasm/nasm-%{version}.tar.bz2 URL: http://nasm.2y.net/ BuildRoot: /tmp/rpm-build-nasm Prefix: /usr Patch0: nasm-0.98.25alt-nasmopt.diff BuildPrereq: perl %package doc Summary: Extensive documentation for NASM Group: Development/Languages Prereq: /sbin/install-info %package rdoff Summary: Tools for the RDOFF binary format, sometimes used with NASM. Group: Development/Tools %description NASM is the Netwide Assembler, a free portable assembler for the Intel 80x86 microprocessor series, using primarily the traditional Intel instruction mnemonics and syntax. %description doc Extensive documentation for the Netwide Assembler, NASM, in HTML, info, PostScript and text formats. %description rdoff Tools for the operating-system independent RDOFF binary format, which is sometimes used with the Netwide Assembler (NASM). These tools include linker, library manager, loader, and information dump. %prep %setup %patch0 -p1 %build CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr make everything %install rm -rf "$RPM_BUILD_ROOT" mkdir -p "$RPM_BUILD_ROOT" mkdir -p "$RPM_BUILD_ROOT"/usr/bin mkdir -p "$RPM_BUILD_ROOT"/usr/man/man1 mkdir -p "$RPM_BUILD_ROOT"/usr/info DOC="$RPM_BUILD_ROOT"/usr/doc/nasm-%{version} mkdir -p "$DOC" mkdir -p "$DOC"/rdoff rm -f "$RPM_BUILD_ROOT"/usr/info/nasm.* make INSTALLROOT="$RPM_BUILD_ROOT" docdir=/usr/doc/nasm-%{version} install_everything gzip -9 "$RPM_BUILD_ROOT"/usr/info/nasm.* gzip -9 "$DOC"/*.txt "$DOC"/*.ps cp AUTHORS CHANGES COPYING README TODO doc/*.doc "$DOC" cp rdoff/README "$DOC"/rdoff cp rdoff/doc/* "$DOC"/rdoff %clean rm -rf "$RPM_BUILD_ROOT" %post doc /sbin/install-info "$RPM_INSTALL_PREFIX"/info/nasm.info.gz "$RPM_INSTALL_PREFIX"/info/dir %preun doc if [ $1 = 0 ]; then /sbin/install-info --delete "$RPM_INSTALL_PREFIX"/info/nasm.info.gz "$RPM_INSTALL_PREFIX"/info/dir fi %files %attr(-,root,root) /usr/bin/nasm %attr(-,root,root) /usr/bin/ndisasm %attr(-,root,root) %doc /usr/man/man1/nasm.1* %attr(-,root,root) %doc /usr/man/man1/ndisasm.1* %files doc %attr(-,root,root) %doc /usr/info/nasm.info*.gz %attr(-,root,root) %doc /usr/doc/nasm-%{version}/* %files rdoff %attr(-,root,root) /usr/bin/ldrdf %attr(-,root,root) /usr/bin/rdf2bin %attr(-,root,root) /usr/bin/rdf2com %attr(-,root,root) /usr/bin/rdfdump %attr(-,root,root) /usr/bin/rdflib %attr(-,root,root) /usr/bin/rdx %attr(-,root,root) %doc /usr/doc/nasm-%{version}/rdoff/* Index: Makefile.in =================================================================== RCS file: /cvsroot/nasm/nasm/Makefile.in,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- Makefile.in 4 May 2002 03:57:52 -0000 1.30 +++ Makefile.in 4 May 2002 05:14:03 -0000 1.31 @@ -132,6 +132,7 @@ cleaner: clean rm -f insnsa.c insnsd.c insnsi.h insnsn.c macros.c *.man + rm -f nasm.spec cd doc && $(MAKE) clean spotless: distclean cleaner @@ -159,3 +160,6 @@ autoconf rm -rf ./autom4te.cache tar cvjf ../nasm-`cat version`-`date +%Y%m%d`.tar.bz2 ../`./nasm-dir` + +nasm.spec: nasm.spec.in version + sed -e s/@@VERSION@@/`cat version`/g < nasm.spec.in > nasm.spec --- nasm.spec DELETED --- |
|
From: <hp...@us...> - 2002-05-04 04:11:02
|
Update of /cvsroot/nasm/nasm/doc
In directory usw-pr-cvs1:/tmp/cvs-serv26159/doc
Modified Files:
nasmdoc.src
Log Message:
Change the NASM environment variable to NASMOPT.
Index: nasmdoc.src
===================================================================
RCS file: /cvsroot/nasm/nasm/doc/nasmdoc.src,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- nasmdoc.src 30 Apr 2002 21:09:16 -0000 1.23
+++ nasmdoc.src 4 May 2002 04:11:00 -0000 1.24
@@ -561,7 +561,7 @@
If you want to define a \e{standard} \i{include search path},
similar to \c{/usr/include} on Unix systems, you should place one or
-more \c{-i} directives in the \c{NASM} environment variable (see
+more \c{-i} directives in the \c{NASMOPT} environment variable (see
\k{nasmenv}).
For Makefile compatibility with many C compilers, this option can also
@@ -762,13 +762,13 @@
You will need the version number if you report a bug.
-\S{nasmenv} The \c{NASM} \i{Environment} Variable
+\S{nasmenv} The \c{NASMOPT} \i{Environment} Variable
-If you define an environment variable called \c{NASM}, the program
+If you define an environment variable called \c{NASMOPT}, the program
will interpret it as a list of extra command-line options, which are
processed before the real command line. You can use this to define
standard search directories for include files, by putting \c{-i}
-options in the \c{NASM} variable.
+options in the \c{NASMOPT} variable.
The value of the variable is split up at white space, so that the
value \c{-s -ic:\\nasmlib} will be treated as two separate options.
@@ -778,12 +778,15 @@
nonsensical words \c{-dNAME="my} and \c{name"}.
To get round this, NASM provides a feature whereby, if you begin the
-\c{NASM} environment variable with some character that isn't a minus
+\c{NASMOPT} environment variable with some character that isn't a minus
sign, then NASM will treat this character as the \i{separator
-character} for options. So setting the \c{NASM} variable to the
+character} for options. So setting the \c{NASMOPT} variable to the
value \c{!-s!-ic:\\nasmlib} is equivalent to setting it to \c{-s
-ic:\\nasmlib}, but \c{!-dNAME="my name"} will work.
+This variable was called \c{NASM} in earlier versions of NASM,
+however, this caused problems with makefiles which used a \c{$(NASM)}
+variable.
\H{qstart} \i{Quick Start} for \i{MASM} Users
@@ -5655,7 +5658,7 @@
\b Which version of NASM you're using, and exactly how you invoked
it. Give us the precise command line, and the contents of the
-\c{NASM} environment variable if any.
+\c{NASMOPT} environment variable if any.
\b Which versions of any supplementary programs you're using, and
how you invoked them. If the problem only becomes visible at link
|