From b9fad1ab2ad3bd87bff05c4688c978d582ada438 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Tue, 15 May 2012 22:27:48 +0100 Subject: Upstream version 2.08rc7 --- AUTHORS | 137 + CHANGES | 2 + ChangeLog | 2905 +++++++ INSTALL | 102 + LICENSE | 29 + Makefile.in | 378 + Mkfiles/README | 42 + Mkfiles/msvc.mak | 300 + Mkfiles/netware.mak | 235 + Mkfiles/openwcom.mak | 329 + Mkfiles/owlinux.mak | 339 + README | 23 + TODO | 376 + aclocal.m4 | 39 + assemble.c | 2603 ++++++ assemble.h | 47 + autogen.sh | 7 + compiler.h | 186 + config.h.in | 189 + configure | 9270 ++++++++++++++++++++++ configure.in | 156 + contrib/VSrules/nasm.README | 16 + contrib/VSrules/nasm.rules | 79 + crc64.c | 188 + directives.c | 127 + directives.dat | 62 + directives.h | 39 + directives.pl | 171 + disasm.c | 1559 ++++ disasm.h | 47 + doc/Makefile | 102 + doc/Makefile.in | 102 + doc/afmmetrics.pl | 130 + doc/changes.src | 1938 +++++ doc/genps.pl | 1231 +++ doc/genpsdriver.pl | 64 + doc/head.ps | 391 + doc/inslist.pl | 98 + doc/internal.doc | 290 + doc/makedocs.bat | 255 + doc/metrics/pagd8a.ph | 72 + doc/metrics/pagdo8a.ph | 72 + doc/metrics/pagk8a.ph | 72 + doc/metrics/pagko8a.ph | 72 + doc/metrics/pbkd8a.ph | 72 + doc/metrics/pbkdi8a.ph | 72 + doc/metrics/pbkl8a.ph | 72 + doc/metrics/pbkli8a.ph | 72 + doc/metrics/pcrb8a.ph | 82 + doc/metrics/pcrbo8a.ph | 82 + doc/metrics/pcrr8a.ph | 82 + doc/metrics/pcrro8a.ph | 82 + doc/metrics/phvb8a.ph | 72 + doc/metrics/phvb8an.ph | 71 + doc/metrics/phvbo8a.ph | 72 + doc/metrics/phvbo8an.ph | 71 + doc/metrics/phvl8a.ph | 72 + doc/metrics/phvlo8a.ph | 72 + doc/metrics/phvr8a.ph | 72 + doc/metrics/phvr8an.ph | 71 + doc/metrics/phvro8a.ph | 72 + doc/metrics/phvro8an.ph | 71 + doc/metrics/pncb8a.ph | 72 + doc/metrics/pncbi8a.ph | 72 + doc/metrics/pncr8a.ph | 72 + doc/metrics/pncri8a.ph | 72 + doc/metrics/pplb8a.ph | 72 + doc/metrics/pplbi8a.ph | 72 + doc/metrics/pplr8a.ph | 72 + doc/metrics/pplri8a.ph | 72 + doc/metrics/psyr.ph | 68 + doc/metrics/ptmb8a.ph | 72 + doc/metrics/ptmbi8a.ph | 72 + doc/metrics/ptmr8a.ph | 72 + doc/metrics/ptmri8a.ph | 71 + doc/metrics/putb8a.ph | 72 + doc/metrics/putbi8a.ph | 72 + doc/metrics/putr8a.ph | 72 + doc/metrics/putri8a.ph | 72 + doc/metrics/pzcmi8a.ph | 72 + doc/metrics/pzdr.ph | 57 + doc/nasmdoc.src | 7930 +++++++++++++++++++ doc/nasmlogo.eps | 35 + doc/opt_var.txt | 114 + doc/psfonts.ph | 112 + doc/pswidth.ph | 26 + doc/rdsrc.pl | 1509 ++++ eval.c | 977 +++ eval.h | 58 + exprlib.c | 186 + float.c | 956 +++ float.h | 55 + hashtbl.c | 233 + hashtbl.h | 86 + headers/c | 33 + headers/doc | 33 + headers/mac | 33 + headers/perl | 33 + insns.dat | 3243 ++++++++ insns.h | 135 + insns.pl | 936 +++ insnsa.c | 10480 +++++++++++++++++++++++++ insnsb.c | 3016 +++++++ insnsd.c | 17415 +++++++++++++++++++++++++++++++++++++++++ insnsi.h | 1395 ++++ insnsn.c | 1384 ++++ install-sh | 250 + inttypes/inttypes.h | 201 + labels.c | 527 ++ labels.h | 56 + lcc/README | 52 + lcc/bind.c | 23 + lcc/lin-aout.c | 48 + lcc/lin-elf.c | 49 + lcc/x86nasm.md | 703 ++ lib/snprintf.c | 25 + lib/strlcpy.c | 53 + lib/vsnprintf.c | 49 + listing.c | 387 + listing.h | 44 + macros.c | 516 ++ macros.pl | 239 + macros/altreg.mac | 107 + macros/smartalign.mac | 182 + misc/Doxyfile | 752 ++ misc/Nindent | 18 + misc/README | 2 + misc/altreg.inc | 72 + misc/c16.mac | 82 + misc/c32.mac | 52 + misc/cleanfile | 176 + misc/cleanpatch | 258 + misc/crcgen.c | 44 + misc/exebin.mac | 57 + misc/exebin2.mac | 114 + misc/findleak.pl | 42 + misc/findleak.txt | 59 + misc/fmtinsns.pl | 40 + misc/genfma.pl | 63 + misc/hints.txt | 26 + misc/magic | 6 + misc/makedist.sh | 71 + misc/myC32.mac | 121 + misc/nasm.sl | 320 + misc/nasmstab | 296 + misc/omfdump.c | 223 + misc/pmw.bat | 9 + misc/proc32.ash | 441 ++ misc/release | 96 + misc/scitech.mac | 1223 +++ misc/tag-release | 13 + misc/xcrcgen.c | 80 + mkdep.pl | 238 + nasm.1 | 535 ++ nasm.c | 2120 +++++ nasm.h | 893 +++ nasm.nsi | 204 + nasm.spec | 104 + nasm.spec.in | 104 + nasmlib.c | 729 ++ nasmlib.h | 446 ++ ndisasm.1 | 129 + ndisasm.c | 390 + nsis/nasm-un.ico | Bin 0 -> 2238 bytes nsis/nasm.ico | Bin 0 -> 2238 bytes opflags.h | 239 + output/dwarf.h | 566 ++ output/elf.h | 534 ++ output/nulldbg.c | 91 + output/nullout.c | 51 + output/outaout.c | 955 +++ output/outaout.mac | 37 + output/outas86.c | 647 ++ output/outas86.mac | 37 + output/outbin.c | 1719 ++++ output/outbin.mac | 40 + output/outcoff.c | 1065 +++ output/outcoff.mac | 43 + output/outdbg.c | 268 + output/outelf.c | 67 + output/outelf.h | 95 + output/outelf.mac | 41 + output/outelf32.c | 2191 ++++++ output/outelf64.c | 2267 ++++++ output/outform.c | 92 + output/outform.h | 344 + output/outieee.c | 1510 ++++ output/outlib.c | 56 + output/outlib.h | 59 + output/outmacho.mac | 37 + output/outmacho32.c | 1357 ++++ output/outmacho64.c | 1508 ++++ output/outobj.c | 2567 ++++++ output/outobj.mac | 49 + output/outrdf.mac | 40 + output/outrdf2.c | 797 ++ output/outrdf2.mac | 43 + output/stabs.h | 145 + parser.c | 974 +++ parser.h | 46 + perllib/README | 5 + perllib/crc64.ph | 158 + perllib/gensv.pl | 34 + perllib/phash.ph | 228 + perllib/random_sv_vectors.ph | 67 + phash.pl | 83 + pptok.c | 510 ++ pptok.dat | 94 + pptok.h | 159 + pptok.ph | 94 + pptok.pl | 270 + preproc.c | 4943 ++++++++++++ preproc.h | 57 + quote.c | 477 ++ quote.h | 44 + raa.c | 128 + raa.h | 89 + rbtree.c | 119 + rbtree.h | 52 + rdoff/Makefile.in | 105 + rdoff/Mkfiles/Makefile.dj | 75 + rdoff/Mkfiles/Makefile.emx | 76 + rdoff/Mkfiles/Makefile.sc | 56 + rdoff/Mkfiles/Makefile.unx | 75 + rdoff/Mkfiles/README | 4 + rdoff/README | 185 + rdoff/collectn.c | 45 + rdoff/collectn.h | 22 + rdoff/doc/Makefile | 37 + rdoff/doc/rdoff.texi | 137 + rdoff/doc/v1-v2.txt | 62 + rdoff/hash.c | 122 + rdoff/hash.h | 18 + rdoff/ldrdf.1 | 41 + rdoff/ldrdf.c | 1360 ++++ rdoff/ldsegs.h | 60 + rdoff/rdf2bin.1 | 65 + rdoff/rdf2bin.c | 430 + rdoff/rdf2com.1 | 1 + rdoff/rdf2ihx.1 | 1 + rdoff/rdf2ith.1 | 1 + rdoff/rdf2srec.1 | 1 + rdoff/rdfdump.1 | 24 + rdoff/rdfdump.c | 347 + rdoff/rdflib.1 | 39 + rdoff/rdflib.c | 428 + rdoff/rdfload.c | 212 + rdoff/rdfload.h | 31 + rdoff/rdlar.c | 490 ++ rdoff/rdlar.h | 38 + rdoff/rdlib.c | 296 + rdoff/rdlib.h | 62 + rdoff/rdoff.c | 611 ++ rdoff/rdoff.h | 293 + rdoff/rdx.1 | 21 + rdoff/rdx.c | 88 + rdoff/segtab.c | 175 + rdoff/segtab.h | 46 + rdoff/symtab.c | 159 + rdoff/symtab.h | 56 + rdoff/test/Makefile | 10 + rdoff/test/makelib.sh | 14 + rdoff/test/rdfseg.asm | 20 + rdoff/test/rdfseg2.asm | 12 + rdoff/test/rdftest1.asm | 54 + rdoff/test/rdftest2.asm | 33 + rdoff/test/rdtlib.asm | 48 + rdoff/test/rdtmain.asm | 47 + rdoff/test/testlib.asm | 18 + regdis.c | 17 + regdis.h | 22 + regflags.c | 172 + regs.c | 170 + regs.dat | 119 + regs.h | 346 + regs.pl | 204 + regvals.c | 171 + saa.c | 417 + saa.h | 93 + standard.mac | 189 + stdscan.c | 272 + stdscan.h | 49 + strfunc.c | 203 + sync.c | 133 + sync.h | 45 + syncfiles.pl | 126 + tables.h | 69 + test/Makefile | 91 + test/_file_.asm | 5 + test/_version.asm | 2 + test/a32offs.asm | 9 + test/absolute.asm | 40 + test/addr64x.asm | 18 + test/align13.asm | 16 + test/align13s.asm | 16 + test/alonesym-obj.asm | 163 + test/andbyte.asm | 15 + test/aoutso.asm | 99 + test/aouttest.asm | 86 + test/aouttest.c | 36 + test/avx.asm | 53 + test/avx005.asm | 529 ++ test/bcd.asm | 21 + test/binexe.asm | 35 + test/bintest.asm | 59 + test/bisect.sh | 22 + test/br1879590.asm | 25 + test/br2003451.asm | 15 + test/br2030823.asm | 5 + test/br2148476.asm | 221 + test/br2222615.asm | 19 + test/br560575.asm | 17 + test/br560873.asm | 27 + test/br890790.asm | 7 + test/br890790_i.asm | 1 + test/changed.asm | 383 + test/cofftest.asm | 85 + test/cofftest.c | 35 + test/crc32.asm | 37 + test/dtbcd.asm | 72 + test/elf64so.asm | 118 + test/elfso.asm | 100 + test/elftest.asm | 87 + test/elftest.c | 38 + test/elftest64.c | 43 + test/elif.asm | 39 + test/expimp.asm | 90 + test/far64.asm | 10 + test/float.asm | 186 + test/float8.asm | 135 + test/floatb.asm | 35 + test/floatexp.asm | 382 + test/floatize.asm | 19 + test/floattest.asm | 28 + test/floatx.asm | 525 ++ test/fpu.asm | 127 + test/fwdopt.asm | 133 + test/fwdoptpp.asm | 150 + test/gotoff64.asm | 25 + test/ifelse.asm | 46 + test/ifmacro.asm | 413 + test/iftoken.asm | 317 + test/iftoken.pl | 32 + test/imacro.asm | 8 + test/imm64.asm | 7 + test/immwarn.asm | 91 + test/imul.asm | 117 + test/inc1.asm | 6 + test/inc2.asm | 8 + test/inctest.asm | 15 + test/insnlbl.asm | 12 + test/invlpga.asm | 11 + test/jmp64.asm | 15 + test/lar_lsl.asm | 124 + test/larlsl.asm | 23 + test/lnxhello.asm | 54 + test/local.asm | 19 + test/loopoffs.asm | 12 + test/macro-defaults.asm | 64 + test/mmxsize.asm | 38 + test/movimm.asm | 28 + test/movnti.asm | 10 + test/multisection.asm | 96 + test/nasmformat.asm | 17 + test/new | 9 + test/nop.asm | 17 + test/nullfile.asm | 4 + test/objexe.asm | 30 + test/objlink.c | 33 + test/objtest.asm | 85 + test/optimization.asm | 104 + test/org.asm | 18 + test/perf/label.pl | 18 + test/perf/macro.pl | 18 + test/perf/token.pl | 23 + test/performtest.pl | 192 + test/pinsr16.asm | 53 + test/pinsr32.asm | 53 + test/pinsr64.asm | 68 + test/popcnt.asm | 32 + test/ppindirect.asm | 42 + test/pushseg.asm | 17 + test/r13.asm | 15 + test/radix.asm | 54 + test/riprel.asm | 5357 +++++++++++++ test/riprel.pl | 29 + test/riprel2.asm | 11 + test/smartalign16.asm | 36 + test/smartalign32.asm | 36 + test/smartalign64.asm | 36 + test/struc.asm | 33 + test/test67.asm | 38 + test/testdos.asm | 13 + test/testnos3.asm | 973 +++ test/time.asm | 11 + test/tmap.nas | 1447 ++++ test/uscore.asm | 15 + test/utf.asm | 30 + test/vmread.asm | 26 + test/weirdpaste.asm | 29 + test/xchg.asm | 96 + test/xcrypt.asm | 24 + test/zerobyte.asm | 22 + tokens.dat | 96 + tokens.h | 11 + tokhash.c | 5821 ++++++++++++++ tokhash.pl | 275 + ver.c | 51 + version | 1 + version.h | 9 + version.mac | 6 + version.mak | 5 + version.nsh | 5 + version.pl | 185 + version.sed | 9 + 415 files changed, 151517 insertions(+) create mode 100644 AUTHORS create mode 100644 CHANGES create mode 100644 ChangeLog create mode 100644 INSTALL create mode 100644 LICENSE create mode 100644 Makefile.in create mode 100644 Mkfiles/README create mode 100644 Mkfiles/msvc.mak create mode 100644 Mkfiles/netware.mak create mode 100644 Mkfiles/openwcom.mak create mode 100644 Mkfiles/owlinux.mak create mode 100644 README create mode 100644 TODO create mode 100644 aclocal.m4 create mode 100644 assemble.c create mode 100644 assemble.h create mode 100755 autogen.sh create mode 100644 compiler.h create mode 100644 config.h.in create mode 100755 configure create mode 100644 configure.in create mode 100644 contrib/VSrules/nasm.README create mode 100644 contrib/VSrules/nasm.rules create mode 100644 crc64.c create mode 100644 directives.c create mode 100644 directives.dat create mode 100644 directives.h create mode 100755 directives.pl create mode 100644 disasm.c create mode 100644 disasm.h create mode 100644 doc/Makefile create mode 100644 doc/Makefile.in create mode 100755 doc/afmmetrics.pl create mode 100644 doc/changes.src create mode 100755 doc/genps.pl create mode 100644 doc/genpsdriver.pl create mode 100644 doc/head.ps create mode 100644 doc/inslist.pl create mode 100644 doc/internal.doc create mode 100644 doc/makedocs.bat create mode 100644 doc/metrics/pagd8a.ph create mode 100644 doc/metrics/pagdo8a.ph create mode 100644 doc/metrics/pagk8a.ph create mode 100644 doc/metrics/pagko8a.ph create mode 100644 doc/metrics/pbkd8a.ph create mode 100644 doc/metrics/pbkdi8a.ph create mode 100644 doc/metrics/pbkl8a.ph create mode 100644 doc/metrics/pbkli8a.ph create mode 100644 doc/metrics/pcrb8a.ph create mode 100644 doc/metrics/pcrbo8a.ph create mode 100644 doc/metrics/pcrr8a.ph create mode 100644 doc/metrics/pcrro8a.ph create mode 100644 doc/metrics/phvb8a.ph create mode 100644 doc/metrics/phvb8an.ph create mode 100644 doc/metrics/phvbo8a.ph create mode 100644 doc/metrics/phvbo8an.ph create mode 100644 doc/metrics/phvl8a.ph create mode 100644 doc/metrics/phvlo8a.ph create mode 100644 doc/metrics/phvr8a.ph create mode 100644 doc/metrics/phvr8an.ph create mode 100644 doc/metrics/phvro8a.ph create mode 100644 doc/metrics/phvro8an.ph create mode 100644 doc/metrics/pncb8a.ph create mode 100644 doc/metrics/pncbi8a.ph create mode 100644 doc/metrics/pncr8a.ph create mode 100644 doc/metrics/pncri8a.ph create mode 100644 doc/metrics/pplb8a.ph create mode 100644 doc/metrics/pplbi8a.ph create mode 100644 doc/metrics/pplr8a.ph create mode 100644 doc/metrics/pplri8a.ph create mode 100644 doc/metrics/psyr.ph create mode 100644 doc/metrics/ptmb8a.ph create mode 100644 doc/metrics/ptmbi8a.ph create mode 100644 doc/metrics/ptmr8a.ph create mode 100644 doc/metrics/ptmri8a.ph create mode 100644 doc/metrics/putb8a.ph create mode 100644 doc/metrics/putbi8a.ph create mode 100644 doc/metrics/putr8a.ph create mode 100644 doc/metrics/putri8a.ph create mode 100644 doc/metrics/pzcmi8a.ph create mode 100644 doc/metrics/pzdr.ph create mode 100644 doc/nasmdoc.src create mode 100644 doc/nasmlogo.eps create mode 100644 doc/opt_var.txt create mode 100644 doc/psfonts.ph create mode 100644 doc/pswidth.ph create mode 100644 doc/rdsrc.pl create mode 100644 eval.c create mode 100644 eval.h create mode 100644 exprlib.c create mode 100644 float.c create mode 100644 float.h create mode 100644 hashtbl.c create mode 100644 hashtbl.h create mode 100644 headers/c create mode 100644 headers/doc create mode 100644 headers/mac create mode 100644 headers/perl create mode 100644 insns.dat create mode 100644 insns.h create mode 100755 insns.pl create mode 100644 insnsa.c create mode 100644 insnsb.c create mode 100644 insnsd.c create mode 100644 insnsi.h create mode 100644 insnsn.c create mode 100755 install-sh create mode 100644 inttypes/inttypes.h create mode 100644 labels.c create mode 100644 labels.h create mode 100644 lcc/README create mode 100644 lcc/bind.c create mode 100644 lcc/lin-aout.c create mode 100644 lcc/lin-elf.c create mode 100644 lcc/x86nasm.md create mode 100644 lib/snprintf.c create mode 100644 lib/strlcpy.c create mode 100644 lib/vsnprintf.c create mode 100644 listing.c create mode 100644 listing.h create mode 100644 macros.c create mode 100755 macros.pl create mode 100644 macros/altreg.mac create mode 100644 macros/smartalign.mac create mode 100644 misc/Doxyfile create mode 100755 misc/Nindent create mode 100644 misc/README create mode 100644 misc/altreg.inc create mode 100644 misc/c16.mac create mode 100644 misc/c32.mac create mode 100755 misc/cleanfile create mode 100755 misc/cleanpatch create mode 100644 misc/crcgen.c create mode 100644 misc/exebin.mac create mode 100644 misc/exebin2.mac create mode 100755 misc/findleak.pl create mode 100644 misc/findleak.txt create mode 100755 misc/fmtinsns.pl create mode 100755 misc/genfma.pl create mode 100644 misc/hints.txt create mode 100644 misc/magic create mode 100755 misc/makedist.sh create mode 100644 misc/myC32.mac create mode 100644 misc/nasm.sl create mode 100644 misc/nasmstab create mode 100644 misc/omfdump.c create mode 100644 misc/pmw.bat create mode 100644 misc/proc32.ash create mode 100755 misc/release create mode 100644 misc/scitech.mac create mode 100755 misc/tag-release create mode 100644 misc/xcrcgen.c create mode 100755 mkdep.pl create mode 100644 nasm.1 create mode 100644 nasm.c create mode 100644 nasm.h create mode 100644 nasm.nsi create mode 100644 nasm.spec create mode 100644 nasm.spec.in create mode 100644 nasmlib.c create mode 100644 nasmlib.h create mode 100644 ndisasm.1 create mode 100644 ndisasm.c create mode 100644 nsis/nasm-un.ico create mode 100644 nsis/nasm.ico create mode 100644 opflags.h create mode 100644 output/dwarf.h create mode 100644 output/elf.h create mode 100644 output/nulldbg.c create mode 100644 output/nullout.c create mode 100644 output/outaout.c create mode 100644 output/outaout.mac create mode 100644 output/outas86.c create mode 100644 output/outas86.mac create mode 100644 output/outbin.c create mode 100644 output/outbin.mac create mode 100644 output/outcoff.c create mode 100644 output/outcoff.mac create mode 100644 output/outdbg.c create mode 100644 output/outelf.c create mode 100644 output/outelf.h create mode 100644 output/outelf.mac create mode 100644 output/outelf32.c create mode 100644 output/outelf64.c create mode 100644 output/outform.c create mode 100644 output/outform.h create mode 100644 output/outieee.c create mode 100644 output/outlib.c create mode 100644 output/outlib.h create mode 100644 output/outmacho.mac create mode 100644 output/outmacho32.c create mode 100644 output/outmacho64.c create mode 100644 output/outobj.c create mode 100644 output/outobj.mac create mode 100644 output/outrdf.mac create mode 100644 output/outrdf2.c create mode 100644 output/outrdf2.mac create mode 100644 output/stabs.h create mode 100644 parser.c create mode 100644 parser.h create mode 100644 perllib/README create mode 100644 perllib/crc64.ph create mode 100755 perllib/gensv.pl create mode 100644 perllib/phash.ph create mode 100644 perllib/random_sv_vectors.ph create mode 100755 phash.pl create mode 100644 pptok.c create mode 100644 pptok.dat create mode 100644 pptok.h create mode 100644 pptok.ph create mode 100755 pptok.pl create mode 100644 preproc.c create mode 100644 preproc.h create mode 100644 quote.c create mode 100644 quote.h create mode 100644 raa.c create mode 100644 raa.h create mode 100644 rbtree.c create mode 100644 rbtree.h create mode 100644 rdoff/Makefile.in create mode 100644 rdoff/Mkfiles/Makefile.dj create mode 100644 rdoff/Mkfiles/Makefile.emx create mode 100644 rdoff/Mkfiles/Makefile.sc create mode 100644 rdoff/Mkfiles/Makefile.unx create mode 100644 rdoff/Mkfiles/README create mode 100644 rdoff/README create mode 100644 rdoff/collectn.c create mode 100644 rdoff/collectn.h create mode 100644 rdoff/doc/Makefile create mode 100644 rdoff/doc/rdoff.texi create mode 100644 rdoff/doc/v1-v2.txt create mode 100644 rdoff/hash.c create mode 100644 rdoff/hash.h create mode 100644 rdoff/ldrdf.1 create mode 100644 rdoff/ldrdf.c create mode 100644 rdoff/ldsegs.h create mode 100644 rdoff/rdf2bin.1 create mode 100644 rdoff/rdf2bin.c create mode 100644 rdoff/rdf2com.1 create mode 100644 rdoff/rdf2ihx.1 create mode 100644 rdoff/rdf2ith.1 create mode 100644 rdoff/rdf2srec.1 create mode 100644 rdoff/rdfdump.1 create mode 100644 rdoff/rdfdump.c create mode 100644 rdoff/rdflib.1 create mode 100644 rdoff/rdflib.c create mode 100644 rdoff/rdfload.c create mode 100644 rdoff/rdfload.h create mode 100644 rdoff/rdlar.c create mode 100644 rdoff/rdlar.h create mode 100644 rdoff/rdlib.c create mode 100644 rdoff/rdlib.h create mode 100644 rdoff/rdoff.c create mode 100644 rdoff/rdoff.h create mode 100644 rdoff/rdx.1 create mode 100644 rdoff/rdx.c create mode 100644 rdoff/segtab.c create mode 100644 rdoff/segtab.h create mode 100644 rdoff/symtab.c create mode 100644 rdoff/symtab.h create mode 100644 rdoff/test/Makefile create mode 100644 rdoff/test/makelib.sh create mode 100644 rdoff/test/rdfseg.asm create mode 100644 rdoff/test/rdfseg2.asm create mode 100644 rdoff/test/rdftest1.asm create mode 100644 rdoff/test/rdftest2.asm create mode 100644 rdoff/test/rdtlib.asm create mode 100644 rdoff/test/rdtmain.asm create mode 100644 rdoff/test/testlib.asm create mode 100644 regdis.c create mode 100644 regdis.h create mode 100644 regflags.c create mode 100644 regs.c create mode 100644 regs.dat create mode 100644 regs.h create mode 100755 regs.pl create mode 100644 regvals.c create mode 100644 saa.c create mode 100644 saa.h create mode 100644 standard.mac create mode 100644 stdscan.c create mode 100644 stdscan.h create mode 100644 strfunc.c create mode 100644 sync.c create mode 100644 sync.h create mode 100755 syncfiles.pl create mode 100644 tables.h create mode 100644 test/Makefile create mode 100644 test/_file_.asm create mode 100644 test/_version.asm create mode 100644 test/a32offs.asm create mode 100644 test/absolute.asm create mode 100644 test/addr64x.asm create mode 100644 test/align13.asm create mode 100644 test/align13s.asm create mode 100644 test/alonesym-obj.asm create mode 100644 test/andbyte.asm create mode 100644 test/aoutso.asm create mode 100644 test/aouttest.asm create mode 100644 test/aouttest.c create mode 100644 test/avx.asm create mode 100644 test/avx005.asm create mode 100644 test/bcd.asm create mode 100644 test/binexe.asm create mode 100644 test/bintest.asm create mode 100755 test/bisect.sh create mode 100644 test/br1879590.asm create mode 100644 test/br2003451.asm create mode 100644 test/br2030823.asm create mode 100644 test/br2148476.asm create mode 100644 test/br2222615.asm create mode 100644 test/br560575.asm create mode 100644 test/br560873.asm create mode 100644 test/br890790.asm create mode 100644 test/br890790_i.asm create mode 100644 test/changed.asm create mode 100644 test/cofftest.asm create mode 100644 test/cofftest.c create mode 100644 test/crc32.asm create mode 100644 test/dtbcd.asm create mode 100644 test/elf64so.asm create mode 100644 test/elfso.asm create mode 100644 test/elftest.asm create mode 100644 test/elftest.c create mode 100644 test/elftest64.c create mode 100644 test/elif.asm create mode 100644 test/expimp.asm create mode 100644 test/far64.asm create mode 100644 test/float.asm create mode 100644 test/float8.asm create mode 100644 test/floatb.asm create mode 100644 test/floatexp.asm create mode 100644 test/floatize.asm create mode 100644 test/floattest.asm create mode 100644 test/floatx.asm create mode 100644 test/fpu.asm create mode 100644 test/fwdopt.asm create mode 100644 test/fwdoptpp.asm create mode 100644 test/gotoff64.asm create mode 100644 test/ifelse.asm create mode 100644 test/ifmacro.asm create mode 100644 test/iftoken.asm create mode 100755 test/iftoken.pl create mode 100644 test/imacro.asm create mode 100644 test/imm64.asm create mode 100644 test/immwarn.asm create mode 100644 test/imul.asm create mode 100644 test/inc1.asm create mode 100644 test/inc2.asm create mode 100644 test/inctest.asm create mode 100644 test/insnlbl.asm create mode 100644 test/invlpga.asm create mode 100644 test/jmp64.asm create mode 100644 test/lar_lsl.asm create mode 100644 test/larlsl.asm create mode 100644 test/lnxhello.asm create mode 100644 test/local.asm create mode 100644 test/loopoffs.asm create mode 100644 test/macro-defaults.asm create mode 100644 test/mmxsize.asm create mode 100644 test/movimm.asm create mode 100644 test/movnti.asm create mode 100644 test/multisection.asm create mode 100644 test/nasmformat.asm create mode 100755 test/new create mode 100644 test/nop.asm create mode 100644 test/nullfile.asm create mode 100644 test/objexe.asm create mode 100644 test/objlink.c create mode 100644 test/objtest.asm create mode 100644 test/optimization.asm create mode 100644 test/org.asm create mode 100755 test/perf/label.pl create mode 100755 test/perf/macro.pl create mode 100755 test/perf/token.pl create mode 100755 test/performtest.pl create mode 100644 test/pinsr16.asm create mode 100644 test/pinsr32.asm create mode 100644 test/pinsr64.asm create mode 100644 test/popcnt.asm create mode 100644 test/ppindirect.asm create mode 100644 test/pushseg.asm create mode 100644 test/r13.asm create mode 100644 test/radix.asm create mode 100644 test/riprel.asm create mode 100755 test/riprel.pl create mode 100644 test/riprel2.asm create mode 100644 test/smartalign16.asm create mode 100644 test/smartalign32.asm create mode 100644 test/smartalign64.asm create mode 100644 test/struc.asm create mode 100644 test/test67.asm create mode 100644 test/testdos.asm create mode 100644 test/testnos3.asm create mode 100644 test/time.asm create mode 100644 test/tmap.nas create mode 100644 test/uscore.asm create mode 100644 test/utf.asm create mode 100644 test/vmread.asm create mode 100644 test/weirdpaste.asm create mode 100644 test/xchg.asm create mode 100644 test/xcrypt.asm create mode 100644 test/zerobyte.asm create mode 100644 tokens.dat create mode 100644 tokens.h create mode 100644 tokhash.c create mode 100755 tokhash.pl create mode 100644 ver.c create mode 100644 version create mode 100644 version.h create mode 100644 version.mac create mode 100644 version.mak create mode 100644 version.nsh create mode 100755 version.pl create mode 100644 version.sed diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..a66ecb3 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,137 @@ +This is the AUTHORS file for the NASM project located at: +http://nasm.sourceforge.net/ + +Names should be inserted as follows: + +N: Name Here +E: Email Here +D: Description Here +D: Additional Description Here.... and so on +C: Copyright information + +Such is life. +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +N: Julian Hall +E: Jules@acris.co.uk +D: Original author and co-conspirator + +N: Simon Tatham +E: anakin@pobox.com +D: Original author and co-conspirator + +N: Nelson Rush +E: palisade@users.sourceforge.net +D: Some guy. + +N: Frank Kotler +E: fbkotler@users.sf.net +D: Bug smashing. +D: Documentation - "KATMAI" and "3DNow!" instructions supported by 0.98 +D: General coordination and moral support. + +N: Stephen Silver +E: nasm@argentum.freeserve.co.uk +D: Documentation - "3dNow!" instructions and misc. +D: insns.dat fixes and new instructions. + +N: AMD Inc. (names of developers here?) +E: +D: 3DNow instructions +D: New Athlon instructions +D: Makefile.vc fix + +N: John Coffman +E: johninsd@users.sourceforge.net +D: added Jcc optimizations; CPU level checks +D: bug fixes, compilation fixes + +N: Yuri Zaporogets +E: yuriz@users.sourceforge.net +D: RDOFF support + +N: H. Peter Anvin +E: hpa@zytor.com +D: Primary maintainer for the 0.98, late 0.98.x and 2.x releases. +C: Contributions since 2008-12-15 are Copyright Intel Corporation. + +N: John Fine +E: johnfine@earthlink.net +D: Preprocessor and OBJ (OMF) output format driver +D: Organized DOS versions of 0.98 release + +N: Kendall Bennet +E: KendallB@scitechsoft.com +D: NASM enhancements +D: macros +D: Syntax modifications + +N: Gary Clark +E: +D: AMD 3DNow! instructions + +N: Andrew Crabtree +E: +D: Debugging support + +N: Rafael R. Sevilla +E: dido@pacific.net.ph +D: RDF2HEX utility + +N: Jaime Tejedor Gómez, aka Metalbrain +E: metalbrain_coder@gmx.net +D: jecxz bug fix + +N: James Seter +E: pharos@zsnes.com +D: --POSTFIX, --PREFIX switches +D: ? + +N: Edward J. Beroset +E: beroset@mindspring.com +D: added %substr and %strlen + +N: Stanislav Karchebny, aka berkus, madfire, daemonhunter +E: madfire@users.sourceforge.net +D: multiple sections support for -fbin format +D: cvs maintenance +D: webpage at http://nasm.2y.net maintenance + +N: Debbie Wiles, aka debs +E: debs@dwiles.demon.co.uk +D: Work on docs, added undocumented instructions (esp SSE2 and 3D-Now!) +D: Added other documentation and tidied up docs +D: Added a few instructions to insns.dat and tidied it up. + +N: Trevor Woerner +E: FIXME +D: Quiet compiler warnings + +N: Michael K. Ter Louw +E: mterlo1 "at" uic "dot" edu +D: Multisection support for "-f bin" + +N: Martin Wawro +E: FIXME +D: stabs debug support for "-f elf" + +N: Alexei Frounze +E: alexfru@users.sourceforge.net +D: "-I" paths searched for "incbined" files +D: bugswatting + +N: Keith Kanios, aka SpooK +E: keith@kanios.net +D: c99 Compliance +D: General x64 Support +D: win64 (x86-64 COFF) output format +D: __BITS__ Standard Macro +D: Website Maintenance @ http://nasm.sourceforge.net/ + +N: Chuck Crayne +E: ccrayne@users.sourceforge.net +D: elf64 (x86_64) output format + +N: Cyrill Gorcunov +E: gorcunov@gmail.com +D: AMD XOP/FMA4/CVT16 instructions diff --git a/CHANGES b/CHANGES new file mode 100644 index 0000000..b89696f --- /dev/null +++ b/CHANGES @@ -0,0 +1,2 @@ +The revision history has moved to the file doc/changes.src, and +is now included in the documentation as Appendix C. diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..ff3befc --- /dev/null +++ b/ChangeLog @@ -0,0 +1,2905 @@ +Sat Nov 24 16:31:48 2007 -0800 H. Peter Anvin + * Typo fixes in documentation +Tue Nov 20 23:37:46 2007 -0800 H. Peter Anvin + * NASM 2.00rc3 +Tue Nov 20 21:45:16 2007 -0800 H. Peter Anvin + * Unbreak CMPSW/CMPSD/CMPSQ +Tue Nov 20 13:23:34 2007 -0800 H. Peter Anvin + * Merge branch 'master' of git+ssh://repo.or.cz/srv/git/nasm +Tue Nov 20 13:22:58 2007 -0800 H. Peter Anvin + * ndisasm: handle the case of "no more sync points" +Mon Nov 19 23:09:31 2007 -0800 H. Peter Anvin + * NASM 2.00rc2 +Mon Nov 19 23:09:24 2007 -0800 H. Peter Anvin + * tag-release: a simple script to tag the repository for release +Mon Nov 19 13:14:59 2007 -0800 H. Peter Anvin + * Slightly faster implementation of the deadman counter +Mon Nov 19 12:26:50 2007 -0800 H. Peter Anvin + * BR 812417: Deadman counter for macro expansion +Mon Nov 19 12:02:38 2007 -0800 H. Peter Anvin + * BR 877583: Fix RAA memory leak +Mon Nov 19 11:53:18 2007 -0800 H. Peter Anvin + * BR 863173: Fix offsets of TIMES/INCBIN in list file +Mon Nov 19 11:45:40 2007 -0800 H. Peter Anvin + * BR 1834731: Remove redundant error messages for no input file +Mon Nov 19 11:44:05 2007 -0800 H. Peter Anvin + * insns.pl: remove debugging output +Sun Nov 18 22:18:09 2007 -0800 H. Peter Anvin + * Clean up remaining build warnings +Sun Nov 18 21:55:26 2007 -0800 H. Peter Anvin + * BR 1834292: Fix multiple disassembler bugs +Sun Nov 18 12:01:05 2007 -0800 H. Peter Anvin + * BR 1834056: Remove warnings in rdoff/rdoff.c +Sun Nov 18 11:55:10 2007 -0800 H. Peter Anvin + * BR 1091926: Bounds checking for command line parsing +Sat Nov 17 21:21:18 2007 -0800 H. Peter Anvin + * Remove FIXME from documentation +Sat Nov 17 21:08:33 2007 -0800 Charles Crayne + * Check in Keith's Fixes +Sat Nov 17 14:35:19 2007 -0800 H. Peter Anvin + * Make the definition for float_const() match the prototype +Fri Nov 16 00:03:02 2007 -0800 H. Peter Anvin + * NASM 2.00rc1 +Thu Nov 15 17:12:29 2007 -0800 H. Peter Anvin + * Clean up the command-line parsing; make -w/-W match others +Thu Nov 15 14:38:19 2007 -0800 H. Peter Anvin + * BR 993895: Support zero-operand floating-point insn +Thu Nov 15 10:25:52 2007 -0800 H. Peter Anvin + * Remove some vestiges of "native" RESW/RESD support +Thu Nov 15 10:24:55 2007 -0800 H. Peter Anvin + * outbin.c: fix one missed change from type -> size +Tue Nov 13 19:52:54 2007 -0800 root + * Support setting OSABI value in ELF header. +Tue Nov 13 11:34:34 2007 -0800 H. Peter Anvin + * Enable a few warnings by default; clean up warning descriptions +Tue Nov 13 11:31:15 2007 -0800 H. Peter Anvin + * Add gcc-style -W/-Wno- warning selections; -Wall; -Werror +Tue Nov 13 10:37:23 2007 -0800 H. Peter Anvin + * Clean up the fwrite*() function definitions somewhat +Tue Nov 13 09:49:51 2007 -0800 H. Peter Anvin + * Cast 64-bit switch expressions to (int) to keep OpenWatcom happy +Tue Nov 13 09:46:38 2007 -0800 H. Peter Anvin + * x86-host-specific performance improvement +Tue Nov 13 09:37:59 2007 -0800 H. Peter Anvin + * Address data is int64_t; simplify writing an address object +Mon Nov 12 23:00:31 2007 -0800 H. Peter Anvin + * ndisasm: factor out the common operand-extraction code +Mon Nov 12 22:56:07 2007 -0800 H. Peter Anvin + * Un-special-case "xchg rax,rax"; disassemble o64 +Mon Nov 12 22:11:46 2007 -0800 H. Peter Anvin + * BR 1709392: Fix alignment handling in Mach-O format +Mon Nov 12 22:05:31 2007 -0800 H. Peter Anvin + * BR 1828866: fix handling of LAR/LSL +Mon Nov 12 21:57:00 2007 -0800 H. Peter Anvin + * Better (but not *good!*) handling of 64-bit addressing in ndisasm +Mon Nov 12 21:02:33 2007 -0800 H. Peter Anvin + * Fix disassembly of XCHG +Mon Nov 12 20:18:33 2007 -0800 H. Peter Anvin + * Test of XCHG +Mon Nov 12 20:18:05 2007 -0800 H. Peter Anvin + * Fix handling of XCHG in 64-bit mode +Mon Nov 12 19:36:13 2007 -0800 H. Peter Anvin + * More \321 -> \324 bug fixes +Mon Nov 12 18:26:31 2007 -0800 H. Peter Anvin + * float.c: all warnings and errors are pass 1 only +Sat Nov 10 21:55:19 2007 -0800 Charles Crayne + * Update documentation for stack relative directives. +Sat Nov 10 17:52:23 2007 -0800 Charles Crayne + * Clean up a few more 32-bit bottlenecks +Fri Nov 9 16:37:41 2007 -0800 Charles Crayne + * Update documantation for stack relative directives +Fri Nov 9 16:33:54 2007 -0800 Charles Crayne + * Merge branch 'master' of /home/chuck/development/gitnasm/ +Fri Nov 9 16:25:43 2007 -0800 Charles Crayne + * Update documentation for stack relative directives +Fri Nov 9 14:44:02 2007 -0800 H. Peter Anvin + * Don't combine type and size into a single argument +Thu Nov 8 22:11:14 2007 -0800 Charles Crayne + * Add flat64 to %stacksize choices +Thu Nov 8 20:43:22 2007 -0800 H. Peter Anvin + * Fix building under OpenWatcom +Thu Nov 8 20:29:37 2007 -0800 H. Peter Anvin + * ps2pdf: remove -dOptimize=true +Thu Nov 8 20:21:41 2007 -0800 H. Peter Anvin + * No binary files left in the source distro; unbreak release script +Thu Nov 8 20:01:11 2007 -0800 H. Peter Anvin + * BR 1828103: Fix %arg and %local +Thu Nov 8 19:34:01 2007 -0800 H. Peter Anvin + * nasmlib.c: prefix_name(): use the elements() macro +Thu Nov 8 19:30:22 2007 -0800 H. Peter Anvin + * Move elements() to nasmlib.h +Thu Nov 8 19:15:33 2007 -0800 H. Peter Anvin + * constipate the "str" argument to bsi() and bsii() +Wed Nov 7 19:03:46 2007 -0800 Charles Crayne + * Upgrade RAA functions to hold 64-bit data. +Tue Nov 6 21:48:12 2007 -0800 Charles Crayne + * Pass 64-bit instruction lengths to back-ends. +Tue Nov 6 18:27:23 2007 -0800 Charles Crayne + * Prepare for 64-bit instruction lengths +Mon Nov 5 21:49:49 2007 -0800 Charles Crayne + * Disambiguate error messages +Mon Nov 5 17:19:32 2007 -0800 Charles Crayne + * Upgrade label functions to 64-bit +Sun Nov 4 21:10:42 2007 -0800 H. Peter Anvin + * Permit opcode names as labels as long as they are followed by a colon +Sun Nov 4 15:28:30 2007 -0800 Charles Crayne + * Make warning limit valid for both i386 and x86_64 +Sat Nov 3 22:06:13 2007 -0700 Charles Crayne + * Warn on out of bounds EA displacements +Thu Nov 1 15:08:27 2007 -0700 H. Peter Anvin + * Treat info files as binary when creating xdoc distro file +Thu Nov 1 15:07:42 2007 -0700 H. Peter Anvin + * Remove obsolete binary files from the distribution +Thu Nov 1 14:53:32 2007 -0700 H. Peter Anvin + * Move declarations before statements +Wed Oct 31 23:37:35 2007 -0700 H. Peter Anvin + * NASM 0.99.06 +Wed Oct 31 23:37:19 2007 -0700 H. Peter Anvin + * Script to tag the tree for release +Wed Oct 31 10:59:26 2007 -0700 H. Peter Anvin + * Even more "riprel" tests +Tue Oct 30 01:17:57 2007 -0700 H. Peter Anvin + * floatx.asm: add tests for "rounds up to smallest denorm" +Tue Oct 30 01:13:27 2007 -0700 H. Peter Anvin + * Run "make alldeps" +Tue Oct 30 01:13:09 2007 -0700 H. Peter Anvin + * float.c: handle round-up-to-denorm correctly. +Tue Oct 30 00:59:27 2007 -0700 H. Peter Anvin + * Exhaustive test for 8-bit floating point values +Mon Oct 29 23:12:47 2007 -0700 H. Peter Anvin + * Clean up the handing of operands in assemble.c +Mon Oct 29 22:56:08 2007 -0700 H. Peter Anvin + * Don't warn for segmented references +Mon Oct 29 20:20:12 2007 -0700 H. Peter Anvin + * Use a 32-bit floating-point limb size; support 8-bit float +Mon Oct 29 18:24:59 2007 -0700 Charles Crayne + * Reduce severity of redundant prefixes from error to warning. +Sun Oct 28 23:23:24 2007 -0700 H. Peter Anvin + * Test of some addressing modes in 64-bit mode. +Sun Oct 28 23:21:46 2007 -0700 H. Peter Anvin + * Fix bogus flagging of effective addresses as invalid +Sun Oct 28 23:10:34 2007 -0700 H. Peter Anvin + * Actually shut up the warning in rdfload.c +Sun Oct 28 22:04:42 2007 -0700 H. Peter Anvin + * Clean up stealth whitespace +Sun Oct 28 22:04:00 2007 -0700 H. Peter Anvin + * Fix warning about cast to pointer in rdfload.c +Sun Oct 28 22:04:00 2007 -0700 H. Peter Anvin + * 64-bit addressing and prefix handling changes +Sun Oct 28 15:29:54 2007 -0700 Charles Crayne + * Adjust stabs symbol index to match symbol table. +Fri Oct 26 21:38:02 2007 -0700 H. Peter Anvin + * readnum(): handle prefix-suffix collision like "0h" +Fri Oct 26 18:49:29 2007 -0700 H. Peter Anvin + * Better handling of platforms which hide "extended" functionality +Wed Oct 24 15:51:40 2007 -0700 Charles Crayne + * Merge branch 'master' of /home/chuck/development/gitnasm/ +Wed Oct 24 15:30:17 2007 -0700 Charles Crayne + * Update sections about debug info formats +Wed Oct 24 15:29:51 2007 -0700 H. Peter Anvin + * Fix the handling of floating-point tokens in the preprocessor +Tue Oct 23 19:28:39 2007 -0700 Charles Crayne + * Fix bugs item #1817677 +Tue Oct 23 00:08:58 2007 -0700 H. Peter Anvin + * Slightly simplify the radix-detection code +Mon Oct 22 19:48:06 2007 -0700 H. Peter Anvin + * Unbreak particularly tricky hex constants +Mon Oct 22 19:37:36 2007 -0700 H. Peter Anvin + * Decimal floating point can also start with 0. 0e 0E +Mon Oct 22 17:34:10 2007 -0700 H. Peter Anvin + * Support binary and octal floating-point +Mon Oct 22 16:53:48 2007 -0700 H. Peter Anvin + * More consistent handling of radix letters +Sun Oct 21 15:33:01 2007 -0700 H. Peter Anvin + * float.c: correct exponent capping +Sun Oct 21 14:21:43 2007 -0700 Charles Crayne + * Clean up elf symbol table section +Fri Oct 19 18:33:57 2007 -0700 H. Peter Anvin + * Allow $-prefixed hexadecimal FP as an alternative to 0x +Fri Oct 19 14:43:22 2007 -0700 H. Peter Anvin + * Scripts to remove stealth whitespace +Fri Oct 19 14:42:29 2007 -0700 H. Peter Anvin + * Formatting: kill off "stealth whitespace" +Fri Oct 19 14:26:52 2007 -0700 H. Peter Anvin + * test/floatx.asm: fix test case +Fri Oct 19 14:19:52 2007 -0700 H. Peter Anvin + * uscore.asm: Fix test case +Fri Oct 19 14:17:51 2007 -0700 H. Peter Anvin + * float.c: mark read_exponent() static +Fri Oct 19 14:10:35 2007 -0700 H. Peter Anvin + * Don't confuse suffixed hexadecimal with floating-point +Fri Oct 19 13:17:24 2007 -0700 H. Peter Anvin + * Anchor filename locations in .gitignore +Fri Oct 19 13:16:51 2007 -0700 H. Peter Anvin + * test/Makefile: Use -Ox instead of -O999 +Fri Oct 19 13:14:06 2007 -0700 H. Peter Anvin + * Test of underscored constants +Fri Oct 19 13:10:46 2007 -0700 H. Peter Anvin + * Allow underscores in numbers; better detection of FP +Fri Oct 19 10:52:31 2007 -0700 H. Peter Anvin + * Modernize nasm.spec.in and make it closer to the Fedora version +Thu Oct 18 23:33:06 2007 -0700 Charles Crayne + * Suppress datarootdir warnings from configure +Thu Oct 18 21:17:20 2007 -0700 Charles Crayne + * Suppress signedness warnings in disassembler +Thu Oct 18 19:14:08 2007 -0700 H. Peter Anvin + * Cleaner solution for MinGW handling of __STRICT_ANSI__ +Thu Oct 18 19:14:08 2007 -0700 H. Peter Anvin + * configure: Undefine __STRICT_ANSI__ for mingw's benefit +Thu Oct 18 19:14:07 2007 -0700 H. Peter Anvin + * Fix invocation of readnum() +Thu Oct 18 19:02:42 2007 -0700 Charles Crayne + * Suppress a few signedness warnings +Thu Oct 18 17:04:10 2007 -0700 root + * Avoid unnecessary warning on redefinition of section (bug 801180) +Wed Oct 17 17:55:45 2007 -0700 Charles Crayne + * Generate stabs entries for any executable section +Tue Oct 16 22:59:09 2007 -0700 H. Peter Anvin + * NASM 0.99.05 +Tue Oct 16 15:46:04 2007 -0700 H. Peter Anvin + * Tests of obscenely large exponents +Tue Oct 16 14:42:32 2007 -0700 H. Peter Anvin + * Comma-separate contents of __FLOAT__ +Tue Oct 16 14:40:27 2007 -0700 H. Peter Anvin + * Implement floating-point option control directive +Tue Oct 16 11:48:07 2007 -0700 H. Peter Anvin + * Floating-point warning fixes; fix round-to-overflow +Tue Oct 16 11:32:58 2007 -0700 H. Peter Anvin + * Handle rounding of denorms correctly; make fp overflow a warning +Tue Oct 16 10:35:02 2007 -0700 H. Peter Anvin + * Additional entries for .gitignore +Tue Oct 16 10:32:57 2007 -0700 H. Peter Anvin + * Refactor floating-point formatting code; fix 80-bit denorms +Tue Oct 16 10:31:16 2007 -0700 H. Peter Anvin + * Add 1.5 as a test case: representative of an exact fraction +Mon Oct 15 20:06:06 2007 -0700 H. Peter Anvin + * Recognize 'd', 't' and 'y' as radix suffixes +Mon Oct 15 19:53:10 2007 -0700 H. Peter Anvin + * Fix FISTTP opcodes (BR 689695) +Mon Oct 15 19:46:32 2007 -0700 H. Peter Anvin + * New floating-point conversion routines +Mon Oct 15 17:48:43 2007 -0700 H. Peter Anvin + * Add testnos3 from the gdtoa package (floating-point test) +Sat Oct 13 23:19:21 2007 -0700 H. Peter Anvin + * .gitignore file doesn't need to be in the release file +Sat Oct 13 23:17:41 2007 -0700 H. Peter Anvin + * Add .gitignore file so "git status" produces something sane +Sat Oct 13 23:12:46 2007 -0700 H. Peter Anvin + * autoconf: drop AC_USE_SYSTEM_EXTENSIONS to support autoconf 2.59 +Sat Oct 13 07:09:22 2007 -0700 Keith Kanios + * Fix 32-bit types in preproc.c and eval.c +Thu Oct 11 20:32:33 2007 -0700 Charles Crayne + * Must define types before using them +Thu Oct 11 13:42:09 2007 -0700 H. Peter Anvin + * preproc.c: move smacro define/undef to separate functions +Thu Oct 11 13:38:38 2007 -0700 H. Peter Anvin + * preproc.c: PP_DEFINE and PP_XDEFINE are case-sensitive +Thu Oct 11 12:52:03 2007 -0700 H. Peter Anvin + * preproc.c: normalize the handling of case sensitivity +Thu Oct 11 12:51:06 2007 -0700 H. Peter Anvin + * Define macros necessary for on C++ +Thu Oct 11 10:12:58 2007 -0700 H. Peter Anvin + * More "bool" fixes +Thu Oct 11 10:11:57 2007 -0700 H. Peter Anvin + * preproc.c: allow 64-bit repeat counts +Thu Oct 11 10:06:19 2007 -0700 H. Peter Anvin + * preproc.c: For an SMacro, in_progress really is a boolean (no %rep) +Thu Oct 11 00:05:57 2007 -0700 H. Peter Anvin + * Additional uses of bool and enum +Thu Oct 11 00:05:57 2007 -0700 H. Peter Anvin + * preproc.c: MMacro.in_progress is not a boolean +Wed Oct 10 18:07:51 2007 -0700 H. Peter Anvin + * saa_fread/fwrite: when seeking, must set [rw]ptr as well +Wed Oct 10 14:58:45 2007 -0700 H. Peter Anvin + * Use the compiler-provided booleans if available, otherwise emulate +Wed Oct 10 14:55:14 2007 -0700 H. Peter Anvin + * owlinux.mak: don't clean things we won't be able to +Wed Oct 10 14:29:53 2007 -0700 H. Peter Anvin + * configure.in: looks like we need autoconf 2.61 :( +Wed Oct 10 14:06:59 2007 -0700 H. Peter Anvin + * Create option -Ox to tell NASM to do unlimited passes +Mon Oct 8 19:26:57 2007 -0700 H. Peter Anvin + * Revert "floatb.asm: fix broken testcase" +Mon Oct 8 18:39:24 2007 -0700 H. Peter Anvin + * floatb.asm: fix broken testcase +Mon Oct 8 12:41:00 2007 -0700 H. Peter Anvin + * saa_rstruct: fix overrun check +Mon Oct 8 12:12:23 2007 -0700 H. Peter Anvin + * Add Frank's floattest.asm test file +Sun Oct 7 21:13:14 2007 -0700 H. Peter Anvin + * saa_fpwrite: initializing "len" should be part of the loop +Sun Oct 7 18:46:57 2007 -0700 Charles Crayne + * Fix infinite loop in function saa_fpwrite +Fri Oct 5 17:44:16 2007 -0700 H. Peter Anvin + * zerobyte.asm: use a real instruction to avoid confusing ndisasm +Fri Oct 5 17:42:31 2007 -0700 H. Peter Anvin + * zerobyte.asm: add test cases for non-initial \170 uses +Fri Oct 5 17:29:01 2007 -0700 H. Peter Anvin + * Check in the proper zerobyte test +Fri Oct 5 17:04:32 2007 -0700 H. Peter Anvin + * Emit REX prefix before literal zero (\170) +Fri Oct 5 17:01:15 2007 -0700 H. Peter Anvin + * LICENSE: Break long line +Fri Oct 5 14:36:03 2007 -0700 H. Peter Anvin + * Add test for problematic floats +Thu Oct 4 23:51:08 2007 -0700 H. Peter Anvin + * floatx.asm: add Inf and NaN to the boundary condition tests +Thu Oct 4 23:09:19 2007 -0700 H. Peter Anvin + * floatx.asm: add specific tests for exponent boundary conditions +Thu Oct 4 22:51:08 2007 -0700 H. Peter Anvin + * float.c: correct the exponent +Thu Oct 4 15:18:23 2007 -0700 H. Peter Anvin + * Additional rules in test/Makefile +Thu Oct 4 13:42:56 2007 -0700 H. Peter Anvin + * Rewrite the handling of SAA's to allow random access +Wed Oct 3 21:30:57 2007 -0700 H. Peter Anvin + * Change cloc_t to struct location, and reorder the members +Wed Oct 3 21:24:51 2007 -0700 H. Peter Anvin + * BR 1352920: change loc_t -> cloc_t +Wed Oct 3 21:22:16 2007 -0700 H. Peter Anvin + * BR 1352920: Handle upper case %line +Wed Oct 3 17:40:12 2007 -0700 H. Peter Anvin + * Use autoconf to request feature macros +Tue Oct 2 22:04:15 2007 -0700 H. Peter Anvin + * preproc.c: constipation +Tue Oct 2 21:57:27 2007 -0700 H. Peter Anvin + * make alldeps +Tue Oct 2 21:53:51 2007 -0700 H. Peter Anvin + * Portability fixes +Tue Oct 2 21:13:18 2007 -0700 H. Peter Anvin + * Run "make alldeps". +Tue Oct 2 17:40:00 2007 -0700 H. Peter Anvin + * Use the crc64 we already use as the perfect hash function prehash +Tue Oct 2 15:09:33 2007 -0700 H. Peter Anvin + * insns.dat: add systematic names for the hinting NOPs (0F18-0F1F) +Mon Oct 1 11:28:32 2007 -0700 H. Peter Anvin + * Unspecified files are null strings, not null pointers +Mon Oct 1 11:26:31 2007 -0700 H. Peter Anvin + * Check for the most basic filename overlaps +Sun Sep 30 22:15:36 2007 -0700 Charles Crayne + * modified: nasm.1 to add newer command line options +Fri Sep 28 21:27:41 2007 -0700 Charles Crayne + * Merge branch 'master' of git+ssh://ccrayne@repo.or.cz/srv/git/nasm +Fri Sep 28 20:17:12 2007 -0700 H. Peter Anvin + * configure.in: AC_SUBST_FILE should have been AC_SUBST +Fri Sep 28 17:17:20 2007 -0700 H. Peter Anvin + * Unbreak relative references to immediate addresses +Fri Sep 28 15:16:47 2007 -0700 Charles Crayne + * Merge branch 'master' of git+ssh://ccrayne@repo.or.cz/srv/git/nasm +Fri Sep 28 12:01:55 2007 -0700 H. Peter Anvin + * lib/vsnprintf.c: correct boundary conditions +Fri Sep 28 10:50:20 2007 -0700 H. Peter Anvin + * Add substitutes for snprintf() and vsnprintf() +Fri Sep 28 02:03:41 2007 -0400 Frank Kotler + * Merge branch 'master' of git+ssh://fbkotler@repo.or.cz/srv/git/nasm +Thu Sep 27 21:35:04 2007 -0700 H. Peter Anvin + * Exclude config.h from the dependency list for the canned makefiles +Thu Sep 27 21:12:17 2007 -0700 H. Peter Anvin + * version.pl: Add support for daily snapshot releases +Thu Sep 27 19:46:55 2007 -0700 H. Peter Anvin + * Add Makefile for Linux -> DOS, Win32, OS/2 using OpenWatcom +Wed Sep 26 19:57:07 2007 -0700 H. Peter Anvin + * Add Makefile for OpenWatcom (DOS, OS/2 or Win32 output) +Wed Sep 26 17:00:18 2007 -0700 H. Peter Anvin + * Test for various addressing modes in 64-bit mode +Wed Sep 26 15:19:28 2007 -0700 H. Peter Anvin + * nasm option reshuffling, -E -> -Z +Tue Sep 25 23:57:21 2007 -0400 Frank Kotler + * Version 0.99.04 +Tue Sep 25 20:36:45 2007 -0700 H. Peter Anvin + * nasmdoc: corrections on 64-bit immediates/displacements +Tue Sep 25 16:02:21 2007 -0700 H. Peter Anvin + * nasmdoc: shorten lines which are too long +Tue Sep 25 16:01:07 2007 -0700 H. Peter Anvin + * Document NASM behaviour for 64-bit immediates and displacements +Tue Sep 25 15:44:40 2007 -0700 H. Peter Anvin + * test/movimm.asm: add optimizable forms +Tue Sep 25 15:41:19 2007 -0700 H. Peter Anvin + * assemble.c: clean up whitespace +Tue Sep 25 15:40:36 2007 -0700 H. Peter Anvin + * Correct the handling of "MOV" with immediate in 64-bit mode +Tue Sep 25 15:39:42 2007 -0700 H. Peter Anvin + * Test of immediate handling on 64-bit mode +Tue Sep 25 14:27:34 2007 -0700 H. Peter Anvin + * Add nasm_zalloc() to nasmlib.c +Tue Sep 25 14:26:03 2007 -0700 H. Peter Anvin + * Fix BR 1490407: size of the second operand of LAR/LSL +Tue Sep 25 14:11:29 2007 -0700 H. Peter Anvin + * Fix BR 1490407: size of the second operand of LAR/LSL +Tue Sep 25 13:34:55 2007 -0700 H. Peter Anvin + * Makefile.in: make "make install" create directories +Tue Sep 25 08:48:37 2007 -0700 H. Peter Anvin + * Fix BR 1445441: uninitialized use of "error_file" +Mon Sep 24 21:33:17 2007 -0700 H. Peter Anvin + * preproc.c: fix the loop in %undef +Mon Sep 24 20:53:48 2007 -0700 H. Peter Anvin + * float.c: clear off uninitialized warning +Mon Sep 24 17:02:41 2007 -0700 H. Peter Anvin + * outcoff: set the "virtual size field" to zero (BR 1351586) +Mon Sep 24 15:56:02 2007 -0700 H. Peter Anvin + * insns.dat: SMINT - mark ND, DMINT - fix opcode +Mon Sep 24 15:55:20 2007 -0700 H. Peter Anvin + * 0F0F is a 3Dnow! prefix; remove from prefix list +Mon Sep 24 15:48:09 2007 -0700 H. Peter Anvin + * Additional compaction missed by script +Mon Sep 24 15:42:53 2007 -0700 H. Peter Anvin + * insns.dat: machine-generated compaction mmx/xmmreg,mem -> mmx/xmmrm +Mon Sep 24 13:54:00 2007 -0700 H. Peter Anvin + * nasmdoc: grammar fix +Mon Sep 24 13:44:02 2007 -0700 H. Peter Anvin + * nasmdoc: remove stray periods +Mon Sep 24 13:42:09 2007 -0700 H. Peter Anvin + * test/Makefile: make a bit more useful +Mon Sep 24 13:41:58 2007 -0700 H. Peter Anvin + * Implement the -MG option (SF RFE 1564264) +Mon Sep 24 12:52:09 2007 -0700 H. Peter Anvin + * nasmdoc: clarify __float*__ example +Mon Sep 24 12:44:38 2007 -0700 H. Peter Anvin + * nasmdoc: document the __float*__ operators +Mon Sep 24 12:30:54 2007 -0700 H. Peter Anvin + * Support __float*__ for floating-point numbers in expressions +Mon Sep 24 10:51:07 2007 -0700 H. Peter Anvin + * eval.c: replace sequence of ifs with switch +Mon Sep 24 10:50:23 2007 -0700 H. Peter Anvin + * tokhash: allow a bit smarter pattern matching +Sat Sep 22 22:35:28 2007 -0700 H. Peter Anvin + * Implement INVLPGA according to the documentation +Sat Sep 22 22:02:34 2007 -0700 H. Peter Anvin + * Reformat insns.dat to uniform column width +Sat Sep 22 21:50:03 2007 -0700 H. Peter Anvin + * Simple test for 0x67 prefixes +Sat Sep 22 21:49:51 2007 -0700 H. Peter Anvin + * Auto-generate 0x67 prefixes without the need for \30x codes +Sat Sep 22 21:47:13 2007 -0700 H. Peter Anvin + * Make test/Makefile a bit more useful +Sat Sep 22 21:29:41 2007 -0700 H. Peter Anvin + * Add TY_OWORD for "DO" output +Sat Sep 22 19:52:11 2007 -0700 H. Peter Anvin + * LDDQU needs \301 (BR 1103549) +Sat Sep 22 19:51:13 2007 -0700 H. Peter Anvin + * RDTSCP and INVLPGA aren't 64-bit specific +Sat Sep 22 19:40:37 2007 -0700 H. Peter Anvin + * Cyrix GX1 instructions: BBx_RESET, CPU_READ, CPU_WRITE +Sat Sep 22 19:28:14 2007 -0700 H. Peter Anvin + * Centaur XSHA1, XSHA256, MONTMUL +Sat Sep 22 19:20:56 2007 -0700 H. Peter Anvin + * Implement Centaur's XCRYPT instructions +Sat Sep 22 19:13:05 2007 -0700 H. Peter Anvin + * Add Geode LX (AMD's Cyrix-derived core) instructions +Sat Sep 22 19:05:11 2007 -0700 H. Peter Anvin + * Add the GETSEC instruction for Intel SMX +Sat Sep 22 18:59:18 2007 -0700 H. Peter Anvin + * Add the AMD SSE4a and LZCNT instructions +Sat Sep 22 18:23:20 2007 -0700 H. Peter Anvin + * Tag UMOV as ND (no disassembly) to avoid collision +Sat Sep 22 18:20:49 2007 -0700 H. Peter Anvin + * Disallow optimizing by less than 5 passes. +Sat Sep 22 17:45:45 2007 -0700 H. Peter Anvin + * BR 1783117: Document that %+ needs a space after it, and fix crash +Sat Sep 22 16:44:56 2007 -0700 H. Peter Anvin + * nasm.spec.in: minor fixes +Sat Sep 22 16:38:25 2007 -0700 H. Peter Anvin + * release script: handle stricter CLI parsing for "git tag" +Sat Sep 22 16:35:11 2007 -0700 H. Peter Anvin + * Update nasm.spec.in and make it handle rc releases +Sat Sep 22 16:19:19 2007 -0700 H. Peter Anvin + * version.pl: support version numbers of the form X.Y[.Z]rcW +Thu Sep 20 21:33:43 2007 -0700 Charles Crayne + * Merge branch 'master' of git+ssh://ccrayne@repo.or.cz/srv/git/nasm +Thu Sep 20 21:12:33 2007 -0700 Charles Crayne + * modified: misc/release to fix bug in removing .git +Wed Sep 19 21:41:43 2007 -0700 H. Peter Anvin + * Merge branch 'master' of git+ssh://repo.or.cz/srv/git/nasm +Wed Sep 19 21:41:27 2007 -0700 H. Peter Anvin + * Update manual pages +Wed Sep 19 21:41:02 2007 -0700 H. Peter Anvin + * Remove limit on number of sync points +Wed Sep 19 21:40:37 2007 -0700 H. Peter Anvin + * Make nasm_malloc() et al available from inside ndisasm +Wed Sep 19 21:07:32 2007 -0400 Frank Kotler + * Version 0.99.03 +Wed Sep 19 21:06:59 2007 -0400 Frank Kotler + * Merge branch 'master' of git+ssh://fbkotler@repo.or.cz/srv/git/nasm +Wed Sep 19 16:22:03 2007 -0700 H. Peter Anvin + * Merge commit 'origin/sse5' +Wed Sep 19 16:15:22 2007 -0700 H. Peter Anvin + * test/Makefile: make a bit more useful +Tue Sep 18 22:54:40 2007 -0700 H. Peter Anvin + * Slightly optimize the interface to nasm_token_hash() +Wed Sep 19 01:34:55 2007 -0400 Frank Kotler + * Merge branch 'master' of git+ssh://fbkotler@repo.or.cz/srv/git/nasm +Tue Sep 18 22:23:42 2007 -0700 H. Peter Anvin + * Merge commit 'origin/master' into sse5 +Tue Sep 18 22:22:49 2007 -0700 H. Peter Anvin + * elf64: fix 32-bit truncations +Tue Sep 18 22:08:04 2007 -0700 H. Peter Anvin + * Document Infinity and NaN +Tue Sep 18 21:55:56 2007 -0700 H. Peter Anvin + * Support generating NaNs and infinities +Tue Sep 18 19:12:26 2007 -0700 H. Peter Anvin + * Update documentation +Tue Sep 18 18:37:36 2007 -0700 H. Peter Anvin + * Simple test for hexadecimal floating-point numbers +Tue Sep 18 18:33:17 2007 -0700 H. Peter Anvin + * Fix error-reporting in hexadecimal floating-point numbers +Tue Sep 18 18:31:26 2007 -0700 H. Peter Anvin + * Support C99-style hexadecimal floating point. +Tue Sep 18 17:50:34 2007 -0700 H. Peter Anvin + * Unify all standard IEEE floating-point formats; add 128-bit +Tue Sep 18 17:49:09 2007 -0700 H. Peter Anvin + * Fix handling of DO; support unary + for floating-point numbers +Tue Sep 18 16:39:03 2007 -0700 H. Peter Anvin + * Support 16-bit IEEE floating point; used in SSE5 +Tue Sep 18 15:43:40 2007 -0700 H. Peter Anvin + * Merge commit 'origin/master' into sse5 +Tue Sep 18 15:43:08 2007 -0700 H. Peter Anvin + * Add NOP with argument to the instruction list +Tue Sep 18 15:24:38 2007 -0700 H. Peter Anvin + * Remove 0FC2 from list of instruction prefixes +Tue Sep 18 15:08:20 2007 -0700 H. Peter Anvin + * Speed up the disassembler by allowing prefixed instruction tables +Tue Sep 18 13:45:12 2007 -0700 H. Peter Anvin + * Document oword, do and reso +Tue Sep 18 13:01:32 2007 -0700 H. Peter Anvin + * Implement "oword" (128 bits) as a first-class size +Tue Sep 18 12:38:07 2007 -0700 H. Peter Anvin + * Change the token prehash function for better convergence +Tue Sep 18 12:23:21 2007 -0700 H. Peter Anvin + * SSE5 instruction table +Tue Sep 18 02:06:09 2007 -0400 Frank Kotler + * add "const" to output/outdbg.c +Mon Sep 17 18:45:44 2007 -0700 H. Peter Anvin + * Disassembler support for SSE5 instructions +Mon Sep 17 17:27:46 2007 -0700 H. Peter Anvin + * insns.dat: All SSE5 instructions are AMD +Mon Sep 17 17:25:27 2007 -0700 H. Peter Anvin + * Actually generate SSE5 instructions +Mon Sep 17 16:55:04 2007 -0700 H. Peter Anvin + * Initial support for generating DREX suffixes +Mon Sep 17 16:31:33 2007 -0700 H. Peter Anvin + * Fix a few instances of missing renumbers +Mon Sep 17 16:20:45 2007 -0700 H. Peter Anvin + * Enable IF_AR3 +Mon Sep 17 15:49:53 2007 -0700 H. Peter Anvin + * Merge commit 'origin/master' into sse5 +Mon Sep 17 15:49:30 2007 -0700 H. Peter Anvin + * Initial support for four arguments per instruction +Mon Sep 17 15:48:32 2007 -0700 H. Peter Anvin + * CLFLUSH: Neither an x64 instruction nor AMD +Mon Sep 17 13:56:26 2007 -0700 H. Peter Anvin + * Sort dependency lists +Mon Sep 17 13:53:14 2007 -0700 H. Peter Anvin + * Cleaner way to handle MSVC's _snprintf() underscore damage +Mon Sep 17 13:19:25 2007 -0700 H. Peter Anvin + * test/r13.asm: test special-casing of rbp and r13 in 64-bit mode +Mon Sep 17 13:03:33 2007 -0700 H. Peter Anvin + * Additional documentation for 64-bit programming +Sun Sep 16 22:27:07 2007 -0700 H. Peter Anvin + * INSTALL: MSVC++ compilation instructions +Sun Sep 16 22:17:29 2007 -0700 H. Peter Anvin + * make alldeps: change Mkfiles/Makefile.* to Mkfiles/*.mak +Sun Sep 16 22:16:24 2007 -0700 H. Peter Anvin + * Fix Makefile for MSVC++ 2005, delete obsolete Makefiles +Sun Sep 16 22:15:34 2007 -0700 H. Peter Anvin + * Minor fixes needed to compile with MSVC++ 2005 +Sun Sep 16 18:35:02 2007 -0700 H. Peter Anvin + * Run "make alldeps" +Sun Sep 16 18:04:57 2007 -0700 H. Peter Anvin + * Switch the preprocessor over to using the hash table library +Sun Sep 16 17:53:17 2007 -0700 H. Peter Anvin + * Fix the handling of local labels +Fri Sep 14 18:36:01 2007 -0700 H. Peter Anvin + * preproc.c: remove unnecessary int64_t +Fri Sep 14 18:03:29 2007 -0700 H. Peter Anvin + * Use the new hash table function library to store labels +Fri Sep 14 09:24:38 2007 -0700 H. Peter Anvin + * Define a proper hash table library +Thu Sep 13 18:13:20 2007 -0700 H. Peter Anvin + * Simple performance benchmarks: label, macro and token lookups +Thu Sep 13 12:25:32 2007 -0700 H. Peter Anvin + * release script: fix final cleanup +Thu Sep 13 12:22:00 2007 -0700 H. Peter Anvin + * Modify release script for a git-centric world +Thu Sep 13 11:06:42 2007 -0700 H. Peter Anvin + * pptok.c: don't insist on C99 compiler behaviour +Wed Sep 12 22:02:06 2007 -0700 H. Peter Anvin + * Fix literal F2 and F3 prefixes +Wed Sep 12 21:58:51 2007 -0700 H. Peter Anvin + * Add (untested!) SSSE3, SSE4.1, SSE4.2 instructions +Wed Sep 12 21:06:36 2007 -0700 H. Peter Anvin + * Add support for Tejas New Instructions (SSSE3) +Wed Sep 12 21:05:06 2007 -0700 H. Peter Anvin + * Remove $Id$ tags (useless with git) +Wed Sep 12 21:04:58 2007 -0700 H. Peter Anvin + * Use rm32 operands for VMREAD/VMWRITE +Wed Sep 12 21:04:51 2007 -0700 H. Peter Anvin + * Macros for SSSE3/SSE4 instruction sets +Wed Sep 12 21:04:39 2007 -0700 H. Peter Anvin + * Support r/m operands for non-integer types +Wed Sep 12 20:27:41 2007 -0700 H. Peter Anvin + * Use enumerations where practical to ease debugging +Wed Sep 12 17:02:55 2007 +0000 H. Peter Anvin + * pptok.c: quick-and-dirty downcasing during prehashing +Wed Sep 12 16:55:57 2007 +0000 H. Peter Anvin + * phash: Tell the user when the graph is OK +Wed Sep 12 05:18:20 2007 +0000 H. Peter Anvin + * pptok.c: handle holes in the pp_directives array +Wed Sep 12 04:20:08 2007 +0000 H. Peter Anvin + * preproc.c: adjust whitespace +Wed Sep 12 04:18:37 2007 +0000 H. Peter Anvin + * More automation in the preprocessor conditionals handling +Wed Sep 12 02:13:39 2007 +0000 H. Peter Anvin + * pptok.c: fix spacing +Wed Sep 12 02:12:07 2007 +0000 H. Peter Anvin + * Generate automatically correct tests for %if and %elif +Wed Sep 12 01:34:19 2007 +0000 H. Peter Anvin + * Run "make alldeps"; add dependencies missing from the previous checkin +Wed Sep 12 01:29:43 2007 +0000 H. Peter Anvin + * Use a perfect hash to look up preprocessor directives +Wed Sep 12 01:27:53 2007 +0000 H. Peter Anvin + * phash: Be a bit more aggressive about trying to make a small hash +Wed Sep 12 00:22:29 2007 +0000 H. Peter Anvin + * Add RCXZ as a known preprocessor condition +Tue Sep 11 23:57:23 2007 +0000 H. Peter Anvin + * doc: add some cross-references +Tue Sep 11 23:52:01 2007 +0000 H. Peter Anvin + * Feeble attempt at updating the documentation; remove Appendix B +Tue Sep 11 22:44:03 2007 +0000 H. Peter Anvin + * Handle instructions which can have both REX.W and OSP +Tue Sep 11 22:14:18 2007 +0000 H. Peter Anvin + * Use enums to make debugging easier +Tue Sep 11 22:13:17 2007 +0000 H. Peter Anvin + * ndisasm: handle \366 codes, prefer unprefixed instructions +Tue Sep 11 22:00:34 2007 +0000 H. Peter Anvin + * Simplify tokens.dat slightly +Tue Sep 11 04:26:44 2007 +0000 H. Peter Anvin + * Quiet gcc warning about uninitialized variables +Tue Sep 11 04:16:57 2007 +0000 H. Peter Anvin + * Make the big instruction arrays "const" +Mon Sep 10 23:32:05 2007 +0000 H. Peter Anvin + * Use an actual enum for the opcode +Mon Sep 10 23:30:21 2007 +0000 H. Peter Anvin + * Fix order of token arguments +Mon Sep 10 18:59:26 2007 +0000 H. Peter Anvin + * assemble.c: correct special handing of ESP/RSP +Mon Sep 10 18:59:01 2007 +0000 H. Peter Anvin + * tokhash: correct duplicate-token test +Mon Sep 10 18:58:40 2007 +0000 H. Peter Anvin + * tokhash: adjust table types to reduce size +Mon Sep 10 18:55:52 2007 +0000 H. Peter Anvin + * Fix the MMXREG and XMMREG flags definitions. +Wed Sep 5 06:48:38 2007 +0000 H. Peter Anvin + * nasm.spec.in: Copyright -> License +Wed Sep 5 06:40:51 2007 +0000 H. Peter Anvin + * Fix "make tar"; useful for RPM testing +Wed Sep 5 06:24:43 2007 +0000 H. Peter Anvin + * Remove obsolete Serial: construct; we shouldn't need it anyway. +Tue Sep 4 01:29:43 2007 +0000 Chuck Crayne + * Provide 64-bit support for ORG directive +Sun Sep 2 16:37:03 2007 +0000 H. Peter Anvin + * Fix some MMX/SSE irregularities which interact with the 64-bit support +Sun Sep 2 14:46:00 2007 +0000 H. Peter Anvin + * phash.ph: yet another attempt at getting Perl to behave, arithmetically +Sun Sep 2 06:23:29 2007 +0000 H. Peter Anvin + * Simple 64-bit org test +Sun Sep 2 06:20:15 2007 +0000 H. Peter Anvin + * phash.ph: remove some stale code +Sun Sep 2 01:00:34 2007 +0000 Chuck Crayne + * Force use of integer values for generating hash keys. +Fri Aug 31 18:10:23 2007 +0000 H. Peter Anvin + * phash: don't rely on the build platform Perl version of rand() +Fri Aug 31 07:31:51 2007 +0000 H. Peter Anvin + * tokhash.pl: formatting changes for readability +Fri Aug 31 07:23:31 2007 +0000 H. Peter Anvin + * tokhash: Speed up the rejection of unhashed values +Fri Aug 31 06:06:17 2007 +0000 H. Peter Anvin + * tokhash.pl: "ix" should have the same width as the "hash" arrays +Fri Aug 31 00:28:35 2007 +0000 H. Peter Anvin + * Add "do not edit" comment to tokhash.c +Fri Aug 31 00:23:40 2007 +0000 H. Peter Anvin + * Make the token hash a bit smaller by using 16-bit hash tables +Fri Aug 31 00:16:10 2007 +0000 H. Peter Anvin + * Minor cleanup; remove duplication of names.c +Thu Aug 30 23:42:39 2007 +0000 H. Peter Anvin + * phash.ph: use a bipartite graph to reduce the storage requirements +Thu Aug 30 22:35:34 2007 +0000 H. Peter Anvin + * Finishing touches on perfect hash tokenizer; actually turn the thing on +Thu Aug 30 21:50:20 2007 +0000 H. Peter Anvin + * Makefile rule for tokhash.c +Thu Aug 30 21:47:46 2007 +0000 H. Peter Anvin + * tokens.dat: Data file containing alphanumeric tokens not in other .dats +Thu Aug 30 21:45:56 2007 +0000 H. Peter Anvin + * Generate a perfect hash for the token parser +Thu Aug 30 21:40:08 2007 +0000 H. Peter Anvin + * Fix bugs in repeated suffix handling, which led to missing r8d/r8w/r8d +Thu Aug 30 21:39:37 2007 +0000 H. Peter Anvin + * phash.ph: more powerful prehashing +Thu Aug 30 20:15:25 2007 +0000 H. Peter Anvin + * Make the perfect hash generator an includable module +Wed Aug 29 20:30:31 2007 +0000 H. Peter Anvin + * Correct the logic for recording fs: and gs: overrides. +Wed Aug 29 18:20:19 2007 +0000 H. Peter Anvin + * Generate R_X86_64_64 relocations in elf64 output +Wed Aug 29 17:24:03 2007 +0000 H. Peter Anvin + * Add README file +Wed Aug 29 17:20:09 2007 +0000 H. Peter Anvin + * Create a Perl library directory, and add the Graph module to it +Wed Aug 29 17:05:17 2007 +0000 H. Peter Anvin + * Perfect hash generator, as a perl script +Wed Aug 29 16:41:43 2007 +0000 H. Peter Anvin + * Use standard macro for the default directive +Wed Aug 29 16:40:26 2007 +0000 H. Peter Anvin + * Add standard macro for [default] directive +Wed Aug 29 16:38:47 2007 +0000 H. Peter Anvin + * More test cases for rel and abs addressing +Wed Aug 29 16:38:05 2007 +0000 H. Peter Anvin + * Add [default] directive +Wed Aug 29 16:25:46 2007 +0000 H. Peter Anvin + * nasmlib: add bsii() case-insensitive version of bsi() +Wed Aug 29 15:49:53 2007 +0000 H. Peter Anvin + * Add test cases for IP-relative addressing +Wed Aug 29 15:19:19 2007 +0000 H. Peter Anvin + * Suppress IP-relative only for fs: and gs: overrides +Tue Aug 28 23:06:00 2007 +0000 H. Peter Anvin + * Implement REL/ABS modifiers +Sun Aug 26 05:51:39 2007 +0000 Frank Kotler + * attempt to make static makefiles aware of outelf32/outelf64 +Sun Aug 26 05:48:54 2007 +0000 Frank Kotler + * add nasm_strsep to nasmlib, for output/outmacho.c - strtok doesn't work +Sun Aug 26 05:41:33 2007 +0000 Frank Kotler + * remove "#include from rdoff directory - two places - it annoyed Windows users and seems unneeded +Sun Aug 26 05:10:24 2007 +0000 Frank Kotler + * finally commit Mike Frysinger's "elf-visibility" patch +Mon Aug 20 21:03:14 2007 +0000 H. Peter Anvin + * regs.pl: handle dashed sequences with suffixes +Mon Aug 20 20:10:04 2007 +0000 H. Peter Anvin + * sync.c: change ULONG_MAX to UINT32_MAX +Mon Aug 20 20:09:11 2007 +0000 H. Peter Anvin + * Add _MIN and _MAX macros for the fixed-size types. +Mon Aug 20 20:02:17 2007 +0000 H. Peter Anvin + * ldrdf: cast output of sizeof() before passing to printf(), to avoid warning. +Sun Aug 19 18:49:26 2007 +0000 Keith Kanios + * Fixed RIP address processing ambiguity found by Charles Crayne. +Fri Aug 17 07:37:52 2007 +0000 Keith Kanios + * Fixed issues with REX prefix effective address generation. Fixed XMM instruction output. +Fri Aug 17 02:03:10 2007 +0000 Keith Kanios + * Changed MMXREG and XMMREG flags to help resolve invalid REX prefix generation for MMX instructions. +Sat Jul 7 02:01:08 2007 +0000 H. Peter Anvin + * More int/int32_t confusion +Sat Jul 7 01:59:52 2007 +0000 H. Peter Anvin + * regflag() should return int32_t. +Thu Jun 21 19:00:12 2007 +0000 H. Peter Anvin + * Detect missing and include ersatz version if missing +Thu Jun 21 06:24:23 2007 +0000 H. Peter Anvin + * inttypes.h: for older preprocessors, specify L and LL as appropriate +Thu Jun 21 06:20:43 2007 +0000 H. Peter Anvin + * inttypes.h: Fix spelling of SHRT_MAX +Thu Jun 21 06:15:42 2007 +0000 H. Peter Anvin + * inttypes.h: do a single ersatz based on +Sun Jun 3 02:42:41 2007 +0000 Chuck Crayne + * Support 32-bit direct addressing in 64-bit mode without base or index regs +Sat Jun 2 02:26:21 2007 +0000 H. Peter Anvin + * Fix the [U]INT*_C() creation macros +Sat Jun 2 00:05:35 2007 +0000 H. Peter Anvin + * For platforms that don't have them, provide for common models. +Wed May 30 22:21:11 2007 +0000 H. Peter Anvin + * Fix the handling of the \313 code. +Wed May 30 22:20:01 2007 +0000 H. Peter Anvin + * Machine-generated \321->\324 corrections +Wed May 30 21:22:33 2007 +0000 Frank Kotler + * update "version" to 0.99.02 +Wed May 30 20:30:15 2007 +0000 H. Peter Anvin + * Correct the generation of 67 prefixes. +Wed May 30 18:30:18 2007 +0000 H. Peter Anvin + * Update dependencies. +Wed May 30 16:34:29 2007 +0000 Frank Kotler + * update cvs server name in misc/release script +Wed May 30 04:28:50 2007 +0000 H. Peter Anvin + * Avoid magic values; we have more than 124 registers now +Wed May 30 04:27:58 2007 +0000 H. Peter Anvin + * Remove bogus redundant tests +Wed May 30 03:44:50 2007 +0000 H. Peter Anvin + * More \321 -> \324 +Wed May 30 03:44:02 2007 +0000 H. Peter Anvin + * Remove bogus check for 64-bitness +Wed May 30 03:25:21 2007 +0000 H. Peter Anvin + * Get rid of magic open-coded "register numbers" +Wed May 30 02:48:51 2007 +0000 H. Peter Anvin + * MOV reg64,reg64 takes \324 (64 bit with REX) not \321 (32 bit) +Wed May 30 00:18:26 2007 +0000 H. Peter Anvin + * Rename REGNORM to REG_EA +Wed May 30 00:15:25 2007 +0000 H. Peter Anvin + * More instruction flag surgery +Wed May 30 00:05:00 2007 +0000 H. Peter Anvin + * More cleanup of operand flags/register classes +Tue May 29 23:57:12 2007 +0000 H. Peter Anvin + * Clean up the existing operand flag definitions, and document +Tue May 29 21:44:55 2007 +0000 H. Peter Anvin + * Run "make alldeps" +Thu May 24 22:33:07 2007 +0000 Frank Kotler + * update version number to 0.99.01 +Tue May 15 04:33:43 2007 +0000 H. Peter Anvin + * regs.dat: fix comment +Fri May 4 18:47:16 2007 +0000 H. Peter Anvin + * 16-bit relocations are standard in ELF64 (at my request, incidentally) +Fri May 4 02:16:08 2007 +0000 Chuck Crayne + * Addition of elf32 and elf64 output formats. +Wed May 2 04:21:26 2007 +0000 Chuck Crayne + * Allow '!' to be used in expressions with same meaning as in C. +Wed May 2 01:59:16 2007 +0000 Chuck Crayne + * Add %IFN and %ELIFN as per RFE #786286 +Mon Apr 30 22:26:58 2007 +0000 Chuck Crayne + * Accept responsibility for support of outelf64.c +Sun Apr 29 20:57:53 2007 +0000 Chuck Crayne + * Clarify comments about relocation entries. +Sun Apr 29 00:28:24 2007 +0000 Chuck Crayne + * Allow ELF32 to be invoked either as -f elf or -f elf32 +Sat Apr 28 22:18:04 2007 +0000 Chuck Crayne + * Eliminate shift count warnings when building on 32-bit systems +Sat Apr 28 06:18:48 2007 +0000 Chuck Crayne + * Initial support for ELF64 +Wed Apr 18 02:27:18 2007 +0000 H. Peter Anvin + * Fix the handling of \324 for computing the length +Wed Apr 18 02:24:34 2007 +0000 Keith Kanios + * Fixed RDF/2 to comply with "maxbits" use. +Tue Apr 17 20:23:11 2007 +0000 H. Peter Anvin + * Handle "LOCK as REX.R" for MOV CRx; fix warning for invalid 64-bit regs +Mon Apr 16 18:16:46 2007 +0000 Keith Kanios + * MEM_OFFSET Instructions Fixed. +Mon Apr 16 15:46:46 2007 +0000 Keith Kanios + * Fixed 64-bit Mode Segment Selection. +Mon Apr 16 14:31:54 2007 +0000 Keith Kanios + * Fixed distinction between [LOCAL]SYMBOL/IMMEDIATE for RIP-relative addressing. +Mon Apr 16 14:05:01 2007 +0000 Keith Kanios + * Fixed long mode MEM_OFFS issue. +Mon Apr 16 13:54:49 2007 +0000 Keith Kanios + * Filled in all RIP Register Flags. +Mon Apr 16 05:26:29 2007 +0000 H. Peter Anvin + * More \321 -> \324 for 64-bit instructions +Mon Apr 16 04:56:06 2007 +0000 Keith Kanios + * Fixed 64-bit offset generation. +Mon Apr 16 02:39:56 2007 +0000 H. Peter Anvin + * More 64-bit ndisasm fixes. +Mon Apr 16 02:02:06 2007 +0000 H. Peter Anvin + * Fixes for 64-bit ndisasm. +Mon Apr 16 01:21:29 2007 +0000 H. Peter Anvin + * Use + instead of * for extension; it feels cleaner with the new meaning. +Mon Apr 16 01:18:30 2007 +0000 H. Peter Anvin + * Initial 64-bit support for ndisasm. Still a work in progress. +Sun Apr 15 23:12:17 2007 +0000 H. Peter Anvin + * Clean up the 64-bitification of regs.dat for 64-bit ndisasm support +Sun Apr 15 23:10:26 2007 +0000 H. Peter Anvin + * Remove @GCCFLAGS@ +Sun Apr 15 23:09:23 2007 +0000 H. Peter Anvin + * CR8 is not special in any way as far as the assembler is concerned. +Sun Apr 15 23:03:28 2007 +0000 H. Peter Anvin Sat Nov 24 16:31:48 2007 -0800 H. Peter Anvin + * Typo fixes in documentation +Tue Nov 20 23:37:46 2007 -0800 H. Peter Anvin + * NASM 2.00rc3 +Tue Nov 20 21:45:16 2007 -0800 H. Peter Anvin + * Unbreak CMPSW/CMPSD/CMPSQ +Tue Nov 20 13:23:34 2007 -0800 H. Peter Anvin + * Merge branch 'master' of git+ssh://repo.or.cz/srv/git/nasm +Tue Nov 20 13:22:58 2007 -0800 H. Peter Anvin + * ndisasm: handle the case of "no more sync points" +Mon Nov 19 23:09:31 2007 -0800 H. Peter Anvin + * NASM 2.00rc2 +Mon Nov 19 23:09:24 2007 -0800 H. Peter Anvin + * tag-release: a simple script to tag the repository for release +Mon Nov 19 13:14:59 2007 -0800 H. Peter Anvin + * Slightly faster implementation of the deadman counter +Mon Nov 19 12:26:50 2007 -0800 H. Peter Anvin + * BR 812417: Deadman counter for macro expansion +Mon Nov 19 12:02:38 2007 -0800 H. Peter Anvin + * BR 877583: Fix RAA memory leak +Mon Nov 19 11:53:18 2007 -0800 H. Peter Anvin + * BR 863173: Fix offsets of TIMES/INCBIN in list file +Mon Nov 19 11:45:40 2007 -0800 H. Peter Anvin + * BR 1834731: Remove redundant error messages for no input file +Mon Nov 19 11:44:05 2007 -0800 H. Peter Anvin + * insns.pl: remove debugging output +Sun Nov 18 22:18:09 2007 -0800 H. Peter Anvin + * Clean up remaining build warnings +Sun Nov 18 21:55:26 2007 -0800 H. Peter Anvin + * BR 1834292: Fix multiple disassembler bugs +Sun Nov 18 12:01:05 2007 -0800 H. Peter Anvin + * BR 1834056: Remove warnings in rdoff/rdoff.c +Sun Nov 18 11:55:10 2007 -0800 H. Peter Anvin + * BR 1091926: Bounds checking for command line parsing +Sat Nov 17 21:21:18 2007 -0800 H. Peter Anvin + * Remove FIXME from documentation +Sat Nov 17 21:08:33 2007 -0800 Charles Crayne + * Check in Keith's Fixes +Sat Nov 17 14:35:19 2007 -0800 H. Peter Anvin + * Make the definition for float_const() match the prototype +Fri Nov 16 00:03:02 2007 -0800 H. Peter Anvin + * NASM 2.00rc1 +Thu Nov 15 17:12:29 2007 -0800 H. Peter Anvin + * Clean up the command-line parsing; make -w/-W match others +Thu Nov 15 14:38:19 2007 -0800 H. Peter Anvin + * BR 993895: Support zero-operand floating-point insn +Thu Nov 15 10:25:52 2007 -0800 H. Peter Anvin + * Remove some vestiges of "native" RESW/RESD support +Thu Nov 15 10:24:55 2007 -0800 H. Peter Anvin + * outbin.c: fix one missed change from type -> size +Tue Nov 13 19:52:54 2007 -0800 root + * Support setting OSABI value in ELF header. +Tue Nov 13 11:34:34 2007 -0800 H. Peter Anvin + * Enable a few warnings by default; clean up warning descriptions +Tue Nov 13 11:31:15 2007 -0800 H. Peter Anvin + * Add gcc-style -W/-Wno- warning selections; -Wall; -Werror +Tue Nov 13 10:37:23 2007 -0800 H. Peter Anvin + * Clean up the fwrite*() function definitions somewhat +Tue Nov 13 09:49:51 2007 -0800 H. Peter Anvin + * Cast 64-bit switch expressions to (int) to keep OpenWatcom happy +Tue Nov 13 09:46:38 2007 -0800 H. Peter Anvin + * x86-host-specific performance improvement +Tue Nov 13 09:37:59 2007 -0800 H. Peter Anvin + * Address data is int64_t; simplify writing an address object +Mon Nov 12 23:00:31 2007 -0800 H. Peter Anvin + * ndisasm: factor out the common operand-extraction code +Mon Nov 12 22:56:07 2007 -0800 H. Peter Anvin + * Un-special-case "xchg rax,rax"; disassemble o64 +Mon Nov 12 22:11:46 2007 -0800 H. Peter Anvin + * BR 1709392: Fix alignment handling in Mach-O formatSat Nov 24 16:31:48 2007 -0800 H. Peter Anvin + * Typo fixes in documentation +Tue Nov 20 23:37:46 2007 -0800 H. Peter Anvin + * NASM 2.00rc3 +Tue Nov 20 21:45:16 2007 -0800 H. Peter Anvin + * Unbreak CMPSW/CMPSD/CMPSQ +Tue Nov 20 13:23:34 2007 -0800 H. Peter Anvin + * Merge branch 'master' of git+ssh://repo.or.cz/srv/git/nasm +Tue Nov 20 13:22:58 2007 -0800 H. Peter Anvin + * ndisasm: handle the case of "no more sync points" +Mon Nov 19 23:09:31 2007 -0800 H. Peter Anvin + * NASM 2.00rc2 +Mon Nov 19 23:09:24 2007 -0800 H. Peter Anvin + * tag-release: a simple script to tag the repository for release +Mon Nov 19 13:14:59 2007 -0800 H. Peter Anvin + * Slightly faster implementation of the deadman counter +Mon Nov 19 12:26:50 2007 -0800 H. Peter Anvin + * BR 812417: Deadman counter for macro expansion +Mon Nov 19 12:02:38 2007 -0800 H. Peter Anvin + * BR 877583: Fix RAA memory leak +Mon Nov 19 11:53:18 2007 -0800 H. Peter Anvin + * BR 863173: Fix offsets of TIMES/INCBIN in list file +Mon Nov 19 11:45:40 2007 -0800 H. Peter Anvin + * BR 1834731: Remove redundant error messages for no input file +Mon Nov 19 11:44:05 2007 -0800 H. Peter Anvin + * insns.pl: remove debugging output +Sun Nov 18 22:18:09 2007 -0800 H. Peter Anvin + * Clean up remaining build warnings +Sun Nov 18 21:55:26 2007 -0800 H. Peter Anvin + * BR 1834292: Fix multiple disassembler bugs +Sun Nov 18 12:01:05 2007 -0800 H. Peter Anvin + * BR 1834056: Remove warnings in rdoff/rdoff.c +Sun Nov 18 11:55:10 2007 -0800 H. Peter Anvin + * BR 1091926: Bounds checking for command line parsing +Sat Nov 17 21:21:18 2007 -0800 H. Peter Anvin + * Remove FIXME from documentation +Sat Nov 17 21:08:33 2007 -0800 Charles Crayne + * Check in Keith's Fixes +Sat Nov 17 14:35:19 2007 -0800 H. Peter Anvin + * Make the definition for float_const() match the prototype +Fri Nov 16 00:03:02 2007 -0800 H. Peter Anvin + * NASM 2.00rc1 +Thu Nov 15 17:12:29 2007 -0800 H. Peter Anvin + * Clean up the command-line parsing; make -w/-W match others +Thu Nov 15 14:38:19 2007 -0800 H. Peter Anvin + * BR 993895: Support zero-operand floating-point insn +Thu Nov 15 10:25:52 2007 -0800 H. Peter Anvin + * Remove some vestiges of "native" RESW/RESD support +Thu Nov 15 10:24:55 2007 -0800 H. Peter Anvin + * outbin.c: fix one missed change from type -> size +Tue Nov 13 19:52:54 2007 -0800 root + * Support setting OSABI value in ELF header. +Tue Nov 13 11:34:34 2007 -0800 H. Peter Anvin + * Enable a few warnings by default; clean up warning descriptions +Tue Nov 13 11:31:15 2007 -0800 H. Peter Anvin + * Add gcc-style -W/-Wno- warning selections; -Wall; -Werror +Tue Nov 13 10:37:23 2007 -0800 H. Peter Anvin + * Clean up the fwrite*() function definitions somewhat +Tue Nov 13 09:49:51 2007 -0800 H. Peter Anvin + * Cast 64-bit switch expressions to (int) to keep OpenWatcom happy +Tue Nov 13 09:46:38 2007 -0800 H. Peter Anvin + * x86-host-specific performance improvement +Tue Nov 13 09:37:59 2007 -0800 H. Peter Anvin + * Address data is int64_t; simplify writing an address object +Mon Nov 12 23:00:31 2007 -0800 H. Peter Anvin + * ndisasm: factor out the common operand-extraction code +Mon Nov 12 22:56:07 2007 -0800 H. Peter Anvin + * Un-special-case "xchg rax,rax"; disassemble o64 +Mon Nov 12 22:11:46 2007 -0800 H. Peter Anvin + * BR 1709392: Fix alignment handling in Mach-O format +Mon Nov 12 22:05:31 2007 -0800 H. Peter Anvin + * BR 1828866: fix handling of LAR/LSL +Mon Nov 12 21:57:00 2007 -0800 H. Peter Anvin + * Better (but not *good!*) handling of 64-bit addressing in ndisasm +Mon Nov 12 21:02:33 2007 -0800 H. Peter Anvin + * Fix disassembly of XCHG +Mon Nov 12 20:18:33 2007 -0800 H. Peter Anvin + * Test of XCHG +Mon Nov 12 20:18:05 2007 -0800 H. Peter Anvin + * Fix handling of XCHG in 64-bit mode +Mon Nov 12 19:36:13 2007 -0800 H. Peter Anvin + * More \321 -> \324 bug fixes +Mon Nov 12 18:26:31 2007 -0800 H. Peter Anvin + * float.c: all warnings and errors are pass 1 only +Sat Nov 10 21:55:19 2007 -0800 Charles Crayne + * Update documentation for stack relative directives. +Sat Nov 10 17:52:23 2007 -0800 Charles Crayne + * Clean up a few more 32-bit bottlenecks +Fri Nov 9 16:37:41 2007 -0800 Charles Crayne + * Update documantation for stack relative directives +Fri Nov 9 16:33:54 2007 -0800 Charles Crayne + * Merge branch 'master' of /home/chuck/development/gitnasm/ +Fri Nov 9 16:25:43 2007 -0800 Charles Crayne + * Update documentation for stack relative directives +Fri Nov 9 14:44:02 2007 -0800 H. Peter Anvin + * Don't combine type and size into a single argument +Thu Nov 8 22:11:14 2007 -0800 Charles Crayne + * Add flat64 to %stacksize choices +Thu Nov 8 20:43:22 2007 -0800 H. Peter Anvin + * Fix building under OpenWatcom +Thu Nov 8 20:29:37 2007 -0800 H. Peter Anvin + * ps2pdf: remove -dOptimize=true +Thu Nov 8 20:21:41 2007 -0800 H. Peter Anvin + * No binary files left in the source distro; unbreak release script +Thu Nov 8 20:01:11 2007 -0800 H. Peter Anvin + * BR 1828103: Fix %arg and %local +Thu Nov 8 19:34:01 2007 -0800 H. Peter Anvin + * nasmlib.c: prefix_name(): use the elements() macro +Thu Nov 8 19:30:22 2007 -0800 H. Peter Anvin + * Move elements() to nasmlib.h +Thu Nov 8 19:15:33 2007 -0800 H. Peter Anvin + * constipate the "str" argument to bsi() and bsii() +Wed Nov 7 19:03:46 2007 -0800 Charles Crayne + * Upgrade RAA functions to hold 64-bit data. +Tue Nov 6 21:48:12 2007 -0800 Charles Crayne + * Pass 64-bit instruction lengths to back-ends. +Tue Nov 6 18:27:23 2007 -0800 Charles Crayne + * Prepare for 64-bit instruction lengths +Mon Nov 5 21:49:49 2007 -0800 Charles Crayne + * Disambiguate error messages +Mon Nov 5 17:19:32 2007 -0800 Charles Crayne + * Upgrade label functions to 64-bit +Sun Nov 4 21:10:42 2007 -0800 H. Peter Anvin + * Permit opcode names as labels as long as they are followed by a colon +Sun Nov 4 15:28:30 2007 -0800 Charles Crayne + * Make warning limit valid for both i386 and x86_64 +Sat Nov 3 22:06:13 2007 -0700 Charles Crayne + * Warn on out of bounds EA displacements +Thu Nov 1 15:08:27 2007 -0700 H. Peter Anvin + * Treat info files as binary when creating xdoc distro file +Thu Nov 1 15:07:42 2007 -0700 H. Peter Anvin + * Remove obsolete binary files from the distribution +Thu Nov 1 14:53:32 2007 -0700 H. Peter Anvin + * Move declarations before statements +Wed Oct 31 23:37:35 2007 -0700 H. Peter Anvin + * NASM 0.99.06 +Wed Oct 31 23:37:19 2007 -0700 H. Peter Anvin + * Script to tag the tree for release +Wed Oct 31 10:59:26 2007 -0700 H. Peter Anvin + * Even more "riprel" tests +Tue Oct 30 01:17:57 2007 -0700 H. Peter Anvin + * floatx.asm: add tests for "rounds up to smallest denorm" +Tue Oct 30 01:13:27 2007 -0700 H. Peter Anvin + * Run "make alldeps" +Tue Oct 30 01:13:09 2007 -0700 H. Peter Anvin + * float.c: handle round-up-to-denorm correctly. +Tue Oct 30 00:59:27 2007 -0700 H. Peter Anvin + * Exhaustive test for 8-bit floating point values +Mon Oct 29 23:12:47 2007 -0700 H. Peter Anvin + * Clean up the handing of operands in assemble.c +Mon Oct 29 22:56:08 2007 -0700 H. Peter Anvin + * Don't warn for segmented references +Mon Oct 29 20:20:12 2007 -0700 H. Peter Anvin + * Use a 32-bit floating-point limb size; support 8-bit float +Mon Oct 29 18:24:59 2007 -0700 Charles Crayne + * Reduce severity of redundant prefixes from error to warning. +Sun Oct 28 23:23:24 2007 -0700 H. Peter Anvin + * Test of some addressing modes in 64-bit mode. +Sun Oct 28 23:21:46 2007 -0700 H. Peter Anvin + * Fix bogus flagging of effective addresses as invalid +Sun Oct 28 23:10:34 2007 -0700 H. Peter Anvin + * Actually shut up the warning in rdfload.c +Sun Oct 28 22:04:42 2007 -0700 H. Peter Anvin + * Clean up stealth whitespace +Sun Oct 28 22:04:00 2007 -0700 H. Peter Anvin + * Fix warning about cast to pointer in rdfload.c +Sun Oct 28 22:04:00 2007 -0700 H. Peter Anvin + * 64-bit addressing and prefix handling changes +Sun Oct 28 15:29:54 2007 -0700 Charles Crayne + * Adjust stabs symbol index to match symbol table. +Fri Oct 26 21:38:02 2007 -0700 H. Peter Anvin + * readnum(): handle prefix-suffix collision like "0h" +Fri Oct 26 18:49:29 2007 -0700 H. Peter Anvin + * Better handling of platforms which hide "extended" functionality +Wed Oct 24 15:51:40 2007 -0700 Charles Crayne + * Merge branch 'master' of /home/chuck/development/gitnasm/ +Wed Oct 24 15:30:17 2007 -0700 Charles Crayne + * Update sections about debug info formats +Wed Oct 24 15:29:51 2007 -0700 H. Peter Anvin + * Fix the handling of floating-point tokens in the preprocessor +Tue Oct 23 19:28:39 2007 -0700 Charles Crayne + * Fix bugs item #1817677 +Tue Oct 23 00:08:58 2007 -0700 H. Peter Anvin + * Slightly simplify the radix-detection code +Mon Oct 22 19:48:06 2007 -0700 H. Peter Anvin + * Unbreak particularly tricky hex constants +Mon Oct 22 19:37:36 2007 -0700 H. Peter Anvin + * Decimal floating point can also start with 0. 0e 0E +Mon Oct 22 17:34:10 2007 -0700 H. Peter Anvin + * Support binary and octal floating-point +Mon Oct 22 16:53:48 2007 -0700 H. Peter Anvin + * More consistent handling of radix letters +Sun Oct 21 15:33:01 2007 -0700 H. Peter Anvin + * float.c: correct exponent capping +Sun Oct 21 14:21:43 2007 -0700 Charles Crayne + * Clean up elf symbol table section +Fri Oct 19 18:33:57 2007 -0700 H. Peter Anvin + * Allow $-prefixed hexadecimal FP as an alternative to 0x +Fri Oct 19 14:43:22 2007 -0700 H. Peter Anvin + * Scripts to remove stealth whitespace +Fri Oct 19 14:42:29 2007 -0700 H. Peter Anvin + * Formatting: kill off "stealth whitespace" +Fri Oct 19 14:26:52 2007 -0700 H. Peter Anvin + * test/floatx.asm: fix test case +Fri Oct 19 14:19:52 2007 -0700 H. Peter Anvin + * uscore.asm: Fix test case +Fri Oct 19 14:17:51 2007 -0700 H. Peter Anvin + * float.c: mark read_exponent() static +Fri Oct 19 14:10:35 2007 -0700 H. Peter Anvin + * Don't confuse suffixed hexadecimal with floating-point +Fri Oct 19 13:17:24 2007 -0700 H. Peter Anvin + * Anchor filename locations in .gitignore +Fri Oct 19 13:16:51 2007 -0700 H. Peter Anvin + * test/Makefile: Use -Ox instead of -O999 +Fri Oct 19 13:14:06 2007 -0700 H. Peter Anvin + * Test of underscored constants +Fri Oct 19 13:10:46 2007 -0700 H. Peter Anvin + * Allow underscores in numbers; better detection of FP +Fri Oct 19 10:52:31 2007 -0700 H. Peter Anvin + * Modernize nasm.spec.in and make it closer to the Fedora version +Thu Oct 18 23:33:06 2007 -0700 Charles Crayne + * Suppress datarootdir warnings from configure +Thu Oct 18 21:17:20 2007 -0700 Charles Crayne + * Suppress signedness warnings in disassembler +Thu Oct 18 19:14:08 2007 -0700 H. Peter Anvin + * Cleaner solution for MinGW handling of __STRICT_ANSI__ +Thu Oct 18 19:14:08 2007 -0700 H. Peter Anvin + * configure: Undefine __STRICT_ANSI__ for mingw's benefit +Thu Oct 18 19:14:07 2007 -0700 H. Peter Anvin + * Fix invocation of readnum() +Thu Oct 18 19:02:42 2007 -0700 Charles Crayne + * Suppress a few signedness warnings +Thu Oct 18 17:04:10 2007 -0700 root + * Avoid unnecessary warning on redefinition of section (bug 801180) +Wed Oct 17 17:55:45 2007 -0700 Charles Crayne + * Generate stabs entries for any executable section +Tue Oct 16 22:59:09 2007 -0700 H. Peter Anvin + * NASM 0.99.05 +Tue Oct 16 15:46:04 2007 -0700 H. Peter Anvin + * Tests of obscenely large exponents +Tue Oct 16 14:42:32 2007 -0700 H. Peter Anvin + * Comma-separate contents of __FLOAT__ +Tue Oct 16 14:40:27 2007 -0700 H. Peter Anvin + * Implement floating-point option control directive +Tue Oct 16 11:48:07 2007 -0700 H. Peter Anvin + * Floating-point warning fixes; fix round-to-overflow +Tue Oct 16 11:32:58 2007 -0700 H. Peter Anvin + * Handle rounding of denorms correctly; make fp overflow a warning +Tue Oct 16 10:35:02 2007 -0700 H. Peter Anvin + * Additional entries for .gitignore +Tue Oct 16 10:32:57 2007 -0700 H. Peter Anvin + * Refactor floating-point formatting code; fix 80-bit denorms +Tue Oct 16 10:31:16 2007 -0700 H. Peter Anvin + * Add 1.5 as a test case: representative of an exact fraction +Mon Oct 15 20:06:06 2007 -0700 H. Peter Anvin + * Recognize 'd', 't' and 'y' as radix suffixes +Mon Oct 15 19:53:10 2007 -0700 H. Peter Anvin + * Fix FISTTP opcodes (BR 689695) +Mon Oct 15 19:46:32 2007 -0700 H. Peter Anvin + * New floating-point conversion routines +Mon Oct 15 17:48:43 2007 -0700 H. Peter Anvin + * Add testnos3 from the gdtoa package (floating-point test) +Sat Oct 13 23:19:21 2007 -0700 H. Peter Anvin + * .gitignore file doesn't need to be in the release file +Sat Oct 13 23:17:41 2007 -0700 H. Peter Anvin + * Add .gitignore file so "git status" produces something sane +Sat Oct 13 23:12:46 2007 -0700 H. Peter Anvin + * autoconf: drop AC_USE_SYSTEM_EXTENSIONS to support autoconf 2.59 +Sat Oct 13 07:09:22 2007 -0700 Keith Kanios + * Fix 32-bit types in preproc.c and eval.c +Thu Oct 11 20:32:33 2007 -0700 Charles Crayne + * Must define types before using them +Thu Oct 11 13:42:09 2007 -0700 H. Peter Anvin + * preproc.c: move smacro define/undef to separate functions +Thu Oct 11 13:38:38 2007 -0700 H. Peter Anvin + * preproc.c: PP_DEFINE and PP_XDEFINE are case-sensitive +Thu Oct 11 12:52:03 2007 -0700 H. Peter Anvin + * preproc.c: normalize the handling of case sensitivity +Thu Oct 11 12:51:06 2007 -0700 H. Peter Anvin + * Define macros necessary for on C++ +Thu Oct 11 10:12:58 2007 -0700 H. Peter Anvin + * More "bool" fixes +Thu Oct 11 10:11:57 2007 -0700 H. Peter Anvin + * preproc.c: allow 64-bit repeat counts +Thu Oct 11 10:06:19 2007 -0700 H. Peter Anvin + * preproc.c: For an SMacro, in_progress really is a boolean (no %rep) +Thu Oct 11 00:05:57 2007 -0700 H. Peter Anvin + * Additional uses of bool and enum +Thu Oct 11 00:05:57 2007 -0700 H. Peter Anvin + * preproc.c: MMacro.in_progress is not a boolean +Wed Oct 10 18:07:51 2007 -0700 H. Peter Anvin + * saa_fread/fwrite: when seeking, must set [rw]ptr as well +Wed Oct 10 14:58:45 2007 -0700 H. Peter Anvin + * Use the compiler-provided booleans if available, otherwise emulate +Wed Oct 10 14:55:14 2007 -0700 H. Peter Anvin + * owlinux.mak: don't clean things we won't be able to +Wed Oct 10 14:29:53 2007 -0700 H. Peter Anvin + * configure.in: looks like we need autoconf 2.61 :( +Wed Oct 10 14:06:59 2007 -0700 H. Peter Anvin + * Create option -Ox to tell NASM to do unlimited passes +Mon Oct 8 19:26:57 2007 -0700 H. Peter Anvin + * Revert "floatb.asm: fix broken testcase" +Mon Oct 8 18:39:24 2007 -0700 H. Peter Anvin + * floatb.asm: fix broken testcase +Mon Oct 8 12:41:00 2007 -0700 H. Peter Anvin + * saa_rstruct: fix overrun check +Mon Oct 8 12:12:23 2007 -0700 H. Peter Anvin + * Add Frank's floattest.asm test file +Sun Oct 7 21:13:14 2007 -0700 H. Peter Anvin + * saa_fpwrite: initializing "len" should be part of the loop +Sun Oct 7 18:46:57 2007 -0700 Charles Crayne + * Fix infinite loop in function saa_fpwrite +Fri Oct 5 17:44:16 2007 -0700 H. Peter Anvin + * zerobyte.asm: use a real instruction to avoid confusing ndisasm +Fri Oct 5 17:42:31 2007 -0700 H. Peter Anvin + * zerobyte.asm: add test cases for non-initial \170 uses +Fri Oct 5 17:29:01 2007 -0700 H. Peter Anvin + * Check in the proper zerobyte test +Fri Oct 5 17:04:32 2007 -0700 H. Peter Anvin + * Emit REX prefix before literal zero (\170) +Fri Oct 5 17:01:15 2007 -0700 H. Peter Anvin + * LICENSE: Break long line +Fri Oct 5 14:36:03 2007 -0700 H. Peter Anvin + * Add test for problematic floats +Thu Oct 4 23:51:08 2007 -0700 H. Peter Anvin + * floatx.asm: add Inf and NaN to the boundary condition tests +Thu Oct 4 23:09:19 2007 -0700 H. Peter Anvin + * floatx.asm: add specific tests for exponent boundary conditions +Thu Oct 4 22:51:08 2007 -0700 H. Peter Anvin + * float.c: correct the exponent +Thu Oct 4 15:18:23 2007 -0700 H. Peter Anvin + * Additional rules in test/Makefile +Thu Oct 4 13:42:56 2007 -0700 H. Peter Anvin + * Rewrite the handling of SAA's to allow random access +Wed Oct 3 21:30:57 2007 -0700 H. Peter Anvin + * Change cloc_t to struct location, and reorder the members +Wed Oct 3 21:24:51 2007 -0700 H. Peter Anvin + * BR 1352920: change loc_t -> cloc_t +Wed Oct 3 21:22:16 2007 -0700 H. Peter Anvin + * BR 1352920: Handle upper case %line +Wed Oct 3 17:40:12 2007 -0700 H. Peter Anvin + * Use autoconf to request feature macros +Tue Oct 2 22:04:15 2007 -0700 H. Peter Anvin + * preproc.c: constipation +Tue Oct 2 21:57:27 2007 -0700 H. Peter Anvin + * make alldeps +Tue Oct 2 21:53:51 2007 -0700 H. Peter Anvin + * Portability fixes +Tue Oct 2 21:13:18 2007 -0700 H. Peter Anvin + * Run "make alldeps". +Tue Oct 2 17:40:00 2007 -0700 H. Peter Anvin + * Use the crc64 we already use as the perfect hash function prehash +Tue Oct 2 15:09:33 2007 -0700 H. Peter Anvin + * insns.dat: add systematic names for the hinting NOPs (0F18-0F1F) +Mon Oct 1 11:28:32 2007 -0700 H. Peter Anvin + * Unspecified files are null strings, not null pointers +Mon Oct 1 11:26:31 2007 -0700 H. Peter Anvin + * Check for the most basic filename overlaps +Sun Sep 30 22:15:36 2007 -0700 Charles Crayne + * modified: nasm.1 to add newer command line options +Fri Sep 28 21:27:41 2007 -0700 Charles Crayne + * Merge branch 'master' of git+ssh://ccrayne@repo.or.cz/srv/git/nasm +Fri Sep 28 20:17:12 2007 -0700 H. Peter Anvin + * configure.in: AC_SUBST_FILE should have been AC_SUBST +Fri Sep 28 17:17:20 2007 -0700 H. Peter Anvin + * Unbreak relative references to immediate addresses +Fri Sep 28 15:16:47 2007 -0700 Charles Crayne + * Merge branch 'master' of git+ssh://ccrayne@repo.or.cz/srv/git/nasm +Fri Sep 28 12:01:55 2007 -0700 H. Peter Anvin + * lib/vsnprintf.c: correct boundary conditions +Fri Sep 28 10:50:20 2007 -0700 H. Peter Anvin + * Add substitutes for snprintf() and vsnprintf() +Fri Sep 28 02:03:41 2007 -0400 Frank Kotler + * Merge branch 'master' of git+ssh://fbkotler@repo.or.cz/srv/git/nasm +Thu Sep 27 21:35:04 2007 -0700 H. Peter Anvin + * Exclude config.h from the dependency list for the canned makefiles +Thu Sep 27 21:12:17 2007 -0700 H. Peter Anvin + * version.pl: Add support for daily snapshot releases +Thu Sep 27 19:46:55 2007 -0700 H. Peter Anvin + * Add Makefile for Linux -> DOS, Win32, OS/2 using OpenWatcom +Wed Sep 26 19:57:07 2007 -0700 H. Peter Anvin + * Add Makefile for OpenWatcom (DOS, OS/2 or Win32 output) +Wed Sep 26 17:00:18 2007 -0700 H. Peter Anvin + * Test for various addressing modes in 64-bit mode +Wed Sep 26 15:19:28 2007 -0700 H. Peter Anvin + * nasm option reshuffling, -E -> -Z +Tue Sep 25 23:57:21 2007 -0400 Frank Kotler + * Version 0.99.04 +Tue Sep 25 20:36:45 2007 -0700 H. Peter Anvin + * nasmdoc: corrections on 64-bit immediates/displacements +Tue Sep 25 16:02:21 2007 -0700 H. Peter Anvin + * nasmdoc: shorten lines which are too long +Tue Sep 25 16:01:07 2007 -0700 H. Peter Anvin + * Document NASM behaviour for 64-bit immediates and displacements +Tue Sep 25 15:44:40 2007 -0700 H. Peter Anvin + * test/movimm.asm: add optimizable forms +Tue Sep 25 15:41:19 2007 -0700 H. Peter Anvin + * assemble.c: clean up whitespace +Tue Sep 25 15:40:36 2007 -0700 H. Peter Anvin + * Correct the handling of "MOV" with immediate in 64-bit mode +Tue Sep 25 15:39:42 2007 -0700 H. Peter Anvin + * Test of immediate handling on 64-bit mode +Tue Sep 25 14:27:34 2007 -0700 H. Peter Anvin + * Add nasm_zalloc() to nasmlib.c +Tue Sep 25 14:26:03 2007 -0700 H. Peter Anvin + * Fix BR 1490407: size of the second operand of LAR/LSL +Tue Sep 25 14:11:29 2007 -0700 H. Peter Anvin + * Fix BR 1490407: size of the second operand of LAR/LSL +Tue Sep 25 13:34:55 2007 -0700 H. Peter Anvin + * Makefile.in: make "make install" create directories +Tue Sep 25 08:48:37 2007 -0700 H. Peter Anvin + * Fix BR 1445441: uninitialized use of "error_file" +Mon Sep 24 21:33:17 2007 -0700 H. Peter Anvin + * preproc.c: fix the loop in %undef +Mon Sep 24 20:53:48 2007 -0700 H. Peter Anvin + * float.c: clear off uninitialized warning +Mon Sep 24 17:02:41 2007 -0700 H. Peter Anvin + * outcoff: set the "virtual size field" to zero (BR 1351586) +Mon Sep 24 15:56:02 2007 -0700 H. Peter Anvin + * insns.dat: SMINT - mark ND, DMINT - fix opcode +Mon Sep 24 15:55:20 2007 -0700 H. Peter Anvin + * 0F0F is a 3Dnow! prefix; remove from prefix list +Mon Sep 24 15:48:09 2007 -0700 H. Peter Anvin + * Additional compaction missed by script +Mon Sep 24 15:42:53 2007 -0700 H. Peter Anvin + * insns.dat: machine-generated compaction mmx/xmmreg,mem -> mmx/xmmrm +Mon Sep 24 13:54:00 2007 -0700 H. Peter Anvin + * nasmdoc: grammar fix +Mon Sep 24 13:44:02 2007 -0700 H. Peter Anvin + * nasmdoc: remove stray periods +Mon Sep 24 13:42:09 2007 -0700 H. Peter Anvin + * test/Makefile: make a bit more useful +Mon Sep 24 13:41:58 2007 -0700 H. Peter Anvin + * Implement the -MG option (SF RFE 1564264) +Mon Sep 24 12:52:09 2007 -0700 H. Peter Anvin + * nasmdoc: clarify __float*__ example +Mon Sep 24 12:44:38 2007 -0700 H. Peter Anvin + * nasmdoc: document the __float*__ operators +Mon Sep 24 12:30:54 2007 -0700 H. Peter Anvin + * Support __float*__ for floating-point numbers in expressions +Mon Sep 24 10:51:07 2007 -0700 H. Peter Anvin + * eval.c: replace sequence of ifs with switch +Mon Sep 24 10:50:23 2007 -0700 H. Peter Anvin + * tokhash: allow a bit smarter pattern matching +Sat Sep 22 22:35:28 2007 -0700 H. Peter Anvin + * Implement INVLPGA according to the documentation +Sat Sep 22 22:02:34 2007 -0700 H. Peter Anvin + * Reformat insns.dat to uniform column width +Sat Sep 22 21:50:03 2007 -0700 H. Peter Anvin + * Simple test for 0x67 prefixes +Sat Sep 22 21:49:51 2007 -0700 H. Peter Anvin + * Auto-generate 0x67 prefixes without the need for \30x codes +Sat Sep 22 21:47:13 2007 -0700 H. Peter Anvin + * Make test/Makefile a bit more useful +Sat Sep 22 21:29:41 2007 -0700 H. Peter Anvin + * Add TY_OWORD for "DO" output +Sat Sep 22 19:52:11 2007 -0700 H. Peter Anvin + * LDDQU needs \301 (BR 1103549) +Sat Sep 22 19:51:13 2007 -0700 H. Peter Anvin + * RDTSCP and INVLPGA aren't 64-bit specific +Sat Sep 22 19:40:37 2007 -0700 H. Peter Anvin + * Cyrix GX1 instructions: BBx_RESET, CPU_READ, CPU_WRITE +Sat Sep 22 19:28:14 2007 -0700 H. Peter Anvin + * Centaur XSHA1, XSHA256, MONTMUL +Sat Sep 22 19:20:56 2007 -0700 H. Peter Anvin + * Implement Centaur's XCRYPT instructions +Sat Sep 22 19:13:05 2007 -0700 H. Peter Anvin + * Add Geode LX (AMD's Cyrix-derived core) instructions +Sat Sep 22 19:05:11 2007 -0700 H. Peter Anvin + * Add the GETSEC instruction for Intel SMX +Sat Sep 22 18:59:18 2007 -0700 H. Peter Anvin + * Add the AMD SSE4a and LZCNT instructions +Sat Sep 22 18:23:20 2007 -0700 H. Peter Anvin + * Tag UMOV as ND (no disassembly) to avoid collision +Sat Sep 22 18:20:49 2007 -0700 H. Peter Anvin + * Disallow optimizing by less than 5 passes. +Sat Sep 22 17:45:45 2007 -0700 H. Peter Anvin + * BR 1783117: Document that %+ needs a space after it, and fix crash +Sat Sep 22 16:44:56 2007 -0700 H. Peter Anvin + * nasm.spec.in: minor fixes +Sat Sep 22 16:38:25 2007 -0700 H. Peter Anvin + * release script: handle stricter CLI parsing for "git tag" +Sat Sep 22 16:35:11 2007 -0700 H. Peter Anvin + * Update nasm.spec.in and make it handle rc releases +Sat Sep 22 16:19:19 2007 -0700 H. Peter Anvin + * version.pl: support version numbers of the form X.Y[.Z]rcW +Thu Sep 20 21:33:43 2007 -0700 Charles Crayne + * Merge branch 'master' of git+ssh://ccrayne@repo.or.cz/srv/git/nasm +Thu Sep 20 21:12:33 2007 -0700 Charles Crayne + * modified: misc/release to fix bug in removing .git +Wed Sep 19 21:41:43 2007 -0700 H. Peter Anvin + * Merge branch 'master' of git+ssh://repo.or.cz/srv/git/nasm +Wed Sep 19 21:41:27 2007 -0700 H. Peter Anvin + * Update manual pages +Wed Sep 19 21:41:02 2007 -0700 H. Peter Anvin + * Remove limit on number of sync points +Wed Sep 19 21:40:37 2007 -0700 H. Peter Anvin + * Make nasm_malloc() et al available from inside ndisasm +Wed Sep 19 21:07:32 2007 -0400 Frank Kotler + * Version 0.99.03 +Wed Sep 19 21:06:59 2007 -0400 Frank Kotler + * Merge branch 'master' of git+ssh://fbkotler@repo.or.cz/srv/git/nasm +Wed Sep 19 16:22:03 2007 -0700 H. Peter Anvin + * Merge commit 'origin/sse5' +Wed Sep 19 16:15:22 2007 -0700 H. Peter Anvin + * test/Makefile: make a bit more useful +Tue Sep 18 22:54:40 2007 -0700 H. Peter Anvin + * Slightly optimize the interface to nasm_token_hash() +Wed Sep 19 01:34:55 2007 -0400 Frank Kotler + * Merge branch 'master' of git+ssh://fbkotler@repo.or.cz/srv/git/nasm +Tue Sep 18 22:23:42 2007 -0700 H. Peter Anvin + * Merge commit 'origin/master' into sse5 +Tue Sep 18 22:22:49 2007 -0700 H. Peter Anvin + * elf64: fix 32-bit truncations +Tue Sep 18 22:08:04 2007 -0700 H. Peter Anvin + * Document Infinity and NaN +Tue Sep 18 21:55:56 2007 -0700 H. Peter Anvin + * Support generating NaNs and infinities +Tue Sep 18 19:12:26 2007 -0700 H. Peter Anvin + * Update documentation +Tue Sep 18 18:37:36 2007 -0700 H. Peter Anvin + * Simple test for hexadecimal floating-point numbers +Tue Sep 18 18:33:17 2007 -0700 H. Peter Anvin + * Fix error-reporting in hexadecimal floating-point numbers +Tue Sep 18 18:31:26 2007 -0700 H. Peter Anvin + * Support C99-style hexadecimal floating point. +Tue Sep 18 17:50:34 2007 -0700 H. Peter Anvin + * Unify all standard IEEE floating-point formats; add 128-bit +Tue Sep 18 17:49:09 2007 -0700 H. Peter Anvin + * Fix handling of DO; support unary + for floating-point numbers +Tue Sep 18 16:39:03 2007 -0700 H. Peter Anvin + * Support 16-bit IEEE floating point; used in SSE5 +Tue Sep 18 15:43:40 2007 -0700 H. Peter Anvin + * Merge commit 'origin/master' into sse5 +Tue Sep 18 15:43:08 2007 -0700 H. Peter Anvin + * Add NOP with argument to the instruction list +Tue Sep 18 15:24:38 2007 -0700 H. Peter Anvin + * Remove 0FC2 from list of instruction prefixes +Tue Sep 18 15:08:20 2007 -0700 H. Peter Anvin + * Speed up the disassembler by allowing prefixed instruction tables +Tue Sep 18 13:45:12 2007 -0700 H. Peter Anvin + * Document oword, do and reso +Tue Sep 18 13:01:32 2007 -0700 H. Peter Anvin + * Implement "oword" (128 bits) as a first-class size +Tue Sep 18 12:38:07 2007 -0700 H. Peter Anvin + * Change the token prehash function for better convergence +Tue Sep 18 12:23:21 2007 -0700 H. Peter Anvin + * SSE5 instruction table +Tue Sep 18 02:06:09 2007 -0400 Frank Kotler + * add "const" to output/outdbg.c +Mon Sep 17 18:45:44 2007 -0700 H. Peter Anvin + * Disassembler support for SSE5 instructions +Mon Sep 17 17:27:46 2007 -0700 H. Peter Anvin + * insns.dat: All SSE5 instructions are AMD +Mon Sep 17 17:25:27 2007 -0700 H. Peter Anvin + * Actually generate SSE5 instructions +Mon Sep 17 16:55:04 2007 -0700 H. Peter Anvin + * Initial support for generating DREX suffixes +Mon Sep 17 16:31:33 2007 -0700 H. Peter Anvin + * Fix a few instances of missing renumbers +Mon Sep 17 16:20:45 2007 -0700 H. Peter Anvin + * Enable IF_AR3 +Mon Sep 17 15:49:53 2007 -0700 H. Peter Anvin + * Merge commit 'origin/master' into sse5 +Mon Sep 17 15:49:30 2007 -0700 H. Peter Anvin + * Initial support for four arguments per instruction +Mon Sep 17 15:48:32 2007 -0700 H. Peter Anvin + * CLFLUSH: Neither an x64 instruction nor AMD +Mon Sep 17 13:56:26 2007 -0700 H. Peter Anvin + * Sort dependency lists +Mon Sep 17 13:53:14 2007 -0700 H. Peter Anvin + * Cleaner way to handle MSVC's _snprintf() underscore damage +Mon Sep 17 13:19:25 2007 -0700 H. Peter Anvin + * test/r13.asm: test special-casing of rbp and r13 in 64-bit mode +Mon Sep 17 13:03:33 2007 -0700 H. Peter Anvin + * Additional documentation for 64-bit programming +Sun Sep 16 22:27:07 2007 -0700 H. Peter Anvin + * INSTALL: MSVC++ compilation instructions +Sun Sep 16 22:17:29 2007 -0700 H. Peter Anvin + * make alldeps: change Mkfiles/Makefile.* to Mkfiles/*.mak +Sun Sep 16 22:16:24 2007 -0700 H. Peter Anvin + * Fix Makefile for MSVC++ 2005, delete obsolete Makefiles +Sun Sep 16 22:15:34 2007 -0700 H. Peter Anvin + * Minor fixes needed to compile with MSVC++ 2005 +Sun Sep 16 18:35:02 2007 -0700 H. Peter Anvin + * Run "make alldeps" +Sun Sep 16 18:04:57 2007 -0700 H. Peter Anvin + * Switch the preprocessor over to using the hash table library +Sun Sep 16 17:53:17 2007 -0700 H. Peter Anvin + * Fix the handling of local labels +Fri Sep 14 18:36:01 2007 -0700 H. Peter Anvin + * preproc.c: remove unnecessary int64_t +Fri Sep 14 18:03:29 2007 -0700 H. Peter Anvin + * Use the new hash table function library to store labels +Fri Sep 14 09:24:38 2007 -0700 H. Peter Anvin + * Define a proper hash table library +Thu Sep 13 18:13:20 2007 -0700 H. Peter Anvin + * Simple performance benchmarks: label, macro and token lookups +Thu Sep 13 12:25:32 2007 -0700 H. Peter Anvin + * release script: fix final cleanup +Thu Sep 13 12:22:00 2007 -0700 H. Peter Anvin + * Modify release script for a git-centric world +Thu Sep 13 11:06:42 2007 -0700 H. Peter Anvin + * pptok.c: don't insist on C99 compiler behaviour +Wed Sep 12 22:02:06 2007 -0700 H. Peter Anvin + * Fix literal F2 and F3 prefixes +Wed Sep 12 21:58:51 2007 -0700 H. Peter Anvin + * Add (untested!) SSSE3, SSE4.1, SSE4.2 instructions +Wed Sep 12 21:06:36 2007 -0700 H. Peter Anvin + * Add support for Tejas New Instructions (SSSE3) +Wed Sep 12 21:05:06 2007 -0700 H. Peter Anvin + * Remove $Id$ tags (useless with git) +Wed Sep 12 21:04:58 2007 -0700 H. Peter Anvin + * Use rm32 operands for VMREAD/VMWRITE +Wed Sep 12 21:04:51 2007 -0700 H. Peter Anvin + * Macros for SSSE3/SSE4 instruction sets +Wed Sep 12 21:04:39 2007 -0700 H. Peter Anvin + * Support r/m operands for non-integer types +Wed Sep 12 20:27:41 2007 -0700 H. Peter Anvin + * Use enumerations where practical to ease debugging +Wed Sep 12 17:02:55 2007 +0000 H. Peter Anvin + * pptok.c: quick-and-dirty downcasing during prehashing +Wed Sep 12 16:55:57 2007 +0000 H. Peter Anvin + * phash: Tell the user when the graph is OK +Wed Sep 12 05:18:20 2007 +0000 H. Peter Anvin + * pptok.c: handle holes in the pp_directives array +Wed Sep 12 04:20:08 2007 +0000 H. Peter Anvin + * preproc.c: adjust whitespace +Wed Sep 12 04:18:37 2007 +0000 H. Peter Anvin + * More automation in the preprocessor conditionals handling +Wed Sep 12 02:13:39 2007 +0000 H. Peter Anvin + * pptok.c: fix spacing +Wed Sep 12 02:12:07 2007 +0000 H. Peter Anvin + * Generate automatically correct tests for %if and %elif +Wed Sep 12 01:34:19 2007 +0000 H. Peter Anvin + * Run "make alldeps"; add dependencies missing from the previous checkin +Wed Sep 12 01:29:43 2007 +0000 H. Peter Anvin + * Use a perfect hash to look up preprocessor directives +Wed Sep 12 01:27:53 2007 +0000 H. Peter Anvin + * phash: Be a bit more aggressive about trying to make a small hash +Wed Sep 12 00:22:29 2007 +0000 H. Peter Anvin + * Add RCXZ as a known preprocessor condition +Tue Sep 11 23:57:23 2007 +0000 H. Peter Anvin + * doc: add some cross-references +Tue Sep 11 23:52:01 2007 +0000 H. Peter Anvin + * Feeble attempt at updating the documentation; remove Appendix B +Tue Sep 11 22:44:03 2007 +0000 H. Peter Anvin + * Handle instructions which can have both REX.W and OSP +Tue Sep 11 22:14:18 2007 +0000 H. Peter Anvin + * Use enums to make debugging easier +Tue Sep 11 22:13:17 2007 +0000 H. Peter Anvin + * ndisasm: handle \366 codes, prefer unprefixed instructions +Tue Sep 11 22:00:34 2007 +0000 H. Peter Anvin + * Simplify tokens.dat slightly +Tue Sep 11 04:26:44 2007 +0000 H. Peter Anvin + * Quiet gcc warning about uninitialized variables +Tue Sep 11 04:16:57 2007 +0000 H. Peter Anvin + * Make the big instruction arrays "const" +Mon Sep 10 23:32:05 2007 +0000 H. Peter Anvin + * Use an actual enum for the opcode +Mon Sep 10 23:30:21 2007 +0000 H. Peter Anvin + * Fix order of token arguments +Mon Sep 10 18:59:26 2007 +0000 H. Peter Anvin + * assemble.c: correct special handing of ESP/RSP +Mon Sep 10 18:59:01 2007 +0000 H. Peter Anvin + * tokhash: correct duplicate-token test +Mon Sep 10 18:58:40 2007 +0000 H. Peter Anvin + * tokhash: adjust table types to reduce size +Mon Sep 10 18:55:52 2007 +0000 H. Peter Anvin + * Fix the MMXREG and XMMREG flags definitions. +Wed Sep 5 06:48:38 2007 +0000 H. Peter Anvin + * nasm.spec.in: Copyright -> License +Wed Sep 5 06:40:51 2007 +0000 H. Peter Anvin + * Fix "make tar"; useful for RPM testing +Wed Sep 5 06:24:43 2007 +0000 H. Peter Anvin + * Remove obsolete Serial: construct; we shouldn't need it anyway. +Tue Sep 4 01:29:43 2007 +0000 Chuck Crayne + * Provide 64-bit support for ORG directive +Sun Sep 2 16:37:03 2007 +0000 H. Peter Anvin + * Fix some MMX/SSE irregularities which interact with the 64-bit support +Sun Sep 2 14:46:00 2007 +0000 H. Peter Anvin + * phash.ph: yet another attempt at getting Perl to behave, arithmetically +Sun Sep 2 06:23:29 2007 +0000 H. Peter Anvin + * Simple 64-bit org test +Sun Sep 2 06:20:15 2007 +0000 H. Peter Anvin + * phash.ph: remove some stale code +Sun Sep 2 01:00:34 2007 +0000 Chuck Crayne + * Force use of integer values for generating hash keys. +Fri Aug 31 18:10:23 2007 +0000 H. Peter Anvin + * phash: don't rely on the build platform Perl version of rand() +Fri Aug 31 07:31:51 2007 +0000 H. Peter Anvin + * tokhash.pl: formatting changes for readability +Fri Aug 31 07:23:31 2007 +0000 H. Peter Anvin + * tokhash: Speed up the rejection of unhashed values +Fri Aug 31 06:06:17 2007 +0000 H. Peter Anvin + * tokhash.pl: "ix" should have the same width as the "hash" arrays +Fri Aug 31 00:28:35 2007 +0000 H. Peter Anvin + * Add "do not edit" comment to tokhash.c +Fri Aug 31 00:23:40 2007 +0000 H. Peter Anvin + * Make the token hash a bit smaller by using 16-bit hash tables +Fri Aug 31 00:16:10 2007 +0000 H. Peter Anvin + * Minor cleanup; remove duplication of names.c +Thu Aug 30 23:42:39 2007 +0000 H. Peter Anvin + * phash.ph: use a bipartite graph to reduce the storage requirements +Thu Aug 30 22:35:34 2007 +0000 H. Peter Anvin + * Finishing touches on perfect hash tokenizer; actually turn the thing on +Thu Aug 30 21:50:20 2007 +0000 H. Peter Anvin + * Makefile rule for tokhash.c +Thu Aug 30 21:47:46 2007 +0000 H. Peter Anvin + * tokens.dat: Data file containing alphanumeric tokens not in other .dats +Thu Aug 30 21:45:56 2007 +0000 H. Peter Anvin + * Generate a perfect hash for the token parser +Thu Aug 30 21:40:08 2007 +0000 H. Peter Anvin + * Fix bugs in repeated suffix handling, which led to missing r8d/r8w/r8d +Thu Aug 30 21:39:37 2007 +0000 H. Peter Anvin + * phash.ph: more powerful prehashing +Thu Aug 30 20:15:25 2007 +0000 H. Peter Anvin + * Make the perfect hash generator an includable module +Wed Aug 29 20:30:31 2007 +0000 H. Peter Anvin + * Correct the logic for recording fs: and gs: overrides. +Wed Aug 29 18:20:19 2007 +0000 H. Peter Anvin + * Generate R_X86_64_64 relocations in elf64 output +Wed Aug 29 17:24:03 2007 +0000 H. Peter Anvin + * Add README file +Wed Aug 29 17:20:09 2007 +0000 H. Peter Anvin + * Create a Perl library directory, and add the Graph module to it +Wed Aug 29 17:05:17 2007 +0000 H. Peter Anvin + * Perfect hash generator, as a perl script +Wed Aug 29 16:41:43 2007 +0000 H. Peter Anvin + * Use standard macro for the default directive +Wed Aug 29 16:40:26 2007 +0000 H. Peter Anvin + * Add standard macro for [default] directive +Wed Aug 29 16:38:47 2007 +0000 H. Peter Anvin + * More test cases for rel and abs addressing +Wed Aug 29 16:38:05 2007 +0000 H. Peter Anvin + * Add [default] directive +Wed Aug 29 16:25:46 2007 +0000 H. Peter Anvin + * nasmlib: add bsii() case-insensitive version of bsi() +Wed Aug 29 15:49:53 2007 +0000 H. Peter Anvin + * Add test cases for IP-relative addressing +Wed Aug 29 15:19:19 2007 +0000 H. Peter Anvin + * Suppress IP-relative only for fs: and gs: overrides +Tue Aug 28 23:06:00 2007 +0000 H. Peter Anvin + * Implement REL/ABS modifiers +Sun Aug 26 05:51:39 2007 +0000 Frank Kotler + * attempt to make static makefiles aware of outelf32/outelf64 +Sun Aug 26 05:48:54 2007 +0000 Frank Kotler + * add nasm_strsep to nasmlib, for output/outmacho.c - strtok doesn't work +Sun Aug 26 05:41:33 2007 +0000 Frank Kotler + * remove "#include from rdoff directory - two places - it annoyed Windows users and seems unneeded +Sun Aug 26 05:10:24 2007 +0000 Frank Kotler + * finally commit Mike Frysinger's "elf-visibility" patch +Mon Aug 20 21:03:14 2007 +0000 H. Peter Anvin + * regs.pl: handle dashed sequences with suffixes +Mon Aug 20 20:10:04 2007 +0000 H. Peter Anvin + * sync.c: change ULONG_MAX to UINT32_MAX +Mon Aug 20 20:09:11 2007 +0000 H. Peter Anvin + * Add _MIN and _MAX macros for the fixed-size types. +Mon Aug 20 20:02:17 2007 +0000 H. Peter Anvin + * ldrdf: cast output of sizeof() before passing to printf(), to avoid warning. +Sun Aug 19 18:49:26 2007 +0000 Keith Kanios + * Fixed RIP address processing ambiguity found by Charles Crayne. +Fri Aug 17 07:37:52 2007 +0000 Keith Kanios + * Fixed issues with REX prefix effective address generation. Fixed XMM instruction output. +Fri Aug 17 02:03:10 2007 +0000 Keith Kanios + * Changed MMXREG and XMMREG flags to help resolve invalid REX prefix generation for MMX instructions. +Sat Jul 7 02:01:08 2007 +0000 H. Peter Anvin + * More int/int32_t confusion +Sat Jul 7 01:59:52 2007 +0000 H. Peter Anvin + * regflag() should return int32_t. +Thu Jun 21 19:00:12 2007 +0000 H. Peter Anvin + * Detect missing and include ersatz version if missing +Thu Jun 21 06:24:23 2007 +0000 H. Peter Anvin + * inttypes.h: for older preprocessors, specify L and LL as appropriate +Thu Jun 21 06:20:43 2007 +0000 H. Peter Anvin + * inttypes.h: Fix spelling of SHRT_MAX +Thu Jun 21 06:15:42 2007 +0000 H. Peter Anvin + * inttypes.h: do a single ersatz based on +Sun Jun 3 02:42:41 2007 +0000 Chuck Crayne + * Support 32-bit direct addressing in 64-bit mode without base or index regs +Sat Jun 2 02:26:21 2007 +0000 H. Peter Anvin + * Fix the [U]INT*_C() creation macros +Sat Jun 2 00:05:35 2007 +0000 H. Peter Anvin + * For platforms that don't have them, provide for common models. +Wed May 30 22:21:11 2007 +0000 H. Peter Anvin + * Fix the handling of the \313 code. +Wed May 30 22:20:01 2007 +0000 H. Peter Anvin + * Machine-generated \321->\324 corrections +Wed May 30 21:22:33 2007 +0000 Frank Kotler + * update "version" to 0.99.02 +Wed May 30 20:30:15 2007 +0000 H. Peter Anvin + * Correct the generation of 67 prefixes. +Wed May 30 18:30:18 2007 +0000 H. Peter Anvin + * Update dependencies. +Wed May 30 16:34:29 2007 +0000 Frank Kotler + * update cvs server name in misc/release script +Wed May 30 04:28:50 2007 +0000 H. Peter Anvin + * Avoid magic values; we have more than 124 registers now +Wed May 30 04:27:58 2007 +0000 H. Peter Anvin + * Remove bogus redundant tests +Wed May 30 03:44:50 2007 +0000 H. Peter Anvin + * More \321 -> \324 +Wed May 30 03:44:02 2007 +0000 H. Peter Anvin + * Remove bogus check for 64-bitness +Wed May 30 03:25:21 2007 +0000 H. Peter Anvin + * Get rid of magic open-coded "register numbers" +Wed May 30 02:48:51 2007 +0000 H. Peter Anvin + * MOV reg64,reg64 takes \324 (64 bit with REX) not \321 (32 bit) +Wed May 30 00:18:26 2007 +0000 H. Peter Anvin + * Rename REGNORM to REG_EA +Wed May 30 00:15:25 2007 +0000 H. Peter Anvin + * More instruction flag surgery +Wed May 30 00:05:00 2007 +0000 H. Peter Anvin + * More cleanup of operand flags/register classes +Tue May 29 23:57:12 2007 +0000 H. Peter Anvin + * Clean up the existing operand flag definitions, and document +Tue May 29 21:44:55 2007 +0000 H. Peter Anvin + * Run "make alldeps" +Thu May 24 22:33:07 2007 +0000 Frank Kotler + * update version number to 0.99.01 +Tue May 15 04:33:43 2007 +0000 H. Peter Anvin + * regs.dat: fix comment +Fri May 4 18:47:16 2007 +0000 H. Peter Anvin + * 16-bit relocations are standard in ELF64 (at my request, incidentally) +Fri May 4 02:16:08 2007 +0000 Chuck Crayne + * Addition of elf32 and elf64 output formats. +Wed May 2 04:21:26 2007 +0000 Chuck Crayne + * Allow '!' to be used in expressions with same meaning as in C. +Wed May 2 01:59:16 2007 +0000 Chuck Crayne + * Add %IFN and %ELIFN as per RFE #786286 +Mon Apr 30 22:26:58 2007 +0000 Chuck Crayne + * Accept responsibility for support of outelf64.c +Sun Apr 29 20:57:53 2007 +0000 Chuck Crayne + * Clarify comments about relocation entries. +Sun Apr 29 00:28:24 2007 +0000 Chuck Crayne + * Allow ELF32 to be invoked either as -f elf or -f elf32 +Sat Apr 28 22:18:04 2007 +0000 Chuck Crayne + * Eliminate shift count warnings when building on 32-bit systems +Sat Apr 28 06:18:48 2007 +0000 Chuck Crayne + * Initial support for ELF64 +Wed Apr 18 02:27:18 2007 +0000 H. Peter Anvin + * Fix the handling of \324 for computing the length +Wed Apr 18 02:24:34 2007 +0000 Keith Kanios + * Fixed RDF/2 to comply with "maxbits" use. +Tue Apr 17 20:23:11 2007 +0000 H. Peter Anvin + * Handle "LOCK as REX.R" for MOV CRx; fix warning for invalid 64-bit regs +Mon Apr 16 18:16:46 2007 +0000 Keith Kanios + * MEM_OFFSET Instructions Fixed. +Mon Apr 16 15:46:46 2007 +0000 Keith Kanios + * Fixed 64-bit Mode Segment Selection. +Mon Apr 16 14:31:54 2007 +0000 Keith Kanios + * Fixed distinction between [LOCAL]SYMBOL/IMMEDIATE for RIP-relative addressing. +Mon Apr 16 14:05:01 2007 +0000 Keith Kanios + * Fixed long mode MEM_OFFS issue. +Mon Apr 16 13:54:49 2007 +0000 Keith Kanios + * Filled in all RIP Register Flags. +Mon Apr 16 05:26:29 2007 +0000 H. Peter Anvin + * More \321 -> \324 for 64-bit instructions +Mon Apr 16 04:56:06 2007 +0000 Keith Kanios + * Fixed 64-bit offset generation. +Mon Apr 16 02:39:56 2007 +0000 H. Peter Anvin + * More 64-bit ndisasm fixes. +Mon Apr 16 02:02:06 2007 +0000 H. Peter Anvin + * Fixes for 64-bit ndisasm. +Mon Apr 16 01:21:29 2007 +0000 H. Peter Anvin + * Use + instead of * for extension; it feels cleaner with the new meaning. +Mon Apr 16 01:18:30 2007 +0000 H. Peter Anvin + * Initial 64-bit support for ndisasm. Still a work in progress. +Sun Apr 15 23:12:17 2007 +0000 H. Peter Anvin + * Clean up the 64-bitification of regs.dat for 64-bit ndisasm support +Sun Apr 15 23:10:26 2007 +0000 H. Peter Anvin + * Remove @GCCFLAGS@ +Sun Apr 15 23:09:23 2007 +0000 H. Peter Anvin + * CR8 is not special in any way as far as the assembler is concerned. +Sun Apr 15 23:03:28 2007 +0000 H. Peter Anvin + * Get rid of @GCCFLAGS@ +Sun Apr 15 22:45:25 2007 +0000 H. Peter Anvin + * Cleaner way to add gcc options +Sun Apr 15 22:08:30 2007 +0000 Keith Kanios + * Fixed distinction between RIP relative symbols and immediate values. +Sun Apr 15 05:40:43 2007 +0000 H. Peter Anvin + * Fix the register number for CR7 (it was using the same number as CR15). +Sun Apr 15 05:32:18 2007 +0000 H. Peter Anvin + * More perl-like idioms for generating regdis.c +Sun Apr 15 01:37:13 2007 +0000 Keith Kanios + * Fixed regdis.c generation. +Sat Apr 14 18:54:52 2007 +0000 Keith Kanios + * Added DQ constants for all BITS modes. +Sat Apr 14 08:03:02 2007 +0000 H. Peter Anvin + * outmacho.c: stylistic cleanups +Sat Apr 14 03:52:05 2007 +0000 Keith Kanios + * Fixed support for DQ constants in long mode. +Sat Apr 14 03:44:31 2007 +0000 Keith Kanios + * Hopefully it is actually fixed this time :P +Sat Apr 14 01:49:07 2007 +0000 Keith Kanios + * Fixed structure initialization issue. +Sat Apr 14 01:44:35 2007 +0000 Keith Kanios + * Refixed uninitialized data. +Sat Apr 14 01:40:24 2007 +0000 Keith Kanios + * Fixed uninitialized structure data. +Sat Apr 14 01:24:14 2007 +0000 Keith Kanios + * c99 printf/fprintf compliance. +Sat Apr 14 00:46:25 2007 +0000 Keith Kanios + * Placated unreferenced types. +Sat Apr 14 00:10:59 2007 +0000 Keith Kanios + * c99 printf/fprintf compliance. +Fri Apr 13 23:09:18 2007 +0000 Keith Kanios + * Added outmacho.* to static makefile. +Fri Apr 13 22:24:46 2007 +0000 Keith Kanios + * Fixed REGRIP -> RIPREG to match regs.dat. +Fri Apr 13 22:07:53 2007 +0000 Keith Kanios + * Fixed obj_fwrite() declaration to match "static" definition. +Fri Apr 13 22:03:24 2007 +0000 Keith Kanios + * Added appropriate "void" prototypes. +Fri Apr 13 22:00:42 2007 +0000 Keith Kanios + * Replaced str(n)casecmp with more standard str(n)icmp. +Fri Apr 13 20:06:41 2007 +0000 H. Peter Anvin + * AIf we have config.h, we should actually include it!! +Fri Apr 13 19:59:20 2007 +0000 H. Peter Anvin + * When compiling with gcc, compile with -W -Wall for maximum warnings. +Fri Apr 13 19:58:42 2007 +0000 H. Peter Anvin + * Macroize any compiler-specific code; macros defined in "compiler.h" +Fri Apr 13 16:47:53 2007 +0000 Keith Kanios + * Fixed distinction between char and int8_t data types. +Fri Apr 13 01:17:45 2007 +0000 Keith Kanios + * Comment "REX.I" should have been "REX.X" +Fri Apr 13 00:52:54 2007 +0000 Keith Kanios + * Fixed c99 data-types after removal of typedefs. +Fri Apr 13 00:43:50 2007 +0000 Keith Kanios + * Added Dev-Cpp Makefile +Fri Apr 13 00:38:29 2007 +0000 Keith Kanios + * *** empty log message *** +Thu Apr 12 17:58:02 2007 +0000 H. Peter Anvin + * Remove redundant inclusion of +Thu Apr 12 16:54:50 2007 +0000 H. Peter Anvin + * Remove obsolete types; add where needed; header fixes +Thu Apr 12 16:25:58 2007 +0000 H. Peter Anvin + * autogen.sh script to create configure, et al. +Thu Apr 12 16:23:11 2007 +0000 Keith Kanios + * Fixed c99 support for RDOFF Tools +Thu Apr 12 16:12:09 2007 +0000 H. Peter Anvin + * outmacho.c: Don't assume __builtin_ctzl exists for gcc < 4 + +Mon Nov 12 22:05:31 2007 -0800 H. Peter Anvin + * BR 1828866: fix handling of LAR/LSL +Mon Nov 12 21:57:00 2007 -0800 H. Peter Anvin + * Better (but not *good!*) handling of 64-bit addressing in ndisasm +Mon Nov 12 21:02:33 2007 -0800 H. Peter Anvin + * Fix disassembly of XCHG +Mon Nov 12 20:18:33 2007 -0800 H. Peter Anvin + * Test of XCHG +Mon Nov 12 20:18:05 2007 -0800 H. Peter Anvin + * Fix handling of XCHG in 64-bit mode +Mon Nov 12 19:36:13 2007 -0800 H. Peter Anvin + * More \321 -> \324 bug fixes +Mon Nov 12 18:26:31 2007 -0800 H. Peter Anvin + * float.c: all warnings and errors are pass 1 only +Sat Nov 10 21:55:19 2007 -0800 Charles Crayne + * Update documentation for stack relative directives. +Sat Nov 10 17:52:23 2007 -0800 Charles Crayne + * Clean up a few more 32-bit bottlenecks +Fri Nov 9 16:37:41 2007 -0800 Charles Crayne + * Update documantation for stack relative directives +Fri Nov 9 16:33:54 2007 -0800 Charles Crayne + * Merge branch 'master' of /home/chuck/development/gitnasm/ +Fri Nov 9 16:25:43 2007 -0800 Charles Crayne + * Update documentation for stack relative directives +Fri Nov 9 14:44:02 2007 -0800 H. Peter Anvin + * Don't combine type and size into a single argument +Thu Nov 8 22:11:14 2007 -0800 Charles Crayne + * Add flat64 to %stacksize choices +Thu Nov 8 20:43:22 2007 -0800 H. Peter Anvin + * Fix building under OpenWatcom +Thu Nov 8 20:29:37 2007 -0800 H. Peter Anvin + * ps2pdf: remove -dOptimize=true +Thu Nov 8 20:21:41 2007 -0800 H. Peter Anvin + * No binary files left in the source distro; unbreak release script +Thu Nov 8 20:01:11 2007 -0800 H. Peter Anvin + * BR 1828103: Fix %arg and %local +Thu Nov 8 19:34:01 2007 -0800 H. Peter Anvin + * nasmlib.c: prefix_name(): use the elements() macro +Thu Nov 8 19:30:22 2007 -0800 H. Peter Anvin + * Move elements() to nasmlib.h +Thu Nov 8 19:15:33 2007 -0800 H. Peter Anvin + * constipate the "str" argument to bsi() and bsii() +Wed Nov 7 19:03:46 2007 -0800 Charles Crayne + * Upgrade RAA functions to hold 64-bit data. +Tue Nov 6 21:48:12 2007 -0800 Charles Crayne + * Pass 64-bit instruction lengths to back-ends. +Tue Nov 6 18:27:23 2007 -0800 Charles Crayne + * Prepare for 64-bit instruction lengths +Mon Nov 5 21:49:49 2007 -0800 Charles Crayne + * Disambiguate error messages +Mon Nov 5 17:19:32 2007 -0800 Charles Crayne + * Upgrade label functions to 64-bit +Sun Nov 4 21:10:42 2007 -0800 H. Peter Anvin + * Permit opcode names as labels as long as they are followed by a colon +Sun Nov 4 15:28:30 2007 -0800 Charles Crayne + * Make warning limit valid for both i386 and x86_64 +Sat Nov 3 22:06:13 2007 -0700 Charles Crayne + * Warn on out of bounds EA displacements +Thu Nov 1 15:08:27 2007 -0700 H. Peter Anvin + * Treat info files as binary when creating xdoc distro file +Thu Nov 1 15:07:42 2007 -0700 H. Peter Anvin + * Remove obsolete binary files from the distribution +Thu Nov 1 14:53:32 2007 -0700 H. Peter Anvin + * Move declarations before statements +Wed Oct 31 23:37:35 2007 -0700 H. Peter Anvin + * NASM 0.99.06 +Wed Oct 31 23:37:19 2007 -0700 H. Peter Anvin + * Script to tag the tree for release +Wed Oct 31 10:59:26 2007 -0700 H. Peter Anvin + * Even more "riprel" tests +Tue Oct 30 01:17:57 2007 -0700 H. Peter Anvin + * floatx.asm: add tests for "rounds up to smallest denorm" +Tue Oct 30 01:13:27 2007 -0700 H. Peter Anvin + * Run "make alldeps" +Tue Oct 30 01:13:09 2007 -0700 H. Peter Anvin + * float.c: handle round-up-to-denorm correctly. +Tue Oct 30 00:59:27 2007 -0700 H. Peter Anvin + * Exhaustive test for 8-bit floating point values +Mon Oct 29 23:12:47 2007 -0700 H. Peter Anvin + * Clean up the handing of operands in assemble.c +Mon Oct 29 22:56:08 2007 -0700 H. Peter Anvin + * Don't warn for segmented references +Mon Oct 29 20:20:12 2007 -0700 H. Peter Anvin + * Use a 32-bit floating-point limb size; support 8-bit float +Mon Oct 29 18:24:59 2007 -0700 Charles Crayne + * Reduce severity of redundant prefixes from error to warning. +Sun Oct 28 23:23:24 2007 -0700 H. Peter Anvin + * Test of some addressing modes in 64-bit mode. +Sun Oct 28 23:21:46 2007 -0700 H. Peter Anvin + * Fix bogus flagging of effective addresses as invalid +Sun Oct 28 23:10:34 2007 -0700 H. Peter Anvin + * Actually shut up the warning in rdfload.c +Sun Oct 28 22:04:42 2007 -0700 H. Peter Anvin + * Clean up stealth whitespace +Sun Oct 28 22:04:00 2007 -0700 H. Peter Anvin + * Fix warning about cast to pointer in rdfload.c +Sun Oct 28 22:04:00 2007 -0700 H. Peter Anvin + * 64-bit addressing and prefix handling changes +Sun Oct 28 15:29:54 2007 -0700 Charles Crayne + * Adjust stabs symbol index to match symbol table. +Fri Oct 26 21:38:02 2007 -0700 H. Peter Anvin + * readnum(): handle prefix-suffix collision like "0h" +Fri Oct 26 18:49:29 2007 -0700 H. Peter Anvin + * Better handling of platforms which hide "extended" functionality +Wed Oct 24 15:51:40 2007 -0700 Charles Crayne + * Merge branch 'master' of /home/chuck/development/gitnasm/ +Wed Oct 24 15:30:17 2007 -0700 Charles Crayne + * Update sections about debug info formats +Wed Oct 24 15:29:51 2007 -0700 H. Peter Anvin + * Fix the handling of floating-point tokens in the preprocessor +Tue Oct 23 19:28:39 2007 -0700 Charles Crayne + * Fix bugs item #1817677 +Tue Oct 23 00:08:58 2007 -0700 H. Peter Anvin + * Slightly simplify the radix-detection code +Mon Oct 22 19:48:06 2007 -0700 H. Peter Anvin + * Unbreak particularly tricky hex constants +Mon Oct 22 19:37:36 2007 -0700 H. Peter Anvin + * Decimal floating point can also start with 0. 0e 0E +Mon Oct 22 17:34:10 2007 -0700 H. Peter Anvin + * Support binary and octal floating-point +Mon Oct 22 16:53:48 2007 -0700 H. Peter Anvin + * More consistent handling of radix letters +Sun Oct 21 15:33:01 2007 -0700 H. Peter Anvin + * float.c: correct exponent capping +Sun Oct 21 14:21:43 2007 -0700 Charles Crayne + * Clean up elf symbol table section +Fri Oct 19 18:33:57 2007 -0700 H. Peter Anvin + * Allow $-prefixed hexadecimal FP as an alternative to 0x +Fri Oct 19 14:43:22 2007 -0700 H. Peter Anvin + * Scripts to remove stealth whitespace +Fri Oct 19 14:42:29 2007 -0700 H. Peter Anvin + * Formatting: kill off "stealth whitespace" +Fri Oct 19 14:26:52 2007 -0700 H. Peter Anvin + * test/floatx.asm: fix test case +Fri Oct 19 14:19:52 2007 -0700 H. Peter Anvin + * uscore.asm: Fix test case +Fri Oct 19 14:17:51 2007 -0700 H. Peter Anvin + * float.c: mark read_exponent() static +Fri Oct 19 14:10:35 2007 -0700 H. Peter Anvin + * Don't confuse suffixed hexadecimal with floating-point +Fri Oct 19 13:17:24 2007 -0700 H. Peter Anvin + * Anchor filename locations in .gitignore +Fri Oct 19 13:16:51 2007 -0700 H. Peter Anvin + * test/Makefile: Use -Ox instead of -O999 +Fri Oct 19 13:14:06 2007 -0700 H. Peter Anvin + * Test of underscored constants +Fri Oct 19 13:10:46 2007 -0700 H. Peter Anvin + * Allow underscores in numbers; better detection of FP +Fri Oct 19 10:52:31 2007 -0700 H. Peter Anvin + * Modernize nasm.spec.in and make it closer to the Fedora version +Thu Oct 18 23:33:06 2007 -0700 Charles Crayne + * Suppress datarootdir warnings from configure +Thu Oct 18 21:17:20 2007 -0700 Charles Crayne + * Suppress signedness warnings in disassembler +Thu Oct 18 19:14:08 2007 -0700 H. Peter Anvin + * Cleaner solution for MinGW handling of __STRICT_ANSI__ +Thu Oct 18 19:14:08 2007 -0700 H. Peter Anvin + * configure: Undefine __STRICT_ANSI__ for mingw's benefit +Thu Oct 18 19:14:07 2007 -0700 H. Peter Anvin + * Fix invocation of readnum() +Thu Oct 18 19:02:42 2007 -0700 Charles Crayne + * Suppress a few signedness warnings +Thu Oct 18 17:04:10 2007 -0700 root + * Avoid unnecessary warning on redefinition of section (bug 801180) +Wed Oct 17 17:55:45 2007 -0700 Charles Crayne + * Generate stabs entries for any executable section +Tue Oct 16 22:59:09 2007 -0700 H. Peter Anvin + * NASM 0.99.05 +Tue Oct 16 15:46:04 2007 -0700 H. Peter Anvin + * Tests of obscenely large exponents +Tue Oct 16 14:42:32 2007 -0700 H. Peter Anvin + * Comma-separate contents of __FLOAT__ +Tue Oct 16 14:40:27 2007 -0700 H. Peter Anvin + * Implement floating-point option control directive +Tue Oct 16 11:48:07 2007 -0700 H. Peter Anvin + * Floating-point warning fixes; fix round-to-overflow +Tue Oct 16 11:32:58 2007 -0700 H. Peter Anvin + * Handle rounding of denorms correctly; make fp overflow a warning +Tue Oct 16 10:35:02 2007 -0700 H. Peter Anvin + * Additional entries for .gitignore +Tue Oct 16 10:32:57 2007 -0700 H. Peter Anvin + * Refactor floating-point formatting code; fix 80-bit denorms +Tue Oct 16 10:31:16 2007 -0700 H. Peter Anvin + * Add 1.5 as a test case: representative of an exact fraction +Mon Oct 15 20:06:06 2007 -0700 H. Peter Anvin + * Recognize 'd', 't' and 'y' as radix suffixes +Mon Oct 15 19:53:10 2007 -0700 H. Peter Anvin + * Fix FISTTP opcodes (BR 689695) +Mon Oct 15 19:46:32 2007 -0700 H. Peter Anvin + * New floating-point conversion routines +Mon Oct 15 17:48:43 2007 -0700 H. Peter Anvin + * Add testnos3 from the gdtoa package (floating-point test) +Sat Oct 13 23:19:21 2007 -0700 H. Peter Anvin + * .gitignore file doesn't need to be in the release file +Sat Oct 13 23:17:41 2007 -0700 H. Peter Anvin + * Add .gitignore file so "git status" produces something sane +Sat Oct 13 23:12:46 2007 -0700 H. Peter Anvin + * autoconf: drop AC_USE_SYSTEM_EXTENSIONS to support autoconf 2.59 +Sat Oct 13 07:09:22 2007 -0700 Keith Kanios + * Fix 32-bit types in preproc.c and eval.c +Thu Oct 11 20:32:33 2007 -0700 Charles Crayne + * Must define types before using them +Thu Oct 11 13:42:09 2007 -0700 H. Peter Anvin + * preproc.c: move smacro define/undef to separate functions +Thu Oct 11 13:38:38 2007 -0700 H. Peter Anvin + * preproc.c: PP_DEFINE and PP_XDEFINE are case-sensitive +Thu Oct 11 12:52:03 2007 -0700 H. Peter Anvin + * preproc.c: normalize the handling of case sensitivity +Thu Oct 11 12:51:06 2007 -0700 H. Peter Anvin + * Define macros necessary for on C++ +Thu Oct 11 10:12:58 2007 -0700 H. Peter Anvin + * More "bool" fixes +Thu Oct 11 10:11:57 2007 -0700 H. Peter Anvin + * preproc.c: allow 64-bit repeat counts +Thu Oct 11 10:06:19 2007 -0700 H. Peter Anvin + * preproc.c: For an SMacro, in_progress really is a boolean (no %rep) +Thu Oct 11 00:05:57 2007 -0700 H. Peter Anvin + * Additional uses of bool and enum +Thu Oct 11 00:05:57 2007 -0700 H. Peter Anvin + * preproc.c: MMacro.in_progress is not a boolean +Wed Oct 10 18:07:51 2007 -0700 H. Peter Anvin + * saa_fread/fwrite: when seeking, must set [rw]ptr as well +Wed Oct 10 14:58:45 2007 -0700 H. Peter Anvin + * Use the compiler-provided booleans if available, otherwise emulate +Wed Oct 10 14:55:14 2007 -0700 H. Peter Anvin + * owlinux.mak: don't clean things we won't be able to +Wed Oct 10 14:29:53 2007 -0700 H. Peter Anvin + * configure.in: looks like we need autoconf 2.61 :( +Wed Oct 10 14:06:59 2007 -0700 H. Peter Anvin + * Create option -Ox to tell NASM to do unlimited passes +Mon Oct 8 19:26:57 2007 -0700 H. Peter Anvin + * Revert "floatb.asm: fix broken testcase" +Mon Oct 8 18:39:24 2007 -0700 H. Peter Anvin + * floatb.asm: fix broken testcase +Mon Oct 8 12:41:00 2007 -0700 H. Peter Anvin + * saa_rstruct: fix overrun check +Mon Oct 8 12:12:23 2007 -0700 H. Peter Anvin + * Add Frank's floattest.asm test file +Sun Oct 7 21:13:14 2007 -0700 H. Peter Anvin + * saa_fpwrite: initializing "len" should be part of the loop +Sun Oct 7 18:46:57 2007 -0700 Charles Crayne + * Fix infinite loop in function saa_fpwrite +Fri Oct 5 17:44:16 2007 -0700 H. Peter Anvin + * zerobyte.asm: use a real instruction to avoid confusing ndisasm +Fri Oct 5 17:42:31 2007 -0700 H. Peter Anvin + * zerobyte.asm: add test cases for non-initial \170 uses +Fri Oct 5 17:29:01 2007 -0700 H. Peter Anvin + * Check in the proper zerobyte test +Fri Oct 5 17:04:32 2007 -0700 H. Peter Anvin + * Emit REX prefix before literal zero (\170) +Fri Oct 5 17:01:15 2007 -0700 H. Peter Anvin + * LICENSE: Break long line +Fri Oct 5 14:36:03 2007 -0700 H. Peter Anvin + * Add test for problematic floats +Thu Oct 4 23:51:08 2007 -0700 H. Peter Anvin + * floatx.asm: add Inf and NaN to the boundary condition tests +Thu Oct 4 23:09:19 2007 -0700 H. Peter Anvin + * floatx.asm: add specific tests for exponent boundary conditions +Thu Oct 4 22:51:08 2007 -0700 H. Peter Anvin + * float.c: correct the exponent +Thu Oct 4 15:18:23 2007 -0700 H. Peter Anvin + * Additional rules in test/Makefile +Thu Oct 4 13:42:56 2007 -0700 H. Peter Anvin + * Rewrite the handling of SAA's to allow random access +Wed Oct 3 21:30:57 2007 -0700 H. Peter Anvin + * Change cloc_t to struct location, and reorder the members +Wed Oct 3 21:24:51 2007 -0700 H. Peter Anvin + * BR 1352920: change loc_t -> cloc_t +Wed Oct 3 21:22:16 2007 -0700 H. Peter Anvin + * BR 1352920: Handle upper case %line +Wed Oct 3 17:40:12 2007 -0700 H. Peter Anvin + * Use autoconf to request feature macros +Tue Oct 2 22:04:15 2007 -0700 H. Peter Anvin + * preproc.c: constipation +Tue Oct 2 21:57:27 2007 -0700 H. Peter Anvin + * make alldeps +Tue Oct 2 21:53:51 2007 -0700 H. Peter Anvin + * Portability fixes +Tue Oct 2 21:13:18 2007 -0700 H. Peter Anvin + * Run "make alldeps". +Tue Oct 2 17:40:00 2007 -0700 H. Peter Anvin + * Use the crc64 we already use as the perfect hash function prehash +Tue Oct 2 15:09:33 2007 -0700 H. Peter Anvin + * insns.dat: add systematic names for the hinting NOPs (0F18-0F1F) +Mon Oct 1 11:28:32 2007 -0700 H. Peter Anvin + * Unspecified files are null strings, not null pointers +Mon Oct 1 11:26:31 2007 -0700 H. Peter Anvin + * Check for the most basic filename overlaps +Sun Sep 30 22:15:36 2007 -0700 Charles Crayne + * modified: nasm.1 to add newer command line options +Fri Sep 28 21:27:41 2007 -0700 Charles Crayne + * Merge branch 'master' of git+ssh://ccrayne@repo.or.cz/srv/git/nasm +Fri Sep 28 20:17:12 2007 -0700 H. Peter Anvin + * configure.in: AC_SUBST_FILE should have been AC_SUBST +Fri Sep 28 17:17:20 2007 -0700 H. Peter Anvin + * Unbreak relative references to immediate addresses +Fri Sep 28 15:16:47 2007 -0700 Charles Crayne + * Merge branch 'master' of git+ssh://ccrayne@repo.or.cz/srv/git/nasm +Fri Sep 28 12:01:55 2007 -0700 H. Peter Anvin + * lib/vsnprintf.c: correct boundary conditions +Fri Sep 28 10:50:20 2007 -0700 H. Peter Anvin + * Add substitutes for snprintf() and vsnprintf() +Fri Sep 28 02:03:41 2007 -0400 Frank Kotler + * Merge branch 'master' of git+ssh://fbkotler@repo.or.cz/srv/git/nasm +Thu Sep 27 21:35:04 2007 -0700 H. Peter Anvin + * Exclude config.h from the dependency list for the canned makefiles +Thu Sep 27 21:12:17 2007 -0700 H. Peter Anvin + * version.pl: Add support for daily snapshot releases +Thu Sep 27 19:46:55 2007 -0700 H. Peter Anvin + * Add Makefile for Linux -> DOS, Win32, OS/2 using OpenWatcom +Wed Sep 26 19:57:07 2007 -0700 H. Peter Anvin + * Add Makefile for OpenWatcom (DOS, OS/2 or Win32 output) +Wed Sep 26 17:00:18 2007 -0700 H. Peter Anvin + * Test for various addressing modes in 64-bit mode +Wed Sep 26 15:19:28 2007 -0700 H. Peter Anvin + * nasm option reshuffling, -E -> -Z +Tue Sep 25 23:57:21 2007 -0400 Frank Kotler + * Version 0.99.04 +Tue Sep 25 20:36:45 2007 -0700 H. Peter Anvin + * nasmdoc: corrections on 64-bit immediates/displacements +Tue Sep 25 16:02:21 2007 -0700 H. Peter Anvin + * nasmdoc: shorten lines which are too long +Tue Sep 25 16:01:07 2007 -0700 H. Peter Anvin + * Document NASM behaviour for 64-bit immediates and displacements +Tue Sep 25 15:44:40 2007 -0700 H. Peter Anvin + * test/movimm.asm: add optimizable forms +Tue Sep 25 15:41:19 2007 -0700 H. Peter Anvin + * assemble.c: clean up whitespace +Tue Sep 25 15:40:36 2007 -0700 H. Peter Anvin + * Correct the handling of "MOV" with immediate in 64-bit mode +Tue Sep 25 15:39:42 2007 -0700 H. Peter Anvin + * Test of immediate handling on 64-bit mode +Tue Sep 25 14:27:34 2007 -0700 H. Peter Anvin + * Add nasm_zalloc() to nasmlib.c +Tue Sep 25 14:26:03 2007 -0700 H. Peter Anvin + * Fix BR 1490407: size of the second operand of LAR/LSL +Tue Sep 25 14:11:29 2007 -0700 H. Peter Anvin + * Fix BR 1490407: size of the second operand of LAR/LSL +Tue Sep 25 13:34:55 2007 -0700 H. Peter Anvin + * Makefile.in: make "make install" create directories +Tue Sep 25 08:48:37 2007 -0700 H. Peter Anvin + * Fix BR 1445441: uninitialized use of "error_file" +Mon Sep 24 21:33:17 2007 -0700 H. Peter Anvin + * preproc.c: fix the loop in %undef +Mon Sep 24 20:53:48 2007 -0700 H. Peter Anvin + * float.c: clear off uninitialized warning +Mon Sep 24 17:02:41 2007 -0700 H. Peter Anvin + * outcoff: set the "virtual size field" to zero (BR 1351586) +Mon Sep 24 15:56:02 2007 -0700 H. Peter Anvin + * insns.dat: SMINT - mark ND, DMINT - fix opcode +Mon Sep 24 15:55:20 2007 -0700 H. Peter Anvin + * 0F0F is a 3Dnow! prefix; remove from prefix list +Mon Sep 24 15:48:09 2007 -0700 H. Peter Anvin + * Additional compaction missed by script +Mon Sep 24 15:42:53 2007 -0700 H. Peter Anvin + * insns.dat: machine-generated compaction mmx/xmmreg,mem -> mmx/xmmrm +Mon Sep 24 13:54:00 2007 -0700 H. Peter Anvin + * nasmdoc: grammar fix +Mon Sep 24 13:44:02 2007 -0700 H. Peter Anvin + * nasmdoc: remove stray periods +Mon Sep 24 13:42:09 2007 -0700 H. Peter Anvin + * test/Makefile: make a bit more useful +Mon Sep 24 13:41:58 2007 -0700 H. Peter Anvin + * Implement the -MG option (SF RFE 1564264) +Mon Sep 24 12:52:09 2007 -0700 H. Peter Anvin + * nasmdoc: clarify __float*__ example +Mon Sep 24 12:44:38 2007 -0700 H. Peter Anvin + * nasmdoc: document the __float*__ operators +Mon Sep 24 12:30:54 2007 -0700 H. Peter Anvin + * Support __float*__ for floating-point numbers in expressions +Mon Sep 24 10:51:07 2007 -0700 H. Peter Anvin + * eval.c: replace sequence of ifs with switch +Mon Sep 24 10:50:23 2007 -0700 H. Peter Anvin + * tokhash: allow a bit smarter pattern matching +Sat Sep 22 22:35:28 2007 -0700 H. Peter Anvin + * Implement INVLPGA according to the documentation +Sat Sep 22 22:02:34 2007 -0700 H. Peter Anvin + * Reformat insns.dat to uniform column width +Sat Sep 22 21:50:03 2007 -0700 H. Peter Anvin + * Simple test for 0x67 prefixes +Sat Sep 22 21:49:51 2007 -0700 H. Peter Anvin + * Auto-generate 0x67 prefixes without the need for \30x codes +Sat Sep 22 21:47:13 2007 -0700 H. Peter Anvin + * Make test/Makefile a bit more useful +Sat Sep 22 21:29:41 2007 -0700 H. Peter Anvin + * Add TY_OWORD for "DO" output +Sat Sep 22 19:52:11 2007 -0700 H. Peter Anvin + * LDDQU needs \301 (BR 1103549) +Sat Sep 22 19:51:13 2007 -0700 H. Peter Anvin + * RDTSCP and INVLPGA aren't 64-bit specific +Sat Sep 22 19:40:37 2007 -0700 H. Peter Anvin + * Cyrix GX1 instructions: BBx_RESET, CPU_READ, CPU_WRITE +Sat Sep 22 19:28:14 2007 -0700 H. Peter Anvin + * Centaur XSHA1, XSHA256, MONTMUL +Sat Sep 22 19:20:56 2007 -0700 H. Peter Anvin + * Implement Centaur's XCRYPT instructions +Sat Sep 22 19:13:05 2007 -0700 H. Peter Anvin + * Add Geode LX (AMD's Cyrix-derived core) instructions +Sat Sep 22 19:05:11 2007 -0700 H. Peter Anvin + * Add the GETSEC instruction for Intel SMX +Sat Sep 22 18:59:18 2007 -0700 H. Peter Anvin + * Add the AMD SSE4a and LZCNT instructions +Sat Sep 22 18:23:20 2007 -0700 H. Peter Anvin + * Tag UMOV as ND (no disassembly) to avoid collision +Sat Sep 22 18:20:49 2007 -0700 H. Peter Anvin + * Disallow optimizing by less than 5 passes. +Sat Sep 22 17:45:45 2007 -0700 H. Peter Anvin + * BR 1783117: Document that %+ needs a space after it, and fix crash +Sat Sep 22 16:44:56 2007 -0700 H. Peter Anvin + * nasm.spec.in: minor fixes +Sat Sep 22 16:38:25 2007 -0700 H. Peter Anvin + * release script: handle stricter CLI parsing for "git tag" +Sat Sep 22 16:35:11 2007 -0700 H. Peter Anvin + * Update nasm.spec.in and make it handle rc releases +Sat Sep 22 16:19:19 2007 -0700 H. Peter Anvin + * version.pl: support version numbers of the form X.Y[.Z]rcW +Thu Sep 20 21:33:43 2007 -0700 Charles Crayne + * Merge branch 'master' of git+ssh://ccrayne@repo.or.cz/srv/git/nasm +Thu Sep 20 21:12:33 2007 -0700 Charles Crayne + * modified: misc/release to fix bug in removing .git +Wed Sep 19 21:41:43 2007 -0700 H. Peter Anvin + * Merge branch 'master' of git+ssh://repo.or.cz/srv/git/nasm +Wed Sep 19 21:41:27 2007 -0700 H. Peter Anvin + * Update manual pages +Wed Sep 19 21:41:02 2007 -0700 H. Peter Anvin + * Remove limit on number of sync points +Wed Sep 19 21:40:37 2007 -0700 H. Peter Anvin + * Make nasm_malloc() et al available from inside ndisasm +Wed Sep 19 21:07:32 2007 -0400 Frank Kotler + * Version 0.99.03 +Wed Sep 19 21:06:59 2007 -0400 Frank Kotler + * Merge branch 'master' of git+ssh://fbkotler@repo.or.cz/srv/git/nasm +Wed Sep 19 16:22:03 2007 -0700 H. Peter Anvin + * Merge commit 'origin/sse5' +Wed Sep 19 16:15:22 2007 -0700 H. Peter Anvin + * test/Makefile: make a bit more useful +Tue Sep 18 22:54:40 2007 -0700 H. Peter Anvin + * Slightly optimize the interface to nasm_token_hash() +Wed Sep 19 01:34:55 2007 -0400 Frank Kotler + * Merge branch 'master' of git+ssh://fbkotler@repo.or.cz/srv/git/nasm +Tue Sep 18 22:23:42 2007 -0700 H. Peter Anvin + * Merge commit 'origin/master' into sse5 +Tue Sep 18 22:22:49 2007 -0700 H. Peter Anvin + * elf64: fix 32-bit truncations +Tue Sep 18 22:08:04 2007 -0700 H. Peter Anvin + * Document Infinity and NaN +Tue Sep 18 21:55:56 2007 -0700 H. Peter Anvin + * Support generating NaNs and infinities +Tue Sep 18 19:12:26 2007 -0700 H. Peter Anvin + * Update documentation +Tue Sep 18 18:37:36 2007 -0700 H. Peter Anvin + * Simple test for hexadecimal floating-point numbers +Tue Sep 18 18:33:17 2007 -0700 H. Peter Anvin + * Fix error-reporting in hexadecimal floating-point numbers +Tue Sep 18 18:31:26 2007 -0700 H. Peter Anvin + * Support C99-style hexadecimal floating point. +Tue Sep 18 17:50:34 2007 -0700 H. Peter Anvin + * Unify all standard IEEE floating-point formats; add 128-bit +Tue Sep 18 17:49:09 2007 -0700 H. Peter Anvin + * Fix handling of DO; support unary + for floating-point numbers +Tue Sep 18 16:39:03 2007 -0700 H. Peter Anvin + * Support 16-bit IEEE floating point; used in SSE5 +Tue Sep 18 15:43:40 2007 -0700 H. Peter Anvin + * Merge commit 'origin/master' into sse5 +Tue Sep 18 15:43:08 2007 -0700 H. Peter Anvin + * Add NOP with argument to the instruction list +Tue Sep 18 15:24:38 2007 -0700 H. Peter Anvin + * Remove 0FC2 from list of instruction prefixes +Tue Sep 18 15:08:20 2007 -0700 H. Peter Anvin + * Speed up the disassembler by allowing prefixed instruction tables +Tue Sep 18 13:45:12 2007 -0700 H. Peter Anvin + * Document oword, do and reso +Tue Sep 18 13:01:32 2007 -0700 H. Peter Anvin + * Implement "oword" (128 bits) as a first-class size +Tue Sep 18 12:38:07 2007 -0700 H. Peter Anvin + * Change the token prehash function for better convergence +Tue Sep 18 12:23:21 2007 -0700 H. Peter Anvin + * SSE5 instruction table +Tue Sep 18 02:06:09 2007 -0400 Frank Kotler + * add "const" to output/outdbg.c +Mon Sep 17 18:45:44 2007 -0700 H. Peter Anvin + * Disassembler support for SSE5 instructions +Mon Sep 17 17:27:46 2007 -0700 H. Peter Anvin + * insns.dat: All SSE5 instructions are AMD +Mon Sep 17 17:25:27 2007 -0700 H. Peter Anvin + * Actually generate SSE5 instructions +Mon Sep 17 16:55:04 2007 -0700 H. Peter Anvin + * Initial support for generating DREX suffixes +Mon Sep 17 16:31:33 2007 -0700 H. Peter Anvin + * Fix a few instances of missing renumbers +Mon Sep 17 16:20:45 2007 -0700 H. Peter Anvin + * Enable IF_AR3 +Mon Sep 17 15:49:53 2007 -0700 H. Peter Anvin + * Merge commit 'origin/master' into sse5 +Mon Sep 17 15:49:30 2007 -0700 H. Peter Anvin + * Initial support for four arguments per instruction +Mon Sep 17 15:48:32 2007 -0700 H. Peter Anvin + * CLFLUSH: Neither an x64 instruction nor AMD +Mon Sep 17 13:56:26 2007 -0700 H. Peter Anvin + * Sort dependency lists +Mon Sep 17 13:53:14 2007 -0700 H. Peter Anvin + * Cleaner way to handle MSVC's _snprintf() underscore damage +Mon Sep 17 13:19:25 2007 -0700 H. Peter Anvin + * test/r13.asm: test special-casing of rbp and r13 in 64-bit mode +Mon Sep 17 13:03:33 2007 -0700 H. Peter Anvin + * Additional documentation for 64-bit programming +Sun Sep 16 22:27:07 2007 -0700 H. Peter Anvin + * INSTALL: MSVC++ compilation instructions +Sun Sep 16 22:17:29 2007 -0700 H. Peter Anvin + * make alldeps: change Mkfiles/Makefile.* to Mkfiles/*.mak +Sun Sep 16 22:16:24 2007 -0700 H. Peter Anvin + * Fix Makefile for MSVC++ 2005, delete obsolete Makefiles +Sun Sep 16 22:15:34 2007 -0700 H. Peter Anvin + * Minor fixes needed to compile with MSVC++ 2005 +Sun Sep 16 18:35:02 2007 -0700 H. Peter Anvin + * Run "make alldeps" +Sun Sep 16 18:04:57 2007 -0700 H. Peter Anvin + * Switch the preprocessor over to using the hash table library +Sun Sep 16 17:53:17 2007 -0700 H. Peter Anvin + * Fix the handling of local labels +Fri Sep 14 18:36:01 2007 -0700 H. Peter Anvin + * preproc.c: remove unnecessary int64_t +Fri Sep 14 18:03:29 2007 -0700 H. Peter Anvin + * Use the new hash table function library to store labels +Fri Sep 14 09:24:38 2007 -0700 H. Peter Anvin + * Define a proper hash table library +Thu Sep 13 18:13:20 2007 -0700 H. Peter Anvin + * Simple performance benchmarks: label, macro and token lookups +Thu Sep 13 12:25:32 2007 -0700 H. Peter Anvin + * release script: fix final cleanup +Thu Sep 13 12:22:00 2007 -0700 H. Peter Anvin + * Modify release script for a git-centric world +Thu Sep 13 11:06:42 2007 -0700 H. Peter Anvin + * pptok.c: don't insist on C99 compiler behaviour +Wed Sep 12 22:02:06 2007 -0700 H. Peter Anvin + * Fix literal F2 and F3 prefixes +Wed Sep 12 21:58:51 2007 -0700 H. Peter Anvin + * Add (untested!) SSSE3, SSE4.1, SSE4.2 instructions +Wed Sep 12 21:06:36 2007 -0700 H. Peter Anvin + * Add support for Tejas New Instructions (SSSE3) +Wed Sep 12 21:05:06 2007 -0700 H. Peter Anvin + * Remove $Id$ tags (useless with git) +Wed Sep 12 21:04:58 2007 -0700 H. Peter Anvin + * Use rm32 operands for VMREAD/VMWRITE +Wed Sep 12 21:04:51 2007 -0700 H. Peter Anvin + * Macros for SSSE3/SSE4 instruction sets +Wed Sep 12 21:04:39 2007 -0700 H. Peter Anvin + * Support r/m operands for non-integer types +Wed Sep 12 20:27:41 2007 -0700 H. Peter Anvin + * Use enumerations where practical to ease debugging +Wed Sep 12 17:02:55 2007 +0000 H. Peter Anvin + * pptok.c: quick-and-dirty downcasing during prehashing +Wed Sep 12 16:55:57 2007 +0000 H. Peter Anvin + * phash: Tell the user when the graph is OK +Wed Sep 12 05:18:20 2007 +0000 H. Peter Anvin + * pptok.c: handle holes in the pp_directives array +Wed Sep 12 04:20:08 2007 +0000 H. Peter Anvin + * preproc.c: adjust whitespace +Wed Sep 12 04:18:37 2007 +0000 H. Peter Anvin + * More automation in the preprocessor conditionals handling +Wed Sep 12 02:13:39 2007 +0000 H. Peter Anvin + * pptok.c: fix spacing +Wed Sep 12 02:12:07 2007 +0000 H. Peter Anvin + * Generate automatically correct tests for %if and %elif +Wed Sep 12 01:34:19 2007 +0000 H. Peter Anvin + * Run "make alldeps"; add dependencies missing from the previous checkin +Wed Sep 12 01:29:43 2007 +0000 H. Peter Anvin + * Use a perfect hash to look up preprocessor directives +Wed Sep 12 01:27:53 2007 +0000 H. Peter Anvin + * phash: Be a bit more aggressive about trying to make a small hash +Wed Sep 12 00:22:29 2007 +0000 H. Peter Anvin + * Add RCXZ as a known preprocessor condition +Tue Sep 11 23:57:23 2007 +0000 H. Peter Anvin + * doc: add some cross-references +Tue Sep 11 23:52:01 2007 +0000 H. Peter Anvin + * Feeble attempt at updating the documentation; remove Appendix B +Tue Sep 11 22:44:03 2007 +0000 H. Peter Anvin + * Handle instructions which can have both REX.W and OSP +Tue Sep 11 22:14:18 2007 +0000 H. Peter Anvin + * Use enums to make debugging easier +Tue Sep 11 22:13:17 2007 +0000 H. Peter Anvin + * ndisasm: handle \366 codes, prefer unprefixed instructions +Tue Sep 11 22:00:34 2007 +0000 H. Peter Anvin + * Simplify tokens.dat slightly +Tue Sep 11 04:26:44 2007 +0000 H. Peter Anvin + * Quiet gcc warning about uninitialized variables +Tue Sep 11 04:16:57 2007 +0000 H. Peter Anvin + * Make the big instruction arrays "const" +Mon Sep 10 23:32:05 2007 +0000 H. Peter Anvin + * Use an actual enum for the opcode +Mon Sep 10 23:30:21 2007 +0000 H. Peter Anvin + * Fix order of token arguments +Mon Sep 10 18:59:26 2007 +0000 H. Peter Anvin + * assemble.c: correct special handing of ESP/RSP +Mon Sep 10 18:59:01 2007 +0000 H. Peter Anvin + * tokhash: correct duplicate-token test +Mon Sep 10 18:58:40 2007 +0000 H. Peter Anvin + * tokhash: adjust table types to reduce size +Mon Sep 10 18:55:52 2007 +0000 H. Peter Anvin + * Fix the MMXREG and XMMREG flags definitions. +Wed Sep 5 06:48:38 2007 +0000 H. Peter Anvin + * nasm.spec.in: Copyright -> License +Wed Sep 5 06:40:51 2007 +0000 H. Peter Anvin + * Fix "make tar"; useful for RPM testing +Wed Sep 5 06:24:43 2007 +0000 H. Peter Anvin + * Remove obsolete Serial: construct; we shouldn't need it anyway. +Tue Sep 4 01:29:43 2007 +0000 Chuck Crayne + * Provide 64-bit support for ORG directive +Sun Sep 2 16:37:03 2007 +0000 H. Peter Anvin + * Fix some MMX/SSE irregularities which interact with the 64-bit support +Sun Sep 2 14:46:00 2007 +0000 H. Peter Anvin + * phash.ph: yet another attempt at getting Perl to behave, arithmetically +Sun Sep 2 06:23:29 2007 +0000 H. Peter Anvin + * Simple 64-bit org test +Sun Sep 2 06:20:15 2007 +0000 H. Peter Anvin + * phash.ph: remove some stale code +Sun Sep 2 01:00:34 2007 +0000 Chuck Crayne + * Force use of integer values for generating hash keys. +Fri Aug 31 18:10:23 2007 +0000 H. Peter Anvin + * phash: don't rely on the build platform Perl version of rand() +Fri Aug 31 07:31:51 2007 +0000 H. Peter Anvin + * tokhash.pl: formatting changes for readability +Fri Aug 31 07:23:31 2007 +0000 H. Peter Anvin + * tokhash: Speed up the rejection of unhashed values +Fri Aug 31 06:06:17 2007 +0000 H. Peter Anvin + * tokhash.pl: "ix" should have the same width as the "hash" arrays +Fri Aug 31 00:28:35 2007 +0000 H. Peter Anvin + * Add "do not edit" comment to tokhash.c +Fri Aug 31 00:23:40 2007 +0000 H. Peter Anvin + * Make the token hash a bit smaller by using 16-bit hash tables +Fri Aug 31 00:16:10 2007 +0000 H. Peter Anvin + * Minor cleanup; remove duplication of names.c +Thu Aug 30 23:42:39 2007 +0000 H. Peter Anvin + * phash.ph: use a bipartite graph to reduce the storage requirements +Thu Aug 30 22:35:34 2007 +0000 H. Peter Anvin + * Finishing touches on perfect hash tokenizer; actually turn the thing on +Thu Aug 30 21:50:20 2007 +0000 H. Peter Anvin + * Makefile rule for tokhash.c +Thu Aug 30 21:47:46 2007 +0000 H. Peter Anvin + * tokens.dat: Data file containing alphanumeric tokens not in other .dats +Thu Aug 30 21:45:56 2007 +0000 H. Peter Anvin + * Generate a perfect hash for the token parser +Thu Aug 30 21:40:08 2007 +0000 H. Peter Anvin + * Fix bugs in repeated suffix handling, which led to missing r8d/r8w/r8d +Thu Aug 30 21:39:37 2007 +0000 H. Peter Anvin + * phash.ph: more powerful prehashing +Thu Aug 30 20:15:25 2007 +0000 H. Peter Anvin + * Make the perfect hash generator an includable module +Wed Aug 29 20:30:31 2007 +0000 H. Peter Anvin + * Correct the logic for recording fs: and gs: overrides. +Wed Aug 29 18:20:19 2007 +0000 H. Peter Anvin + * Generate R_X86_64_64 relocations in elf64 output +Wed Aug 29 17:24:03 2007 +0000 H. Peter Anvin + * Add README file +Wed Aug 29 17:20:09 2007 +0000 H. Peter Anvin + * Create a Perl library directory, and add the Graph module to it +Wed Aug 29 17:05:17 2007 +0000 H. Peter Anvin + * Perfect hash generator, as a perl script +Wed Aug 29 16:41:43 2007 +0000 H. Peter Anvin + * Use standard macro for the default directive +Wed Aug 29 16:40:26 2007 +0000 H. Peter Anvin + * Add standard macro for [default] directive +Wed Aug 29 16:38:47 2007 +0000 H. Peter Anvin + * More test cases for rel and abs addressing +Wed Aug 29 16:38:05 2007 +0000 H. Peter Anvin + * Add [default] directive +Wed Aug 29 16:25:46 2007 +0000 H. Peter Anvin + * nasmlib: add bsii() case-insensitive version of bsi() +Wed Aug 29 15:49:53 2007 +0000 H. Peter Anvin + * Add test cases for IP-relative addressing +Wed Aug 29 15:19:19 2007 +0000 H. Peter Anvin + * Suppress IP-relative only for fs: and gs: overrides +Tue Aug 28 23:06:00 2007 +0000 H. Peter Anvin + * Implement REL/ABS modifiers +Sun Aug 26 05:51:39 2007 +0000 Frank Kotler + * attempt to make static makefiles aware of outelf32/outelf64 +Sun Aug 26 05:48:54 2007 +0000 Frank Kotler + * add nasm_strsep to nasmlib, for output/outmacho.c - strtok doesn't work +Sun Aug 26 05:41:33 2007 +0000 Frank Kotler + * remove "#include from rdoff directory - two places - it annoyed Windows users and seems unneeded +Sun Aug 26 05:10:24 2007 +0000 Frank Kotler + * finally commit Mike Frysinger's "elf-visibility" patch +Mon Aug 20 21:03:14 2007 +0000 H. Peter Anvin + * regs.pl: handle dashed sequences with suffixes +Mon Aug 20 20:10:04 2007 +0000 H. Peter Anvin + * sync.c: change ULONG_MAX to UINT32_MAX +Mon Aug 20 20:09:11 2007 +0000 H. Peter Anvin + * Add _MIN and _MAX macros for the fixed-size types. +Mon Aug 20 20:02:17 2007 +0000 H. Peter Anvin + * ldrdf: cast output of sizeof() before passing to printf(), to avoid warning. +Sun Aug 19 18:49:26 2007 +0000 Keith Kanios + * Fixed RIP address processing ambiguity found by Charles Crayne. +Fri Aug 17 07:37:52 2007 +0000 Keith Kanios + * Fixed issues with REX prefix effective address generation. Fixed XMM instruction output. +Fri Aug 17 02:03:10 2007 +0000 Keith Kanios + * Changed MMXREG and XMMREG flags to help resolve invalid REX prefix generation for MMX instructions. +Sat Jul 7 02:01:08 2007 +0000 H. Peter Anvin + * More int/int32_t confusion +Sat Jul 7 01:59:52 2007 +0000 H. Peter Anvin + * regflag() should return int32_t. +Thu Jun 21 19:00:12 2007 +0000 H. Peter Anvin + * Detect missing and include ersatz version if missing +Thu Jun 21 06:24:23 2007 +0000 H. Peter Anvin + * inttypes.h: for older preprocessors, specify L and LL as appropriate +Thu Jun 21 06:20:43 2007 +0000 H. Peter Anvin + * inttypes.h: Fix spelling of SHRT_MAX +Thu Jun 21 06:15:42 2007 +0000 H. Peter Anvin + * inttypes.h: do a single ersatz based on +Sun Jun 3 02:42:41 2007 +0000 Chuck Crayne + * Support 32-bit direct addressing in 64-bit mode without base or index regs +Sat Jun 2 02:26:21 2007 +0000 H. Peter Anvin + * Fix the [U]INT*_C() creation macros +Sat Jun 2 00:05:35 2007 +0000 H. Peter Anvin + * For platforms that don't have them, provide for common models. +Wed May 30 22:21:11 2007 +0000 H. Peter Anvin + * Fix the handling of the \313 code. +Wed May 30 22:20:01 2007 +0000 H. Peter Anvin + * Machine-generated \321->\324 corrections +Wed May 30 21:22:33 2007 +0000 Frank Kotler + * update "version" to 0.99.02 +Wed May 30 20:30:15 2007 +0000 H. Peter Anvin + * Correct the generation of 67 prefixes. +Wed May 30 18:30:18 2007 +0000 H. Peter Anvin + * Update dependencies. +Wed May 30 16:34:29 2007 +0000 Frank Kotler + * update cvs server name in misc/release script +Wed May 30 04:28:50 2007 +0000 H. Peter Anvin + * Avoid magic values; we have more than 124 registers now +Wed May 30 04:27:58 2007 +0000 H. Peter Anvin + * Remove bogus redundant tests +Wed May 30 03:44:50 2007 +0000 H. Peter Anvin + * More \321 -> \324 +Wed May 30 03:44:02 2007 +0000 H. Peter Anvin + * Remove bogus check for 64-bitness +Wed May 30 03:25:21 2007 +0000 H. Peter Anvin + * Get rid of magic open-coded "register numbers" +Wed May 30 02:48:51 2007 +0000 H. Peter Anvin + * MOV reg64,reg64 takes \324 (64 bit with REX) not \321 (32 bit) +Wed May 30 00:18:26 2007 +0000 H. Peter Anvin + * Rename REGNORM to REG_EA +Wed May 30 00:15:25 2007 +0000 H. Peter Anvin + * More instruction flag surgery +Wed May 30 00:05:00 2007 +0000 H. Peter Anvin + * More cleanup of operand flags/register classes +Tue May 29 23:57:12 2007 +0000 H. Peter Anvin + * Clean up the existing operand flag definitions, and document +Tue May 29 21:44:55 2007 +0000 H. Peter Anvin + * Run "make alldeps" +Thu May 24 22:33:07 2007 +0000 Frank Kotler + * update version number to 0.99.01 +Tue May 15 04:33:43 2007 +0000 H. Peter Anvin + * regs.dat: fix comment +Fri May 4 18:47:16 2007 +0000 H. Peter Anvin + * 16-bit relocations are standard in ELF64 (at my request, incidentally) +Fri May 4 02:16:08 2007 +0000 Chuck Crayne + * Addition of elf32 and elf64 output formats. +Wed May 2 04:21:26 2007 +0000 Chuck Crayne + * Allow '!' to be used in expressions with same meaning as in C. +Wed May 2 01:59:16 2007 +0000 Chuck Crayne + * Add %IFN and %ELIFN as per RFE #786286 +Mon Apr 30 22:26:58 2007 +0000 Chuck Crayne + * Accept responsibility for support of outelf64.c +Sun Apr 29 20:57:53 2007 +0000 Chuck Crayne + * Clarify comments about relocation entries. +Sun Apr 29 00:28:24 2007 +0000 Chuck Crayne + * Allow ELF32 to be invoked either as -f elf or -f elf32 +Sat Apr 28 22:18:04 2007 +0000 Chuck Crayne + * Eliminate shift count warnings when building on 32-bit systems +Sat Apr 28 06:18:48 2007 +0000 Chuck Crayne + * Initial support for ELF64 +Wed Apr 18 02:27:18 2007 +0000 H. Peter Anvin + * Fix the handling of \324 for computing the length +Wed Apr 18 02:24:34 2007 +0000 Keith Kanios + * Fixed RDF/2 to comply with "maxbits" use. +Tue Apr 17 20:23:11 2007 +0000 H. Peter Anvin + * Handle "LOCK as REX.R" for MOV CRx; fix warning for invalid 64-bit regs +Mon Apr 16 18:16:46 2007 +0000 Keith Kanios + * MEM_OFFSET Instructions Fixed. +Mon Apr 16 15:46:46 2007 +0000 Keith Kanios + * Fixed 64-bit Mode Segment Selection. +Mon Apr 16 14:31:54 2007 +0000 Keith Kanios + * Fixed distinction between [LOCAL]SYMBOL/IMMEDIATE for RIP-relative addressing. +Mon Apr 16 14:05:01 2007 +0000 Keith Kanios + * Fixed long mode MEM_OFFS issue. +Mon Apr 16 13:54:49 2007 +0000 Keith Kanios + * Filled in all RIP Register Flags. +Mon Apr 16 05:26:29 2007 +0000 H. Peter Anvin + * More \321 -> \324 for 64-bit instructions +Mon Apr 16 04:56:06 2007 +0000 Keith Kanios + * Fixed 64-bit offset generation. +Mon Apr 16 02:39:56 2007 +0000 H. Peter Anvin + * More 64-bit ndisasm fixes. +Mon Apr 16 02:02:06 2007 +0000 H. Peter Anvin + * Fixes for 64-bit ndisasm. +Mon Apr 16 01:21:29 2007 +0000 H. Peter Anvin + * Use + instead of * for extension; it feels cleaner with the new meaning. +Mon Apr 16 01:18:30 2007 +0000 H. Peter Anvin + * Initial 64-bit support for ndisasm. Still a work in progress. +Sun Apr 15 23:12:17 2007 +0000 H. Peter Anvin + * Clean up the 64-bitification of regs.dat for 64-bit ndisasm support +Sun Apr 15 23:10:26 2007 +0000 H. Peter Anvin + * Remove @GCCFLAGS@ +Sun Apr 15 23:09:23 2007 +0000 H. Peter Anvin + * CR8 is not special in any way as far as the assembler is concerned. +Sun Apr 15 23:03:28 2007 +0000 H. Peter Anvin + * Get rid of @GCCFLAGS@ +Sun Apr 15 22:45:25 2007 +0000 H. Peter Anvin + * Cleaner way to add gcc options +Sun Apr 15 22:08:30 2007 +0000 Keith Kanios + * Fixed distinction between RIP relative symbols and immediate values. +Sun Apr 15 05:40:43 2007 +0000 H. Peter Anvin + * Fix the register number for CR7 (it was using the same number as CR15). +Sun Apr 15 05:32:18 2007 +0000 H. Peter Anvin + * More perl-like idioms for generating regdis.c +Sun Apr 15 01:37:13 2007 +0000 Keith Kanios + * Fixed regdis.c generation. +Sat Apr 14 18:54:52 2007 +0000 Keith Kanios + * Added DQ constants for all BITS modes. +Sat Apr 14 08:03:02 2007 +0000 H. Peter Anvin + * outmacho.c: stylistic cleanups +Sat Apr 14 03:52:05 2007 +0000 Keith Kanios + * Fixed support for DQ constants in long mode. +Sat Apr 14 03:44:31 2007 +0000 Keith Kanios + * Hopefully it is actually fixed this time :P +Sat Apr 14 01:49:07 2007 +0000 Keith Kanios + * Fixed structure initialization issue. +Sat Apr 14 01:44:35 2007 +0000 Keith Kanios + * Refixed uninitialized data. +Sat Apr 14 01:40:24 2007 +0000 Keith Kanios + * Fixed uninitialized structure data. +Sat Apr 14 01:24:14 2007 +0000 Keith Kanios + * c99 printf/fprintf compliance. +Sat Apr 14 00:46:25 2007 +0000 Keith Kanios + * Placated unreferenced types. +Sat Apr 14 00:10:59 2007 +0000 Keith Kanios + * c99 printf/fprintf compliance. +Fri Apr 13 23:09:18 2007 +0000 Keith Kanios + * Added outmacho.* to static makefile. +Fri Apr 13 22:24:46 2007 +0000 Keith Kanios + * Fixed REGRIP -> RIPREG to match regs.dat. +Fri Apr 13 22:07:53 2007 +0000 Keith Kanios + * Fixed obj_fwrite() declaration to match "static" definition. +Fri Apr 13 22:03:24 2007 +0000 Keith Kanios + * Added appropriate "void" prototypes. +Fri Apr 13 22:00:42 2007 +0000 Keith Kanios + * Replaced str(n)casecmp with more standard str(n)icmp. +Fri Apr 13 20:06:41 2007 +0000 H. Peter Anvin + * AIf we have config.h, we should actually include it!! +Fri Apr 13 19:59:20 2007 +0000 H. Peter Anvin + * When compiling with gcc, compile with -W -Wall for maximum warnings. +Fri Apr 13 19:58:42 2007 +0000 H. Peter Anvin + * Macroize any compiler-specific code; macros defined in "compiler.h" +Fri Apr 13 16:47:53 2007 +0000 Keith Kanios + * Fixed distinction between char and int8_t data types. +Fri Apr 13 01:17:45 2007 +0000 Keith Kanios + * Comment "REX.I" should have been "REX.X" +Fri Apr 13 00:52:54 2007 +0000 Keith Kanios + * Fixed c99 data-types after removal of typedefs. +Fri Apr 13 00:43:50 2007 +0000 Keith Kanios + * Added Dev-Cpp Makefile +Fri Apr 13 00:38:29 2007 +0000 Keith Kanios + * *** empty log message *** +Thu Apr 12 17:58:02 2007 +0000 H. Peter Anvin + * Remove redundant inclusion of +Thu Apr 12 16:54:50 2007 +0000 H. Peter Anvin + * Remove obsolete types; add where needed; header fixes +Thu Apr 12 16:25:58 2007 +0000 H. Peter Anvin + * autogen.sh script to create configure, et al. +Thu Apr 12 16:23:11 2007 +0000 Keith Kanios + * Fixed c99 support for RDOFF Tools +Thu Apr 12 16:12:09 2007 +0000 H. Peter Anvin + * outmacho.c: Don't assume __builtin_ctzl exists for gcc < 4 + + * Get rid of @GCCFLAGS@ +Sun Apr 15 22:45:25 2007 +0000 H. Peter Anvin + * Cleaner way to add gcc options +Sun Apr 15 22:08:30 2007 +0000 Keith Kanios + * Fixed distinction between RIP relative symbols and immediate values. +Sun Apr 15 05:40:43 2007 +0000 H. Peter Anvin + * Fix the register number for CR7 (it was using the same number as CR15). +Sun Apr 15 05:32:18 2007 +0000 H. Peter Anvin + * More perl-like idioms for generating regdis.c +Sun Apr 15 01:37:13 2007 +0000 Keith Kanios + * Fixed regdis.c generation. +Sat Apr 14 18:54:52 2007 +0000 Keith Kanios + * Added DQ constants for all BITS modes. +Sat Apr 14 08:03:02 2007 +0000 H. Peter Anvin + * outmacho.c: stylistic cleanups +Sat Apr 14 03:52:05 2007 +0000 Keith Kanios + * Fixed support for DQ constants in long mode. +Sat Apr 14 03:44:31 2007 +0000 Keith Kanios + * Hopefully it is actually fixed this time :P +Sat Apr 14 01:49:07 2007 +0000 Keith Kanios + * Fixed structure initialization issue. +Sat Apr 14 01:44:35 2007 +0000 Keith Kanios + * Refixed uninitialized data. +Sat Apr 14 01:40:24 2007 +0000 Keith Kanios + * Fixed uninitialized structure data. +Sat Apr 14 01:24:14 2007 +0000 Keith Kanios + * c99 printf/fprintf compliance. +Sat Apr 14 00:46:25 2007 +0000 Keith Kanios + * Placated unreferenced types. +Sat Apr 14 00:10:59 2007 +0000 Keith Kanios + * c99 printf/fprintf compliance. +Fri Apr 13 23:09:18 2007 +0000 Keith Kanios + * Added outmacho.* to static makefile. +Fri Apr 13 22:24:46 2007 +0000 Keith Kanios + * Fixed REGRIP -> RIPREG to match regs.dat. +Fri Apr 13 22:07:53 2007 +0000 Keith Kanios + * Fixed obj_fwrite() declaration to match "static" definition. +Fri Apr 13 22:03:24 2007 +0000 Keith Kanios + * Added appropriate "void" prototypes. +Fri Apr 13 22:00:42 2007 +0000 Keith Kanios + * Replaced str(n)casecmp with more standard str(n)icmp. +Fri Apr 13 20:06:41 2007 +0000 H. Peter Anvin + * AIf we have config.h, we should actually include it!! +Fri Apr 13 19:59:20 2007 +0000 H. Peter Anvin + * When compiling with gcc, compile with -W -Wall for maximum warnings. +Fri Apr 13 19:58:42 2007 +0000 H. Peter Anvin + * Macroize any compiler-specific code; macros defined in "compiler.h" +Fri Apr 13 16:47:53 2007 +0000 Keith Kanios + * Fixed distinction between char and int8_t data types. +Fri Apr 13 01:17:45 2007 +0000 Keith Kanios + * Comment "REX.I" should have been "REX.X" +Fri Apr 13 00:52:54 2007 +0000 Keith Kanios + * Fixed c99 data-types after removal of typedefs. +Fri Apr 13 00:43:50 2007 +0000 Keith Kanios + * Added Dev-Cpp Makefile +Fri Apr 13 00:38:29 2007 +0000 Keith Kanios + * *** empty log message *** +Thu Apr 12 17:58:02 2007 +0000 H. Peter Anvin + * Remove redundant inclusion of +Thu Apr 12 16:54:50 2007 +0000 H. Peter Anvin + * Remove obsolete types; add where needed; header fixes +Thu Apr 12 16:25:58 2007 +0000 H. Peter Anvin + * autogen.sh script to create configure, et al. +Thu Apr 12 16:23:11 2007 +0000 Keith Kanios + * Fixed c99 support for RDOFF Tools +Thu Apr 12 16:12:09 2007 +0000 H. Peter Anvin + * outmacho.c: Don't assume __builtin_ctzl exists for gcc < 4 +2007-04-10 Keith Kanios + * (insns.dat): updated x86-64 general+system instruction set. + +2007-04-09 Keith Kanios + * (outrdf.c): added support for 64-bit addressing. + * (outrdf2.c): added support for 64-bit addressing. + +2007-04-08 Keith Kanios + * (standard.mac): added entry for __BITS__ standard macro. + * (preproc.c): added __BITS__ to the standard macro processing. + +2007-04-05 Keith Kanios + * (nasm.c): added [BITS 64] for the x86-64 architecture extension. + * (nasm.h): added general flags to support the x86-64 architecture. + * (nasmlib.h): updated to support the x86-64 architecture. + * (nasmlib.c): revamped readnum/readlinenum to support 64-bit. + * (assemble.c): modified for the x86-64 architecture extension. + * (regs.dat): added x86-64 register extensions; revamped flags. + * (insns.dat): added AMD64 instruction set support. + * (outbin.c): added support for 64-bit addressing. + * (outcoff.c): added win64 (x86-64 COFF) support. + * (outform.h): added entry for win64. + +2007-03-15 Keith Kanios + * (*.c): added c99 data-type compliance and inclusion. + * (*.pl): added c99 data-type compliance and inclusion. + * (*.h): added c99 data-type compliance. + * (assemble.h): fixed procedure defintions to sync with respective + procedure declarations. + +2002-05-16 Ed Beroset + * (preproc.c): fixed unterminated macro bug error reporting + * (nasmlib.h): changed strdup's arg to const char * + * (nasmlib.c): changed strdup's arg to const char * + +2002-05-12 Debbie Wiles + * (insns.dat): fixed incorrect processor flags + * (Mkfiles/Makefile.vc): added optimisation, and changed to work with 0.98.31 + * (doc/nasmdoc.src): added %ifmacro, and tidied up format of code items. + +2002-05-03 H. Peter Anvin + * (nasm.c): Change the NASM environment variable to NASMOPT. + +2002-05-03 H. Peter Anvin + * (Makefile.in Mkfiles/*): use new version -> version.{h,mac}. + * (macros.pl): support multiple input files (standard.mac, version.mac). + * (standard.mac): use an explicit delimiter to end the TASM macros. + * (nasm-version): remove, no longer needed. + * (version.pl): script to produce version.h and version.mac from version. + * (version): contains the official NASM version. + * (nasm.h): include version.h. + +2002-05-03 H. Peter Anvin + + * (configure.in): create output directory. + * (Makefile.in): change cd ; to cd &&. + * (rdoff/Makefile.in): handle building in a separate obj directory + correctly. + +2002-04-29 Stanislav Karchebny + + * (Makefile.in): added 'strip' target to strip debug info. + * (INSTALL): added INSTALL file. + * (nasm.1): added -v option description. + + +2002-04-29 Frank Kotler + + * (parser.c): fixed INCBIN bug reported by Rebel. + + +2002-04-11 Stanislav Karchebny + + * Started ChangeLog for recording per-file changes in the project. + We could get away without ChangeLog at all (use CVS logs), but we + lose CVS so often its better to have log glued to the sources =) + You should record changes in CHANGES also, not for every change + but rather when making a release. + diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..d184982 --- /dev/null +++ b/INSTALL @@ -0,0 +1,102 @@ +1. Installing NASM from source (Unix, MacOS X; Windows - Cygwin; + Windows - MinGW; DOS - DJGPP) +2. Installing NASM from source (Windows - MS Visual C++) +3. Installing NASM from source (DOS, Windows, OS/2 - OpenWatcom) + + +1. Installing NASM from source (Unix, MacOS X; Windows - Cygwin; + Windows - MinGW; DOS - DJGPP) +================================================================ + +Installing NASM is pretty straightforward on Unix or Unix-like systems +with a C compiler, Make, and standard shell tools installed, including +MinGW for Windows (with MSYS installed) and DJGPP for DOS with the +appropriate tools. Perl is not required for compiling unmodified +sources from a tarball, but is required to build from git or for most +source modifications. + +If you checked out source from git you will need to run autoconf to +generate configure, otherwise you don't have to. + +$ sh autogen.sh + +Then run configure to detect your platform settings and generate makefiles. + +$ sh configure + +You can get information about available configuration options by +running `sh configure --help`. + +If configure fails, please file a bug report with detailed platform +information at: + + http://www.sf.net/projects/nasm/ + +If everything went okay, type + +$ make + +to build NASM, ndisasm and rdoff tools, or + +$ make everything + +to build the former plus the docs. + +You can decrease the size of produces executables by stripping off +unnecessary information, to achieve this run + +$ make strip + +If you install to a system-wide location you might need to become +root: + +$ su + +then + +$ make install + +optionally followed by + +$ make install_rdf + +Or you can + +$ make install_everything + +to install everything =) + + +Thats it, enjoy! + + +2. Installing NASM from source (Windows - MS Visual C++) +======================================================== + +The recommended compiler for NASM on Windows is MinGW +(http://www.mingw.org/), but it is also possible to compile with +Microsoft Visual C++ (tested with Visual C++ 2005 Express Edition.) + +To do so, start the "Visual C++ Command Shell", go to the directory +where the NASM source code was extracted, and run: + +> nmake /f Mkfiles/msvc.mak + +We recommend MinGW over Visual C++ 2005 as we have found it to be more +up to date with regards to C99 compliance, and we are increasingly +using C99 features in NASM. + + +3. Installing NASM from source (DOS, Windows, OS/2 - OpenWatcom) +================================================================ + +NASM has been reported to build correctly with OpenWatcom 1.7 on the +Windows and OS/2 platforms. In addition, it *should* work under DOS +with the DOS4GW DOS extender, although the NASM developers recommend +using DJGPP with the CWSDPMI DOS extender instead. + +A WMAKE make file is provided: + +> wmake -f Mkfiles\openwcom.mak + +... where is "dos", "win32" or "os2". diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f397b82 --- /dev/null +++ b/LICENSE @@ -0,0 +1,29 @@ +NASM is now licensed under the 2-clause BSD license, also known as the +simplified BSD license. + + Copyright 1996-2009 the NASM Authors - All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following + conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 0000000..e8edf4a --- /dev/null +++ b/Makefile.in @@ -0,0 +1,378 @@ +# +# Auto-configuring Makefile for the Netwide Assembler. +# +# The Netwide Assembler is copyright (C) 1996 Simon Tatham and +# Julian Hall. All rights reserved. The software is +# redistributable under the license given in the file "LICENSE" +# distributed in the NASM archive. + +top_srcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ +bindir = @bindir@ +mandir = @mandir@ +datarootdir = @datarootdir@ + +CC = @CC@ +CFLAGS = @CFLAGS@ +BUILD_CFLAGS = $(CFLAGS) @DEFS@ +INTERNAL_CFLAGS = -I$(srcdir) -I. +ALL_CFLAGS = $(BUILD_CFLAGS) $(INTERNAL_CFLAGS) +LDFLAGS = @LDFLAGS@ +LIBS = @LIBS@ +PERL = perl -I$(srcdir)/perllib + +XOBJS = @XOBJS@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ + +NROFF = @NROFF@ + +MKDIR = mkdir +RM = rm + +STRIP = strip + +# Binary suffixes +O = @OBJEXT@ +X = @EXEEXT@ + +.SUFFIXES: .c .i .s .$(O) .1 .man + +.PHONY: all doc rdf install clean distclean cleaner spotless install_rdf +.PHONY: install_doc everything install_everything strip perlreq dist + +.c.$(O): + $(CC) -c $(ALL_CFLAGS) -o $@ $< + +.c.s: + $(CC) -S $(ALL_CFLAGS) -o $@ $< + +.c.i: + $(CC) -E $(ALL_CFLAGS) -o $@ $< + +.1.man: + $(NROFF) -man $< > $@ + +#-- Begin File Lists --# +NASM = nasm.$(O) nasmlib.$(O) ver.$(O) \ + raa.$(O) saa.$(O) rbtree.$(O) \ + float.$(O) insnsa.$(O) insnsb.$(O) \ + directives.$(O) \ + assemble.$(O) labels.$(O) hashtbl.$(O) crc64.$(O) parser.$(O) \ + output/outform.$(O) output/outlib.$(O) output/nulldbg.$(O) \ + output/nullout.$(O) \ + output/outbin.$(O) output/outaout.$(O) output/outcoff.$(O) \ + output/outelf.$(O) output/outelf32.$(O) output/outelf64.$(O) \ + output/outobj.$(O) output/outas86.$(O) output/outrdf2.$(O) \ + output/outdbg.$(O) output/outieee.$(O) output/outmacho32.$(O) \ + output/outmacho64.$(O) preproc.$(O) quote.$(O) pptok.$(O) \ + macros.$(O) listing.$(O) eval.$(O) exprlib.$(O) stdscan.$(O) \ + strfunc.$(O) tokhash.$(O) regvals.$(O) regflags.$(O) \ + lib/strlcpy.$(O) + +NDISASM = ndisasm.$(O) disasm.$(O) sync.$(O) nasmlib.$(O) ver.$(O) \ + insnsd.$(O) insnsb.$(O) insnsn.$(O) regs.$(O) regdis.$(O) +#-- End File Lists --# + +all: nasm$(X) ndisasm$(X) nasm.man ndisasm.man + cd rdoff && $(MAKE) all + +nasm$(X): $(NASM) $(XOBJS) + $(CC) $(LDFLAGS) -o nasm$(X) $(NASM) $(XOBJS) $(LIBS) + +ndisasm$(X): $(NDISASM) $(XOBJS) + $(CC) $(LDFLAGS) -o ndisasm$(X) $(NDISASM) $(XOBJS) $(LIBS) + +# These source files are automagically generated from a single +# instruction-table file by a Perl script. They're distributed, +# though, so it isn't necessary to have Perl just to recompile NASM +# from the distribution. + +insnsb.c: insns.dat insns.pl + $(PERL) $(srcdir)/insns.pl -b $(srcdir)/insns.dat +insnsa.c: insns.dat insns.pl + $(PERL) $(srcdir)/insns.pl -a $(srcdir)/insns.dat +insnsd.c: insns.dat insns.pl + $(PERL) $(srcdir)/insns.pl -d $(srcdir)/insns.dat +insnsi.h: insns.dat insns.pl + $(PERL) $(srcdir)/insns.pl -i $(srcdir)/insns.dat +insnsn.c: insns.dat insns.pl + $(PERL) $(srcdir)/insns.pl -n $(srcdir)/insns.dat + +# These files contains all the standard macros that are derived from +# the version number. +version.h: version version.pl + $(PERL) $(srcdir)/version.pl h < $(srcdir)/version > version.h +version.mac: version version.pl + $(PERL) $(srcdir)/version.pl mac < $(srcdir)/version > version.mac +version.sed: version version.pl + $(PERL) $(srcdir)/version.pl sed < $(srcdir)/version > version.sed +version.mak: version version.pl + $(PERL) $(srcdir)/version.pl make < $(srcdir)/version > version.mak +version.nsh: version version.pl + $(PERL) $(srcdir)/version.pl nsis < $(srcdir)/version > version.nsh + +# This source file is generated from the standard macros file +# `standard.mac' by another Perl script. Again, it's part of the +# standard distribution. +macros.c: macros.pl pptok.ph standard.mac version.mac \ + $(srcdir)/macros/*.mac $(srcdir)/output/*.mac + $(PERL) $(srcdir)/macros.pl $(srcdir)/standard.mac version.mac \ + $(srcdir)/macros/*.mac $(srcdir)/output/*.mac + +# These source files are generated from regs.dat by yet another +# perl script. +regs.c: regs.dat regs.pl + $(PERL) $(srcdir)/regs.pl c $(srcdir)/regs.dat > regs.c +regflags.c: regs.dat regs.pl + $(PERL) $(srcdir)/regs.pl fc $(srcdir)/regs.dat > regflags.c +regdis.c: regs.dat regs.pl + $(PERL) $(srcdir)/regs.pl dc $(srcdir)/regs.dat > regdis.c +regdis.h: regs.dat regs.pl + $(PERL) $(srcdir)/regs.pl dh $(srcdir)/regs.dat > regdis.h +regvals.c: regs.dat regs.pl + $(PERL) $(srcdir)/regs.pl vc $(srcdir)/regs.dat > regvals.c +regs.h: regs.dat regs.pl + $(PERL) $(srcdir)/regs.pl h $(srcdir)/regs.dat > regs.h + +# Assembler token hash +tokhash.c: insns.dat regs.dat tokens.dat tokhash.pl perllib/phash.ph + $(PERL) $(srcdir)/tokhash.pl c $(srcdir)/insns.dat $(srcdir)/regs.dat \ + $(srcdir)/tokens.dat > tokhash.c + +# Assembler token metadata +tokens.h: insns.dat regs.dat tokens.dat tokhash.pl perllib/phash.ph + $(PERL) $(srcdir)/tokhash.pl h $(srcdir)/insns.dat $(srcdir)/regs.dat \ + $(srcdir)/tokens.dat > tokens.h + +# Preprocessor token hash +pptok.h: pptok.dat pptok.pl perllib/phash.ph + $(PERL) $(srcdir)/pptok.pl h $(srcdir)/pptok.dat pptok.h +pptok.c: pptok.dat pptok.pl perllib/phash.ph + $(PERL) $(srcdir)/pptok.pl c $(srcdir)/pptok.dat pptok.c +pptok.ph: pptok.dat pptok.pl perllib/phash.ph + $(PERL) $(srcdir)/pptok.pl ph $(srcdir)/pptok.dat pptok.ph + +# Directives hash +directives.h: directives.dat directives.pl perllib/phash.ph + $(PERL) $(srcdir)/directives.pl h $(srcdir)/directives.dat directives.h +directives.c: directives.dat directives.pl perllib/phash.ph + $(PERL) $(srcdir)/directives.pl c $(srcdir)/directives.dat directives.c + +# This target generates all files that require perl. +# This allows easier generation of distribution (see dist target). +PERLREQ = macros.c insnsb.c insnsa.c insnsd.c insnsi.h insnsn.c \ + regs.c regs.h regflags.c regdis.c regdis.h regvals.c \ + tokhash.c tokens.h pptok.h pptok.c pptok.ph \ + directives.c directives.h \ + version.h version.mac version.mak version.nsh +perlreq: $(PERLREQ) + +install: nasm$(X) ndisasm$(X) + $(MKDIR) -p $(INSTALLROOT)$(bindir) + $(INSTALL_PROGRAM) nasm$(X) $(INSTALLROOT)$(bindir)/nasm$(X) + $(INSTALL_PROGRAM) ndisasm$(X) $(INSTALLROOT)$(bindir)/ndisasm$(X) + $(MKDIR) -p $(INSTALLROOT)$(mandir)/man1 + $(INSTALL_DATA) $(srcdir)/nasm.1 $(INSTALLROOT)$(mandir)/man1/nasm.1 + $(INSTALL_DATA) $(srcdir)/ndisasm.1 $(INSTALLROOT)$(mandir)/man1/ndisasm.1 + +clean: + $(RM) -f *.$(O) *.s *.i + $(RM) -f output/*.$(O) output/*.s output/*.i + $(RM) -f nasm$(X) ndisasm$(X) + cd rdoff && $(MAKE) clean + +distclean: clean + $(RM) -f config.h config.log config.status + $(RM) -f Makefile *~ *.bak *.lst *.bin + $(RM) -f output/*~ output/*.bak + $(RM) -f test/*.lst test/*.bin test/*.$(O) test/*.bin + $(RM) -rf autom4te*.cache + cd rdoff && $(MAKE) distclean + +cleaner: clean + $(RM) -f $(PERLREQ) *.man nasm.spec + cd doc && $(MAKE) clean + +spotless: distclean cleaner + $(RM) -f doc/Makefile doc/*~ doc/*.bak + +strip: + $(STRIP) --strip-unneeded nasm$(X) ndisasm$(X) + +rdf: + cd rdoff && $(MAKE) + +rdf_install install_rdf: + cd rdoff && $(MAKE) install + +doc: + cd doc && $(MAKE) all + +doc_install install_doc: + cd doc && $(MAKE) install + +everything: all doc rdf + +install_everything: everything install install_doc install_rdf + +dist: spotless perlreq spec + autoheader + autoconf + $(RM) -rf ./autom4te*.cache + +tar: dist + tar -cvj --exclude CVS -C .. -f ../nasm-`cat version`-`date +%Y%m%d`.tar.bz2 `basename \`pwd\`` + +spec: nasm.spec + +nasm.spec: nasm.spec.in version.sed + sed -f version.sed < nasm.spec.in > nasm.spec + +splint: + splint -weak *.c + +test: nasm$(X) + cd test && $(PERL) performtest.pl --nasm=../nasm *.asm + +# +# This build dependencies in *ALL* makefiles. Partially for that reason, +# it's expected to be invoked manually. +# +alldeps: perlreq + $(PERL) syncfiles.pl Makefile.in Mkfiles/*.mak + $(PERL) mkdep.pl -M Makefile.in Mkfiles/*.mak -- \ + . output lib + ./config.status + +#-- Magic hints to mkdep.pl --# +# @object-ending: ".$(O)" +# @path-separator: "/" +#-- Everything below is generated by mkdep.pl - do not edit --# +assemble.$(O): assemble.c assemble.h compiler.h config.h directives.h \ + insns.h insnsi.h nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h \ + tables.h tokens.h +crc64.$(O): crc64.c compiler.h config.h nasmlib.h +directives.$(O): directives.c compiler.h config.h directives.h hashtbl.h \ + insnsi.h nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h +disasm.$(O): disasm.c compiler.h config.h directives.h disasm.h insns.h \ + insnsi.h nasm.h nasmlib.h opflags.h pptok.h preproc.h regdis.h regs.h \ + sync.h tables.h tokens.h +eval.$(O): eval.c compiler.h config.h directives.h eval.h float.h insnsi.h \ + labels.h nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h +exprlib.$(O): exprlib.c compiler.h config.h directives.h insnsi.h nasm.h \ + nasmlib.h opflags.h pptok.h preproc.h regs.h +float.$(O): float.c compiler.h config.h directives.h float.h insnsi.h nasm.h \ + nasmlib.h opflags.h pptok.h preproc.h regs.h +hashtbl.$(O): hashtbl.c compiler.h config.h directives.h hashtbl.h insnsi.h \ + nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h +insnsa.$(O): insnsa.c compiler.h config.h directives.h insns.h insnsi.h \ + nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h tokens.h +insnsb.$(O): insnsb.c compiler.h config.h directives.h insns.h insnsi.h \ + nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h tokens.h +insnsd.$(O): insnsd.c compiler.h config.h directives.h insns.h insnsi.h \ + nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h tokens.h +insnsn.$(O): insnsn.c compiler.h config.h insnsi.h opflags.h tables.h +labels.$(O): labels.c compiler.h config.h directives.h hashtbl.h insnsi.h \ + nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h +lib/snprintf.$(O): lib/snprintf.c compiler.h config.h nasmlib.h +lib/strlcpy.$(O): lib/strlcpy.c compiler.h config.h +lib/vsnprintf.$(O): lib/vsnprintf.c compiler.h config.h nasmlib.h +listing.$(O): listing.c compiler.h config.h directives.h insnsi.h listing.h \ + nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h +macros.$(O): macros.c compiler.h config.h directives.h hashtbl.h insnsi.h \ + nasm.h nasmlib.h opflags.h output/outform.h pptok.h preproc.h regs.h \ + tables.h +nasm.$(O): nasm.c assemble.h compiler.h config.h directives.h eval.h float.h \ + insns.h insnsi.h labels.h listing.h nasm.h nasmlib.h opflags.h \ + output/outform.h parser.h pptok.h preproc.h raa.h regs.h saa.h stdscan.h \ + tokens.h +nasmlib.$(O): nasmlib.c compiler.h config.h directives.h insns.h insnsi.h \ + nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h tokens.h +ndisasm.$(O): ndisasm.c compiler.h config.h directives.h disasm.h insns.h \ + insnsi.h nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h sync.h \ + tokens.h +output/nulldbg.$(O): output/nulldbg.c compiler.h config.h directives.h \ + insnsi.h nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h +output/nullout.$(O): output/nullout.c compiler.h config.h directives.h \ + insnsi.h nasm.h nasmlib.h opflags.h output/outlib.h pptok.h preproc.h \ + regs.h +output/outaout.$(O): output/outaout.c compiler.h config.h directives.h \ + eval.h insnsi.h nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h \ + pptok.h preproc.h raa.h regs.h saa.h stdscan.h +output/outas86.$(O): output/outas86.c compiler.h config.h directives.h \ + insnsi.h nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h \ + pptok.h preproc.h raa.h regs.h saa.h +output/outbin.$(O): output/outbin.c compiler.h config.h directives.h eval.h \ + insnsi.h labels.h nasm.h nasmlib.h opflags.h output/outform.h \ + output/outlib.h pptok.h preproc.h regs.h saa.h stdscan.h +output/outcoff.$(O): output/outcoff.c compiler.h config.h directives.h \ + eval.h insnsi.h nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h \ + pptok.h preproc.h raa.h regs.h saa.h +output/outdbg.$(O): output/outdbg.c compiler.h config.h directives.h \ + insnsi.h nasm.h nasmlib.h opflags.h output/outform.h pptok.h preproc.h \ + regs.h +output/outelf.$(O): output/outelf.c compiler.h config.h directives.h \ + insnsi.h nasm.h nasmlib.h opflags.h output/dwarf.h output/elf.h \ + output/outelf.h output/outform.h pptok.h preproc.h regs.h +output/outelf32.$(O): output/outelf32.c compiler.h config.h directives.h \ + eval.h insnsi.h nasm.h nasmlib.h opflags.h output/dwarf.h output/elf.h \ + output/outelf.h output/outform.h output/outlib.h output/stabs.h pptok.h \ + preproc.h raa.h rbtree.h regs.h saa.h stdscan.h +output/outelf64.$(O): output/outelf64.c compiler.h config.h directives.h \ + eval.h insnsi.h nasm.h nasmlib.h opflags.h output/dwarf.h output/elf.h \ + output/outelf.h output/outform.h output/outlib.h output/stabs.h pptok.h \ + preproc.h raa.h rbtree.h regs.h saa.h stdscan.h +output/outform.$(O): output/outform.c compiler.h config.h directives.h \ + insnsi.h nasm.h nasmlib.h opflags.h output/outform.h pptok.h preproc.h \ + regs.h +output/outieee.$(O): output/outieee.c compiler.h config.h directives.h \ + insnsi.h nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h \ + pptok.h preproc.h regs.h +output/outlib.$(O): output/outlib.c compiler.h config.h directives.h \ + insnsi.h nasm.h nasmlib.h opflags.h output/outlib.h pptok.h preproc.h \ + regs.h +output/outmacho32.$(O): output/outmacho32.c compiler.h config.h directives.h \ + eval.h insnsi.h nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h \ + pptok.h preproc.h raa.h regs.h saa.h +output/outmacho64.$(O): output/outmacho64.c compiler.h config.h directives.h \ + insnsi.h nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h \ + pptok.h preproc.h raa.h regs.h saa.h +output/outobj.$(O): output/outobj.c compiler.h config.h directives.h eval.h \ + insnsi.h nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h \ + pptok.h preproc.h regs.h stdscan.h +output/outrdf2.$(O): output/outrdf2.c compiler.h config.h directives.h \ + insnsi.h nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h \ + pptok.h preproc.h rdoff/rdoff.h regs.h saa.h +parser.$(O): parser.c compiler.h config.h directives.h eval.h float.h \ + insns.h insnsi.h nasm.h nasmlib.h opflags.h parser.h pptok.h preproc.h \ + regs.h stdscan.h tables.h tokens.h +pptok.$(O): pptok.c compiler.h config.h hashtbl.h nasmlib.h pptok.h \ + preproc.h +preproc.$(O): preproc.c compiler.h config.h directives.h eval.h hashtbl.h \ + insnsi.h nasm.h nasmlib.h opflags.h pptok.h preproc.h quote.h regs.h \ + stdscan.h tables.h tokens.h +quote.$(O): quote.c compiler.h config.h nasmlib.h quote.h +raa.$(O): raa.c compiler.h config.h nasmlib.h raa.h +rbtree.$(O): rbtree.c compiler.h config.h rbtree.h +regdis.$(O): regdis.c regdis.h regs.h +regflags.$(O): regflags.c compiler.h config.h directives.h insnsi.h nasm.h \ + nasmlib.h opflags.h pptok.h preproc.h regs.h tables.h +regs.$(O): regs.c compiler.h config.h insnsi.h opflags.h tables.h +regvals.$(O): regvals.c compiler.h config.h insnsi.h opflags.h tables.h +saa.$(O): saa.c compiler.h config.h nasmlib.h saa.h +stdscan.$(O): stdscan.c compiler.h config.h directives.h insns.h insnsi.h \ + nasm.h nasmlib.h opflags.h pptok.h preproc.h quote.h regs.h stdscan.h \ + tokens.h +strfunc.$(O): strfunc.c compiler.h config.h directives.h insnsi.h nasm.h \ + nasmlib.h opflags.h pptok.h preproc.h regs.h +sync.$(O): sync.c compiler.h config.h nasmlib.h sync.h +tokhash.$(O): tokhash.c compiler.h config.h directives.h hashtbl.h insns.h \ + insnsi.h nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h tokens.h +ver.$(O): ver.c compiler.h config.h directives.h insnsi.h nasm.h nasmlib.h \ + opflags.h pptok.h preproc.h regs.h version.h diff --git a/Mkfiles/README b/Mkfiles/README new file mode 100644 index 0000000..6bab32c --- /dev/null +++ b/Mkfiles/README @@ -0,0 +1,42 @@ +These are pre-created Makefiles for various platforms, use them if +GNU autoconf/automake packages are not supported on your system. + +The Makefiles are: + + Filename Target Compiler Tested with + --------------------------------------------------------------------------- + msvc.mak Win32 MS Visual C++ Visual C++ Express 2005 + + For building on a Win32 host using Microsoft Visual C++. + + Usage: nmake /f Mkfiles/msvc.mak + + + Filename Target Compiler Tested with + --------------------------------------------------------------------------- + openwcom.mak DOS,Win32,OS/2 OpenWatcom C OpenWatcom 1.7 (Win32) + + For building on a DOS, OS/2 or Win32 host using OpenWatcom. + OpenWatcom can be downloaded from http://www.openwatcom.org/. + + Usage: wmake /f Mkfiles/ + + is dos, win32, or os2. + + Filename Target Compiler Tested with + --------------------------------------------------------------------------- + owlinux.mak DOS,Win32,OS/2 OpenWatcom C OpenWatcom 1.6rc2 (Linux) + + For building on a Linux host using OpenWatcom for Linux. + + Usage: make -f Mkfiles/ + + is dos, win32, or os2. + + Filename Target Compiler Tested with + --------------------------------------------------------------------------- + netware.mak NetWare Cross-GCC Cross-GCC 3.2.3 (Linux, Win32) + + For building on a Linux or Win32 host using Cross-GCC for Linux/Win32. + + Usage: make -f Mkfiles/netware.mak diff --git a/Mkfiles/msvc.mak b/Mkfiles/msvc.mak new file mode 100644 index 0000000..7bb1cfd --- /dev/null +++ b/Mkfiles/msvc.mak @@ -0,0 +1,300 @@ +# -*- makefile -*- +# +# Makefile for building NASM using Microsoft Visual C++ and NMAKE. +# Tested on Microsoft Visual C++ 2005 Express Edition. +# +# Make sure to put the appropriate directories in your PATH, in +# the case of MSVC++ 2005, they are ...\VC\bin and ...\Common7\IDE. + +top_srcdir = . +srcdir = . +VPATH = . +prefix = C:\Program Files\NASM +exec_prefix = $(prefix) +bindir = $(prefix)/bin +mandir = $(prefix)/man + +CC = cl +CFLAGS = /O2 /Ox /Oy /W2 +BUILD_CFLAGS = $(CFLAGS) /I$(srcdir)/inttypes +INTERNAL_CFLAGS = /I$(srcdir) /I. /DHAVE__SNPRINTF /DHAVE__VSNPRINTF +ALL_CFLAGS = $(BUILD_CFLAGS) $(INTERNAL_CFLAGS) +LDFLAGS = +LIBS = +PERL = perl -I$(srcdir)/perllib + +# Binary suffixes +O = obj +X = .exe + +.SUFFIXES: .c .i .s .$(O) .1 .man + +.c.obj: + $(CC) /c $(ALL_CFLAGS) /Fo$@ $< + +#-- Begin File Lists --# +# Edit in Makefile.in, not here! +NASM = nasm.$(O) nasmlib.$(O) ver.$(O) \ + raa.$(O) saa.$(O) rbtree.$(O) \ + float.$(O) insnsa.$(O) insnsb.$(O) \ + directives.$(O) \ + assemble.$(O) labels.$(O) hashtbl.$(O) crc64.$(O) parser.$(O) \ + output/outform.$(O) output/outlib.$(O) output/nulldbg.$(O) \ + output/nullout.$(O) \ + output/outbin.$(O) output/outaout.$(O) output/outcoff.$(O) \ + output/outelf.$(O) output/outelf32.$(O) output/outelf64.$(O) \ + output/outobj.$(O) output/outas86.$(O) output/outrdf2.$(O) \ + output/outdbg.$(O) output/outieee.$(O) output/outmacho32.$(O) \ + output/outmacho64.$(O) preproc.$(O) quote.$(O) pptok.$(O) \ + macros.$(O) listing.$(O) eval.$(O) exprlib.$(O) stdscan.$(O) \ + strfunc.$(O) tokhash.$(O) regvals.$(O) regflags.$(O) \ + lib/strlcpy.$(O) + +NDISASM = ndisasm.$(O) disasm.$(O) sync.$(O) nasmlib.$(O) ver.$(O) \ + insnsd.$(O) insnsb.$(O) insnsn.$(O) regs.$(O) regdis.$(O) +#-- End File Lists --# + +all: nasm$(X) ndisasm$(X) + rem cd rdoff && $(MAKE) all + +nasm$(X): $(NASM) + $(CC) $(LDFLAGS) /Fenasm$(X) $(NASM) $(LIBS) + +ndisasm$(X): $(NDISASM) + $(CC) $(LDFLAGS) /Fendisasm$(X) $(NDISASM) $(LIBS) + +# These source files are automagically generated from a single +# instruction-table file by a Perl script. They're distributed, +# though, so it isn't necessary to have Perl just to recompile NASM +# from the distribution. + +insnsb.c: insns.dat insns.pl + $(PERL) $(srcdir)/insns.pl -b $(srcdir)/insns.dat +insnsa.c: insns.dat insns.pl + $(PERL) $(srcdir)/insns.pl -a $(srcdir)/insns.dat +insnsd.c: insns.dat insns.pl + $(PERL) $(srcdir)/insns.pl -d $(srcdir)/insns.dat +insnsi.h: insns.dat insns.pl + $(PERL) $(srcdir)/insns.pl -i $(srcdir)/insns.dat +insnsn.c: insns.dat insns.pl + $(PERL) $(srcdir)/insns.pl -n $(srcdir)/insns.dat + +# These files contains all the standard macros that are derived from +# the version number. +version.h: version version.pl + $(PERL) $(srcdir)/version.pl h < $(srcdir)/version > version.h + +version.mac: version version.pl + $(PERL) $(srcdir)/version.pl mac < $(srcdir)/version > version.mac + +# This source file is generated from the standard macros file +# `standard.mac' by another Perl script. Again, it's part of the +# standard distribution. + +macros.c: macros.pl standard.mac version.mac + $(PERL) $(srcdir)/macros.pl $(srcdir)/standard.mac version.mac + +# These source files are generated from regs.dat by yet another +# perl script. +regs.c: regs.dat regs.pl + $(PERL) $(srcdir)/regs.pl c $(srcdir)/regs.dat > regs.c +regflags.c: regs.dat regs.pl + $(PERL) $(srcdir)/regs.pl fc $(srcdir)/regs.dat > regflags.c +regdis.c: regs.dat regs.pl + $(PERL) $(srcdir)/regs.pl dc $(srcdir)/regs.dat > regdis.c +regvals.c: regs.dat regs.pl + $(PERL) $(srcdir)/regs.pl vc $(srcdir)/regs.dat > regvals.c +regs.h: regs.dat regs.pl + $(PERL) $(srcdir)/regs.pl h $(srcdir)/regs.dat > regs.h + +# Assembler token hash +tokhash.c: insns.dat regs.dat tokens.dat tokhash.pl perllib/phash.ph + $(PERL) $(srcdir)/tokhash.pl c $(srcdir)/insns.dat $(srcdir)/regs.dat \ + $(srcdir)/tokens.dat > tokhash.c + +# Assembler token metadata +tokens.h: insns.dat regs.dat tokens.dat tokhash.pl perllib/phash.ph + $(PERL) $(srcdir)/tokhash.pl h $(srcdir)/insns.dat $(srcdir)/regs.dat \ + $(srcdir)/tokens.dat > tokens.h + +# Preprocessor token hash +pptok.h: pptok.dat pptok.pl perllib/phash.ph + $(PERL) $(srcdir)/pptok.pl h $(srcdir)/pptok.dat pptok.h +pptok.c: pptok.dat pptok.pl perllib/phash.ph + $(PERL) $(srcdir)/pptok.pl c $(srcdir)/pptok.dat pptok.c + +# This target generates all files that require perl. +# This allows easier generation of distribution (see dist target). +PERLREQ = macros.c insnsb.c insnsa.c insnsd.c insnsi.h insnsn.c \ + regs.c regs.h regflags.c regdis.c regvals.c tokhash.c tokens.h \ + version.h version.mac pptok.h pptok.c +perlreq: $(PERLREQ) + +clean: + -del /f *.$(O) + -del /f *.s + -del /f *.i + -del /f output\*.$(O) + -del /f output\*.s + -del /f output\*.i + -del /f nasm$(X) + -del /f ndisasm$(X) + rem cd rdoff && $(MAKE) clean + +distclean: clean + -del /f config.h + -del /f config.log + -del /f config.status + -del /f Makefile + -del /f *~ + -del /f *.bak + -del /f *.lst + -del /f *.bin + -del /f output\*~ + -del /f output\*.bak + -del /f test\*.lst + -del /f test\*.bin + -del /f test\*.$(O) + -del /f test\*.bin + -del /f/s autom4te*.cache + rem cd rdoff && $(MAKE) distclean + +cleaner: clean + -del /f $(PERLREQ) + -del /f *.man + -del /f nasm.spec + rem cd doc && $(MAKE) clean + +spotless: distclean cleaner + -del /f doc\Makefile + -del doc\*~ + -del doc\*.bak + +strip: + +rdf: + # cd rdoff && $(MAKE) + +doc: + # cd doc && $(MAKE) all + +everything: all doc rdf + +#-- Magic hints to mkdep.pl --# +# @object-ending: ".$(O)" +# @path-separator: "/" +# @exclude: "config.h" +#-- Everything below is generated by mkdep.pl - do not edit --# +assemble.$(O): assemble.c assemble.h compiler.h directives.h insns.h \ + insnsi.h nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h tables.h \ + tokens.h +crc64.$(O): crc64.c compiler.h nasmlib.h +directives.$(O): directives.c compiler.h directives.h hashtbl.h insnsi.h \ + nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h +disasm.$(O): disasm.c compiler.h directives.h disasm.h insns.h insnsi.h \ + nasm.h nasmlib.h opflags.h pptok.h preproc.h regdis.h regs.h sync.h \ + tables.h tokens.h +eval.$(O): eval.c compiler.h directives.h eval.h float.h insnsi.h labels.h \ + nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h +exprlib.$(O): exprlib.c compiler.h directives.h insnsi.h nasm.h nasmlib.h \ + opflags.h pptok.h preproc.h regs.h +float.$(O): float.c compiler.h directives.h float.h insnsi.h nasm.h \ + nasmlib.h opflags.h pptok.h preproc.h regs.h +hashtbl.$(O): hashtbl.c compiler.h directives.h hashtbl.h insnsi.h nasm.h \ + nasmlib.h opflags.h pptok.h preproc.h regs.h +insnsa.$(O): insnsa.c compiler.h directives.h insns.h insnsi.h nasm.h \ + nasmlib.h opflags.h pptok.h preproc.h regs.h tokens.h +insnsb.$(O): insnsb.c compiler.h directives.h insns.h insnsi.h nasm.h \ + nasmlib.h opflags.h pptok.h preproc.h regs.h tokens.h +insnsd.$(O): insnsd.c compiler.h directives.h insns.h insnsi.h nasm.h \ + nasmlib.h opflags.h pptok.h preproc.h regs.h tokens.h +insnsn.$(O): insnsn.c compiler.h insnsi.h opflags.h tables.h +labels.$(O): labels.c compiler.h directives.h hashtbl.h insnsi.h nasm.h \ + nasmlib.h opflags.h pptok.h preproc.h regs.h +lib/snprintf.$(O): lib/snprintf.c compiler.h nasmlib.h +lib/strlcpy.$(O): lib/strlcpy.c compiler.h +lib/vsnprintf.$(O): lib/vsnprintf.c compiler.h nasmlib.h +listing.$(O): listing.c compiler.h directives.h insnsi.h listing.h nasm.h \ + nasmlib.h opflags.h pptok.h preproc.h regs.h +macros.$(O): macros.c compiler.h directives.h hashtbl.h insnsi.h nasm.h \ + nasmlib.h opflags.h output/outform.h pptok.h preproc.h regs.h tables.h +nasm.$(O): nasm.c assemble.h compiler.h directives.h eval.h float.h insns.h \ + insnsi.h labels.h listing.h nasm.h nasmlib.h opflags.h output/outform.h \ + parser.h pptok.h preproc.h raa.h regs.h saa.h stdscan.h tokens.h +nasmlib.$(O): nasmlib.c compiler.h directives.h insns.h insnsi.h nasm.h \ + nasmlib.h opflags.h pptok.h preproc.h regs.h tokens.h +ndisasm.$(O): ndisasm.c compiler.h directives.h disasm.h insns.h insnsi.h \ + nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h sync.h tokens.h +output/nulldbg.$(O): output/nulldbg.c compiler.h directives.h insnsi.h \ + nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h +output/nullout.$(O): output/nullout.c compiler.h directives.h insnsi.h \ + nasm.h nasmlib.h opflags.h output/outlib.h pptok.h preproc.h regs.h +output/outaout.$(O): output/outaout.c compiler.h directives.h eval.h \ + insnsi.h nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h \ + pptok.h preproc.h raa.h regs.h saa.h stdscan.h +output/outas86.$(O): output/outas86.c compiler.h directives.h insnsi.h \ + nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h pptok.h \ + preproc.h raa.h regs.h saa.h +output/outbin.$(O): output/outbin.c compiler.h directives.h eval.h insnsi.h \ + labels.h nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h \ + pptok.h preproc.h regs.h saa.h stdscan.h +output/outcoff.$(O): output/outcoff.c compiler.h directives.h eval.h \ + insnsi.h nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h \ + pptok.h preproc.h raa.h regs.h saa.h +output/outdbg.$(O): output/outdbg.c compiler.h directives.h insnsi.h nasm.h \ + nasmlib.h opflags.h output/outform.h pptok.h preproc.h regs.h +output/outelf.$(O): output/outelf.c compiler.h directives.h insnsi.h nasm.h \ + nasmlib.h opflags.h output/dwarf.h output/elf.h output/outelf.h \ + output/outform.h pptok.h preproc.h regs.h +output/outelf32.$(O): output/outelf32.c compiler.h directives.h eval.h \ + insnsi.h nasm.h nasmlib.h opflags.h output/dwarf.h output/elf.h \ + output/outelf.h output/outform.h output/outlib.h output/stabs.h pptok.h \ + preproc.h raa.h rbtree.h regs.h saa.h stdscan.h +output/outelf64.$(O): output/outelf64.c compiler.h directives.h eval.h \ + insnsi.h nasm.h nasmlib.h opflags.h output/dwarf.h output/elf.h \ + output/outelf.h output/outform.h output/outlib.h output/stabs.h pptok.h \ + preproc.h raa.h rbtree.h regs.h saa.h stdscan.h +output/outform.$(O): output/outform.c compiler.h directives.h insnsi.h \ + nasm.h nasmlib.h opflags.h output/outform.h pptok.h preproc.h regs.h +output/outieee.$(O): output/outieee.c compiler.h directives.h insnsi.h \ + nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h pptok.h \ + preproc.h regs.h +output/outlib.$(O): output/outlib.c compiler.h directives.h insnsi.h nasm.h \ + nasmlib.h opflags.h output/outlib.h pptok.h preproc.h regs.h +output/outmacho32.$(O): output/outmacho32.c compiler.h directives.h eval.h \ + insnsi.h nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h \ + pptok.h preproc.h raa.h regs.h saa.h +output/outmacho64.$(O): output/outmacho64.c compiler.h directives.h insnsi.h \ + nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h pptok.h \ + preproc.h raa.h regs.h saa.h +output/outobj.$(O): output/outobj.c compiler.h directives.h eval.h insnsi.h \ + nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h pptok.h \ + preproc.h regs.h stdscan.h +output/outrdf2.$(O): output/outrdf2.c compiler.h directives.h insnsi.h \ + nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h pptok.h \ + preproc.h rdoff/rdoff.h regs.h saa.h +parser.$(O): parser.c compiler.h directives.h eval.h float.h insns.h \ + insnsi.h nasm.h nasmlib.h opflags.h parser.h pptok.h preproc.h regs.h \ + stdscan.h tables.h tokens.h +pptok.$(O): pptok.c compiler.h hashtbl.h nasmlib.h pptok.h preproc.h +preproc.$(O): preproc.c compiler.h directives.h eval.h hashtbl.h insnsi.h \ + nasm.h nasmlib.h opflags.h pptok.h preproc.h quote.h regs.h stdscan.h \ + tables.h tokens.h +quote.$(O): quote.c compiler.h nasmlib.h quote.h +raa.$(O): raa.c compiler.h nasmlib.h raa.h +rbtree.$(O): rbtree.c compiler.h rbtree.h +regdis.$(O): regdis.c regdis.h regs.h +regflags.$(O): regflags.c compiler.h directives.h insnsi.h nasm.h nasmlib.h \ + opflags.h pptok.h preproc.h regs.h tables.h +regs.$(O): regs.c compiler.h insnsi.h opflags.h tables.h +regvals.$(O): regvals.c compiler.h insnsi.h opflags.h tables.h +saa.$(O): saa.c compiler.h nasmlib.h saa.h +stdscan.$(O): stdscan.c compiler.h directives.h insns.h insnsi.h nasm.h \ + nasmlib.h opflags.h pptok.h preproc.h quote.h regs.h stdscan.h tokens.h +strfunc.$(O): strfunc.c compiler.h directives.h insnsi.h nasm.h nasmlib.h \ + opflags.h pptok.h preproc.h regs.h +sync.$(O): sync.c compiler.h nasmlib.h sync.h +tokhash.$(O): tokhash.c compiler.h directives.h hashtbl.h insns.h insnsi.h \ + nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h tokens.h +ver.$(O): ver.c compiler.h directives.h insnsi.h nasm.h nasmlib.h opflags.h \ + pptok.h preproc.h regs.h version.h diff --git a/Mkfiles/netware.mak b/Mkfiles/netware.mak new file mode 100644 index 0000000..fbd19bf --- /dev/null +++ b/Mkfiles/netware.mak @@ -0,0 +1,235 @@ +# -*- makefile -*- GNU Makefile for NetWare target + +PROOT=. +OBJDIR=release + +-include $(OBJDIR)/version.mak + +TARGETS=nasm.nlm ndisasm.nlm + +PERL=perl + +CROSSPREFIX=i586-netware- + +CC=$(CROSSPREFIX)gcc +LD=$(CC) + +BINSUFFIX=.nlm + +VERSION=$(NASM_MAJOR_VER).$(NASM_MINOR_VER).$(NASM_SUBMINOR_VER) + +CFLAGS=-g -O2 -Wall -std=c99 -pedantic -D__NETWARE__ -D_POSIX_SOURCE -DHAVE_CONFIG_H -I. +LDFLAGS=-Wl,--nlm-description="NASM $(NASM_VER) - the Netwide Assembler (gcc build)" +LDFLAGS+=-Wl,--nlm-copyright="NASM is licensed under LGPL." +LDFLAGS+=-Wl,--nlm-version=$(VERSION) +LDFLAGS+=-Wl,--nlm-kernelspace +LDFLAGS+=-Wl,--nlm-posixflag +LDFLAGS+=-s + +O = o + +#-- Begin File Lists --# +# Edit in Makefile.in, not here! +NASM = nasm.o nasmlib.o ver.o \ + raa.o saa.o rbtree.o \ + float.o insnsa.o insnsb.o \ + directives.o \ + assemble.o labels.o hashtbl.o crc64.o parser.o \ + outform.o outlib.o nulldbg.o \ + nullout.o \ + outbin.o outaout.o outcoff.o \ + outelf.o outelf32.o outelf64.o \ + outobj.o outas86.o outrdf2.o \ + outdbg.o outieee.o outmacho32.o \ + outmacho64.o preproc.o quote.o pptok.o \ + macros.o listing.o eval.o exprlib.o stdscan.o \ + strfunc.o tokhash.o regvals.o regflags.o \ + strlcpy.o + +NDISASM = ndisasm.o disasm.o sync.o nasmlib.o ver.o \ + insnsd.o insnsb.o insnsn.o regs.o regdis.o +#-- End File Lists --# + +NASM_OBJ = $(addprefix $(OBJDIR)/,$(notdir $(NASM))) $(EOLIST) +NDIS_OBJ = $(addprefix $(OBJDIR)/,$(notdir $(NDISASM))) $(EOLIST) + +VPATH = *.c $(PROOT) $(PROOT)/output + + +all: $(OBJDIR) config.h $(TARGETS) + +$(OBJDIR)/%.o: %.c + $(CC) $(CFLAGS) -c -o $@ $< + +nasm$(BINSUFFIX): $(NASM_OBJ) + $(LD) $(LDFLAGS) -o $@ $^ + +ndisasm$(BINSUFFIX): $(NDIS_OBJ) + $(LD) $(LDFLAGS) -o $@ $^ + +$(OBJDIR): + @mkdir $@ + +config.h: $(PROOT)/Mkfiles/netware.mak + @echo Creating $@ + @echo $(DL)/* $@ for NetWare target.$(DL) > $@ + @echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@ + @echo $(DL)** All your changes will be lost!!$(DL) >> $@ + @echo $(DL)*/$(DL) >> $@ + @echo $(DL)#ifndef __NETWARE__$(DL) >> $@ + @echo $(DL)#error This $(notdir $@) is created for NetWare platform!$(DL) >> $@ + @echo $(DL)#endif$(DL) >> $@ + @echo $(DL)#define PACKAGE_VERSION "$(NASM_VER)"$(DL) >> $@ + @echo $(DL)#define OS "i586-pc-libc-NetWare"$(DL) >> $@ + @echo $(DL)#define HAVE_DECL_STRCASECMP 1$(DL) >> $@ + @echo $(DL)#define HAVE_DECL_STRICMP 1$(DL) >> $@ + @echo $(DL)#define HAVE_DECL_STRNCASECMP 1$(DL) >> $@ + @echo $(DL)#define HAVE_DECL_STRNICMP 1$(DL) >> $@ + @echo $(DL)#define HAVE_INTTYPES_H 1$(DL) >> $@ + @echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@ + @echo $(DL)#define HAVE_MEMORY_H 1$(DL) >> $@ + @echo $(DL)#define HAVE_SNPRINTF 1$(DL) >> $@ + @echo $(DL)#define HAVE_STDBOOL_H 1$(DL) >> $@ + @echo $(DL)#define HAVE_STDINT_H 1$(DL) >> $@ + @echo $(DL)#define HAVE_STDLIB_H 1$(DL) >> $@ + @echo $(DL)#define HAVE_STRCASECMP 1$(DL) >> $@ + @echo $(DL)#define HAVE_STRCSPN 1$(DL) >> $@ + @echo $(DL)#define HAVE_STRICMP 1$(DL) >> $@ + @echo $(DL)#define HAVE_STRINGS_H 1$(DL) >> $@ + @echo $(DL)#define HAVE_STRING_H 1$(DL) >> $@ + @echo $(DL)#define HAVE_STRNCASECMP 1$(DL) >> $@ + @echo $(DL)#define HAVE_STRNICMP 1$(DL) >> $@ + @echo $(DL)#define HAVE_STRSPN 1$(DL) >> $@ + @echo $(DL)#define HAVE_SYS_STAT_H 1$(DL) >> $@ + @echo $(DL)#define HAVE_SYS_TYPES_H 1$(DL) >> $@ + @echo $(DL)#define HAVE_UNISTD_H 1$(DL) >> $@ + @echo $(DL)#define HAVE_VSNPRINTF 1$(DL) >> $@ + @echo $(DL)#define STDC_HEADERS 1$(DL) >> $@ + @echo $(DL)#ifndef _GNU_SOURCE$(DL) >> $@ + @echo $(DL)#define _GNU_SOURCE 1$(DL) >> $@ + @echo $(DL)#endif$(DL) >> $@ + @echo $(DL)#define ldiv __CW_ldiv$(DL) >> $@ + +clean: + -$(RM) -r $(OBJDIR) + -$(RM) config.h + +distclean: clean + -$(RM) $(TARGETS) + +$(OBJDIR)/version.mak: $(PROOT)/version $(PROOT)/version.pl $(OBJDIR) + @$(PERL) $(PROOT)/version.pl make < $< > $@ + +#-- Magic hints to mkdep.pl --# +# @object-ending: ".o" +# @path-separator: "" +# @continuation: "\" +#-- Everything below is generated by mkdep.pl - do not edit --# +assemble.o: assemble.c assemble.h compiler.h config.h directives.h insns.h \ + insnsi.h nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h tables.h \ + tokens.h +crc64.o: crc64.c compiler.h config.h nasmlib.h +directives.o: directives.c compiler.h config.h directives.h hashtbl.h \ + insnsi.h nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h +disasm.o: disasm.c compiler.h config.h directives.h disasm.h insns.h \ + insnsi.h nasm.h nasmlib.h opflags.h pptok.h preproc.h regdis.h regs.h \ + sync.h tables.h tokens.h +eval.o: eval.c compiler.h config.h directives.h eval.h float.h insnsi.h \ + labels.h nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h +exprlib.o: exprlib.c compiler.h config.h directives.h insnsi.h nasm.h \ + nasmlib.h opflags.h pptok.h preproc.h regs.h +float.o: float.c compiler.h config.h directives.h float.h insnsi.h nasm.h \ + nasmlib.h opflags.h pptok.h preproc.h regs.h +hashtbl.o: hashtbl.c compiler.h config.h directives.h hashtbl.h insnsi.h \ + nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h +insnsa.o: insnsa.c compiler.h config.h directives.h insns.h insnsi.h nasm.h \ + nasmlib.h opflags.h pptok.h preproc.h regs.h tokens.h +insnsb.o: insnsb.c compiler.h config.h directives.h insns.h insnsi.h nasm.h \ + nasmlib.h opflags.h pptok.h preproc.h regs.h tokens.h +insnsd.o: insnsd.c compiler.h config.h directives.h insns.h insnsi.h nasm.h \ + nasmlib.h opflags.h pptok.h preproc.h regs.h tokens.h +insnsn.o: insnsn.c compiler.h config.h insnsi.h opflags.h tables.h +labels.o: labels.c compiler.h config.h directives.h hashtbl.h insnsi.h \ + nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h +snprintf.o: snprintf.c compiler.h config.h nasmlib.h +strlcpy.o: strlcpy.c compiler.h config.h +vsnprintf.o: vsnprintf.c compiler.h config.h nasmlib.h +listing.o: listing.c compiler.h config.h directives.h insnsi.h listing.h \ + nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h +macros.o: macros.c compiler.h config.h directives.h hashtbl.h insnsi.h \ + nasm.h nasmlib.h opflags.h outform.h pptok.h preproc.h regs.h tables.h +nasm.o: nasm.c assemble.h compiler.h config.h directives.h eval.h float.h \ + insns.h insnsi.h labels.h listing.h nasm.h nasmlib.h opflags.h outform.h \ + parser.h pptok.h preproc.h raa.h regs.h saa.h stdscan.h tokens.h +nasmlib.o: nasmlib.c compiler.h config.h directives.h insns.h insnsi.h \ + nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h tokens.h +ndisasm.o: ndisasm.c compiler.h config.h directives.h disasm.h insns.h \ + insnsi.h nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h sync.h \ + tokens.h +nulldbg.o: nulldbg.c compiler.h config.h directives.h insnsi.h nasm.h \ + nasmlib.h opflags.h pptok.h preproc.h regs.h +nullout.o: nullout.c compiler.h config.h directives.h insnsi.h nasm.h \ + nasmlib.h opflags.h outlib.h pptok.h preproc.h regs.h +outaout.o: outaout.c compiler.h config.h directives.h eval.h insnsi.h nasm.h \ + nasmlib.h opflags.h outform.h outlib.h pptok.h preproc.h raa.h regs.h saa.h \ + stdscan.h +outas86.o: outas86.c compiler.h config.h directives.h insnsi.h nasm.h \ + nasmlib.h opflags.h outform.h outlib.h pptok.h preproc.h raa.h regs.h saa.h +outbin.o: outbin.c compiler.h config.h directives.h eval.h insnsi.h labels.h \ + nasm.h nasmlib.h opflags.h outform.h outlib.h pptok.h preproc.h regs.h \ + saa.h stdscan.h +outcoff.o: outcoff.c compiler.h config.h directives.h eval.h insnsi.h nasm.h \ + nasmlib.h opflags.h outform.h outlib.h pptok.h preproc.h raa.h regs.h saa.h +outdbg.o: outdbg.c compiler.h config.h directives.h insnsi.h nasm.h \ + nasmlib.h opflags.h outform.h pptok.h preproc.h regs.h +outelf.o: outelf.c compiler.h config.h directives.h insnsi.h nasm.h \ + nasmlib.h opflags.h dwarf.h elf.h outelf.h outform.h pptok.h preproc.h \ + regs.h +outelf32.o: outelf32.c compiler.h config.h directives.h eval.h insnsi.h \ + nasm.h nasmlib.h opflags.h dwarf.h elf.h outelf.h outform.h outlib.h \ + stabs.h pptok.h preproc.h raa.h rbtree.h regs.h saa.h stdscan.h +outelf64.o: outelf64.c compiler.h config.h directives.h eval.h insnsi.h \ + nasm.h nasmlib.h opflags.h dwarf.h elf.h outelf.h outform.h outlib.h \ + stabs.h pptok.h preproc.h raa.h rbtree.h regs.h saa.h stdscan.h +outform.o: outform.c compiler.h config.h directives.h insnsi.h nasm.h \ + nasmlib.h opflags.h outform.h pptok.h preproc.h regs.h +outieee.o: outieee.c compiler.h config.h directives.h insnsi.h nasm.h \ + nasmlib.h opflags.h outform.h outlib.h pptok.h preproc.h regs.h +outlib.o: outlib.c compiler.h config.h directives.h insnsi.h nasm.h \ + nasmlib.h opflags.h outlib.h pptok.h preproc.h regs.h +outmacho32.o: outmacho32.c compiler.h config.h directives.h eval.h insnsi.h \ + nasm.h nasmlib.h opflags.h outform.h outlib.h pptok.h preproc.h raa.h \ + regs.h saa.h +outmacho64.o: outmacho64.c compiler.h config.h directives.h insnsi.h nasm.h \ + nasmlib.h opflags.h outform.h outlib.h pptok.h preproc.h raa.h regs.h saa.h +outobj.o: outobj.c compiler.h config.h directives.h eval.h insnsi.h nasm.h \ + nasmlib.h opflags.h outform.h outlib.h pptok.h preproc.h regs.h stdscan.h +outrdf2.o: outrdf2.c compiler.h config.h directives.h insnsi.h nasm.h \ + nasmlib.h opflags.h outform.h outlib.h pptok.h preproc.h rdoff.h regs.h \ + saa.h +parser.o: parser.c compiler.h config.h directives.h eval.h float.h insns.h \ + insnsi.h nasm.h nasmlib.h opflags.h parser.h pptok.h preproc.h regs.h \ + stdscan.h tables.h tokens.h +pptok.o: pptok.c compiler.h config.h hashtbl.h nasmlib.h pptok.h preproc.h +preproc.o: preproc.c compiler.h config.h directives.h eval.h hashtbl.h \ + insnsi.h nasm.h nasmlib.h opflags.h pptok.h preproc.h quote.h regs.h \ + stdscan.h tables.h tokens.h +quote.o: quote.c compiler.h config.h nasmlib.h quote.h +raa.o: raa.c compiler.h config.h nasmlib.h raa.h +rbtree.o: rbtree.c compiler.h config.h rbtree.h +regdis.o: regdis.c regdis.h regs.h +regflags.o: regflags.c compiler.h config.h directives.h insnsi.h nasm.h \ + nasmlib.h opflags.h pptok.h preproc.h regs.h tables.h +regs.o: regs.c compiler.h config.h insnsi.h opflags.h tables.h +regvals.o: regvals.c compiler.h config.h insnsi.h opflags.h tables.h +saa.o: saa.c compiler.h config.h nasmlib.h saa.h +stdscan.o: stdscan.c compiler.h config.h directives.h insns.h insnsi.h \ + nasm.h nasmlib.h opflags.h pptok.h preproc.h quote.h regs.h stdscan.h \ + tokens.h +strfunc.o: strfunc.c compiler.h config.h directives.h insnsi.h nasm.h \ + nasmlib.h opflags.h pptok.h preproc.h regs.h +sync.o: sync.c compiler.h config.h nasmlib.h sync.h +tokhash.o: tokhash.c compiler.h config.h directives.h hashtbl.h insns.h \ + insnsi.h nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h tokens.h +ver.o: ver.c compiler.h config.h directives.h insnsi.h nasm.h nasmlib.h \ + opflags.h pptok.h preproc.h regs.h version.h diff --git a/Mkfiles/openwcom.mak b/Mkfiles/openwcom.mak new file mode 100644 index 0000000..32a67c4 --- /dev/null +++ b/Mkfiles/openwcom.mak @@ -0,0 +1,329 @@ +# -*- makefile -*- +# +# Makefile for building NASM using OpenWatcom 1.7 +# building on a DOS/Win/OS2 platform host (backslashes +# used in pathnames) +# + +top_srcdir = . +srcdir = . +VPATH = .\output +prefix = C:\Program Files\NASM +exec_prefix = $(prefix) +bindir = $(prefix)\bin +mandir = $(prefix)\man + +CC = wcl386 +DEBUG = +CFLAGS = -6 -ox -wx -ze -fpi $(DEBUG) +BUILD_CFLAGS = $(CFLAGS) $(TARGET_FLAGS) # -I$(srcdir)/inttypes +INTERNAL_CFLAGS = -I$(srcdir) -I. -DHAVE_SNPRINTF -DHAVE_VSNPRINTF +ALL_CFLAGS = $(BUILD_CFLAGS) $(INTERNAL_CFLAGS) +LD = $(CC) +LDFLAGS = $(ALL_CFLAGS) +LIBS = +PERL = perl -I$(srcdir)/perllib + +STRIP = wstrip + +# Binary suffixes +O = obj +X = .exe + +# WMAKE errors out if a suffix is declared more than once, including +# its own built-in declarations. Thus, we need to explicitly clear the list +# first. Also, WMAKE only allows implicit rules that point "to the left" +# in this list! +.SUFFIXES: +.SUFFIXES: .man .1 .$(O) .i .c + +# Needed to find C files anywhere but in the current directory +.c : $(VPATH) + +.c.$(O): + $(CC) -c $(ALL_CFLAGS) -fo=$^@ $[@ + +# Note: wcl386 is broken if forward slashes are used as path separators. +#-- Begin File Lists --# +# Edit in Makefile.in, not here! +NASM = nasm.$(O) nasmlib.$(O) ver.$(O) & + raa.$(O) saa.$(O) rbtree.$(O) & + float.$(O) insnsa.$(O) insnsb.$(O) & + directives.$(O) & + assemble.$(O) labels.$(O) hashtbl.$(O) crc64.$(O) parser.$(O) & + output\outform.$(O) output\outlib.$(O) output\nulldbg.$(O) & + output\nullout.$(O) & + output\outbin.$(O) output\outaout.$(O) output\outcoff.$(O) & + output\outelf.$(O) output\outelf32.$(O) output\outelf64.$(O) & + output\outobj.$(O) output\outas86.$(O) output\outrdf2.$(O) & + output\outdbg.$(O) output\outieee.$(O) output\outmacho32.$(O) & + output\outmacho64.$(O) preproc.$(O) quote.$(O) pptok.$(O) & + macros.$(O) listing.$(O) eval.$(O) exprlib.$(O) stdscan.$(O) & + strfunc.$(O) tokhash.$(O) regvals.$(O) regflags.$(O) & + lib\strlcpy.$(O) + +NDISASM = ndisasm.$(O) disasm.$(O) sync.$(O) nasmlib.$(O) ver.$(O) & + insnsd.$(O) insnsb.$(O) insnsn.$(O) regs.$(O) regdis.$(O) +#-- End File Lists --# + +what: .SYMBOLIC + @echo Please build "dos", "win32" or "os2" + +dos: .SYMBOLIC + $(MAKE) /f $(__MAKEFILES__) all TARGET_FLAGS="-bt=DOS -l=DOS4G" + +win32: .SYMBOLIC + $(MAKE) /f $(__MAKEFILES__) all TARGET_FLAGS="-bt=NT -l=NT" + +os2: .SYMBOLIC + $(MAKE) /f $(__MAKEFILES__) all TARGET_FLAGS="-bt=OS2 -l=OS2V2" + +all: nasm$(X) ndisasm$(X) .SYMBOLIC + rem cd rdoff && $(MAKE) all + +nasm$(X): $(NASM) + $(LD) $(LDFLAGS) -fe=nasm$(X) $(NASM) $(LIBS) + +ndisasm$(X): $(NDISASM) + $(LD) $(LDFLAGS) -fe=ndisasm$(X) $(NDISASM) $(LIBS) + +# These source files are automagically generated from a single +# instruction-table file by a Perl script. They're distributed, +# though, so it isn't necessary to have Perl just to recompile NASM +# from the distribution. + +insnsb.c: insns.dat insns.pl + $(PERL) $(srcdir)/insns.pl -b $(srcdir)/insns.dat +insnsa.c: insns.dat insns.pl + $(PERL) $(srcdir)/insns.pl -a $(srcdir)/insns.dat +insnsd.c: insns.dat insns.pl + $(PERL) $(srcdir)/insns.pl -d $(srcdir)/insns.dat +insnsi.h: insns.dat insns.pl + $(PERL) $(srcdir)/insns.pl -i $(srcdir)/insns.dat +insnsn.c: insns.dat insns.pl + $(PERL) $(srcdir)/insns.pl -n $(srcdir)/insns.dat + +# These files contains all the standard macros that are derived from +# the version number. +version.h: version version.pl + $(PERL) $(srcdir)/version.pl h < $(srcdir)/version > version.h + +version.mac: version version.pl + $(PERL) $(srcdir)/version.pl mac < $(srcdir)/version > version.mac + +# This source file is generated from the standard macros file +# `standard.mac' by another Perl script. Again, it's part of the +# standard distribution. + +macros.c: macros.pl standard.mac version.mac + $(PERL) $(srcdir)/macros.pl $(srcdir)/standard.mac version.mac + +# These source files are generated from regs.dat by yet another +# perl script. +regs.c: regs.dat regs.pl + $(PERL) $(srcdir)/regs.pl c $(srcdir)/regs.dat > regs.c +regflags.c: regs.dat regs.pl + $(PERL) $(srcdir)/regs.pl fc $(srcdir)/regs.dat > regflags.c +regdis.c: regs.dat regs.pl + $(PERL) $(srcdir)/regs.pl dc $(srcdir)/regs.dat > regdis.c +regdis.h: regs.dat regs.pl + $(PERL) $(srcdir)/regs.pl dh $(srcdir)/regs.dat > regdis.h +regvals.c: regs.dat regs.pl + $(PERL) $(srcdir)/regs.pl vc $(srcdir)/regs.dat > regvals.c +regs.h: regs.dat regs.pl + $(PERL) $(srcdir)/regs.pl h $(srcdir)/regs.dat > regs.h + +# Assembler token hash +tokhash.c: insns.dat regs.dat tokens.dat tokhash.pl perllib/phash.ph + $(PERL) $(srcdir)/tokhash.pl c $(srcdir)/insns.dat $(srcdir)/regs.dat & + $(srcdir)/tokens.dat > tokhash.c + +# Assembler token metadata +tokens.h: insns.dat regs.dat tokens.dat tokhash.pl perllib/phash.ph + $(PERL) $(srcdir)/tokhash.pl h $(srcdir)/insns.dat $(srcdir)/regs.dat & + $(srcdir)/tokens.dat > tokens.h + +# Preprocessor token hash +pptok.h: pptok.dat pptok.pl perllib/phash.ph + $(PERL) $(srcdir)/pptok.pl h $(srcdir)/pptok.dat pptok.h +pptok.c: pptok.dat pptok.pl perllib/phash.ph + $(PERL) $(srcdir)/pptok.pl c $(srcdir)/pptok.dat pptok.c + +# This target generates all files that require perl. +# This allows easier generation of distribution (see dist target). +PERLREQ = macros.c insnsb.c insnsa.c insnsd.c insnsi.h insnsn.c & + regs.c regs.h regflags.c regdis.c regdis.h regvals.c & + tokhash.c tokens.h pptok.h pptok.c & + version.h version.mac +perlreq: $(PERLREQ) + +clean: .SYMBOLIC + -del /f *.$(O) + -del /f *.s + -del /f *.i + -del /f output\*.$(O) + -del /f output\*.s + -del /f output\*.i + -del /f nasm$(X) + -del /f ndisasm$(X) + rem cd rdoff && $(MAKE) clean + +distclean: clean .SYMBOLIC + -del /f config.h + -del /f config.log + -del /f config.status + -del /f Makefile + -del /f *~ + -del /f *.bak + -del /f *.lst + -del /f *.bin + -del /f output\*~ + -del /f output\*.bak + -del /f test\*.lst + -del /f test\*.bin + -del /f test\*.$(O) + -del /f test\*.bin + -del /f/s autom4te*.cache + rem cd rdoff && $(MAKE) distclean + +cleaner: clean .SYMBOLIC + -del /f $(PERLREQ) + -del /f *.man + -del /f nasm.spec + rem cd doc && $(MAKE) clean + +spotless: distclean cleaner .SYMBOLIC + -del /f doc\Makefile + -del doc\*~ + -del doc\*.bak + +strip: .SYMBOLIC + $(STRIP) *.exe + +rdf: + # cd rdoff && $(MAKE) + +doc: + # cd doc && $(MAKE) all + +everything: all doc rdf + +#-- Magic hints to mkdep.pl --# +# @object-ending: ".$(O)" +# @path-separator: "\" +# @exclude: "config.h" +# @continuation: "&" +#-- Everything below is generated by mkdep.pl - do not edit --# +assemble.$(O): assemble.c assemble.h compiler.h directives.h insns.h & + insnsi.h nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h tables.h & + tokens.h +crc64.$(O): crc64.c compiler.h nasmlib.h +directives.$(O): directives.c compiler.h directives.h hashtbl.h insnsi.h & + nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h +disasm.$(O): disasm.c compiler.h directives.h disasm.h insns.h insnsi.h & + nasm.h nasmlib.h opflags.h pptok.h preproc.h regdis.h regs.h sync.h & + tables.h tokens.h +eval.$(O): eval.c compiler.h directives.h eval.h float.h insnsi.h labels.h & + nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h +exprlib.$(O): exprlib.c compiler.h directives.h insnsi.h nasm.h nasmlib.h & + opflags.h pptok.h preproc.h regs.h +float.$(O): float.c compiler.h directives.h float.h insnsi.h nasm.h & + nasmlib.h opflags.h pptok.h preproc.h regs.h +hashtbl.$(O): hashtbl.c compiler.h directives.h hashtbl.h insnsi.h nasm.h & + nasmlib.h opflags.h pptok.h preproc.h regs.h +insnsa.$(O): insnsa.c compiler.h directives.h insns.h insnsi.h nasm.h & + nasmlib.h opflags.h pptok.h preproc.h regs.h tokens.h +insnsb.$(O): insnsb.c compiler.h directives.h insns.h insnsi.h nasm.h & + nasmlib.h opflags.h pptok.h preproc.h regs.h tokens.h +insnsd.$(O): insnsd.c compiler.h directives.h insns.h insnsi.h nasm.h & + nasmlib.h opflags.h pptok.h preproc.h regs.h tokens.h +insnsn.$(O): insnsn.c compiler.h insnsi.h opflags.h tables.h +labels.$(O): labels.c compiler.h directives.h hashtbl.h insnsi.h nasm.h & + nasmlib.h opflags.h pptok.h preproc.h regs.h +lib\snprintf.$(O): lib\snprintf.c compiler.h nasmlib.h +lib\strlcpy.$(O): lib\strlcpy.c compiler.h +lib\vsnprintf.$(O): lib\vsnprintf.c compiler.h nasmlib.h +listing.$(O): listing.c compiler.h directives.h insnsi.h listing.h nasm.h & + nasmlib.h opflags.h pptok.h preproc.h regs.h +macros.$(O): macros.c compiler.h directives.h hashtbl.h insnsi.h nasm.h & + nasmlib.h opflags.h output\outform.h pptok.h preproc.h regs.h tables.h +nasm.$(O): nasm.c assemble.h compiler.h directives.h eval.h float.h insns.h & + insnsi.h labels.h listing.h nasm.h nasmlib.h opflags.h output\outform.h & + parser.h pptok.h preproc.h raa.h regs.h saa.h stdscan.h tokens.h +nasmlib.$(O): nasmlib.c compiler.h directives.h insns.h insnsi.h nasm.h & + nasmlib.h opflags.h pptok.h preproc.h regs.h tokens.h +ndisasm.$(O): ndisasm.c compiler.h directives.h disasm.h insns.h insnsi.h & + nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h sync.h tokens.h +output\nulldbg.$(O): output\nulldbg.c compiler.h directives.h insnsi.h & + nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h +output\nullout.$(O): output\nullout.c compiler.h directives.h insnsi.h & + nasm.h nasmlib.h opflags.h output\outlib.h pptok.h preproc.h regs.h +output\outaout.$(O): output\outaout.c compiler.h directives.h eval.h & + insnsi.h nasm.h nasmlib.h opflags.h output\outform.h output\outlib.h & + pptok.h preproc.h raa.h regs.h saa.h stdscan.h +output\outas86.$(O): output\outas86.c compiler.h directives.h insnsi.h & + nasm.h nasmlib.h opflags.h output\outform.h output\outlib.h pptok.h & + preproc.h raa.h regs.h saa.h +output\outbin.$(O): output\outbin.c compiler.h directives.h eval.h insnsi.h & + labels.h nasm.h nasmlib.h opflags.h output\outform.h output\outlib.h & + pptok.h preproc.h regs.h saa.h stdscan.h +output\outcoff.$(O): output\outcoff.c compiler.h directives.h eval.h & + insnsi.h nasm.h nasmlib.h opflags.h output\outform.h output\outlib.h & + pptok.h preproc.h raa.h regs.h saa.h +output\outdbg.$(O): output\outdbg.c compiler.h directives.h insnsi.h nasm.h & + nasmlib.h opflags.h output\outform.h pptok.h preproc.h regs.h +output\outelf.$(O): output\outelf.c compiler.h directives.h insnsi.h nasm.h & + nasmlib.h opflags.h output\dwarf.h output\elf.h output\outelf.h & + output\outform.h pptok.h preproc.h regs.h +output\outelf32.$(O): output\outelf32.c compiler.h directives.h eval.h & + insnsi.h nasm.h nasmlib.h opflags.h output\dwarf.h output\elf.h & + output\outelf.h output\outform.h output\outlib.h output\stabs.h pptok.h & + preproc.h raa.h rbtree.h regs.h saa.h stdscan.h +output\outelf64.$(O): output\outelf64.c compiler.h directives.h eval.h & + insnsi.h nasm.h nasmlib.h opflags.h output\dwarf.h output\elf.h & + output\outelf.h output\outform.h output\outlib.h output\stabs.h pptok.h & + preproc.h raa.h rbtree.h regs.h saa.h stdscan.h +output\outform.$(O): output\outform.c compiler.h directives.h insnsi.h & + nasm.h nasmlib.h opflags.h output\outform.h pptok.h preproc.h regs.h +output\outieee.$(O): output\outieee.c compiler.h directives.h insnsi.h & + nasm.h nasmlib.h opflags.h output\outform.h output\outlib.h pptok.h & + preproc.h regs.h +output\outlib.$(O): output\outlib.c compiler.h directives.h insnsi.h nasm.h & + nasmlib.h opflags.h output\outlib.h pptok.h preproc.h regs.h +output\outmacho32.$(O): output\outmacho32.c compiler.h directives.h eval.h & + insnsi.h nasm.h nasmlib.h opflags.h output\outform.h output\outlib.h & + pptok.h preproc.h raa.h regs.h saa.h +output\outmacho64.$(O): output\outmacho64.c compiler.h directives.h insnsi.h & + nasm.h nasmlib.h opflags.h output\outform.h output\outlib.h pptok.h & + preproc.h raa.h regs.h saa.h +output\outobj.$(O): output\outobj.c compiler.h directives.h eval.h insnsi.h & + nasm.h nasmlib.h opflags.h output\outform.h output\outlib.h pptok.h & + preproc.h regs.h stdscan.h +output\outrdf2.$(O): output\outrdf2.c compiler.h directives.h insnsi.h & + nasm.h nasmlib.h opflags.h output\outform.h output\outlib.h pptok.h & + preproc.h rdoff\rdoff.h regs.h saa.h +parser.$(O): parser.c compiler.h directives.h eval.h float.h insns.h & + insnsi.h nasm.h nasmlib.h opflags.h parser.h pptok.h preproc.h regs.h & + stdscan.h tables.h tokens.h +pptok.$(O): pptok.c compiler.h hashtbl.h nasmlib.h pptok.h preproc.h +preproc.$(O): preproc.c compiler.h directives.h eval.h hashtbl.h insnsi.h & + nasm.h nasmlib.h opflags.h pptok.h preproc.h quote.h regs.h stdscan.h & + tables.h tokens.h +quote.$(O): quote.c compiler.h nasmlib.h quote.h +raa.$(O): raa.c compiler.h nasmlib.h raa.h +rbtree.$(O): rbtree.c compiler.h rbtree.h +regdis.$(O): regdis.c regdis.h regs.h +regflags.$(O): regflags.c compiler.h directives.h insnsi.h nasm.h nasmlib.h & + opflags.h pptok.h preproc.h regs.h tables.h +regs.$(O): regs.c compiler.h insnsi.h opflags.h tables.h +regvals.$(O): regvals.c compiler.h insnsi.h opflags.h tables.h +saa.$(O): saa.c compiler.h nasmlib.h saa.h +stdscan.$(O): stdscan.c compiler.h directives.h insns.h insnsi.h nasm.h & + nasmlib.h opflags.h pptok.h preproc.h quote.h regs.h stdscan.h tokens.h +strfunc.$(O): strfunc.c compiler.h directives.h insnsi.h nasm.h nasmlib.h & + opflags.h pptok.h preproc.h regs.h +sync.$(O): sync.c compiler.h nasmlib.h sync.h +tokhash.$(O): tokhash.c compiler.h directives.h hashtbl.h insns.h insnsi.h & + nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h tokens.h +ver.$(O): ver.c compiler.h directives.h insnsi.h nasm.h nasmlib.h opflags.h & + pptok.h preproc.h regs.h version.h diff --git a/Mkfiles/owlinux.mak b/Mkfiles/owlinux.mak new file mode 100644 index 0000000..a52a667 --- /dev/null +++ b/Mkfiles/owlinux.mak @@ -0,0 +1,339 @@ +# -*- makefile -*- +# +# Makefile for cross-compiling NASM from Linux +# to DOS, Win32 or OS/2 using OpenWatcom. +# +# Please see http://bugzilla.openwatcom.org/show_bug.cgi?id=751 +# for some caveats in using OpenWatcom as a cross-compiler +# from Linux, in particular: +# +# > Second and more importantly, the makefile needs to ensure that the +# > proper headers are included. This is normally not a problem when +# > building on DOS, Windows, or OS/2, as they share the same C +# > library headers. But when cross-compiling from (or to) Linux, it +# > is crucial. +# > +# > This may be accomplished by setting the INCLUDE env var in the +# > makefile, or setting OS2_INCLUDE, DOS_INCLUDE, NT_INCLUDE env vars +# > *and* making sure that the proper -bt switch is used, or passing a +# > switch like -I"$(%WATCOM)/h". The last variant is probably the +# > easiest to implement and least likely to break. +# + +top_srcdir = . +srcdir = . +prefix = C:/Program Files/NASM +exec_prefix = $(prefix) +bindir = $(prefix)/bin +mandir = $(prefix)/man + +CC = wcl386 +DEBUG = +CFLAGS = -6 -ox -wx -ze -fpi $(DEBUG) +BUILD_CFLAGS = $(CFLAGS) $(TARGET_FLAGS) # -I$(srcdir)/inttypes +INTERNAL_CFLAGS = -I$(srcdir) -I. \ + -DHAVE_SNPRINTF -DHAVE_VSNPRINTF +ALL_CFLAGS = $(BUILD_CFLAGS) $(INTERNAL_CFLAGS) +LD = $(CC) +LDFLAGS = $(ALL_CFLAGS) +LIBS = +PERL = perl -I$(srcdir)/perllib + +STRIP = wstrip + +# Binary suffixes +O = obj +X = .exe + +# WMAKE errors out if a suffix is declared more than once, including +# its own built-in declarations. Thus, we need to explicitly clear the list +# first. Also, WMAKE only allows implicit rules that point "to the left" +# in this list! +.SUFFIXES: +.SUFFIXES: .man .1 .$(O) .i .c + +.c.$(O): + $(CC) -c $(ALL_CFLAGS) -fo=$@ $< + +#-- Begin File Lists --# +# Edit in Makefile.in, not here! +NASM = nasm.$(O) nasmlib.$(O) ver.$(O) \ + raa.$(O) saa.$(O) rbtree.$(O) \ + float.$(O) insnsa.$(O) insnsb.$(O) \ + directives.$(O) \ + assemble.$(O) labels.$(O) hashtbl.$(O) crc64.$(O) parser.$(O) \ + output/outform.$(O) output/outlib.$(O) output/nulldbg.$(O) \ + output/nullout.$(O) \ + output/outbin.$(O) output/outaout.$(O) output/outcoff.$(O) \ + output/outelf.$(O) output/outelf32.$(O) output/outelf64.$(O) \ + output/outobj.$(O) output/outas86.$(O) output/outrdf2.$(O) \ + output/outdbg.$(O) output/outieee.$(O) output/outmacho32.$(O) \ + output/outmacho64.$(O) preproc.$(O) quote.$(O) pptok.$(O) \ + macros.$(O) listing.$(O) eval.$(O) exprlib.$(O) stdscan.$(O) \ + strfunc.$(O) tokhash.$(O) regvals.$(O) regflags.$(O) \ + lib/strlcpy.$(O) + +NDISASM = ndisasm.$(O) disasm.$(O) sync.$(O) nasmlib.$(O) ver.$(O) \ + insnsd.$(O) insnsb.$(O) insnsn.$(O) regs.$(O) regdis.$(O) +#-- End File Lists --# + +what: + @echo 'Please build "dos", "win32" or "os2"' + +dos: + $(MAKE) -f $(MAKEFILE_LIST) all TARGET_FLAGS='-bt=DOS -l=DOS4G' + +win32: + $(MAKE) -f $(MAKEFILE_LIST) all TARGET_FLAGS='-bt=NT -l=NT' + +os2: + $(MAKE) -f $(MAKEFILE_LIST) all TARGET_FLAGS='-bt=OS2 -l=OS2V2' + +all: nasm$(X) ndisasm$(X) + +nasm$(X): $(NASM) + $(LD) $(LDFLAGS) -fe=nasm$(X) $(NASM) $(LIBS) + +ndisasm$(X): $(NDISASM) + $(LD) $(LDFLAGS) -fe=ndisasm$(X) $(NDISASM) $(LIBS) + +# These source files are automagically generated from a single +# instruction-table file by a Perl script. They're distributed, +# though, so it isn't necessary to have Perl just to recompile NASM +# from the distribution. + +insnsb.c: insns.dat insns.pl + $(PERL) $(srcdir)/insns.pl -b $(srcdir)/insns.dat +insnsa.c: insns.dat insns.pl + $(PERL) $(srcdir)/insns.pl -a $(srcdir)/insns.dat +insnsd.c: insns.dat insns.pl + $(PERL) $(srcdir)/insns.pl -d $(srcdir)/insns.dat +insnsi.h: insns.dat insns.pl + $(PERL) $(srcdir)/insns.pl -i $(srcdir)/insns.dat +insnsn.c: insns.dat insns.pl + $(PERL) $(srcdir)/insns.pl -n $(srcdir)/insns.dat + +# These files contains all the standard macros that are derived from +# the version number. +version.h: version version.pl + $(PERL) $(srcdir)/version.pl h < $(srcdir)/version > version.h + +version.mac: version version.pl + $(PERL) $(srcdir)/version.pl mac < $(srcdir)/version > version.mac + +# This source file is generated from the standard macros file +# `standard.mac' by another Perl script. Again, it's part of the +# standard distribution. + +macros.c: macros.pl standard.mac version.mac + $(PERL) $(srcdir)/macros.pl $(srcdir)/standard.mac version.mac + +# These source files are generated from regs.dat by yet another +# perl script. +regs.c: regs.dat regs.pl + $(PERL) $(srcdir)/regs.pl c $(srcdir)/regs.dat > regs.c +regflags.c: regs.dat regs.pl + $(PERL) $(srcdir)/regs.pl fc $(srcdir)/regs.dat > regflags.c +regdis.c: regs.dat regs.pl + $(PERL) $(srcdir)/regs.pl dc $(srcdir)/regs.dat > regdis.c +regdis.h: regs.dat regs.pl + $(PERL) $(srcdir)/regs.pl dh $(srcdir)/regs.dat > regdis.h +regvals.c: regs.dat regs.pl + $(PERL) $(srcdir)/regs.pl vc $(srcdir)/regs.dat > regvals.c +regs.h: regs.dat regs.pl + $(PERL) $(srcdir)/regs.pl h $(srcdir)/regs.dat > regs.h + +# Assembler token hash +tokhash.c: insns.dat regs.dat tokens.dat tokhash.pl perllib/phash.ph + $(PERL) $(srcdir)/tokhash.pl c $(srcdir)/insns.dat $(srcdir)/regs.dat \ + $(srcdir)/tokens.dat > tokhash.c + +# Assembler token metadata +tokens.h: insns.dat regs.dat tokens.dat tokhash.pl perllib/phash.ph + $(PERL) $(srcdir)/tokhash.pl h $(srcdir)/insns.dat $(srcdir)/regs.dat \ + $(srcdir)/tokens.dat > tokens.h + +# Preprocessor token hash +pptok.h: pptok.dat pptok.pl perllib/phash.ph + $(PERL) $(srcdir)/pptok.pl h $(srcdir)/pptok.dat pptok.h +pptok.c: pptok.dat pptok.pl perllib/phash.ph + $(PERL) $(srcdir)/pptok.pl c $(srcdir)/pptok.dat pptok.c + +# This target generates all files that require perl. +# This allows easier generation of distribution (see dist target). +PERLREQ = macros.c insnsb.c insnsa.c insnsd.c insnsi.h insnsn.c \ + regs.c regs.h regflags.c regdis.c regdis.h regvals.c \ + tokhash.c tokens.h pptok.h pptok.c \ + version.h version.mac +perlreq: $(PERLREQ) + +clean: + -rm -f *.$(O) + -rm -f *.s + -rm -f *.i + -rm -f output/*.$(O) + -rm -f output/*.s + -rm -f output/*.i + -rm -f nasm$(X) + -rm -f ndisasm$(X) + # cd rdoff && $(MAKE) clean + +distclean: clean .SYMBOLIC + -rm -f config.h + -rm -f config.log + -rm -f config.status + -rm -f Makefile + -rm -f *~ + -rm -f *.bak + -rm -f *.lst + -rm -f *.bin + -rm -f output/*~ + -rm -f output/*.bak + -rm -f test/*.lst + -rm -f test/*.bin + -rm -f test/*.$(O) + -rm -f test/*.bin + -rm -f/s autom4te*.cache + # cd rdoff && $(MAKE) distclean + +cleaner: clean .SYMBOLIC + -rm -f $(PERLREQ) + -rm -f *.man + -rm -f nasm.spec + # cd doc && $(MAKE) clean + +spotless: distclean cleaner .SYMBOLIC + -rm -f doc/Makefile + -rm -f doc/*~ + -rm -f doc/*.bak + +strip: + $(STRIP) *.exe + +rdf: + # cd rdoff && $(MAKE) + +doc: + # cd doc && $(MAKE) all + +everything: all doc rdf + +#-- Magic hints to mkdep.pl --# +# @object-ending: ".$(O)" +# @path-separator: "/" +# @exclude: "config.h" +# @continuation: "\" +#-- Everything below is generated by mkdep.pl - do not edit --# +assemble.$(O): assemble.c assemble.h compiler.h directives.h insns.h \ + insnsi.h nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h tables.h \ + tokens.h +crc64.$(O): crc64.c compiler.h nasmlib.h +directives.$(O): directives.c compiler.h directives.h hashtbl.h insnsi.h \ + nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h +disasm.$(O): disasm.c compiler.h directives.h disasm.h insns.h insnsi.h \ + nasm.h nasmlib.h opflags.h pptok.h preproc.h regdis.h regs.h sync.h \ + tables.h tokens.h +eval.$(O): eval.c compiler.h directives.h eval.h float.h insnsi.h labels.h \ + nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h +exprlib.$(O): exprlib.c compiler.h directives.h insnsi.h nasm.h nasmlib.h \ + opflags.h pptok.h preproc.h regs.h +float.$(O): float.c compiler.h directives.h float.h insnsi.h nasm.h \ + nasmlib.h opflags.h pptok.h preproc.h regs.h +hashtbl.$(O): hashtbl.c compiler.h directives.h hashtbl.h insnsi.h nasm.h \ + nasmlib.h opflags.h pptok.h preproc.h regs.h +insnsa.$(O): insnsa.c compiler.h directives.h insns.h insnsi.h nasm.h \ + nasmlib.h opflags.h pptok.h preproc.h regs.h tokens.h +insnsb.$(O): insnsb.c compiler.h directives.h insns.h insnsi.h nasm.h \ + nasmlib.h opflags.h pptok.h preproc.h regs.h tokens.h +insnsd.$(O): insnsd.c compiler.h directives.h insns.h insnsi.h nasm.h \ + nasmlib.h opflags.h pptok.h preproc.h regs.h tokens.h +insnsn.$(O): insnsn.c compiler.h insnsi.h opflags.h tables.h +labels.$(O): labels.c compiler.h directives.h hashtbl.h insnsi.h nasm.h \ + nasmlib.h opflags.h pptok.h preproc.h regs.h +lib/snprintf.$(O): lib/snprintf.c compiler.h nasmlib.h +lib/strlcpy.$(O): lib/strlcpy.c compiler.h +lib/vsnprintf.$(O): lib/vsnprintf.c compiler.h nasmlib.h +listing.$(O): listing.c compiler.h directives.h insnsi.h listing.h nasm.h \ + nasmlib.h opflags.h pptok.h preproc.h regs.h +macros.$(O): macros.c compiler.h directives.h hashtbl.h insnsi.h nasm.h \ + nasmlib.h opflags.h output/outform.h pptok.h preproc.h regs.h tables.h +nasm.$(O): nasm.c assemble.h compiler.h directives.h eval.h float.h insns.h \ + insnsi.h labels.h listing.h nasm.h nasmlib.h opflags.h output/outform.h \ + parser.h pptok.h preproc.h raa.h regs.h saa.h stdscan.h tokens.h +nasmlib.$(O): nasmlib.c compiler.h directives.h insns.h insnsi.h nasm.h \ + nasmlib.h opflags.h pptok.h preproc.h regs.h tokens.h +ndisasm.$(O): ndisasm.c compiler.h directives.h disasm.h insns.h insnsi.h \ + nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h sync.h tokens.h +output/nulldbg.$(O): output/nulldbg.c compiler.h directives.h insnsi.h \ + nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h +output/nullout.$(O): output/nullout.c compiler.h directives.h insnsi.h \ + nasm.h nasmlib.h opflags.h output/outlib.h pptok.h preproc.h regs.h +output/outaout.$(O): output/outaout.c compiler.h directives.h eval.h \ + insnsi.h nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h \ + pptok.h preproc.h raa.h regs.h saa.h stdscan.h +output/outas86.$(O): output/outas86.c compiler.h directives.h insnsi.h \ + nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h pptok.h \ + preproc.h raa.h regs.h saa.h +output/outbin.$(O): output/outbin.c compiler.h directives.h eval.h insnsi.h \ + labels.h nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h \ + pptok.h preproc.h regs.h saa.h stdscan.h +output/outcoff.$(O): output/outcoff.c compiler.h directives.h eval.h \ + insnsi.h nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h \ + pptok.h preproc.h raa.h regs.h saa.h +output/outdbg.$(O): output/outdbg.c compiler.h directives.h insnsi.h nasm.h \ + nasmlib.h opflags.h output/outform.h pptok.h preproc.h regs.h +output/outelf.$(O): output/outelf.c compiler.h directives.h insnsi.h nasm.h \ + nasmlib.h opflags.h output/dwarf.h output/elf.h output/outelf.h \ + output/outform.h pptok.h preproc.h regs.h +output/outelf32.$(O): output/outelf32.c compiler.h directives.h eval.h \ + insnsi.h nasm.h nasmlib.h opflags.h output/dwarf.h output/elf.h \ + output/outelf.h output/outform.h output/outlib.h output/stabs.h pptok.h \ + preproc.h raa.h rbtree.h regs.h saa.h stdscan.h +output/outelf64.$(O): output/outelf64.c compiler.h directives.h eval.h \ + insnsi.h nasm.h nasmlib.h opflags.h output/dwarf.h output/elf.h \ + output/outelf.h output/outform.h output/outlib.h output/stabs.h pptok.h \ + preproc.h raa.h rbtree.h regs.h saa.h stdscan.h +output/outform.$(O): output/outform.c compiler.h directives.h insnsi.h \ + nasm.h nasmlib.h opflags.h output/outform.h pptok.h preproc.h regs.h +output/outieee.$(O): output/outieee.c compiler.h directives.h insnsi.h \ + nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h pptok.h \ + preproc.h regs.h +output/outlib.$(O): output/outlib.c compiler.h directives.h insnsi.h nasm.h \ + nasmlib.h opflags.h output/outlib.h pptok.h preproc.h regs.h +output/outmacho32.$(O): output/outmacho32.c compiler.h directives.h eval.h \ + insnsi.h nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h \ + pptok.h preproc.h raa.h regs.h saa.h +output/outmacho64.$(O): output/outmacho64.c compiler.h directives.h insnsi.h \ + nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h pptok.h \ + preproc.h raa.h regs.h saa.h +output/outobj.$(O): output/outobj.c compiler.h directives.h eval.h insnsi.h \ + nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h pptok.h \ + preproc.h regs.h stdscan.h +output/outrdf2.$(O): output/outrdf2.c compiler.h directives.h insnsi.h \ + nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h pptok.h \ + preproc.h rdoff/rdoff.h regs.h saa.h +parser.$(O): parser.c compiler.h directives.h eval.h float.h insns.h \ + insnsi.h nasm.h nasmlib.h opflags.h parser.h pptok.h preproc.h regs.h \ + stdscan.h tables.h tokens.h +pptok.$(O): pptok.c compiler.h hashtbl.h nasmlib.h pptok.h preproc.h +preproc.$(O): preproc.c compiler.h directives.h eval.h hashtbl.h insnsi.h \ + nasm.h nasmlib.h opflags.h pptok.h preproc.h quote.h regs.h stdscan.h \ + tables.h tokens.h +quote.$(O): quote.c compiler.h nasmlib.h quote.h +raa.$(O): raa.c compiler.h nasmlib.h raa.h +rbtree.$(O): rbtree.c compiler.h rbtree.h +regdis.$(O): regdis.c regdis.h regs.h +regflags.$(O): regflags.c compiler.h directives.h insnsi.h nasm.h nasmlib.h \ + opflags.h pptok.h preproc.h regs.h tables.h +regs.$(O): regs.c compiler.h insnsi.h opflags.h tables.h +regvals.$(O): regvals.c compiler.h insnsi.h opflags.h tables.h +saa.$(O): saa.c compiler.h nasmlib.h saa.h +stdscan.$(O): stdscan.c compiler.h directives.h insns.h insnsi.h nasm.h \ + nasmlib.h opflags.h pptok.h preproc.h quote.h regs.h stdscan.h tokens.h +strfunc.$(O): strfunc.c compiler.h directives.h insnsi.h nasm.h nasmlib.h \ + opflags.h pptok.h preproc.h regs.h +sync.$(O): sync.c compiler.h nasmlib.h sync.h +tokhash.$(O): tokhash.c compiler.h directives.h hashtbl.h insns.h insnsi.h \ + nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h tokens.h +ver.$(O): ver.c compiler.h directives.h insnsi.h nasm.h nasmlib.h opflags.h \ + pptok.h preproc.h regs.h version.h diff --git a/README b/README new file mode 100644 index 0000000..792b038 --- /dev/null +++ b/README @@ -0,0 +1,23 @@ + NASM, the Netwide Assembler. + +Many many developers all over the net respect NASM for what it is +- a widespread (thus netwide), portable (thus netwide!), very +flexible and mature assembler tool with support for many output +formats (thus netwide!!). + +Now we have good news for you: NASM is licensed under the "simplified" +(2-clause) BSD license. This means its development is open to even +wider society of programmers wishing to improve their lovely +assembler. + +The NASM project is now situated at SourceForge.net, the most +popular Open Source development site on the Internet. + +Visit our website at http://nasm.sourceforge.net/ and our +SourceForge project at http://sourceforge.net/projects/nasm/ + +See the file CHANGES for the description of changes between revisions, +and the file AUTHORS for a list of contributors. + + With best regards, + NASM crew. diff --git a/TODO b/TODO new file mode 100644 index 0000000..29a1b05 --- /dev/null +++ b/TODO @@ -0,0 +1,376 @@ +NASM TODO list +============== + +This, like the AUTHORS file, is intended for easy readability by both human +and machine, thus the format. + + F: feature + V: version you should expect it by + R: responsible person or - if unassigned + C: % complete + D: description + D: maybe on multiple lines + +Anything that doesn't start with /^[FVRCD]:/ should be ignored. + + F:-line triggers new entry. + Empty V,R,C assume: V: ?, R: -, C: 0% + +============= + +F: Extended x64 Support +D: Full FPU/MMX/SSE* instruction support for x64 + +F: ELF64 output format +D: Support for assembling code to the ELF64 output format + +F: NDISASM x64 Support +D: Ability to disassemble respective x64 code + +F: General x64 Support +V: 0.99.00 +R: Keith Kanios +C: 99% +D: Support for assembling 64-bit code to various output formats + +F: win64 (x86-64 COFF) output format +V: 0.99.00 +R: Keith Kanios +C: 99% +D: Support for assembling code to the win64 output format + +F: c99 data-type compliance +V: 0.99.00 +R: Keith Kanios +C: 99% +D: Revamped entire source-code base data-types for compliance +D: with c99 (inttypes.h) + +F: __BITS__ Standard Macro +V: 0.99.00 +R: Keith Kanios +C: 100% +D: __BITS__ standard macro that returns current [BITS XX] mode + +F: i18n via gettext +D: kkanios: be careful about that, stick to UTF-8 if anything + +F: Convert shallow code model to deep code model +D: Tired of messing between lots of unrelated files (especially .c/.h stuff) + +F: Automated dependency generation for Makefile +D: Current looks awful and will break if anything changes. + +F: Move output modules out*.c to output/ subdir +R: madfire +C: 100% + +== THESE ARE FROM old NASM's Wishlist +== THEY NEED SEVERE REVISING (seems they weren't updated for a couple of years or so) + +F: Check misc/ide.cfg into RCS as Watcom IDE enhancement thingy +V: 0.98 +D: (nop@dlc.fi) + +F: Package the Linux Assembler HOWTO +V: 0.98 + +F: 3DNow!, SSE and other extensions need documenting +V: 0.98 +D: hpa: Does it really make sense to have a whole instruction set +D: reference packaged with the assembler? +D: kkanios: Yes, for me it was a great help... and still is. + +F: prototypes of lrotate don't match in test/*. Fix. +V: 0.98 + +F: Build djgpp binaries for 0.98 onwards. Look into PMODE/W as a stub +V: 0.98 +D: it might be a lot better than CWSDPMI. It's in PMW133.ZIP. + +F: %undef operator that goes along with %define +V: ? +C: 100% + +F: Fix `%error' giving error messages twice. +V: 0.99 +D: Not especially important, as changes planned for 1.1x below will make +D: the preprocessor be only called once. + +F: Sort out problems with OBJ +V: 0.99 +D: * TLINK32 doesn't seem to like SEGDEF32 et al. So for that, we +D: should avoid xxx32 records wherever we can. +D: * However, didn't we change _to_ using xxx32 at some stage? Try +D: to remember why and when. +D: * Apparently Delphi's linker has trouble with two or more +D: globals being defined inside a PUBDEF32. Don't even know if it +D: _can_ cope with a PUBDEF16. +D: * Might need extra flags. *sigh* + +F: Symbol table output may possibly be useful. +V: 0.99 +D: Ken Martwick (kenm@efn.org) wants the following format: +D: labelname type offset(hex) repetition count +D: Possibly include xref addresses after repetition count? + +F: ELF fixes +V: 0.99 +D: There are various other bugs in outelf.c that make certain kinds +D: of relocation not work. See zbrown.asm. Looks like we may have to do +D: a major rewrite of parts of it. Compare some NASM code output with +D: equivalent GAS code output. Look at the ELF spec. Generally fix things. + +F: ELF fixes +V: 0.99 +D: NASM is currently using a kludge in ELF that involves defining +D: a symbol at a zero absolute offset. This isn't needed, as the +D: documented solution to the problem that this solves is to use +D: SHN_UNDEF. + +F: Debug information, in all formats it can be usefully done in. +V: 0.99 +D: * including line-number record support. +D: * "George C. Lindauer" +D: wants to have some say in how this goes through. +D: * Andrew Crabtree wants to help out. + +F: Think about a line-continuation character. +V: 0.99 + +F: Consider allowing declaration of two labels on the same line, +V: 0.99 +D: syntax 'label1[:] label2[:] ... instruction'. +D: Need to investigate feasibility. + +F: Quoting of quotes by doubling them, in string and char constants. +V: 0.99 + +F: Two-operand syntax for SEGMENT/SECTION macro to avoid warnings +D: of ignored section parameters on reissue of __SECT__. +D: Or maybe skip the warning if the given parameters are identical to +D: what was actually stored. Investigate. +V: 0.99 + +F: Apparently we are not missing a PSRAQ instruction, because it +D: doesn't exist. Check that it doesn't exist as an undocumented +D: instruction, or something stupid like that. +V: 0.99 + +F: Any assembled form starting 0x80 can also start 0x82. +V: 1.00 +D: ndisasm should know this. New special code in instruction encodings, probably. + +F: Pointing an EQU at an external symbol now generates an error. +V: 1.05 +D: There may be a better way of handling this; we should look into it. +D: Ideally, the label mechanism should be changed to cope with one +D: label being declared relative to another - that may work, but could be +D: a pain to implement (or is it? it may be easy enough that you just +D: need to declare a new offset in the same segment...) This should be done +D: before v1.0 is released. There is a comment regarding this in labels.c, +D: towards the end of the file, which discusses ways of fixing this. + +F: nested %rep used to cause a panic. +V: 1.10 +D: Now a more informative error message is produced. This problem whould +D: be fixed before v1.0. +D: See comment in switch() statement block for PP_REP in do_directive() +D: in preproc.c (line 1585, or thereabouts) + +F: Contribution +D: zgraeme.tar contains improved hash table routines +D: contributed by Graeme Defty for use in the +D: label manager. + +F: Contribution +D: zsyntax.zip contains a syntax-highlighting mode for +D: NASM, for use with the Aurora text editor (??). + +F: Contribution +D: zvim.zip contains a syntax-highlighting mode for NASM, for use with vim. + +F: Contribution +D: zkendal1.zip and zkendal2.zip contain Kendall +D: Bennett's () alternative syntax stuff, +D: providing an alternative syntax mode for NASM which allows a macro +D: set to be written that allows the same source files to be +D: assembled with NASM and TASM. +R: Kendall Bennett +C: 100% + +F: Add the UD2 instruction. +C: 100% + +F: Add the four instructions documented in 24368901.pdf (Intel's own document). +C: 100% + +F: Some means of avoiding MOV memoffs,EAX which apparently the +D: Pentium pairing detector thinks modifies EAX. Similar means of +D: choosing instruction encodings where necessary. +V: 1.10? + +F: The example of ..@ makes it clear that a ..@ label isn't just +D: local, but doesn't make it clear that it isn't just global either. + +F: hpa wants an evaluator operator for ceil(log2(x)). + +F: Extra reloc types in ELF +D: R_386_16 type 20, PC16 is 21, 8 is 22, PC8 is 23. +D: Add support for the 16s at least. + +F: Lazy section creation or selective section output +D: in COFF/win32 at least and probably other formats: don't bother to emit a section +D: if it contains no data. Particularly the default auto-created +D: section. We believe zero-length sections crash at least WLINK (in win32). + +F: Make the flags field in `struct itemplate' in insns.h a long instead of an int. +C: 100%? + +F: Implement %ifref to check whether a single-line macro has ever been expanded since (last re) definition. Or maybe not. We'll see. + +F: add pointer to \k{insLEAVE} and \k{insENTER} in chapters about mixed-language programming. + +F: Some equivalent to TASM's GLOBAL directive +D: ie something which defines a symbol as external if it doesn't end up being defined +D: but defines it as public if it does end up being defined. + +F: Documentation doesn't explain about C++ name mangling. + +F: see if BITS can be made to do anything sensible in obj (eg set the default new-segment property to Use32). + +F: OBJ: coalesce consecutive offset and segment fixups for the same location into full-32bit-pointer fixups. +D: This is apparently necessary because some twazzock in the PowerBASIC development +D: team didn't design to support the OMF spec the way the rest of the +D: world sees it. + +F: Allow % to be separated from the rest of a preproc directive, for alternative directive indentation styles. + +F: __DATE__, __TIME__, and text variants of __NASM_MAJOR__ and __NASM_MINOR__. + +F: Warn on TIMES combined with multi-line macros. +V: 1.00 +D: TIMES gets applied to first line only - should bring to users' attention. + +F: Re-work the evaluator, again, with a per-object-format fixup +D: routine, so as to be able to cope with section offsets "really" +D: being pure numbers; should be able to allow at _least_ the two +D: common idioms +D: TIMES 510-$ DB 0 ; bootsector +D: MOV AX,(PROG_END-100H)/16 ; .COM TSR +D: Would need to call the fixup throughout the evaluator, and the +D: fixup would have to be allowed to return UNKNOWN on pass one if it +D: had to. (_Always_ returning UNKNOWN on pass one, though a lovely +D: clean design, breaks the first of the above examples.) +V: 1.10 + +F: Preprocessor identifier concatenation? +V: 1.10 + +F: Arbitrary section names in `bin'. +V: 0.98.09 +D: Is this necessary? Is it even desirable? +D: hpa: Desirable, yes. Necessary? Probably not, but there are definitely cases where it becomes quite useful. +R: madfire +C: 100% + +F: Ability to read from a pipe. +V: 1.10 +D: Obviously not useful under dos, so memory problems with storing +D: entire input file aren't a problem either. + +F: File caching under DOS/32 bit... +V: 1.10? +D: maybe even implement discardable buffers that get thrown away +D: when we get a NULL returned from malloc(). Only really useful under +D: DOS. Think about it. + +F: possibly spool out the pre-processed stuff to a file, to avoid having to re-process it. +V: 1.10? +D: Possible problems with preprocessor values not known on pass 1? Have a look... + +F: Or maybe we can spool out a pre-parsed version...? +V: 1.10 +D: Need to investigate feasibility. Does the results from the parser +D: change from pass 1 to pass 2? Would it be feasible to alter it so that +D: the parser returns an invariant result, and this is then processed +D: afterwards to resolve label references, etc? + +F: Subsection support? + +F: A good ALIGN mechanism, similar to GAS's. +V: 0.98p1 +D: GAS pads out space by means of the following (32-bit) instructions: +D: 8DB42600000000 lea esi,[esi+0x0] +D: 8DB600000000 lea esi,[esi+0x0] +D: 8D742600 lea esi,[esi+0x0] +D: 8D7600 lea esi,[esi+0x0] +D: 8D36 lea esi,[esi] +D: 90 nop +D: It uses up to two of these instructions to do up to 14-byte pads; +D: when more than 14 bytes are needed, it issues a (short) jump to +D: the end of the padded section and then NOPs the rest. Come up with +D: a similar scheme for 16 bit mode, and also come up with a way to +D: use it - internal to the assembler, so that programs using ALIGN +D: don't knock over preprocess-only mode. +D: Also re-work the macro form so that when given one argument in a +D: code section it calls this feature. +R: Panos Minos +C: 100%? + +F: Possibly a means whereby FP constants can be specified as immediate operands to non-FP instructions. +D: * Possible syntax: MOV EAX,FLOAT 1.2 to get a single-precision FP +D: constant. Then maybe MOV EAX,HI_FLOAT 1.2 and MOV EAX,LO_FLOAT +D: 1.2 to get the two halves of a double-precision one. Best to +D: ignore extended-precision in case it bites. +D: * Alternatively, maybe MOV EAX,FLOAT(4,0-4,1.2) to get bytes 0-4 +D: (ie 0-3) of a 4-byte constant. Then HI_FLOAT is FLOAT(8,4-8,x) +D: and LO_FLOAT is FLOAT(8,0-4,x). But this version allows two-byte +D: chunks, one-byte chunks, even stranger chunks, and pieces of +D: ten-byte reals to be bandied around as well. + +F: A UNION macro might be quite cool +D: now that ABSOLUTE is sane enough to be able to handle it. + +F: An equivalent to gcc's ## stringify operator, plus string concatenation +D: somehow implemented without undue ugliness, so as +D: to be able to do `%include "/my/path/%1"' in a macro, or something +D: similar... + +F: Actually _do_ something with the processor, privileged and +D: undocumented flags in the instruction table. When this happens, +D: consider allowing PMULHRW to map to either of the Cyrix or AMD +D: versions? +D: hpa: The -p option to ndisasm now uses this to some extent. +V: 1.10 + +F: Maybe NEC V20/V30 instructions? ? +D: hpa: What are they? Should be trivial to implement. + +F: Yet more object formats. +D: * Possibly direct support for .EXE files? +V: 1.10 + +F: Symbol map in binary format. Format-specific options... +V: 1.10? + +F: REDESIGN: Think about EQU dependency, and about start-point specification in OBJ. Possibly re-think directive support. +V: 1.20? + +F: Think about a wrapper program like gcc? +V: 2.00? +D: Possibly invent a _patch_ for gcc so that it can take .asm files on the command line? +D: If a wrapper happens, think about adding an option to cause the +D: resulting executable file to be executed immediately, thus +D: allowing NASM source files to have #!... (probably silly) + +F: Multi-platform support? +D: If so: definitely Alpha; possibly Java byte code; +D: probably ARM/StrongARM; maybe Sparc; maybe Mips; maybe +D: Vax. Perhaps Z80 and 6502, just for a laugh? + +F: Consider a 'verbose' option that prints information about the resulting object file onto stdout. + +F: Line numbers in the .lst file don't match the line numbers in the input. +D: They probably should, rather than the current matching of the post-preprocessor line numbers. + diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 0000000..5159c11 --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,39 @@ +dnl -------------------------------------------------------------------------- +dnl PA_ADD_CFLAGS() +dnl +dnl Attempt to add the given option to CFLAGS, if it doesn't break compilation +dnl -------------------------------------------------------------------------- +AC_DEFUN(PA_ADD_CFLAGS, +[AC_MSG_CHECKING([if $CC accepts $1]) + pa_add_cflags__old_cflags="$CFLAGS" + CFLAGS="$CFLAGS $1" + AC_TRY_LINK([#include ], + [printf("Hello, World!\n");], + AC_MSG_RESULT([yes]), + AC_MSG_RESULT([no]) + CFLAGS="$pa_add_cflags__old_cflags")]) + +dnl -------------------------------------------------------------------------- +dnl PA_WORKING_STDBOOL +dnl +dnl See if we have a working and bool support; in particular, +dnl OpenWatcom 1.8 has a broken _Bool type that we don't want to use. +dnl -------------------------------------------------------------------------- +AC_DEFUN(PA_WORKING_BOOL, +[AC_MSG_CHECKING([if $CC has a working bool type]) + AC_COMPILE_IFELSE( + [ +#ifndef __cplusplus +#include +#endif +int foo(bool x, int y) +{ + return x+y; +} + ], + [AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_WORKING_BOOL, 1, + [Define to 1 if your compiler has a correct implementation of bool])], + [AC_MSG_RESULT([no])]) +]) + diff --git a/assemble.c b/assemble.c new file mode 100644 index 0000000..81476db --- /dev/null +++ b/assemble.c @@ -0,0 +1,2603 @@ +/* ----------------------------------------------------------------------- * + * + * Copyright 1996-2009 The NASM Authors - All Rights Reserved + * See the file AUTHORS included with the NASM distribution for + * the specific copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following + * conditions are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ----------------------------------------------------------------------- */ + +/* + * assemble.c code generation for the Netwide Assembler + * + * the actual codes (C syntax, i.e. octal): + * \0 - terminates the code. (Unless it's a literal of course.) + * \1..\4 - that many literal bytes follow in the code stream + * \5 - add 4 to the primary operand number (b, low octdigit) + * \6 - add 4 to the secondary operand number (a, middle octdigit) + * \7 - add 4 to both the primary and the secondary operand number + * \10..\13 - a literal byte follows in the code stream, to be added + * to the register value of operand 0..3 + * \14..\17 - a signed byte immediate operand, from operand 0..3 + * \20..\23 - a byte immediate operand, from operand 0..3 + * \24..\27 - an unsigned byte immediate operand, from operand 0..3 + * \30..\33 - a word immediate operand, from operand 0..3 + * \34..\37 - select between \3[0-3] and \4[0-3] depending on 16/32 bit + * assembly mode or the operand-size override on the operand + * \40..\43 - a long immediate operand, from operand 0..3 + * \44..\47 - select between \3[0-3], \4[0-3] and \5[4-7] + * depending on the address size of the instruction. + * \50..\53 - a byte relative operand, from operand 0..3 + * \54..\57 - a qword immediate operand, from operand 0..3 + * \60..\63 - a word relative operand, from operand 0..3 + * \64..\67 - select between \6[0-3] and \7[0-3] depending on 16/32 bit + * assembly mode or the operand-size override on the operand + * \70..\73 - a long relative operand, from operand 0..3 + * \74..\77 - a word constant, from the _segment_ part of operand 0..3 + * \1ab - a ModRM, calculated on EA in operand a, with the spare + * field the register value of operand b. + * \140..\143 - an immediate word or signed byte for operand 0..3 + * \144..\147 - or 2 (s-field) into opcode byte if operand 0..3 + * is a signed byte rather than a word. Opcode byte follows. + * \150..\153 - an immediate dword or signed byte for operand 0..3 + * \154..\157 - or 2 (s-field) into opcode byte if operand 0..3 + * is a signed byte rather than a dword. Opcode byte follows. + * \160..\163 - this instruction uses DREX rather than REX, with the + * OC0 field set to 0, and the dest field taken from + * operand 0..3. + * \164..\167 - this instruction uses DREX rather than REX, with the + * OC0 field set to 1, and the dest field taken from + * operand 0..3. + * \171 - placement of DREX suffix in the absence of an EA + * \172\ab - the register number from operand a in bits 7..4, with + * the 4-bit immediate from operand b in bits 3..0. + * \173\xab - the register number from operand a in bits 7..4, with + * the value b in bits 3..0. + * \174\a - the register number from operand a in bits 7..4, and + * an arbitrary value in bits 3..0 (assembled as zero.) + * \2ab - a ModRM, calculated on EA in operand a, with the spare + * field equal to digit b. + * \250..\253 - same as \150..\153, except warn if the 64-bit operand + * is not equal to the truncated and sign-extended 32-bit + * operand; used for 32-bit immediates in 64-bit mode. + * \254..\257 - a signed 32-bit operand to be extended to 64 bits. + * \260..\263 - this instruction uses VEX/XOP rather than REX, with the + * V field taken from operand 0..3. + * \270 - this instruction uses VEX/XOP rather than REX, with the + * V field set to 1111b. + * + * VEX/XOP prefixes are followed by the sequence: + * \tmm\wlp where mm is the M field; and wlp is: + * 00 0ww lpp + * [w0] ww = 0 for W = 0 + * [w1] ww = 1 for W = 1 + * [wx] ww = 2 for W don't care (always assembled as 0) + * [ww] ww = 3 for W used as REX.W + * + * t = 0 for VEX (C4/C5), t = 1 for XOP (8F). + * + * \274..\277 - a signed byte immediate operand, from operand 0..3, + * which is to be extended to the operand size. + * \310 - indicates fixed 16-bit address size, i.e. optional 0x67. + * \311 - indicates fixed 32-bit address size, i.e. optional 0x67. + * \312 - (disassembler only) invalid with non-default address size. + * \313 - indicates fixed 64-bit address size, 0x67 invalid. + * \314 - (disassembler only) invalid with REX.B + * \315 - (disassembler only) invalid with REX.X + * \316 - (disassembler only) invalid with REX.R + * \317 - (disassembler only) invalid with REX.W + * \320 - indicates fixed 16-bit operand size, i.e. optional 0x66. + * \321 - indicates fixed 32-bit operand size, i.e. optional 0x66. + * \322 - indicates that this instruction is only valid when the + * operand size is the default (instruction to disassembler, + * generates no code in the assembler) + * \323 - indicates fixed 64-bit operand size, REX on extensions only. + * \324 - indicates 64-bit operand size requiring REX prefix. + * \325 - instruction which always uses spl/bpl/sil/dil + * \330 - a literal byte follows in the code stream, to be added + * to the condition code value of the instruction. + * \331 - instruction not valid with REP prefix. Hint for + * disassembler only; for SSE instructions. + * \332 - REP prefix (0xF2 byte) used as opcode extension. + * \333 - REP prefix (0xF3 byte) used as opcode extension. + * \334 - LOCK prefix used as REX.R (used in non-64-bit mode) + * \335 - disassemble a rep (0xF3 byte) prefix as repe not rep. + * \336 - force a REP(E) prefix (0xF2) even if not specified. + * \337 - force a REPNE prefix (0xF3) even if not specified. + * \336-\337 are still listed as prefixes in the disassembler. + * \340 - reserve bytes of uninitialized storage. + * Operand 0 had better be a segmentless constant. + * \341 - this instruction needs a WAIT "prefix" + * \344,\345 - the PUSH/POP (respectively) codes for CS, DS, ES, SS + * (POP is never used for CS) depending on operand 0 + * \346,\347 - the second byte of PUSH/POP codes for FS, GS, depending + * on operand 0 + * \360 - no SSE prefix (== \364\331) + * \361 - 66 SSE prefix (== \366\331) + * \362 - F2 SSE prefix (== \364\332) + * \363 - F3 SSE prefix (== \364\333) + * \364 - operand-size prefix (0x66) not permitted + * \365 - address-size prefix (0x67) not permitted + * \366 - operand-size prefix (0x66) used as opcode extension + * \367 - address-size prefix (0x67) used as opcode extension + * \370,\371,\372 - match only if operand 0 meets byte jump criteria. + * 370 is used for Jcc, 371 is used for JMP. + * \373 - assemble 0x03 if bits==16, 0x05 if bits==32; + * used for conditional jump over longer jump + */ + +#include "compiler.h" + +#include +#include +#include + +#include "nasm.h" +#include "nasmlib.h" +#include "assemble.h" +#include "insns.h" +#include "tables.h" + +enum match_result { + /* + * Matching errors. These should be sorted so that more specific + * errors come later in the sequence. + */ + MERR_INVALOP, + MERR_OPSIZEMISSING, + MERR_OPSIZEMISMATCH, + MERR_BADCPU, + MERR_BADMODE, + /* + * Matching success; the conditional ones first + */ + MOK_JUMP, /* Matching OK but needs jmp_match() */ + MOK_GOOD /* Matching unconditionally OK */ +}; + +typedef struct { + int sib_present; /* is a SIB byte necessary? */ + int bytes; /* # of bytes of offset needed */ + int size; /* lazy - this is sib+bytes+1 */ + uint8_t modrm, sib, rex, rip; /* the bytes themselves */ +} ea; + +static uint32_t cpu; /* cpu level received from nasm.c */ +static efunc errfunc; +static struct ofmt *outfmt; +static ListGen *list; + +static int64_t calcsize(int32_t, int64_t, int, insn *, const uint8_t *); +static void gencode(int32_t segment, int64_t offset, int bits, + insn * ins, const struct itemplate *temp, + int64_t insn_end); +static enum match_result find_match(const struct itemplate **tempp, + insn *instruction, + int32_t segment, int64_t offset, int bits); +static enum match_result matches(const struct itemplate *, insn *, int bits); +static opflags_t regflag(const operand *); +static int32_t regval(const operand *); +static int rexflags(int, opflags_t, int); +static int op_rexflags(const operand *, int); +static ea *process_ea(operand *, ea *, int, int, int, opflags_t); +static void add_asp(insn *, int); + +static int has_prefix(insn * ins, enum prefix_pos pos, enum prefixes prefix) +{ + return ins->prefixes[pos] == prefix; +} + +static void assert_no_prefix(insn * ins, enum prefix_pos pos) +{ + if (ins->prefixes[pos]) + errfunc(ERR_NONFATAL, "invalid %s prefix", + prefix_name(ins->prefixes[pos])); +} + +static const char *size_name(int size) +{ + switch (size) { + case 1: + return "byte"; + case 2: + return "word"; + case 4: + return "dword"; + case 8: + return "qword"; + case 10: + return "tword"; + case 16: + return "oword"; + case 32: + return "yword"; + default: + return "???"; + } +} + +static void warn_overflow(int pass, int size) +{ + errfunc(ERR_WARNING | pass | ERR_WARN_NOV, + "%s data exceeds bounds", size_name(size)); +} + +static void warn_overflow_const(int64_t data, int size) +{ + if (overflow_general(data, size)) + warn_overflow(ERR_PASS1, size); +} + +static void warn_overflow_opd(const struct operand *o, int size) +{ + if (size < 8 && o->wrt == NO_SEG && o->segment == NO_SEG) { + if (overflow_general(o->offset, size)) + warn_overflow(ERR_PASS2, size); + } +} + +/* + * This routine wrappers the real output format's output routine, + * in order to pass a copy of the data off to the listing file + * generator at the same time. + */ +static void out(int64_t offset, int32_t segto, const void *data, + enum out_type type, uint64_t size, + int32_t segment, int32_t wrt) +{ + static int32_t lineno = 0; /* static!!! */ + static char *lnfname = NULL; + uint8_t p[8]; + + if (type == OUT_ADDRESS && segment == NO_SEG && wrt == NO_SEG) { + /* + * This is a non-relocated address, and we're going to + * convert it into RAWDATA format. + */ + uint8_t *q = p; + + if (size > 8) { + errfunc(ERR_PANIC, "OUT_ADDRESS with size > 8"); + return; + } + + WRITEADDR(q, *(int64_t *)data, size); + data = p; + type = OUT_RAWDATA; + } + + list->output(offset, data, type, size); + + /* + * this call to src_get determines when we call the + * debug-format-specific "linenum" function + * it updates lineno and lnfname to the current values + * returning 0 if "same as last time", -2 if lnfname + * changed, and the amount by which lineno changed, + * if it did. thus, these variables must be static + */ + + if (src_get(&lineno, &lnfname)) { + outfmt->current_dfmt->linenum(lnfname, lineno, segto); + } + + outfmt->output(segto, data, type, size, segment, wrt); +} + +static bool jmp_match(int32_t segment, int64_t offset, int bits, + insn * ins, const uint8_t *code) +{ + int64_t isize; + uint8_t c = code[0]; + + if ((c != 0370 && c != 0371) || (ins->oprs[0].type & STRICT)) + return false; + if (!optimizing) + return false; + if (optimizing < 0 && c == 0371) + return false; + + isize = calcsize(segment, offset, bits, ins, code); + + if (ins->oprs[0].opflags & OPFLAG_UNKNOWN) + /* Be optimistic in pass 1 */ + return true; + + if (ins->oprs[0].segment != segment) + return false; + + isize = ins->oprs[0].offset - offset - isize; /* isize is delta */ + return (isize >= -128 && isize <= 127); /* is it byte size? */ +} + +int64_t assemble(int32_t segment, int64_t offset, int bits, uint32_t cp, + insn * instruction, struct ofmt *output, efunc error, + ListGen * listgen) +{ + const struct itemplate *temp; + int j; + enum match_result m; + int64_t insn_end; + int32_t itimes; + int64_t start = offset; + int64_t wsize; /* size for DB etc. */ + + errfunc = error; /* to pass to other functions */ + cpu = cp; + outfmt = output; /* likewise */ + list = listgen; /* and again */ + + wsize = idata_bytes(instruction->opcode); + if (wsize == -1) + return 0; + + if (wsize) { + extop *e; + int32_t t = instruction->times; + if (t < 0) + errfunc(ERR_PANIC, + "instruction->times < 0 (%ld) in assemble()", t); + + while (t--) { /* repeat TIMES times */ + list_for_each(e, instruction->eops) { + if (e->type == EOT_DB_NUMBER) { + if (wsize == 1) { + if (e->segment != NO_SEG) + errfunc(ERR_NONFATAL, + "one-byte relocation attempted"); + else { + uint8_t out_byte = e->offset; + out(offset, segment, &out_byte, + OUT_RAWDATA, 1, NO_SEG, NO_SEG); + } + } else if (wsize > 8) { + errfunc(ERR_NONFATAL, + "integer supplied to a DT, DO or DY" + " instruction"); + } else + out(offset, segment, &e->offset, + OUT_ADDRESS, wsize, e->segment, e->wrt); + offset += wsize; + } else if (e->type == EOT_DB_STRING || + e->type == EOT_DB_STRING_FREE) { + int align; + + out(offset, segment, e->stringval, + OUT_RAWDATA, e->stringlen, NO_SEG, NO_SEG); + align = e->stringlen % wsize; + + if (align) { + align = wsize - align; + out(offset, segment, zero_buffer, + OUT_RAWDATA, align, NO_SEG, NO_SEG); + } + offset += e->stringlen + align; + } + } + if (t > 0 && t == instruction->times - 1) { + /* + * Dummy call to list->output to give the offset to the + * listing module. + */ + list->output(offset, NULL, OUT_RAWDATA, 0); + list->uplevel(LIST_TIMES); + } + } + if (instruction->times > 1) + list->downlevel(LIST_TIMES); + return offset - start; + } + + if (instruction->opcode == I_INCBIN) { + const char *fname = instruction->eops->stringval; + FILE *fp; + + fp = fopen(fname, "rb"); + if (!fp) { + error(ERR_NONFATAL, "`incbin': unable to open file `%s'", + fname); + } else if (fseek(fp, 0L, SEEK_END) < 0) { + error(ERR_NONFATAL, "`incbin': unable to seek on file `%s'", + fname); + } else { + static char buf[4096]; + size_t t = instruction->times; + size_t base = 0; + size_t len; + + len = ftell(fp); + if (instruction->eops->next) { + base = instruction->eops->next->offset; + len -= base; + if (instruction->eops->next->next && + len > (size_t)instruction->eops->next->next->offset) + len = (size_t)instruction->eops->next->next->offset; + } + /* + * Dummy call to list->output to give the offset to the + * listing module. + */ + list->output(offset, NULL, OUT_RAWDATA, 0); + list->uplevel(LIST_INCBIN); + while (t--) { + size_t l; + + fseek(fp, base, SEEK_SET); + l = len; + while (l > 0) { + int32_t m; + m = fread(buf, 1, l > sizeof(buf) ? sizeof(buf) : l, fp); + if (!m) { + /* + * This shouldn't happen unless the file + * actually changes while we are reading + * it. + */ + error(ERR_NONFATAL, + "`incbin': unexpected EOF while" + " reading file `%s'", fname); + t = 0; /* Try to exit cleanly */ + break; + } + out(offset, segment, buf, OUT_RAWDATA, m, + NO_SEG, NO_SEG); + l -= m; + } + } + list->downlevel(LIST_INCBIN); + if (instruction->times > 1) { + /* + * Dummy call to list->output to give the offset to the + * listing module. + */ + list->output(offset, NULL, OUT_RAWDATA, 0); + list->uplevel(LIST_TIMES); + list->downlevel(LIST_TIMES); + } + fclose(fp); + return instruction->times * len; + } + return 0; /* if we're here, there's an error */ + } + + /* Check to see if we need an address-size prefix */ + add_asp(instruction, bits); + + m = find_match(&temp, instruction, segment, offset, bits); + + if (m == MOK_GOOD) { + /* Matches! */ + int64_t insn_size = calcsize(segment, offset, bits, + instruction, temp->code); + itimes = instruction->times; + if (insn_size < 0) /* shouldn't be, on pass two */ + error(ERR_PANIC, "errors made it through from pass one"); + else + while (itimes--) { + for (j = 0; j < MAXPREFIX; j++) { + uint8_t c = 0; + switch (instruction->prefixes[j]) { + case P_WAIT: + c = 0x9B; + break; + case P_LOCK: + c = 0xF0; + break; + case P_REPNE: + case P_REPNZ: + c = 0xF2; + break; + case P_REPE: + case P_REPZ: + case P_REP: + c = 0xF3; + break; + case R_CS: + if (bits == 64) { + error(ERR_WARNING | ERR_PASS2, + "cs segment base generated, but will be ignored in 64-bit mode"); + } + c = 0x2E; + break; + case R_DS: + if (bits == 64) { + error(ERR_WARNING | ERR_PASS2, + "ds segment base generated, but will be ignored in 64-bit mode"); + } + c = 0x3E; + break; + case R_ES: + if (bits == 64) { + error(ERR_WARNING | ERR_PASS2, + "es segment base generated, but will be ignored in 64-bit mode"); + } + c = 0x26; + break; + case R_FS: + c = 0x64; + break; + case R_GS: + c = 0x65; + break; + case R_SS: + if (bits == 64) { + error(ERR_WARNING | ERR_PASS2, + "ss segment base generated, but will be ignored in 64-bit mode"); + } + c = 0x36; + break; + case R_SEGR6: + case R_SEGR7: + error(ERR_NONFATAL, + "segr6 and segr7 cannot be used as prefixes"); + break; + case P_A16: + if (bits == 64) { + error(ERR_NONFATAL, + "16-bit addressing is not supported " + "in 64-bit mode"); + } else if (bits != 16) + c = 0x67; + break; + case P_A32: + if (bits != 32) + c = 0x67; + break; + case P_A64: + if (bits != 64) { + error(ERR_NONFATAL, + "64-bit addressing is only supported " + "in 64-bit mode"); + } + break; + case P_ASP: + c = 0x67; + break; + case P_O16: + if (bits != 16) + c = 0x66; + break; + case P_O32: + if (bits == 16) + c = 0x66; + break; + case P_O64: + /* REX.W */ + break; + case P_OSP: + c = 0x66; + break; + case P_none: + break; + default: + error(ERR_PANIC, "invalid instruction prefix"); + } + if (c != 0) { + out(offset, segment, &c, OUT_RAWDATA, 1, + NO_SEG, NO_SEG); + offset++; + } + } + insn_end = offset + insn_size; + gencode(segment, offset, bits, instruction, + temp, insn_end); + offset += insn_size; + if (itimes > 0 && itimes == instruction->times - 1) { + /* + * Dummy call to list->output to give the offset to the + * listing module. + */ + list->output(offset, NULL, OUT_RAWDATA, 0); + list->uplevel(LIST_TIMES); + } + } + if (instruction->times > 1) + list->downlevel(LIST_TIMES); + return offset - start; + } else { + /* No match */ + switch (m) { + case MERR_OPSIZEMISSING: + error(ERR_NONFATAL, "operation size not specified"); + break; + case MERR_OPSIZEMISMATCH: + error(ERR_NONFATAL, "mismatch in operand sizes"); + break; + case MERR_BADCPU: + error(ERR_NONFATAL, "no instruction for this cpu level"); + break; + case MERR_BADMODE: + error(ERR_NONFATAL, "instruction not supported in %d-bit mode", + bits); + break; + default: + error(ERR_NONFATAL, + "invalid combination of opcode and operands"); + break; + } + } + return 0; +} + +int64_t insn_size(int32_t segment, int64_t offset, int bits, uint32_t cp, + insn * instruction, efunc error) +{ + const struct itemplate *temp; + enum match_result m; + + errfunc = error; /* to pass to other functions */ + cpu = cp; + + if (instruction->opcode == I_none) + return 0; + + if (instruction->opcode == I_DB || instruction->opcode == I_DW || + instruction->opcode == I_DD || instruction->opcode == I_DQ || + instruction->opcode == I_DT || instruction->opcode == I_DO || + instruction->opcode == I_DY) { + extop *e; + int32_t isize, osize, wsize; + + isize = 0; + wsize = idata_bytes(instruction->opcode); + + list_for_each(e, instruction->eops) { + int32_t align; + + osize = 0; + if (e->type == EOT_DB_NUMBER) { + osize = 1; + warn_overflow_const(e->offset, wsize); + } else if (e->type == EOT_DB_STRING || + e->type == EOT_DB_STRING_FREE) + osize = e->stringlen; + + align = (-osize) % wsize; + if (align < 0) + align += wsize; + isize += osize + align; + } + return isize * instruction->times; + } + + if (instruction->opcode == I_INCBIN) { + const char *fname = instruction->eops->stringval; + FILE *fp; + int64_t val = 0; + size_t len; + + fp = fopen(fname, "rb"); + if (!fp) + error(ERR_NONFATAL, "`incbin': unable to open file `%s'", + fname); + else if (fseek(fp, 0L, SEEK_END) < 0) + error(ERR_NONFATAL, "`incbin': unable to seek on file `%s'", + fname); + else { + len = ftell(fp); + if (instruction->eops->next) { + len -= instruction->eops->next->offset; + if (instruction->eops->next->next && + len > (size_t)instruction->eops->next->next->offset) { + len = (size_t)instruction->eops->next->next->offset; + } + } + val = instruction->times * len; + } + if (fp) + fclose(fp); + return val; + } + + /* Check to see if we need an address-size prefix */ + add_asp(instruction, bits); + + m = find_match(&temp, instruction, segment, offset, bits); + if (m == MOK_GOOD) { + /* we've matched an instruction. */ + int64_t isize; + const uint8_t *codes = temp->code; + int j; + + isize = calcsize(segment, offset, bits, instruction, codes); + if (isize < 0) + return -1; + for (j = 0; j < MAXPREFIX; j++) { + switch (instruction->prefixes[j]) { + case P_A16: + if (bits != 16) + isize++; + break; + case P_A32: + if (bits != 32) + isize++; + break; + case P_O16: + if (bits != 16) + isize++; + break; + case P_O32: + if (bits == 16) + isize++; + break; + case P_A64: + case P_O64: + case P_none: + break; + default: + isize++; + break; + } + } + return isize * instruction->times; + } else { + return -1; /* didn't match any instruction */ + } +} + +static bool possible_sbyte(operand *o) +{ + return o->wrt == NO_SEG && o->segment == NO_SEG && + !(o->opflags & OPFLAG_UNKNOWN) && + optimizing >= 0 && !(o->type & STRICT); +} + +/* check that opn[op] is a signed byte of size 16 or 32 */ +static bool is_sbyte16(operand *o) +{ + int16_t v; + + if (!possible_sbyte(o)) + return false; + + v = o->offset; + return v >= -128 && v <= 127; +} + +static bool is_sbyte32(operand *o) +{ + int32_t v; + + if (!possible_sbyte(o)) + return false; + + v = o->offset; + return v >= -128 && v <= 127; +} + +/* Common construct */ +#define case4(x) case (x): case (x)+1: case (x)+2: case (x)+3 + +static int64_t calcsize(int32_t segment, int64_t offset, int bits, + insn * ins, const uint8_t *codes) +{ + int64_t length = 0; + uint8_t c; + int rex_mask = ~0; + int op1, op2; + struct operand *opx; + uint8_t opex = 0; + + ins->rex = 0; /* Ensure REX is reset */ + + if (ins->prefixes[PPS_OSIZE] == P_O64) + ins->rex |= REX_W; + + (void)segment; /* Don't warn that this parameter is unused */ + (void)offset; /* Don't warn that this parameter is unused */ + + while (*codes) { + c = *codes++; + op1 = (c & 3) + ((opex & 1) << 2); + op2 = ((c >> 3) & 3) + ((opex & 2) << 1); + opx = &ins->oprs[op1]; + opex = 0; /* For the next iteration */ + + switch (c) { + case 01: + case 02: + case 03: + case 04: + codes += c, length += c; + break; + + case 05: + case 06: + case 07: + opex = c; + break; + + case4(010): + ins->rex |= + op_rexflags(opx, REX_B|REX_H|REX_P|REX_W); + codes++, length++; + break; + + case4(014): + case4(020): + case4(024): + length++; + break; + + case4(030): + length += 2; + break; + + case4(034): + if (opx->type & (BITS16 | BITS32 | BITS64)) + length += (opx->type & BITS16) ? 2 : 4; + else + length += (bits == 16) ? 2 : 4; + break; + + case4(040): + length += 4; + break; + + case4(044): + length += ins->addr_size >> 3; + break; + + case4(050): + length++; + break; + + case4(054): + length += 8; /* MOV reg64/imm */ + break; + + case4(060): + length += 2; + break; + + case4(064): + if (opx->type & (BITS16 | BITS32 | BITS64)) + length += (opx->type & BITS16) ? 2 : 4; + else + length += (bits == 16) ? 2 : 4; + break; + + case4(070): + length += 4; + break; + + case4(074): + length += 2; + break; + + case4(0140): + length += is_sbyte16(opx) ? 1 : 2; + break; + + case4(0144): + codes++; + length++; + break; + + case4(0150): + length += is_sbyte32(opx) ? 1 : 4; + break; + + case4(0154): + codes++; + length++; + break; + + case4(0160): + length++; + ins->rex |= REX_D; + ins->drexdst = regval(opx); + break; + + case4(0164): + length++; + ins->rex |= REX_D|REX_OC; + ins->drexdst = regval(opx); + break; + + case 0171: + break; + + case 0172: + case 0173: + case 0174: + codes++; + length++; + break; + + case4(0250): + length += is_sbyte32(opx) ? 1 : 4; + break; + + case4(0254): + length += 4; + break; + + case4(0260): + ins->rex |= REX_V; + ins->drexdst = regval(opx); + ins->vex_cm = *codes++; + ins->vex_wlp = *codes++; + break; + + case 0270: + ins->rex |= REX_V; + ins->drexdst = 0; + ins->vex_cm = *codes++; + ins->vex_wlp = *codes++; + break; + + case4(0274): + length++; + break; + + case4(0300): + break; + + case 0310: + if (bits == 64) + return -1; + length += (bits != 16) && !has_prefix(ins, PPS_ASIZE, P_A16); + break; + + case 0311: + length += (bits != 32) && !has_prefix(ins, PPS_ASIZE, P_A32); + break; + + case 0312: + break; + + case 0313: + if (bits != 64 || has_prefix(ins, PPS_ASIZE, P_A16) || + has_prefix(ins, PPS_ASIZE, P_A32)) + return -1; + break; + + case4(0314): + break; + + case 0320: + length += (bits != 16); + break; + + case 0321: + length += (bits == 16); + break; + + case 0322: + break; + + case 0323: + rex_mask &= ~REX_W; + break; + + case 0324: + ins->rex |= REX_W; + break; + + case 0325: + ins->rex |= REX_NH; + break; + + case 0330: + codes++, length++; + break; + + case 0331: + break; + + case 0332: + case 0333: + length++; + break; + + case 0334: + ins->rex |= REX_L; + break; + + case 0335: + break; + + case 0336: + if (!ins->prefixes[PPS_LREP]) + ins->prefixes[PPS_LREP] = P_REP; + break; + + case 0337: + if (!ins->prefixes[PPS_LREP]) + ins->prefixes[PPS_LREP] = P_REPNE; + break; + + case 0340: + if (ins->oprs[0].segment != NO_SEG) + errfunc(ERR_NONFATAL, "attempt to reserve non-constant" + " quantity of BSS space"); + else + length += ins->oprs[0].offset; + break; + + case 0341: + if (!ins->prefixes[PPS_WAIT]) + ins->prefixes[PPS_WAIT] = P_WAIT; + break; + + case4(0344): + length++; + break; + + case 0360: + break; + + case 0361: + case 0362: + case 0363: + length++; + break; + + case 0364: + case 0365: + break; + + case 0366: + case 0367: + length++; + break; + + case 0370: + case 0371: + case 0372: + break; + + case 0373: + length++; + break; + + case4(0100): + case4(0110): + case4(0120): + case4(0130): + case4(0200): + case4(0204): + case4(0210): + case4(0214): + case4(0220): + case4(0224): + case4(0230): + case4(0234): + { + ea ea_data; + int rfield; + opflags_t rflags; + struct operand *opy = &ins->oprs[op2]; + + ea_data.rex = 0; /* Ensure ea.REX is initially 0 */ + + if (c <= 0177) { + /* pick rfield from operand b (opx) */ + rflags = regflag(opx); + rfield = nasm_regvals[opx->basereg]; + } else { + rflags = 0; + rfield = c & 7; + } + if (!process_ea(opy, &ea_data, bits, + ins->addr_size, rfield, rflags)) { + errfunc(ERR_NONFATAL, "invalid effective address"); + return -1; + } else { + ins->rex |= ea_data.rex; + length += ea_data.size; + } + } + break; + + default: + errfunc(ERR_PANIC, "internal instruction table corrupt" + ": instruction code \\%o (0x%02X) given", c, c); + break; + } + } + + ins->rex &= rex_mask; + + if (ins->rex & REX_NH) { + if (ins->rex & REX_H) { + errfunc(ERR_NONFATAL, "instruction cannot use high registers"); + return -1; + } + ins->rex &= ~REX_P; /* Don't force REX prefix due to high reg */ + } + + if (ins->rex & REX_V) { + int bad32 = REX_R|REX_W|REX_X|REX_B; + + if (ins->rex & REX_H) { + errfunc(ERR_NONFATAL, "cannot use high register in vex instruction"); + return -1; + } + switch (ins->vex_wlp & 030) { + case 000: + case 020: + ins->rex &= ~REX_W; + break; + case 010: + ins->rex |= REX_W; + bad32 &= ~REX_W; + break; + case 030: + /* Follow REX_W */ + break; + } + + if (bits != 64 && ((ins->rex & bad32) || ins->drexdst > 7)) { + errfunc(ERR_NONFATAL, "invalid operands in non-64-bit mode"); + return -1; + } + if (ins->vex_cm != 1 || (ins->rex & (REX_W|REX_R|REX_B))) + length += 3; + else + length += 2; + } else if (ins->rex & REX_D) { + if (ins->rex & REX_H) { + errfunc(ERR_NONFATAL, "cannot use high register in drex instruction"); + return -1; + } + if (bits != 64 && ((ins->rex & (REX_R|REX_W|REX_X|REX_B)) || + ins->drexdst > 7)) { + errfunc(ERR_NONFATAL, "invalid operands in non-64-bit mode"); + return -1; + } + length++; + } else if (ins->rex & REX_REAL) { + if (ins->rex & REX_H) { + errfunc(ERR_NONFATAL, "cannot use high register in rex instruction"); + return -1; + } else if (bits == 64) { + length++; + } else if ((ins->rex & REX_L) && + !(ins->rex & (REX_P|REX_W|REX_X|REX_B)) && + cpu >= IF_X86_64) { + /* LOCK-as-REX.R */ + assert_no_prefix(ins, PPS_LREP); + length++; + } else { + errfunc(ERR_NONFATAL, "invalid operands in non-64-bit mode"); + return -1; + } + } + + return length; +} + +#define EMIT_REX() \ + if (!(ins->rex & (REX_D|REX_V)) && (ins->rex & REX_REAL) && (bits == 64)) { \ + ins->rex = (ins->rex & REX_REAL)|REX_P; \ + out(offset, segment, &ins->rex, OUT_RAWDATA, 1, NO_SEG, NO_SEG); \ + ins->rex = 0; \ + offset += 1; \ + } + +static void gencode(int32_t segment, int64_t offset, int bits, + insn * ins, const struct itemplate *temp, + int64_t insn_end) +{ + static char condval[] = { /* conditional opcodes */ + 0x7, 0x3, 0x2, 0x6, 0x2, 0x4, 0xF, 0xD, 0xC, 0xE, 0x6, 0x2, + 0x3, 0x7, 0x3, 0x5, 0xE, 0xC, 0xD, 0xF, 0x1, 0xB, 0x9, 0x5, + 0x0, 0xA, 0xA, 0xB, 0x8, 0x4 + }; + uint8_t c; + uint8_t bytes[4]; + int64_t size; + int64_t data; + int op1, op2; + struct operand *opx; + const uint8_t *codes = temp->code; + uint8_t opex = 0; + + while (*codes) { + c = *codes++; + op1 = (c & 3) + ((opex & 1) << 2); + op2 = ((c >> 3) & 3) + ((opex & 2) << 1); + opx = &ins->oprs[op1]; + opex = 0; /* For the next iteration */ + + switch (c) { + case 01: + case 02: + case 03: + case 04: + EMIT_REX(); + out(offset, segment, codes, OUT_RAWDATA, c, NO_SEG, NO_SEG); + codes += c; + offset += c; + break; + + case 05: + case 06: + case 07: + opex = c; + break; + + case4(010): + EMIT_REX(); + bytes[0] = *codes++ + (regval(opx) & 7); + out(offset, segment, bytes, OUT_RAWDATA, 1, NO_SEG, NO_SEG); + offset += 1; + break; + + case4(014): + /* The test for BITS8 and SBYTE here is intended to avoid + warning on optimizer actions due to SBYTE, while still + warn on explicit BYTE directives. Also warn, obviously, + if the optimizer isn't enabled. */ + if (((opx->type & BITS8) || + !(opx->type & temp->opd[op1] & BYTENESS)) && + (opx->offset < -128 || opx->offset > 127)) { + errfunc(ERR_WARNING | ERR_PASS2 | ERR_WARN_NOV, + "signed byte value exceeds bounds"); + } + if (opx->segment != NO_SEG) { + data = opx->offset; + out(offset, segment, &data, OUT_ADDRESS, 1, + opx->segment, opx->wrt); + } else { + bytes[0] = opx->offset; + out(offset, segment, bytes, OUT_RAWDATA, 1, NO_SEG, + NO_SEG); + } + offset += 1; + break; + + case4(020): + if (opx->offset < -256 || opx->offset > 255) { + errfunc(ERR_WARNING | ERR_PASS2 | ERR_WARN_NOV, + "byte value exceeds bounds"); + } + if (opx->segment != NO_SEG) { + data = opx->offset; + out(offset, segment, &data, OUT_ADDRESS, 1, + opx->segment, opx->wrt); + } else { + bytes[0] = opx->offset; + out(offset, segment, bytes, OUT_RAWDATA, 1, NO_SEG, + NO_SEG); + } + offset += 1; + break; + + case4(024): + if (opx->offset < 0 || opx->offset > 255) + errfunc(ERR_WARNING | ERR_PASS2 | ERR_WARN_NOV, + "unsigned byte value exceeds bounds"); + if (opx->segment != NO_SEG) { + data = opx->offset; + out(offset, segment, &data, OUT_ADDRESS, 1, + opx->segment, opx->wrt); + } else { + bytes[0] = opx->offset; + out(offset, segment, bytes, OUT_RAWDATA, 1, NO_SEG, + NO_SEG); + } + offset += 1; + break; + + case4(030): + warn_overflow_opd(opx, 2); + data = opx->offset; + out(offset, segment, &data, OUT_ADDRESS, 2, + opx->segment, opx->wrt); + offset += 2; + break; + + case4(034): + if (opx->type & (BITS16 | BITS32)) + size = (opx->type & BITS16) ? 2 : 4; + else + size = (bits == 16) ? 2 : 4; + warn_overflow_opd(opx, size); + data = opx->offset; + out(offset, segment, &data, OUT_ADDRESS, size, + opx->segment, opx->wrt); + offset += size; + break; + + case4(040): + warn_overflow_opd(opx, 4); + data = opx->offset; + out(offset, segment, &data, OUT_ADDRESS, 4, + opx->segment, opx->wrt); + offset += 4; + break; + + case4(044): + data = opx->offset; + size = ins->addr_size >> 3; + warn_overflow_opd(opx, size); + out(offset, segment, &data, OUT_ADDRESS, size, + opx->segment, opx->wrt); + offset += size; + break; + + case4(050): + if (opx->segment != segment) + errfunc(ERR_NONFATAL, + "short relative jump outside segment"); + data = opx->offset - insn_end; + if (data > 127 || data < -128) + errfunc(ERR_NONFATAL, "short jump is out of range"); + bytes[0] = data; + out(offset, segment, bytes, OUT_RAWDATA, 1, NO_SEG, NO_SEG); + offset += 1; + break; + + case4(054): + data = (int64_t)opx->offset; + out(offset, segment, &data, OUT_ADDRESS, 8, + opx->segment, opx->wrt); + offset += 8; + break; + + case4(060): + if (opx->segment != segment) { + data = opx->offset; + out(offset, segment, &data, + OUT_REL2ADR, insn_end - offset, + opx->segment, opx->wrt); + } else { + data = opx->offset - insn_end; + out(offset, segment, &data, + OUT_ADDRESS, 2, NO_SEG, NO_SEG); + } + offset += 2; + break; + + case4(064): + if (opx->type & (BITS16 | BITS32 | BITS64)) + size = (opx->type & BITS16) ? 2 : 4; + else + size = (bits == 16) ? 2 : 4; + if (opx->segment != segment) { + data = opx->offset; + out(offset, segment, &data, + size == 2 ? OUT_REL2ADR : OUT_REL4ADR, + insn_end - offset, opx->segment, opx->wrt); + } else { + data = opx->offset - insn_end; + out(offset, segment, &data, + OUT_ADDRESS, size, NO_SEG, NO_SEG); + } + offset += size; + break; + + case4(070): + if (opx->segment != segment) { + data = opx->offset; + out(offset, segment, &data, + OUT_REL4ADR, insn_end - offset, + opx->segment, opx->wrt); + } else { + data = opx->offset - insn_end; + out(offset, segment, &data, + OUT_ADDRESS, 4, NO_SEG, NO_SEG); + } + offset += 4; + break; + + case4(074): + if (opx->segment == NO_SEG) + errfunc(ERR_NONFATAL, "value referenced by FAR is not" + " relocatable"); + data = 0; + out(offset, segment, &data, OUT_ADDRESS, 2, + outfmt->segbase(1 + opx->segment), + opx->wrt); + offset += 2; + break; + + case4(0140): + data = opx->offset; + warn_overflow_opd(opx, 2); + if (is_sbyte16(opx)) { + bytes[0] = data; + out(offset, segment, bytes, OUT_RAWDATA, 1, NO_SEG, + NO_SEG); + offset++; + } else { + out(offset, segment, &data, OUT_ADDRESS, 2, + opx->segment, opx->wrt); + offset += 2; + } + break; + + case4(0144): + EMIT_REX(); + bytes[0] = *codes++; + if (is_sbyte16(opx)) + bytes[0] |= 2; /* s-bit */ + out(offset, segment, bytes, OUT_RAWDATA, 1, NO_SEG, NO_SEG); + offset++; + break; + + case4(0150): + data = opx->offset; + warn_overflow_opd(opx, 4); + if (is_sbyte32(opx)) { + bytes[0] = data; + out(offset, segment, bytes, OUT_RAWDATA, 1, NO_SEG, + NO_SEG); + offset++; + } else { + out(offset, segment, &data, OUT_ADDRESS, 4, + opx->segment, opx->wrt); + offset += 4; + } + break; + + case4(0154): + EMIT_REX(); + bytes[0] = *codes++; + if (is_sbyte32(opx)) + bytes[0] |= 2; /* s-bit */ + out(offset, segment, bytes, OUT_RAWDATA, 1, NO_SEG, NO_SEG); + offset++; + break; + + case4(0160): + case4(0164): + break; + + case 0171: + bytes[0] = + (ins->drexdst << 4) | + (ins->rex & REX_OC ? 0x08 : 0) | + (ins->rex & (REX_R|REX_X|REX_B)); + ins->rex = 0; + out(offset, segment, bytes, OUT_RAWDATA, 1, NO_SEG, NO_SEG); + offset++; + break; + + case 0172: + c = *codes++; + opx = &ins->oprs[c >> 3]; + bytes[0] = nasm_regvals[opx->basereg] << 4; + opx = &ins->oprs[c & 7]; + if (opx->segment != NO_SEG || opx->wrt != NO_SEG) { + errfunc(ERR_NONFATAL, + "non-absolute expression not permitted as argument %d", + c & 7); + } else { + if (opx->offset & ~15) { + errfunc(ERR_WARNING | ERR_PASS2 | ERR_WARN_NOV, + "four-bit argument exceeds bounds"); + } + bytes[0] |= opx->offset & 15; + } + out(offset, segment, bytes, OUT_RAWDATA, 1, NO_SEG, NO_SEG); + offset++; + break; + + case 0173: + c = *codes++; + opx = &ins->oprs[c >> 4]; + bytes[0] = nasm_regvals[opx->basereg] << 4; + bytes[0] |= c & 15; + out(offset, segment, bytes, OUT_RAWDATA, 1, NO_SEG, NO_SEG); + offset++; + break; + + case 0174: + c = *codes++; + opx = &ins->oprs[c]; + bytes[0] = nasm_regvals[opx->basereg] << 4; + out(offset, segment, bytes, OUT_RAWDATA, 1, NO_SEG, NO_SEG); + offset++; + break; + + case4(0250): + data = opx->offset; + if (opx->wrt == NO_SEG && opx->segment == NO_SEG && + (int32_t)data != (int64_t)data) { + errfunc(ERR_WARNING | ERR_PASS2 | ERR_WARN_NOV, + "signed dword immediate exceeds bounds"); + } + if (is_sbyte32(opx)) { + bytes[0] = data; + out(offset, segment, bytes, OUT_RAWDATA, 1, NO_SEG, + NO_SEG); + offset++; + } else { + out(offset, segment, &data, OUT_ADDRESS, 4, + opx->segment, opx->wrt); + offset += 4; + } + break; + + case4(0254): + data = opx->offset; + if (opx->wrt == NO_SEG && opx->segment == NO_SEG && + (int32_t)data != (int64_t)data) { + errfunc(ERR_WARNING | ERR_PASS2 | ERR_WARN_NOV, + "signed dword immediate exceeds bounds"); + } + out(offset, segment, &data, OUT_ADDRESS, 4, + opx->segment, opx->wrt); + offset += 4; + break; + + case4(0260): + case 0270: + codes += 2; + if (ins->vex_cm != 1 || (ins->rex & (REX_W|REX_X|REX_B))) { + bytes[0] = (ins->vex_cm >> 6) ? 0x8f : 0xc4; + bytes[1] = (ins->vex_cm & 31) | ((~ins->rex & 7) << 5); + bytes[2] = ((ins->rex & REX_W) << (7-3)) | + ((~ins->drexdst & 15)<< 3) | (ins->vex_wlp & 07); + out(offset, segment, &bytes, OUT_RAWDATA, 3, NO_SEG, NO_SEG); + offset += 3; + } else { + bytes[0] = 0xc5; + bytes[1] = ((~ins->rex & REX_R) << (7-2)) | + ((~ins->drexdst & 15) << 3) | (ins->vex_wlp & 07); + out(offset, segment, &bytes, OUT_RAWDATA, 2, NO_SEG, NO_SEG); + offset += 2; + } + break; + + case4(0274): + { + uint64_t uv, um; + int s; + + if (ins->rex & REX_W) + s = 64; + else if (ins->prefixes[PPS_OSIZE] == P_O16) + s = 16; + else if (ins->prefixes[PPS_OSIZE] == P_O32) + s = 32; + else + s = bits; + + um = (uint64_t)2 << (s-1); + uv = opx->offset; + + if (uv > 127 && uv < (uint64_t)-128 && + (uv < um-128 || uv > um-1)) { + errfunc(ERR_WARNING | ERR_PASS2 | ERR_WARN_NOV, + "signed byte value exceeds bounds"); + } + if (opx->segment != NO_SEG) { + data = uv; + out(offset, segment, &data, OUT_ADDRESS, 1, + opx->segment, opx->wrt); + } else { + bytes[0] = uv; + out(offset, segment, bytes, OUT_RAWDATA, 1, NO_SEG, + NO_SEG); + } + offset += 1; + break; + } + + case4(0300): + break; + + case 0310: + if (bits == 32 && !has_prefix(ins, PPS_ASIZE, P_A16)) { + *bytes = 0x67; + out(offset, segment, bytes, OUT_RAWDATA, 1, NO_SEG, NO_SEG); + offset += 1; + } else + offset += 0; + break; + + case 0311: + if (bits != 32 && !has_prefix(ins, PPS_ASIZE, P_A32)) { + *bytes = 0x67; + out(offset, segment, bytes, OUT_RAWDATA, 1, NO_SEG, NO_SEG); + offset += 1; + } else + offset += 0; + break; + + case 0312: + break; + + case 0313: + ins->rex = 0; + break; + + case4(0314): + break; + + case 0320: + if (bits != 16) { + *bytes = 0x66; + out(offset, segment, bytes, OUT_RAWDATA, 1, NO_SEG, NO_SEG); + offset += 1; + } else + offset += 0; + break; + + case 0321: + if (bits == 16) { + *bytes = 0x66; + out(offset, segment, bytes, OUT_RAWDATA, 1, NO_SEG, NO_SEG); + offset += 1; + } else + offset += 0; + break; + + case 0322: + case 0323: + break; + + case 0324: + ins->rex |= REX_W; + break; + + case 0325: + break; + + case 0330: + *bytes = *codes++ ^ condval[ins->condition]; + out(offset, segment, bytes, OUT_RAWDATA, 1, NO_SEG, NO_SEG); + offset += 1; + break; + + case 0331: + break; + + case 0332: + case 0333: + *bytes = c - 0332 + 0xF2; + out(offset, segment, bytes, OUT_RAWDATA, 1, NO_SEG, NO_SEG); + offset += 1; + break; + + case 0334: + if (ins->rex & REX_R) { + *bytes = 0xF0; + out(offset, segment, bytes, OUT_RAWDATA, 1, NO_SEG, NO_SEG); + offset += 1; + } + ins->rex &= ~(REX_L|REX_R); + break; + + case 0335: + break; + + case 0336: + case 0337: + break; + + case 0340: + if (ins->oprs[0].segment != NO_SEG) + errfunc(ERR_PANIC, "non-constant BSS size in pass two"); + else { + int64_t size = ins->oprs[0].offset; + if (size > 0) + out(offset, segment, NULL, + OUT_RESERVE, size, NO_SEG, NO_SEG); + offset += size; + } + break; + + case 0341: + break; + + case 0344: + case 0345: + bytes[0] = c & 1; + switch (ins->oprs[0].basereg) { + case R_CS: + bytes[0] += 0x0E; + break; + case R_DS: + bytes[0] += 0x1E; + break; + case R_ES: + bytes[0] += 0x06; + break; + case R_SS: + bytes[0] += 0x16; + break; + default: + errfunc(ERR_PANIC, + "bizarre 8086 segment register received"); + } + out(offset, segment, bytes, OUT_RAWDATA, 1, NO_SEG, NO_SEG); + offset++; + break; + + case 0346: + case 0347: + bytes[0] = c & 1; + switch (ins->oprs[0].basereg) { + case R_FS: + bytes[0] += 0xA0; + break; + case R_GS: + bytes[0] += 0xA8; + break; + default: + errfunc(ERR_PANIC, + "bizarre 386 segment register received"); + } + out(offset, segment, bytes, OUT_RAWDATA, 1, NO_SEG, NO_SEG); + offset++; + break; + + case 0360: + break; + + case 0361: + bytes[0] = 0x66; + out(offset, segment, bytes, OUT_RAWDATA, 1, NO_SEG, NO_SEG); + offset += 1; + break; + + case 0362: + case 0363: + bytes[0] = c - 0362 + 0xf2; + out(offset, segment, bytes, OUT_RAWDATA, 1, NO_SEG, NO_SEG); + offset += 1; + break; + + case 0364: + case 0365: + break; + + case 0366: + case 0367: + *bytes = c - 0366 + 0x66; + out(offset, segment, bytes, OUT_RAWDATA, 1, NO_SEG, NO_SEG); + offset += 1; + break; + + case 0370: + case 0371: + case 0372: + break; + + case 0373: + *bytes = bits == 16 ? 3 : 5; + out(offset, segment, bytes, OUT_RAWDATA, 1, NO_SEG, NO_SEG); + offset += 1; + break; + + case4(0100): + case4(0110): + case4(0120): + case4(0130): + case4(0200): + case4(0204): + case4(0210): + case4(0214): + case4(0220): + case4(0224): + case4(0230): + case4(0234): + { + ea ea_data; + int rfield; + opflags_t rflags; + uint8_t *p; + int32_t s; + enum out_type type; + struct operand *opy = &ins->oprs[op2]; + + if (c <= 0177) { + /* pick rfield from operand b (opx) */ + rflags = regflag(opx); + rfield = nasm_regvals[opx->basereg]; + } else { + /* rfield is constant */ + rflags = 0; + rfield = c & 7; + } + + if (!process_ea(opy, &ea_data, bits, ins->addr_size, + rfield, rflags)) { + errfunc(ERR_NONFATAL, "invalid effective address"); + } + + + p = bytes; + *p++ = ea_data.modrm; + if (ea_data.sib_present) + *p++ = ea_data.sib; + + /* DREX suffixes come between the SIB and the displacement */ + if (ins->rex & REX_D) { + *p++ = (ins->drexdst << 4) | + (ins->rex & REX_OC ? 0x08 : 0) | + (ins->rex & (REX_R|REX_X|REX_B)); + ins->rex = 0; + } + + s = p - bytes; + out(offset, segment, bytes, OUT_RAWDATA, s, NO_SEG, NO_SEG); + + /* + * Make sure the address gets the right offset in case + * the line breaks in the .lst file (BR 1197827) + */ + offset += s; + s = 0; + + switch (ea_data.bytes) { + case 0: + break; + case 1: + case 2: + case 4: + case 8: + data = opy->offset; + warn_overflow_opd(opy, ea_data.bytes); + s += ea_data.bytes; + if (ea_data.rip) { + if (opy->segment == segment) { + data -= insn_end; + out(offset, segment, &data, OUT_ADDRESS, + ea_data.bytes, NO_SEG, NO_SEG); + } else { + out(offset, segment, &data, OUT_REL4ADR, + insn_end - offset, opy->segment, opy->wrt); + } + } else { + type = OUT_ADDRESS; + out(offset, segment, &data, OUT_ADDRESS, + ea_data.bytes, opy->segment, opy->wrt); + } + break; + default: + /* Impossible! */ + errfunc(ERR_PANIC, + "Invalid amount of bytes (%d) for offset?!", + ea_data.bytes); + break; + } + offset += s; + } + break; + + default: + errfunc(ERR_PANIC, "internal instruction table corrupt" + ": instruction code \\%o (0x%02X) given", c, c); + break; + } + } +} + +static opflags_t regflag(const operand * o) +{ + if (o->basereg < EXPR_REG_START || o->basereg >= REG_ENUM_LIMIT) { + errfunc(ERR_PANIC, "invalid operand passed to regflag()"); + } + return nasm_reg_flags[o->basereg]; +} + +static int32_t regval(const operand * o) +{ + if (o->basereg < EXPR_REG_START || o->basereg >= REG_ENUM_LIMIT) { + errfunc(ERR_PANIC, "invalid operand passed to regval()"); + } + return nasm_regvals[o->basereg]; +} + +static int op_rexflags(const operand * o, int mask) +{ + opflags_t flags; + int val; + + if (o->basereg < EXPR_REG_START || o->basereg >= REG_ENUM_LIMIT) { + errfunc(ERR_PANIC, "invalid operand passed to op_rexflags()"); + } + + flags = nasm_reg_flags[o->basereg]; + val = nasm_regvals[o->basereg]; + + return rexflags(val, flags, mask); +} + +static int rexflags(int val, opflags_t flags, int mask) +{ + int rex = 0; + + if (val >= 8) + rex |= REX_B|REX_X|REX_R; + if (flags & BITS64) + rex |= REX_W; + if (!(REG_HIGH & ~flags)) /* AH, CH, DH, BH */ + rex |= REX_H; + else if (!(REG8 & ~flags) && val >= 4) /* SPL, BPL, SIL, DIL */ + rex |= REX_P; + + return rex & mask; +} + +static enum match_result find_match(const struct itemplate **tempp, + insn *instruction, + int32_t segment, int64_t offset, int bits) +{ + const struct itemplate *temp; + enum match_result m, merr; + opflags_t xsizeflags[MAX_OPERANDS]; + bool opsizemissing = false; + int i; + + for (i = 0; i < instruction->operands; i++) + xsizeflags[i] = instruction->oprs[i].type & SIZE_MASK; + + merr = MERR_INVALOP; + + for (temp = nasm_instructions[instruction->opcode]; + temp->opcode != I_none; temp++) { + m = matches(temp, instruction, bits); + if (m == MOK_JUMP) { + if (jmp_match(segment, offset, bits, instruction, temp->code)) + m = MOK_GOOD; + else + m = MERR_INVALOP; + } else if (m == MERR_OPSIZEMISSING && + (temp->flags & IF_SMASK) != IF_SX) { + /* + * Missing operand size and a candidate for fuzzy matching... + */ + for (i = 0; i < temp->operands; i++) { + if ((temp->opd[i] & SAME_AS) == 0) + xsizeflags[i] |= temp->opd[i] & SIZE_MASK; + } + opsizemissing = true; + } + if (m > merr) + merr = m; + if (merr == MOK_GOOD) + goto done; + } + + /* No match, but see if we can get a fuzzy operand size match... */ + if (!opsizemissing) + goto done; + + for (i = 0; i < instruction->operands; i++) { + /* + * We ignore extrinsic operand sizes on registers, so we should + * never try to fuzzy-match on them. This also resolves the case + * when we have e.g. "xmmrm128" in two different positions. + */ + if (is_class(REGISTER, instruction->oprs[i].type)) + continue; + + /* This tests if xsizeflags[i] has more than one bit set */ + if ((xsizeflags[i] & (xsizeflags[i]-1))) + goto done; /* No luck */ + + instruction->oprs[i].type |= xsizeflags[i]; /* Set the size */ + } + + /* Try matching again... */ + for (temp = nasm_instructions[instruction->opcode]; + temp->opcode != I_none; temp++) { + m = matches(temp, instruction, bits); + if (m == MOK_JUMP) { + if (jmp_match(segment, offset, bits, instruction, temp->code)) + m = MOK_GOOD; + else + m = MERR_INVALOP; + } + if (m > merr) + merr = m; + if (merr == MOK_GOOD) + goto done; + } + +done: + *tempp = temp; + return merr; +} + +static enum match_result matches(const struct itemplate *itemp, + insn *instruction, int bits) +{ + int i, size[MAX_OPERANDS], asize, oprs; + bool opsizemissing = false; + + /* + * Check the opcode + */ + if (itemp->opcode != instruction->opcode) + return MERR_INVALOP; + + /* + * Count the operands + */ + if (itemp->operands != instruction->operands) + return MERR_INVALOP; + + /* + * Check that no spurious colons or TOs are present + */ + for (i = 0; i < itemp->operands; i++) + if (instruction->oprs[i].type & ~itemp->opd[i] & (COLON | TO)) + return MERR_INVALOP; + + /* + * Process size flags + */ + switch (itemp->flags & IF_SMASK) { + case IF_SB: + asize = BITS8; + break; + case IF_SW: + asize = BITS16; + break; + case IF_SD: + asize = BITS32; + break; + case IF_SQ: + asize = BITS64; + break; + case IF_SO: + asize = BITS128; + break; + case IF_SY: + asize = BITS256; + break; + case IF_SZ: + switch (bits) { + case 16: + asize = BITS16; + break; + case 32: + asize = BITS32; + break; + case 64: + asize = BITS64; + break; + default: + asize = 0; + break; + } + break; + default: + asize = 0; + break; + } + + if (itemp->flags & IF_ARMASK) { + /* S- flags only apply to a specific operand */ + i = ((itemp->flags & IF_ARMASK) >> IF_ARSHFT) - 1; + memset(size, 0, sizeof size); + size[i] = asize; + } else { + /* S- flags apply to all operands */ + for (i = 0; i < MAX_OPERANDS; i++) + size[i] = asize; + } + + /* + * Check that the operand flags all match up, + * it's a bit tricky so lets be verbose: + * + * 1) Find out the size of operand. If instruction + * doesn't have one specified -- we're trying to + * guess it either from template (IF_S* flag) or + * from code bits. + * + * 2) If template operand (i) has SAME_AS flag [used for registers only] + * (ie the same operand as was specified somewhere in template, and + * this referred operand index is being achieved via ~SAME_AS) + * we are to be sure that both registers (in template and instruction) + * do exactly match. + * + * 3) If template operand do not match the instruction OR + * template has an operand size specified AND this size differ + * from which instruction has (perhaps we got it from code bits) + * we are: + * a) Check that only size of instruction and operand is differ + * other characteristics do match + * b) Perhaps it's a register specified in instruction so + * for such a case we just mark that operand as "size + * missing" and this will turn on fuzzy operand size + * logic facility (handled by a caller) + */ + for (i = 0; i < itemp->operands; i++) { + opflags_t type = instruction->oprs[i].type; + if (!(type & SIZE_MASK)) + type |= size[i]; + + if (itemp->opd[i] & SAME_AS) { + int j = itemp->opd[i] & ~SAME_AS; + if (type != instruction->oprs[j].type || + instruction->oprs[i].basereg != instruction->oprs[j].basereg) + return MERR_INVALOP; + } else if (itemp->opd[i] & ~type || + ((itemp->opd[i] & SIZE_MASK) && + ((itemp->opd[i] ^ type) & SIZE_MASK))) { + if ((itemp->opd[i] & ~type & ~SIZE_MASK) || (type & SIZE_MASK)) { + return MERR_INVALOP; + } else if (!is_class(REGISTER, type)) { + /* + * Note: we don't honor extrinsic operand sizes for registers, + * so "missing operand size" for a register should be + * considered a wildcard match rather than an error. + */ + opsizemissing = true; + } + } + } + + if (opsizemissing) + return MERR_OPSIZEMISSING; + + /* + * Check operand sizes + */ + if (itemp->flags & (IF_SM | IF_SM2)) { + oprs = (itemp->flags & IF_SM2 ? 2 : itemp->operands); + for (i = 0; i < oprs; i++) { + asize = itemp->opd[i] & SIZE_MASK; + if (asize) { + for (i = 0; i < oprs; i++) + size[i] = asize; + break; + } + } + } else { + oprs = itemp->operands; + } + + for (i = 0; i < itemp->operands; i++) { + if (!(itemp->opd[i] & SIZE_MASK) && + (instruction->oprs[i].type & SIZE_MASK & ~size[i])) + return MERR_OPSIZEMISMATCH; + } + + /* + * Check template is okay at the set cpu level + */ + if (((itemp->flags & IF_PLEVEL) > cpu)) + return MERR_BADCPU; + + /* + * Verify the appropriate long mode flag. + */ + if ((itemp->flags & (bits == 64 ? IF_NOLONG : IF_LONG))) + return MERR_BADMODE; + + /* + * Check if special handling needed for Jumps + */ + if ((itemp->code[0] & 0374) == 0370) + return MOK_JUMP; + + return MOK_GOOD; +} + +static ea *process_ea(operand * input, ea * output, int bits, + int addrbits, int rfield, opflags_t rflags) +{ + bool forw_ref = !!(input->opflags & OPFLAG_UNKNOWN); + + output->rip = false; + + /* REX flags for the rfield operand */ + output->rex |= rexflags(rfield, rflags, REX_R|REX_P|REX_W|REX_H); + + if (is_class(REGISTER, input->type)) { /* register direct */ + int i; + opflags_t f; + + if (input->basereg < EXPR_REG_START /* Verify as Register */ + || input->basereg >= REG_ENUM_LIMIT) + return NULL; + f = regflag(input); + i = nasm_regvals[input->basereg]; + + if (REG_EA & ~f) + return NULL; /* Invalid EA register */ + + output->rex |= op_rexflags(input, REX_B|REX_P|REX_W|REX_H); + + output->sib_present = false; /* no SIB necessary */ + output->bytes = 0; /* no offset necessary either */ + output->modrm = 0xC0 | ((rfield & 7) << 3) | (i & 7); + } else { /* it's a memory reference */ + if (input->basereg == -1 + && (input->indexreg == -1 || input->scale == 0)) { + /* it's a pure offset */ + if (bits == 64 && (~input->type & IP_REL)) { + int scale, index, base; + output->sib_present = true; + scale = 0; + index = 4; + base = 5; + output->sib = (scale << 6) | (index << 3) | base; + output->bytes = 4; + output->modrm = 4 | ((rfield & 7) << 3); + output->rip = false; + } else { + output->sib_present = false; + output->bytes = (addrbits != 16 ? 4 : 2); + output->modrm = (addrbits != 16 ? 5 : 6) | ((rfield & 7) << 3); + output->rip = bits == 64; + } + } else { /* it's an indirection */ + int i = input->indexreg, b = input->basereg, s = input->scale; + int32_t o = input->offset, seg = input->segment; + int hb = input->hintbase, ht = input->hinttype; + int t, it, bt; /* register numbers */ + opflags_t x, ix, bx; /* register flags */ + + if (s == 0) + i = -1; /* make this easy, at least */ + + if (i >= EXPR_REG_START && i < REG_ENUM_LIMIT) { + it = nasm_regvals[i]; + ix = nasm_reg_flags[i]; + } else { + it = -1; + ix = 0; + } + + if (b >= EXPR_REG_START && b < REG_ENUM_LIMIT) { + bt = nasm_regvals[b]; + bx = nasm_reg_flags[b]; + } else { + bt = -1; + bx = 0; + } + + /* check for a 32/64-bit memory reference... */ + if ((ix|bx) & (BITS32|BITS64)) { + /* it must be a 32/64-bit memory reference. Firstly we have + * to check that all registers involved are type E/Rxx. */ + int32_t sok = BITS32|BITS64; + + if (it != -1) { + if (!(REG64 & ~ix) || !(REG32 & ~ix)) + sok &= ix; + else + return NULL; + } + + if (bt != -1) { + if (REG_GPR & ~bx) + return NULL; /* Invalid register */ + if (~sok & bx & SIZE_MASK) + return NULL; /* Invalid size */ + sok &= bx; + } + + /* While we're here, ensure the user didn't specify + WORD or QWORD. */ + if (input->disp_size == 16 || input->disp_size == 64) + return NULL; + + if (addrbits == 16 || + (addrbits == 32 && !(sok & BITS32)) || + (addrbits == 64 && !(sok & BITS64))) + return NULL; + + /* now reorganize base/index */ + if (s == 1 && bt != it && bt != -1 && it != -1 && + ((hb == b && ht == EAH_NOTBASE) + || (hb == i && ht == EAH_MAKEBASE))) { + /* swap if hints say so */ + t = bt, bt = it, it = t; + x = bx, bx = ix, ix = x; + } + if (bt == it) /* convert EAX+2*EAX to 3*EAX */ + bt = -1, bx = 0, s++; + if (bt == -1 && s == 1 && !(hb == it && ht == EAH_NOTBASE)) { + /* make single reg base, unless hint */ + bt = it, bx = ix, it = -1, ix = 0; + } + if (((s == 2 && it != REG_NUM_ESP + && !(input->eaflags & EAF_TIMESTWO)) || s == 3 + || s == 5 || s == 9) && bt == -1) + bt = it, bx = ix, s--; /* convert 3*EAX to EAX+2*EAX */ + if (it == -1 && (bt & 7) != REG_NUM_ESP + && (input->eaflags & EAF_TIMESTWO)) + it = bt, ix = bx, bt = -1, bx = 0, s = 1; + /* convert [NOSPLIT EAX] to sib format with 0x0 displacement */ + if (s == 1 && it == REG_NUM_ESP) { + /* swap ESP into base if scale is 1 */ + t = it, it = bt, bt = t; + x = ix, ix = bx, bx = x; + } + if (it == REG_NUM_ESP + || (s != 1 && s != 2 && s != 4 && s != 8 && it != -1)) + return NULL; /* wrong, for various reasons */ + + output->rex |= rexflags(it, ix, REX_X); + output->rex |= rexflags(bt, bx, REX_B); + + if (it == -1 && (bt & 7) != REG_NUM_ESP) { + /* no SIB needed */ + int mod, rm; + + if (bt == -1) { + rm = 5; + mod = 0; + } else { + rm = (bt & 7); + if (rm != REG_NUM_EBP && o == 0 && + seg == NO_SEG && !forw_ref && + !(input->eaflags & + (EAF_BYTEOFFS | EAF_WORDOFFS))) + mod = 0; + else if (input->eaflags & EAF_BYTEOFFS || + (o >= -128 && o <= 127 && seg == NO_SEG + && !forw_ref + && !(input->eaflags & EAF_WORDOFFS))) + mod = 1; + else + mod = 2; + } + + output->sib_present = false; + output->bytes = (bt == -1 || mod == 2 ? 4 : mod); + output->modrm = (mod << 6) | ((rfield & 7) << 3) | rm; + } else { + /* we need a SIB */ + int mod, scale, index, base; + + if (it == -1) + index = 4, s = 1; + else + index = (it & 7); + + switch (s) { + case 1: + scale = 0; + break; + case 2: + scale = 1; + break; + case 4: + scale = 2; + break; + case 8: + scale = 3; + break; + default: /* then what the smeg is it? */ + return NULL; /* panic */ + } + + if (bt == -1) { + base = 5; + mod = 0; + } else { + base = (bt & 7); + if (base != REG_NUM_EBP && o == 0 && + seg == NO_SEG && !forw_ref && + !(input->eaflags & + (EAF_BYTEOFFS | EAF_WORDOFFS))) + mod = 0; + else if (input->eaflags & EAF_BYTEOFFS || + (o >= -128 && o <= 127 && seg == NO_SEG + && !forw_ref + && !(input->eaflags & EAF_WORDOFFS))) + mod = 1; + else + mod = 2; + } + + output->sib_present = true; + output->bytes = (bt == -1 || mod == 2 ? 4 : mod); + output->modrm = (mod << 6) | ((rfield & 7) << 3) | 4; + output->sib = (scale << 6) | (index << 3) | base; + } + } else { /* it's 16-bit */ + int mod, rm; + + /* check for 64-bit long mode */ + if (addrbits == 64) + return NULL; + + /* check all registers are BX, BP, SI or DI */ + if ((b != -1 && b != R_BP && b != R_BX && b != R_SI + && b != R_DI) || (i != -1 && i != R_BP && i != R_BX + && i != R_SI && i != R_DI)) + return NULL; + + /* ensure the user didn't specify DWORD/QWORD */ + if (input->disp_size == 32 || input->disp_size == 64) + return NULL; + + if (s != 1 && i != -1) + return NULL; /* no can do, in 16-bit EA */ + if (b == -1 && i != -1) { + int tmp = b; + b = i; + i = tmp; + } /* swap */ + if ((b == R_SI || b == R_DI) && i != -1) { + int tmp = b; + b = i; + i = tmp; + } + /* have BX/BP as base, SI/DI index */ + if (b == i) + return NULL; /* shouldn't ever happen, in theory */ + if (i != -1 && b != -1 && + (i == R_BP || i == R_BX || b == R_SI || b == R_DI)) + return NULL; /* invalid combinations */ + if (b == -1) /* pure offset: handled above */ + return NULL; /* so if it gets to here, panic! */ + + rm = -1; + if (i != -1) + switch (i * 256 + b) { + case R_SI * 256 + R_BX: + rm = 0; + break; + case R_DI * 256 + R_BX: + rm = 1; + break; + case R_SI * 256 + R_BP: + rm = 2; + break; + case R_DI * 256 + R_BP: + rm = 3; + break; + } else + switch (b) { + case R_SI: + rm = 4; + break; + case R_DI: + rm = 5; + break; + case R_BP: + rm = 6; + break; + case R_BX: + rm = 7; + break; + } + if (rm == -1) /* can't happen, in theory */ + return NULL; /* so panic if it does */ + + if (o == 0 && seg == NO_SEG && !forw_ref && rm != 6 && + !(input->eaflags & (EAF_BYTEOFFS | EAF_WORDOFFS))) + mod = 0; + else if (input->eaflags & EAF_BYTEOFFS || + (o >= -128 && o <= 127 && seg == NO_SEG + && !forw_ref + && !(input->eaflags & EAF_WORDOFFS))) + mod = 1; + else + mod = 2; + + output->sib_present = false; /* no SIB - it's 16-bit */ + output->bytes = mod; /* bytes of offset needed */ + output->modrm = (mod << 6) | ((rfield & 7) << 3) | rm; + } + } + } + + output->size = 1 + output->sib_present + output->bytes; + return output; +} + +static void add_asp(insn *ins, int addrbits) +{ + int j, valid; + int defdisp; + + valid = (addrbits == 64) ? 64|32 : 32|16; + + switch (ins->prefixes[PPS_ASIZE]) { + case P_A16: + valid &= 16; + break; + case P_A32: + valid &= 32; + break; + case P_A64: + valid &= 64; + break; + case P_ASP: + valid &= (addrbits == 32) ? 16 : 32; + break; + default: + break; + } + + for (j = 0; j < ins->operands; j++) { + if (is_class(MEMORY, ins->oprs[j].type)) { + opflags_t i, b; + + /* Verify as Register */ + if (ins->oprs[j].indexreg < EXPR_REG_START + || ins->oprs[j].indexreg >= REG_ENUM_LIMIT) + i = 0; + else + i = nasm_reg_flags[ins->oprs[j].indexreg]; + + /* Verify as Register */ + if (ins->oprs[j].basereg < EXPR_REG_START + || ins->oprs[j].basereg >= REG_ENUM_LIMIT) + b = 0; + else + b = nasm_reg_flags[ins->oprs[j].basereg]; + + if (ins->oprs[j].scale == 0) + i = 0; + + if (!i && !b) { + int ds = ins->oprs[j].disp_size; + if ((addrbits != 64 && ds > 8) || + (addrbits == 64 && ds == 16)) + valid &= ds; + } else { + if (!(REG16 & ~b)) + valid &= 16; + if (!(REG32 & ~b)) + valid &= 32; + if (!(REG64 & ~b)) + valid &= 64; + + if (!(REG16 & ~i)) + valid &= 16; + if (!(REG32 & ~i)) + valid &= 32; + if (!(REG64 & ~i)) + valid &= 64; + } + } + } + + if (valid & addrbits) { + ins->addr_size = addrbits; + } else if (valid & ((addrbits == 32) ? 16 : 32)) { + /* Add an address size prefix */ + enum prefixes pref = (addrbits == 32) ? P_A16 : P_A32; + ins->prefixes[PPS_ASIZE] = pref; + ins->addr_size = (addrbits == 32) ? 16 : 32; + } else { + /* Impossible... */ + errfunc(ERR_NONFATAL, "impossible combination of address sizes"); + ins->addr_size = addrbits; /* Error recovery */ + } + + defdisp = ins->addr_size == 16 ? 16 : 32; + + for (j = 0; j < ins->operands; j++) { + if (!(MEM_OFFS & ~ins->oprs[j].type) && + (ins->oprs[j].disp_size ? ins->oprs[j].disp_size : defdisp) + != ins->addr_size) { + /* mem_offs sizes must match the address size; if not, + strip the MEM_OFFS bit and match only EA instructions */ + ins->oprs[j].type &= ~(MEM_OFFS & ~MEMORY); + } + } +} diff --git a/assemble.h b/assemble.h new file mode 100644 index 0000000..e5e5015 --- /dev/null +++ b/assemble.h @@ -0,0 +1,47 @@ +/* ----------------------------------------------------------------------- * + * + * Copyright 1996-2009 The NASM Authors - All Rights Reserved + * See the file AUTHORS included with the NASM distribution for + * the specific copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following + * conditions are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ----------------------------------------------------------------------- */ + +/* + * assemble.h header file for assemble.c + */ + +#ifndef NASM_ASSEMBLE_H +#define NASM_ASSEMBLE_H + +int64_t insn_size(int32_t segment, int64_t offset, int bits, uint32_t cp, + insn * instruction, efunc error); +int64_t assemble(int32_t segment, int64_t offset, int bits, uint32_t cp, + insn * instruction, struct ofmt *output, efunc error, + ListGen * listgen); + +#endif diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..5a1395d --- /dev/null +++ b/autogen.sh @@ -0,0 +1,7 @@ +#!/bin/sh -xe +# +# Simple script to run the appropriate autotools from a repository. +# +autoheader +autoconf +rm -rf autom4te.cache config.log config.status diff --git a/compiler.h b/compiler.h new file mode 100644 index 0000000..5805f5a --- /dev/null +++ b/compiler.h @@ -0,0 +1,186 @@ +/* ----------------------------------------------------------------------- * + * + * Copyright 2007-2009 The NASM Authors - All Rights Reserved + * See the file AUTHORS included with the NASM distribution for + * the specific copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following + * conditions are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ----------------------------------------------------------------------- */ + +/* + * compiler.h + * + * Compiler-specific macros for NASM. Feel free to add support for + * other compilers in here. + * + * This header file should be included before any other header. + */ + +#ifndef NASM_COMPILER_H +#define NASM_COMPILER_H 1 + +#ifdef HAVE_CONFIG_H +# include "config.h" +/* autoconf doesn't define these if they are redundant, but we want to + be able to #ifdef them... */ +#else +/* Default these to unsupported unless we have config.h */ +# ifndef inline +# define inline +# endif +# ifndef restrict +# define restrict +# endif +#endif /* HAVE_CONFIG_H */ + +/* This is required to get the standard macros when compiling + with a C++ compiler. This must be defined *before* is + included, directly or indirectly. */ +#define __STDC_CONSTANT_MACROS 1 +#define __STDC_LIMIT_MACROS 1 +#define __STDC_FORMAT_MACROS 1 + +#ifdef __GNUC__ +# if __GNUC__ >= 4 +# define HAVE_GNUC_4 +# endif +# if __GNUC__ >= 3 +# define HAVE_GNUC_3 +# endif +#endif + +#ifdef __GNUC__ +# define _unused __attribute__((unused)) +#else +# define _unused +#endif + +/* Some versions of MSVC have these only with underscores in front */ +#include +#include +#include + +#ifndef HAVE_SNPRINTF +# ifdef HAVE__SNPRINTF +# define snprintf _snprintf +# else +int snprintf(char *, size_t, const char *, ...); +# endif +#endif + +#ifndef HAVE_VSNPRINTF +# ifdef HAVE__VSNPRINT +# define vsnprintf _vsnprintf +# else +int vsnprintf(char *, size_t, const char *, va_list); +# endif +#endif + +#if !defined(HAVE_STRLCPY) || !HAVE_DECL_STRLCPY +size_t strlcpy(char *, const char *, size_t); +#endif + +#ifndef __cplusplus /* C++ has false, true, bool as keywords */ +# if defined(HAVE_STDBOOL_H) && defined(HAVE_WORKING_BOOL) +# include +# else +/* This is sort of dangerous, since casts will behave different than + casting to the standard boolean type. Always use !!, not (bool). */ +typedef enum bool { false, true } bool; +# endif +#endif + +/* Provide a substitute for offsetof() if we don't have one. This + variant works on most (but not *all*) systems... */ +#ifndef offsetof +# define offsetof(t,m) ((size_t)&(((t *)0)->m)) +#endif + +/* The container_of construct: if p is a pointer to member m of + container class c, then return a pointer to the container of which + *p is a member. */ +#ifndef container_of +# define container_of(p, c, m) ((c *)((char *)(p) - offsetof(c,m))) +#endif + +/* Some misguided platforms hide the defs for these */ +#if defined(HAVE_STRCASECMP) && !HAVE_DECL_STRCASECMP +int strcasecmp(const char *, const char *); +#endif + +#if defined(HAVE_STRICMP) && !HAVE_DECL_STRICMP +int stricmp(const char *, const char *); +#endif + +#if defined(HAVE_STRNCASECMP) && !HAVE_DECL_STRNCASECMP +int strncasecmp(const char *, const char *, size_t); +#endif + +#if defined(HAVE_STRNICMP) && !HAVE_DECL_STRNICMP +int strnicmp(const char *, const char *, size_t); +#endif + +#if defined(HAVE_STRSEP) && !HAVE_DECL_STRSEP +char *strsep(char **, const char *); +#endif + +/* + * Define this to 1 for faster performance if this is a littleendian + * platform which can do unaligned memory references. It is safe + * to leave it defined to 0 even if that is true. + */ +#if defined(__386__) || defined(__i386__) || defined(__x86_64__) +# define X86_MEMORY 1 +# ifndef WORDS_LITTLEENDIAN +# define WORDS_LITTLEENDIAN 1 +# endif +#else +# define X86_MEMORY 0 +#endif + +/* + * Hints to the compiler that a particular branch of code is more or + * less likely to be taken. + */ +#if defined(__GNUC__) && __GNUC__ >= 3 +# define likely(x) __builtin_expect(!!(x), 1) +# define unlikely(x) __builtin_expect(!!(x), 0) +#else +# define likely(x) (!!(x)) +# define unlikely(x) (!!(x)) +#endif + +/* + * How to tell the compiler that a function doesn't return + */ +#ifdef __GNUC__ +# define no_return void __attribute__((noreturn)) +#else +# define no_return void +#endif + +#endif /* NASM_COMPILER_H */ diff --git a/config.h.in b/config.h.in new file mode 100644 index 0000000..3625fe0 --- /dev/null +++ b/config.h.in @@ -0,0 +1,189 @@ +/* config.h.in. Generated from configure.in by autoheader. */ + +/* Define if building universal (internal helper macro) */ +#undef AC_APPLE_UNIVERSAL_BUILD + +/* Define to 1 if you have the declaration of `strcasecmp', and to 0 if you + don't. */ +#undef HAVE_DECL_STRCASECMP + +/* Define to 1 if you have the declaration of `stricmp', and to 0 if you + don't. */ +#undef HAVE_DECL_STRICMP + +/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you + don't. */ +#undef HAVE_DECL_STRLCPY + +/* Define to 1 if you have the declaration of `strncasecmp', and to 0 if you + don't. */ +#undef HAVE_DECL_STRNCASECMP + +/* Define to 1 if you have the declaration of `strnicmp', and to 0 if you + don't. */ +#undef HAVE_DECL_STRNICMP + +/* Define to 1 if you have the declaration of `strsep', and to 0 if you don't. + */ +#undef HAVE_DECL_STRSEP + +/* Define to 1 if you have the `getgid' function. */ +#undef HAVE_GETGID + +/* Define to 1 if you have the `getuid' function. */ +#undef HAVE_GETUID + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIMITS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `snprintf' function. */ +#undef HAVE_SNPRINTF + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDBOOL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the `strcasecmp' function. */ +#undef HAVE_STRCASECMP + +/* Define to 1 if you have the `strcspn' function. */ +#undef HAVE_STRCSPN + +/* Define to 1 if you have the `stricmp' function. */ +#undef HAVE_STRICMP + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the `strlcpy' function. */ +#undef HAVE_STRLCPY + +/* Define to 1 if you have the `strncasecmp' function. */ +#undef HAVE_STRNCASECMP + +/* Define to 1 if you have the `strnicmp' function. */ +#undef HAVE_STRNICMP + +/* Define to 1 if you have the `strsep' function. */ +#undef HAVE_STRSEP + +/* Define to 1 if you have the `strspn' function. */ +#undef HAVE_STRSPN + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the `vsnprintf' function. */ +#undef HAVE_VSNPRINTF + +/* Define to 1 if your compiler has a correct implementation of bool */ +#undef HAVE_WORKING_BOOL + +/* Define to 1 if you have the `_snprintf' function. */ +#undef HAVE__SNPRINTF + +/* Define to 1 if you have the `_vsnprintf' function. */ +#undef HAVE__VSNPRINTF + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# undef _TANDEM_SOURCE +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif + + +/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ +#undef WORDS_BIGENDIAN + +/* Define to 1 if your processor stores words with the least significant byte + first (like Intel and VAX, unlike Motorola and SPARC). */ +#undef WORDS_LITTLEENDIAN + +/* Define to 1 if on MINIX. */ +#undef _MINIX + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +#undef _POSIX_1_SOURCE + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +#undef _POSIX_SOURCE + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#undef inline +#endif + +/* Define to the equivalent of the C99 'restrict' keyword, or to + nothing if this is not supported. Do not define if restrict is + supported directly. */ +#undef restrict +/* Work around a bug in Sun C++: it does not support _Restrict, even + though the corresponding Sun C compiler does, which causes + "#define restrict _Restrict" in the previous line. Perhaps some future + version of Sun C++ will work with _Restrict; if so, it'll probably + define __RESTRICT, just as Sun C does. */ +#if defined __SUNPRO_CC && !defined __RESTRICT +# define _Restrict +#endif + +/* Define to `unsigned int' if does not define. */ +#undef size_t diff --git a/configure b/configure new file mode 100755 index 0000000..3d4cc4b --- /dev/null +++ b/configure @@ -0,0 +1,9270 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.63. +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no +fi + + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + case $as_dir in + /*) + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell bug-autoconf@gnu.org about your system, + echo including any error possibly output before this message. + echo This can help us improve future autoconf versions. + echo Configuration will now proceed without shell functions. +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + + +exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= + +ac_unique_file="config.h.in" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='LTLIBOBJS +LIBOBJS +XOBJS +PSTOPDF +PS2PDF +ACRODIST +NROFF +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +SET_MAKE +LN_S +EGREP +GREP +CPP +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +ac_prefix_program +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { $as_echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { $as_echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 + { (exit 1); exit 1; }; } ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { $as_echo "$as_me: error: working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures this package to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF +_ACEOF +fi + +if test -n "$ac_init_help"; then + + cat <<\_ACEOF + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +configure +generated by GNU Autoconf 2.63 + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was +generated by GNU Autoconf 2.63. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" +done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------------- ## +## File substitutions. ## +## ------------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + ac_site_file1=$CONFIG_SITE +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test -r "$ac_site_file"; then + { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + + + + + + + + + + + + + + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +ac_config_headers="$ac_config_headers config.h" + + + + +if test "x$prefix" = xNONE; then + $as_echo_n "checking for prefix by " >&6 + # Extract the first word of "nasm", so it can be a program name with args. +set dummy nasm; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_ac_prefix_program+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $ac_prefix_program in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_prefix_program="$ac_prefix_program" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_prefix_program="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +ac_prefix_program=$ac_cv_path_ac_prefix_program +if test -n "$ac_prefix_program"; then + { $as_echo "$as_me:$LINENO: result: $ac_prefix_program" >&5 +$as_echo "$ac_prefix_program" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test -n "$ac_prefix_program"; then + prefix=`$as_dirname -- "$ac_prefix_program" || +$as_expr X"$ac_prefix_program" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_prefix_program" : 'X\(//\)[^/]' \| \ + X"$ac_prefix_program" : 'X\(//\)$' \| \ + X"$ac_prefix_program" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_prefix_program" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + prefix=`$as_dirname -- "$prefix" || +$as_expr X"$prefix" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$prefix" : 'X\(//\)[^/]' \| \ + X"$prefix" : 'X\(//\)$' \| \ + X"$prefix" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$prefix" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } + +# Provide some information about the compiler. +$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi + +{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +if test -z "$ac_file"; then + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } +fi + +ac_exeext=$ac_cv_exeext + +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } + fi + fi +fi +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + +rm -f conftest$ac_cv_exeext +{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if test "${ac_cv_objext+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:$LINENO: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:$LINENO: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + if test "${ac_cv_header_minix_config_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 +$as_echo_n "checking for minix/config.h... " >&6; } +if test "${ac_cv_header_minix_config_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 +$as_echo "$ac_cv_header_minix_config_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking minix/config.h usability" >&5 +$as_echo_n "checking minix/config.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking minix/config.h presence" >&5 +$as_echo_n "checking minix/config.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 +$as_echo_n "checking for minix/config.h... " >&6; } +if test "${ac_cv_header_minix_config_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_minix_config_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 +$as_echo "$ac_cv_header_minix_config_h" >&6; } + +fi +if test "x$ac_cv_header_minix_config_h" = x""yes; then + MINIX=yes +else + MINIX= +fi + + + if test "$MINIX" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define _POSIX_SOURCE 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define _POSIX_1_SOURCE 2 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define _MINIX 1 +_ACEOF + + fi + + + + { $as_echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5 +$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } +if test "${ac_cv_safe_to_define___extensions__+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +# define __EXTENSIONS__ 1 + $ac_includes_default +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_safe_to_define___extensions__=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_safe_to_define___extensions__=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5 +$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } + test $ac_cv_safe_to_define___extensions__ = yes && + cat >>confdefs.h <<\_ACEOF +#define __EXTENSIONS__ 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define _ALL_SOURCE 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define _GNU_SOURCE 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define _POSIX_PTHREAD_SEMANTICS 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define _TANDEM_SOURCE 1 +_ACEOF + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } + +# Provide some information about the compiler. +$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:$LINENO: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:$LINENO: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + +{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +if test -f nasm.c; then + # we're building in the source dir, so we don't need this check at all + ac_cv_prog_make_vpathok=yes +else + { $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} has sane VPATH handling" >&5 +$as_echo_n "checking whether ${MAKE-make} has sane VPATH handling... " >&6; } +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` +if test "${ac_cv_prog_make_vpathok+set}" = set; then + $as_echo_n "(cached) " >&6 +else + mkdir conftestdir +cat > conftestdir/conftestmake <<\EOF +VPATH = .. +conftestfoo: conftestbar + @echo ac_make2temp=ok +conftestbar: conftestbaz + @echo ac_maketemp=broken + @touch conftestbar +EOF +echo > conftestbaz # these two lines need to be... +echo > conftestbar # ... in this order not the other +unset ac_maketemp +unset ac_make2temp +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `cd conftestdir; ${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + ac_cv_prog_make_vpathok=no +else + if test -n "$ac_make2temp"; then + ac_cv_prog_make_vpathok=yes + else + ac_cv_prog_make_vpathok=no + fi +fi +rm -rf conftestdir +rm -f conftestbar conftestbaz +fi +if test $ac_cv_prog_make_vpathok = yes; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + +fi +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} + { (exit 1); exit 1; }; } +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + +done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + +{ $as_echo "$as_me:$LINENO: checking if $CC accepts -W" >&5 +$as_echo_n "checking if $CC accepts -W... " >&6; } + pa_add_cflags__old_cflags="$CFLAGS" + CFLAGS="$CFLAGS -W" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +printf("Hello, World!\n"); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + CFLAGS="$pa_add_cflags__old_cflags" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: checking if $CC accepts -Wall" >&5 +$as_echo_n "checking if $CC accepts -Wall... " >&6; } + pa_add_cflags__old_cflags="$CFLAGS" + CFLAGS="$CFLAGS -Wall" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +printf("Hello, World!\n"); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + CFLAGS="$pa_add_cflags__old_cflags" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: checking if $CC accepts -std=c99" >&5 +$as_echo_n "checking if $CC accepts -std=c99... " >&6; } + pa_add_cflags__old_cflags="$CFLAGS" + CFLAGS="$CFLAGS -std=c99" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +printf("Hello, World!\n"); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + CFLAGS="$pa_add_cflags__old_cflags" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: checking if $CC accepts -pedantic" >&5 +$as_echo_n "checking if $CC accepts -pedantic... " >&6; } + pa_add_cflags__old_cflags="$CFLAGS" + CFLAGS="$CFLAGS -pedantic" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +printf("Hello, World!\n"); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + CFLAGS="$pa_add_cflags__old_cflags" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + +for ac_prog in nroff +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_NROFF+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$NROFF"; then + ac_cv_prog_NROFF="$NROFF" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_NROFF="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +NROFF=$ac_cv_prog_NROFF +if test -n "$NROFF"; then + { $as_echo "$as_me:$LINENO: result: $NROFF" >&5 +$as_echo "$NROFF" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$NROFF" && break +done +test -n "$NROFF" || NROFF="echo" + +for ac_prog in acrodist +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ACRODIST+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ACRODIST"; then + ac_cv_prog_ACRODIST="$ACRODIST" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ACRODIST="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ACRODIST=$ac_cv_prog_ACRODIST +if test -n "$ACRODIST"; then + { $as_echo "$as_me:$LINENO: result: $ACRODIST" >&5 +$as_echo "$ACRODIST" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ACRODIST" && break +done +test -n "$ACRODIST" || ACRODIST="false" + +for ac_prog in ps2pdf +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_PS2PDF+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$PS2PDF"; then + ac_cv_prog_PS2PDF="$PS2PDF" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_PS2PDF="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +PS2PDF=$ac_cv_prog_PS2PDF +if test -n "$PS2PDF"; then + { $as_echo "$as_me:$LINENO: result: $PS2PDF" >&5 +$as_echo "$PS2PDF" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$PS2PDF" && break +done +test -n "$PS2PDF" || PS2PDF="false" + +for ac_prog in pstopdf +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_PSTOPDF+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$PSTOPDF"; then + ac_cv_prog_PSTOPDF="$PSTOPDF" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_PSTOPDF="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +PSTOPDF=$ac_cv_prog_PSTOPDF +if test -n "$PSTOPDF"; then + { $as_echo "$as_me:$LINENO: result: $PSTOPDF" >&5 +$as_echo "$PSTOPDF" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$PSTOPDF" && break +done +test -n "$PSTOPDF" || PSTOPDF="false" + + +{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +if test $ac_cv_header_stdc = no; then + { { $as_echo "$as_me:$LINENO: error: NASM requires ANSI C header files to compile" >&5 +$as_echo "$as_me: error: NASM requires ANSI C header files to compile" >&2;} + { (exit 1); exit 1; }; } +fi + + +for ac_header in limits.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + +fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +if test $ac_cv_header_limits_h = no; then + { { $as_echo "$as_me:$LINENO: error: NASM requires '' to compile" >&5 +$as_echo "$as_me: error: NASM requires '' to compile" >&2;} + { (exit 1); exit 1; }; } +fi + + +for ac_header in inttypes.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + +fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +else + CFLAGS="$CFLAGS -I\$(top_srcdir)/inttypes" +fi + +done + + + +for ac_header in strings.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + +fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +for ac_header in stdbool.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + +fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if test "${ac_cv_c_const+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset cs; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_const=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_const=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +cat >>confdefs.h <<\_ACEOF +#define const /**/ +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if test "${ac_cv_c_inline+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_inline=$ac_kw +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } + + +case $ac_cv_c_inline in + inline | yes) ;; + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif +_ACEOF + ;; +esac + +{ $as_echo "$as_me:$LINENO: checking for C/C++ restrict keyword" >&5 +$as_echo_n "checking for C/C++ restrict keyword... " >&6; } +if test "${ac_cv_c_restrict+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_c_restrict=no + # The order here caters to the fact that C++ does not require restrict. + for ac_kw in __restrict __restrict__ _Restrict restrict; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +typedef int * int_ptr; + int foo (int_ptr $ac_kw ip) { + return ip[0]; + } +int +main () +{ +int s[1]; + int * $ac_kw t = s; + t[0] = 0; + return foo(t) + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_restrict=$ac_kw +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_restrict" != no && break + done + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_restrict" >&5 +$as_echo "$ac_cv_c_restrict" >&6; } + + + case $ac_cv_c_restrict in + restrict) ;; + no) cat >>confdefs.h <<\_ACEOF +#define restrict /**/ +_ACEOF + ;; + *) cat >>confdefs.h <<_ACEOF +#define restrict $ac_cv_c_restrict +_ACEOF + ;; + esac + +{ $as_echo "$as_me:$LINENO: checking for size_t" >&5 +$as_echo_n "checking for size_t... " >&6; } +if test "${ac_cv_type_size_t+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_type_size_t=no +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if (sizeof (size_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if (sizeof ((size_t))) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_size_t=yes +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +$as_echo "$ac_cv_type_size_t" >&6; } +if test "x$ac_cv_type_size_t" = x""yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking if $CC has a working bool type" >&5 +$as_echo_n "checking if $CC has a working bool type... " >&6; } + cat >conftest.$ac_ext <<_ACEOF + +#ifndef __cplusplus +#include +#endif +int foo(bool x, int y) +{ + return x+y; +} + +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_WORKING_BOOL 1 +_ACEOF + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + + { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if test "${ac_cv_c_bigendian+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + + # Check for potential -arch flags. It is not universal unless + # there are some -arch flags. Note that *ppc* also matches + # ppc64. This check is also rather less than ideal. + case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #( + *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;; + esac +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + # It does; now see whether it defined to BIG_ENDIAN or not. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_bigendian=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_bigendian=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef _BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_bigendian=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_bigendian=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then + # Try to guess by grepping values from an object file. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; + +int +main () +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=no +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_c_bigendian=yes +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + cat >>confdefs.h <<\_ACEOF +#define WORDS_BIGENDIAN 1 +_ACEOF +;; #( + no) + cat >>confdefs.h <<\_ACEOF +#define WORDS_LITTLEENDIAN 1 +_ACEOF + ;; #( + universal) + +cat >>confdefs.h <<\_ACEOF +#define AC_APPLE_UNIVERSAL_BUILD 1 +_ACEOF + + ;; #( + *) + { { $as_echo "$as_me:$LINENO: error: unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +$as_echo "$as_me: error: unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + { (exit 1); exit 1; }; } ;; + esac + + + + + + + + + +for ac_func in strcspn +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + { { $as_echo "$as_me:$LINENO: error: NASM requires ANSI C (specifically, \"strcspn\")" >&5 +$as_echo "$as_me: error: NASM requires ANSI C (specifically, \"strcspn\")" >&2;} + { (exit 1); exit 1; }; } +fi +done + + + +for ac_func in strspn +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + { { $as_echo "$as_me:$LINENO: error: NASM requires ANSI C (specifically, \"strspn\")" >&5 +$as_echo "$as_me: error: NASM requires ANSI C (specifically, \"strspn\")" >&2;} + { (exit 1); exit 1; }; } +fi +done + + +missing=true + + +for ac_func in vsnprintf _vsnprintf +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + missing=false +fi +done + +if $missing; then + XOBJS="$XOBJS lib/vsnprintf.o" +fi + +missing=true + + +for ac_func in snprintf _snprintf +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + missing=false +fi +done + +if $missing; then + XOBJS="$XOBJS lib/snprintf.o" +fi + + + +for ac_func in strcasecmp stricmp +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + +for ac_func in strncasecmp strnicmp +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +for ac_func in strsep +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +for ac_func in strlcpy +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + +for ac_func in getuid +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +for ac_func in getgid +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +{ $as_echo "$as_me:$LINENO: checking whether strcasecmp is declared" >&5 +$as_echo_n "checking whether strcasecmp is declared... " >&6; } +if test "${ac_cv_have_decl_strcasecmp+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +#ifndef strcasecmp + (void) strcasecmp; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl_strcasecmp=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_strcasecmp=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strcasecmp" >&5 +$as_echo "$ac_cv_have_decl_strcasecmp" >&6; } +if test "x$ac_cv_have_decl_strcasecmp" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRCASECMP 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRCASECMP 0 +_ACEOF + + +fi + + +{ $as_echo "$as_me:$LINENO: checking whether stricmp is declared" >&5 +$as_echo_n "checking whether stricmp is declared... " >&6; } +if test "${ac_cv_have_decl_stricmp+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +#ifndef stricmp + (void) stricmp; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl_stricmp=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_stricmp=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_stricmp" >&5 +$as_echo "$ac_cv_have_decl_stricmp" >&6; } +if test "x$ac_cv_have_decl_stricmp" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRICMP 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRICMP 0 +_ACEOF + + +fi + + +{ $as_echo "$as_me:$LINENO: checking whether strncasecmp is declared" >&5 +$as_echo_n "checking whether strncasecmp is declared... " >&6; } +if test "${ac_cv_have_decl_strncasecmp+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +#ifndef strncasecmp + (void) strncasecmp; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl_strncasecmp=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_strncasecmp=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strncasecmp" >&5 +$as_echo "$ac_cv_have_decl_strncasecmp" >&6; } +if test "x$ac_cv_have_decl_strncasecmp" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRNCASECMP 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRNCASECMP 0 +_ACEOF + + +fi + + +{ $as_echo "$as_me:$LINENO: checking whether strnicmp is declared" >&5 +$as_echo_n "checking whether strnicmp is declared... " >&6; } +if test "${ac_cv_have_decl_strnicmp+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +#ifndef strnicmp + (void) strnicmp; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl_strnicmp=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_strnicmp=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strnicmp" >&5 +$as_echo "$ac_cv_have_decl_strnicmp" >&6; } +if test "x$ac_cv_have_decl_strnicmp" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRNICMP 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRNICMP 0 +_ACEOF + + +fi + + +{ $as_echo "$as_me:$LINENO: checking whether strsep is declared" >&5 +$as_echo_n "checking whether strsep is declared... " >&6; } +if test "${ac_cv_have_decl_strsep+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +#ifndef strsep + (void) strsep; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl_strsep=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_strsep=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strsep" >&5 +$as_echo "$ac_cv_have_decl_strsep" >&6; } +if test "x$ac_cv_have_decl_strsep" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRSEP 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRSEP 0 +_ACEOF + + +fi + + +{ $as_echo "$as_me:$LINENO: checking whether strlcpy is declared" >&5 +$as_echo_n "checking whether strlcpy is declared... " >&6; } +if test "${ac_cv_have_decl_strlcpy+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +#ifndef strlcpy + (void) strlcpy; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl_strlcpy=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_strlcpy=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strlcpy" >&5 +$as_echo "$ac_cv_have_decl_strlcpy" >&6; } +if test "x$ac_cv_have_decl_strlcpy" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRLCPY 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRLCPY 0 +_ACEOF + + +fi + + + +if test $ac_cv_prog_make_vpathok = no; then + echo Copying generated srcs into build directory to compensate for VPATH breakage + for file in macros.c insnsa.c insnsd.c insnsn.c insnsi.h version.h version.mac; do + if test ! -f $file; then cp -p ${srcdir}/${file} .; fi + done +fi + +ac_config_commands="$ac_config_commands default-1" + +ac_config_files="$ac_config_files Makefile rdoff/Makefile doc/Makefile" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else + { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + + +: ${CONFIG_STATUS=./config.status} +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 + +# Save the log message, to keep $[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by $as_me, which was +generated by GNU Autoconf 2.63. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTION]... [FILE]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.63, + with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2008 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + { $as_echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { $as_echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# + + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "rdoff/Makefile") CONFIG_FILES="$CONFIG_FILES rdoff/Makefile" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + + *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || +{ + $as_echo "$as_me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=' ' +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\).*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\).*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 +$as_echo "$as_me: error: could not setup config files machinery" >&2;} + { (exit 1); exit 1; }; } +_ACEOF + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_t=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_t"; then + break + elif $ac_last_try; then + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 +$as_echo "$as_me: error: could not setup config headers machinery" >&2;} + { (exit 1); exit 1; }; } +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 +$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + ac_file_inputs="$ac_file_inputs '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" + } >"$tmp/config.h" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$tmp/config.h" "$ac_file" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 +$as_echo "$as_me: error: could not create -" >&2;} + { (exit 1); exit 1; }; } + fi + ;; + + :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "default-1":C) mkdir -p output ;; + + esac +done # for ac_tag + + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + diff --git a/configure.in b/configure.in new file mode 100644 index 0000000..c23bac1 --- /dev/null +++ b/configure.in @@ -0,0 +1,156 @@ +dnl Process this file with autoconf 2.61 or later to produce +dnl a configure script. +AC_PREREQ(2.61) +AC_INIT(config.h.in) +AC_CONFIG_HEADERS(config.h) + +dnl Check for broken VPATH handling on older NetBSD makes. +AC_DEFUN(AC_PROG_MAKE_VPATHOK, +[AC_MSG_CHECKING(whether ${MAKE-make} has sane VPATH handling) +set dummy ${MAKE-make}; ac_make=`echo "[$]2" | sed 'y%./+-%__p_%'` +AC_CACHE_VAL(ac_cv_prog_make_vpathok, +[mkdir conftestdir +cat > conftestdir/conftestmake <<\EOF +VPATH = .. +conftestfoo: conftestbar + @echo ac_make2temp=ok +conftestbar: conftestbaz + @echo ac_maketemp=broken + @touch conftestbar +EOF +echo > conftestbaz # these two lines need to be... +echo > conftestbar # ... in this order not the other +changequote(, )dnl +unset ac_maketemp +unset ac_make2temp +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `cd conftestdir; ${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` +changequote([, ])dnl +if test -n "$ac_maketemp"; then + ac_cv_prog_make_vpathok=no +else + if test -n "$ac_make2temp"; then + ac_cv_prog_make_vpathok=yes + else + ac_cv_prog_make_vpathok=no + fi +fi +rm -rf conftestdir +rm -f conftestbar conftestbaz])dnl +if test $ac_cv_prog_make_vpathok = yes; then + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi +]) + +AC_PREFIX_PROGRAM(nasm) + +dnl Checks for programs. +dnl Consider AC_USE_SYSTEM_EXTENSIONS if autoconf 2.61 is OK in the future +AC_USE_SYSTEM_EXTENSIONS +AC_PROG_CC +AC_PROG_LN_S +AC_PROG_MAKE_SET +if test -f nasm.c; then + # we're building in the source dir, so we don't need this check at all + ac_cv_prog_make_vpathok=yes +else + AC_PROG_MAKE_VPATHOK +fi +AC_PROG_INSTALL + +dnl If we have gcc, add appropriate options +PA_ADD_CFLAGS([-W]) +PA_ADD_CFLAGS([-Wall]) +PA_ADD_CFLAGS([-std=c99]) +PA_ADD_CFLAGS([-pedantic]) + +dnl Look for programs... +AC_CHECK_PROGS(NROFF, nroff, echo) +AC_CHECK_PROGS(ACRODIST, acrodist, false) +AC_CHECK_PROGS(PS2PDF, ps2pdf, false) +AC_CHECK_PROGS(PSTOPDF, pstopdf, false) + +dnl Checks for header files. +AC_HEADER_STDC +if test $ac_cv_header_stdc = no; then + AC_MSG_ERROR([NASM requires ANSI C header files to compile]) +fi + +AC_CHECK_HEADERS(limits.h) +if test $ac_cv_header_limits_h = no; then + AC_MSG_ERROR([NASM requires '' to compile]) +fi + +dnl Check for or add a substitute version +AC_CHECK_HEADERS(inttypes.h, , CFLAGS="$CFLAGS -I\$(top_srcdir)/inttypes") + +dnl The standard header for str*casecmp is +AC_CHECK_HEADERS(strings.h) + +dnl Look for +AC_CHECK_HEADERS(stdbool.h) + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_C_INLINE +AC_C_RESTRICT +AC_TYPE_SIZE_T +PA_WORKING_BOOL +AC_C_BIGENDIAN(AC_DEFINE(WORDS_BIGENDIAN),AC_DEFINE(WORDS_LITTLEENDIAN)) +AH_TEMPLATE(WORDS_BIGENDIAN, +[Define to 1 if your processor stores words with the most significant +byte first (like Motorola and SPARC, unlike Intel and VAX).]) +AH_TEMPLATE(WORDS_LITTLEENDIAN, +[Define to 1 if your processor stores words with the least significant +byte first (like Intel and VAX, unlike Motorola and SPARC).]) + +dnl Checks for library functions. +AC_SUBST(XOBJS) + +AC_CHECK_FUNCS(strcspn, , + AC_MSG_ERROR([NASM requires ANSI C (specifically, "strcspn")])) + +AC_CHECK_FUNCS(strspn, , + AC_MSG_ERROR([NASM requires ANSI C (specifically, "strspn")])) + +missing=true +AC_CHECK_FUNCS([vsnprintf _vsnprintf], missing=false) +if $missing; then + XOBJS="$XOBJS lib/vsnprintf.o" +fi + +missing=true +AC_CHECK_FUNCS([snprintf _snprintf], missing=false) +if $missing; then + XOBJS="$XOBJS lib/snprintf.o" +fi + +AC_CHECK_FUNCS(strcasecmp stricmp) +AC_CHECK_FUNCS(strncasecmp strnicmp) +AC_CHECK_FUNCS(strsep) +AC_CHECK_FUNCS(strlcpy) + +AC_CHECK_FUNCS(getuid) +AC_CHECK_FUNCS(getgid) + +dnl Check for functions that might not be declared in the headers for +dnl various idiotic reasons (mostly because of library authors +dnl abusing the meaning of __STRICT_ANSI__) +AC_CHECK_DECLS(strcasecmp) +AC_CHECK_DECLS(stricmp) +AC_CHECK_DECLS(strncasecmp) +AC_CHECK_DECLS(strnicmp) +AC_CHECK_DECLS(strsep) +AC_CHECK_DECLS(strlcpy) + +if test $ac_cv_prog_make_vpathok = no; then + echo Copying generated srcs into build directory to compensate for VPATH breakage + for file in macros.c insnsa.c insnsd.c insnsn.c insnsi.h version.h version.mac; do + if test ! -f $file; then cp -p ${srcdir}/${file} .; fi + done +fi + +AC_OUTPUT_COMMANDS([mkdir -p output]) +AC_OUTPUT(Makefile rdoff/Makefile doc/Makefile) diff --git a/contrib/VSrules/nasm.README b/contrib/VSrules/nasm.README new file mode 100644 index 0000000..8fbf155 --- /dev/null +++ b/contrib/VSrules/nasm.README @@ -0,0 +1,16 @@ + Visual Studio 2008 NASM integration + + +In order to use nasm seamlessly in your VS2k8, follow the steps below. + +1. First install nasm by running its installer +2. copy nasm.rules to c:\Program Files\Microsoft Visual Studio 2008\VC\VCProjectDefaults +3. Start Visual Studio 2008 +4. go to Tools->Options->VC++ Directories +5. click on Show Directories for Executables +6. add C:\Program Files\NASM to the list of paths +7. Open a solution that you want to use NASM with +8. Right click on the project name and select Custom Build Rules +9. Check the box next to the NASM line +10. Add any .asm files to the project +11. click on build to test diff --git a/contrib/VSrules/nasm.rules b/contrib/VSrules/nasm.rules new file mode 100644 index 0000000..79b4fb1 --- /dev/null +++ b/contrib/VSrules/nasm.rules @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + diff --git a/crc64.c b/crc64.c new file mode 100644 index 0000000..d93ea0c --- /dev/null +++ b/crc64.c @@ -0,0 +1,188 @@ +/* ----------------------------------------------------------------------- * + * + * Copyright 1996-2009 The NASM Authors - All Rights Reserved + * See the file AUTHORS included with the NASM distribution for + * the specific copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following + * conditions are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ----------------------------------------------------------------------- */ + +#include "compiler.h" +#include "nasmlib.h" + +static const uint64_t crc64_tab[256] = { + UINT64_C(0x0000000000000000), UINT64_C(0x7ad870c830358979), + UINT64_C(0xf5b0e190606b12f2), UINT64_C(0x8f689158505e9b8b), + UINT64_C(0xc038e5739841b68f), UINT64_C(0xbae095bba8743ff6), + UINT64_C(0x358804e3f82aa47d), UINT64_C(0x4f50742bc81f2d04), + UINT64_C(0xab28ecb46814fe75), UINT64_C(0xd1f09c7c5821770c), + UINT64_C(0x5e980d24087fec87), UINT64_C(0x24407dec384a65fe), + UINT64_C(0x6b1009c7f05548fa), UINT64_C(0x11c8790fc060c183), + UINT64_C(0x9ea0e857903e5a08), UINT64_C(0xe478989fa00bd371), + UINT64_C(0x7d08ff3b88be6f81), UINT64_C(0x07d08ff3b88be6f8), + UINT64_C(0x88b81eabe8d57d73), UINT64_C(0xf2606e63d8e0f40a), + UINT64_C(0xbd301a4810ffd90e), UINT64_C(0xc7e86a8020ca5077), + UINT64_C(0x4880fbd87094cbfc), UINT64_C(0x32588b1040a14285), + UINT64_C(0xd620138fe0aa91f4), UINT64_C(0xacf86347d09f188d), + UINT64_C(0x2390f21f80c18306), UINT64_C(0x594882d7b0f40a7f), + UINT64_C(0x1618f6fc78eb277b), UINT64_C(0x6cc0863448deae02), + UINT64_C(0xe3a8176c18803589), UINT64_C(0x997067a428b5bcf0), + UINT64_C(0xfa11fe77117cdf02), UINT64_C(0x80c98ebf2149567b), + UINT64_C(0x0fa11fe77117cdf0), UINT64_C(0x75796f2f41224489), + UINT64_C(0x3a291b04893d698d), UINT64_C(0x40f16bccb908e0f4), + UINT64_C(0xcf99fa94e9567b7f), UINT64_C(0xb5418a5cd963f206), + UINT64_C(0x513912c379682177), UINT64_C(0x2be1620b495da80e), + UINT64_C(0xa489f35319033385), UINT64_C(0xde51839b2936bafc), + UINT64_C(0x9101f7b0e12997f8), UINT64_C(0xebd98778d11c1e81), + UINT64_C(0x64b116208142850a), UINT64_C(0x1e6966e8b1770c73), + UINT64_C(0x8719014c99c2b083), UINT64_C(0xfdc17184a9f739fa), + UINT64_C(0x72a9e0dcf9a9a271), UINT64_C(0x08719014c99c2b08), + UINT64_C(0x4721e43f0183060c), UINT64_C(0x3df994f731b68f75), + UINT64_C(0xb29105af61e814fe), UINT64_C(0xc849756751dd9d87), + UINT64_C(0x2c31edf8f1d64ef6), UINT64_C(0x56e99d30c1e3c78f), + UINT64_C(0xd9810c6891bd5c04), UINT64_C(0xa3597ca0a188d57d), + UINT64_C(0xec09088b6997f879), UINT64_C(0x96d1784359a27100), + UINT64_C(0x19b9e91b09fcea8b), UINT64_C(0x636199d339c963f2), + UINT64_C(0xdf7adabd7a6e2d6f), UINT64_C(0xa5a2aa754a5ba416), + UINT64_C(0x2aca3b2d1a053f9d), UINT64_C(0x50124be52a30b6e4), + UINT64_C(0x1f423fcee22f9be0), UINT64_C(0x659a4f06d21a1299), + UINT64_C(0xeaf2de5e82448912), UINT64_C(0x902aae96b271006b), + UINT64_C(0x74523609127ad31a), UINT64_C(0x0e8a46c1224f5a63), + UINT64_C(0x81e2d7997211c1e8), UINT64_C(0xfb3aa75142244891), + UINT64_C(0xb46ad37a8a3b6595), UINT64_C(0xceb2a3b2ba0eecec), + UINT64_C(0x41da32eaea507767), UINT64_C(0x3b024222da65fe1e), + UINT64_C(0xa2722586f2d042ee), UINT64_C(0xd8aa554ec2e5cb97), + UINT64_C(0x57c2c41692bb501c), UINT64_C(0x2d1ab4dea28ed965), + UINT64_C(0x624ac0f56a91f461), UINT64_C(0x1892b03d5aa47d18), + UINT64_C(0x97fa21650afae693), UINT64_C(0xed2251ad3acf6fea), + UINT64_C(0x095ac9329ac4bc9b), UINT64_C(0x7382b9faaaf135e2), + UINT64_C(0xfcea28a2faafae69), UINT64_C(0x8632586aca9a2710), + UINT64_C(0xc9622c4102850a14), UINT64_C(0xb3ba5c8932b0836d), + UINT64_C(0x3cd2cdd162ee18e6), UINT64_C(0x460abd1952db919f), + UINT64_C(0x256b24ca6b12f26d), UINT64_C(0x5fb354025b277b14), + UINT64_C(0xd0dbc55a0b79e09f), UINT64_C(0xaa03b5923b4c69e6), + UINT64_C(0xe553c1b9f35344e2), UINT64_C(0x9f8bb171c366cd9b), + UINT64_C(0x10e3202993385610), UINT64_C(0x6a3b50e1a30ddf69), + UINT64_C(0x8e43c87e03060c18), UINT64_C(0xf49bb8b633338561), + UINT64_C(0x7bf329ee636d1eea), UINT64_C(0x012b592653589793), + UINT64_C(0x4e7b2d0d9b47ba97), UINT64_C(0x34a35dc5ab7233ee), + UINT64_C(0xbbcbcc9dfb2ca865), UINT64_C(0xc113bc55cb19211c), + UINT64_C(0x5863dbf1e3ac9dec), UINT64_C(0x22bbab39d3991495), + UINT64_C(0xadd33a6183c78f1e), UINT64_C(0xd70b4aa9b3f20667), + UINT64_C(0x985b3e827bed2b63), UINT64_C(0xe2834e4a4bd8a21a), + UINT64_C(0x6debdf121b863991), UINT64_C(0x1733afda2bb3b0e8), + UINT64_C(0xf34b37458bb86399), UINT64_C(0x8993478dbb8deae0), + UINT64_C(0x06fbd6d5ebd3716b), UINT64_C(0x7c23a61ddbe6f812), + UINT64_C(0x3373d23613f9d516), UINT64_C(0x49aba2fe23cc5c6f), + UINT64_C(0xc6c333a67392c7e4), UINT64_C(0xbc1b436e43a74e9d), + UINT64_C(0x95ac9329ac4bc9b5), UINT64_C(0xef74e3e19c7e40cc), + UINT64_C(0x601c72b9cc20db47), UINT64_C(0x1ac40271fc15523e), + UINT64_C(0x5594765a340a7f3a), UINT64_C(0x2f4c0692043ff643), + UINT64_C(0xa02497ca54616dc8), UINT64_C(0xdafce7026454e4b1), + UINT64_C(0x3e847f9dc45f37c0), UINT64_C(0x445c0f55f46abeb9), + UINT64_C(0xcb349e0da4342532), UINT64_C(0xb1eceec59401ac4b), + UINT64_C(0xfebc9aee5c1e814f), UINT64_C(0x8464ea266c2b0836), + UINT64_C(0x0b0c7b7e3c7593bd), UINT64_C(0x71d40bb60c401ac4), + UINT64_C(0xe8a46c1224f5a634), UINT64_C(0x927c1cda14c02f4d), + UINT64_C(0x1d148d82449eb4c6), UINT64_C(0x67ccfd4a74ab3dbf), + UINT64_C(0x289c8961bcb410bb), UINT64_C(0x5244f9a98c8199c2), + UINT64_C(0xdd2c68f1dcdf0249), UINT64_C(0xa7f41839ecea8b30), + UINT64_C(0x438c80a64ce15841), UINT64_C(0x3954f06e7cd4d138), + UINT64_C(0xb63c61362c8a4ab3), UINT64_C(0xcce411fe1cbfc3ca), + UINT64_C(0x83b465d5d4a0eece), UINT64_C(0xf96c151de49567b7), + UINT64_C(0x76048445b4cbfc3c), UINT64_C(0x0cdcf48d84fe7545), + UINT64_C(0x6fbd6d5ebd3716b7), UINT64_C(0x15651d968d029fce), + UINT64_C(0x9a0d8ccedd5c0445), UINT64_C(0xe0d5fc06ed698d3c), + UINT64_C(0xaf85882d2576a038), UINT64_C(0xd55df8e515432941), + UINT64_C(0x5a3569bd451db2ca), UINT64_C(0x20ed197575283bb3), + UINT64_C(0xc49581ead523e8c2), UINT64_C(0xbe4df122e51661bb), + UINT64_C(0x3125607ab548fa30), UINT64_C(0x4bfd10b2857d7349), + UINT64_C(0x04ad64994d625e4d), UINT64_C(0x7e7514517d57d734), + UINT64_C(0xf11d85092d094cbf), UINT64_C(0x8bc5f5c11d3cc5c6), + UINT64_C(0x12b5926535897936), UINT64_C(0x686de2ad05bcf04f), + UINT64_C(0xe70573f555e26bc4), UINT64_C(0x9ddd033d65d7e2bd), + UINT64_C(0xd28d7716adc8cfb9), UINT64_C(0xa85507de9dfd46c0), + UINT64_C(0x273d9686cda3dd4b), UINT64_C(0x5de5e64efd965432), + UINT64_C(0xb99d7ed15d9d8743), UINT64_C(0xc3450e196da80e3a), + UINT64_C(0x4c2d9f413df695b1), UINT64_C(0x36f5ef890dc31cc8), + UINT64_C(0x79a59ba2c5dc31cc), UINT64_C(0x037deb6af5e9b8b5), + UINT64_C(0x8c157a32a5b7233e), UINT64_C(0xf6cd0afa9582aa47), + UINT64_C(0x4ad64994d625e4da), UINT64_C(0x300e395ce6106da3), + UINT64_C(0xbf66a804b64ef628), UINT64_C(0xc5bed8cc867b7f51), + UINT64_C(0x8aeeace74e645255), UINT64_C(0xf036dc2f7e51db2c), + UINT64_C(0x7f5e4d772e0f40a7), UINT64_C(0x05863dbf1e3ac9de), + UINT64_C(0xe1fea520be311aaf), UINT64_C(0x9b26d5e88e0493d6), + UINT64_C(0x144e44b0de5a085d), UINT64_C(0x6e963478ee6f8124), + UINT64_C(0x21c640532670ac20), UINT64_C(0x5b1e309b16452559), + UINT64_C(0xd476a1c3461bbed2), UINT64_C(0xaeaed10b762e37ab), + UINT64_C(0x37deb6af5e9b8b5b), UINT64_C(0x4d06c6676eae0222), + UINT64_C(0xc26e573f3ef099a9), UINT64_C(0xb8b627f70ec510d0), + UINT64_C(0xf7e653dcc6da3dd4), UINT64_C(0x8d3e2314f6efb4ad), + UINT64_C(0x0256b24ca6b12f26), UINT64_C(0x788ec2849684a65f), + UINT64_C(0x9cf65a1b368f752e), UINT64_C(0xe62e2ad306bafc57), + UINT64_C(0x6946bb8b56e467dc), UINT64_C(0x139ecb4366d1eea5), + UINT64_C(0x5ccebf68aecec3a1), UINT64_C(0x2616cfa09efb4ad8), + UINT64_C(0xa97e5ef8cea5d153), UINT64_C(0xd3a62e30fe90582a), + UINT64_C(0xb0c7b7e3c7593bd8), UINT64_C(0xca1fc72bf76cb2a1), + UINT64_C(0x45775673a732292a), UINT64_C(0x3faf26bb9707a053), + UINT64_C(0x70ff52905f188d57), UINT64_C(0x0a2722586f2d042e), + UINT64_C(0x854fb3003f739fa5), UINT64_C(0xff97c3c80f4616dc), + UINT64_C(0x1bef5b57af4dc5ad), UINT64_C(0x61372b9f9f784cd4), + UINT64_C(0xee5fbac7cf26d75f), UINT64_C(0x9487ca0fff135e26), + UINT64_C(0xdbd7be24370c7322), UINT64_C(0xa10fceec0739fa5b), + UINT64_C(0x2e675fb4576761d0), UINT64_C(0x54bf2f7c6752e8a9), + UINT64_C(0xcdcf48d84fe75459), UINT64_C(0xb71738107fd2dd20), + UINT64_C(0x387fa9482f8c46ab), UINT64_C(0x42a7d9801fb9cfd2), + UINT64_C(0x0df7adabd7a6e2d6), UINT64_C(0x772fdd63e7936baf), + UINT64_C(0xf8474c3bb7cdf024), UINT64_C(0x829f3cf387f8795d), + UINT64_C(0x66e7a46c27f3aa2c), UINT64_C(0x1c3fd4a417c62355), + UINT64_C(0x935745fc4798b8de), UINT64_C(0xe98f353477ad31a7), + UINT64_C(0xa6df411fbfb21ca3), UINT64_C(0xdc0731d78f8795da), + UINT64_C(0x536fa08fdfd90e51), UINT64_C(0x29b7d047efec8728), +}; + +uint64_t crc64(uint64_t crc, const char *str) +{ + uint8_t c; + + while ((c = *str++) != 0) { + crc = crc64_tab[(uint8_t)crc ^ c] ^ (crc >> 8); + } + + return crc; +} + +uint64_t crc64i(uint64_t crc, const char *str) +{ + uint8_t c; + + while ((c = *str++) != 0) { + crc = crc64_tab[(uint8_t)crc ^ nasm_tolower(c)] ^ (crc >> 8); + } + + return crc; +} diff --git a/directives.c b/directives.c new file mode 100644 index 0000000..1e1d302 --- /dev/null +++ b/directives.c @@ -0,0 +1,127 @@ +/* + * This file is generated from directives.dat + * by directives.pl; do not edit. + */ + +#include "compiler.h" +#include +#include "nasm.h" +#include "hashtbl.h" +#include "directives.h" + +const char * const directives[24] = { + NULL, + "absolute", + "bits", + "common", + "cpu", + "debug", + "default", + "extern", + "float", + "global", + "list", + "section", + "segment", + "warning", + "export", + "group", + "import", + "library", + "map", + "module", + "org", + "osabi", + "safeseh", + "uppercase" +}; + +enum directives find_directive(const char *token) +{ +#define UNUSED 16383 + static const int16_t hash1[32] = { + 0, + UNUSED, + UNUSED, + UNUSED, + UNUSED, + 0, + 0, + 10, + 0, + 9, + UNUSED, + UNUSED, + UNUSED, + 0, + 0, + UNUSED, + UNUSED, + UNUSED, + UNUSED, + 0, + UNUSED, + 22, + 16, + UNUSED, + -14, + 13, + UNUSED, + UNUSED, + 20, + -17, + 13, + 3, + }; + static const int16_t hash2[32] = { + 0, + UNUSED, + UNUSED, + UNUSED, + 0, + UNUSED, + 6, + 0, + 19, + 2, + 0, + 28, + 0, + 0, + 3, + UNUSED, + UNUSED, + UNUSED, + 8, + 21, + 9, + 1, + UNUSED, + UNUSED, + UNUSED, + UNUSED, + 1, + 5, + UNUSED, + UNUSED, + -4, + UNUSED, + }; + uint32_t k1, k2; + uint64_t crc; + uint16_t ix; + + crc = crc64i(UINT64_C(0x076259c3e291c26c), token); + k1 = (uint32_t)crc; + k2 = (uint32_t)(crc >> 32); + + ix = hash1[k1 & 0x1f] + hash2[k2 & 0x1f]; + if (ix >= 23) + return D_NONE; + + ix++; + if (nasm_stricmp(token, directives[ix])) + return D_NONE; + + return ix; +} diff --git a/directives.dat b/directives.dat new file mode 100644 index 0000000..b08d387 --- /dev/null +++ b/directives.dat @@ -0,0 +1,62 @@ +;; -------------------------------------------------------------------------- +;; +;; Copyright 1996-2009 The NASM Authors - All Rights Reserved +;; See the file AUTHORS included with the NASM distribution for +;; the specific copyright holders. +;; +;; Redistribution and use in source and binary forms, with or without +;; modification, are permitted provided that the following +;; conditions are met: +;; +;; * Redistributions of source code must retain the above copyright +;; notice, this list of conditions and the following disclaimer. +;; * Redistributions in binary form must reproduce the above +;; copyright notice, this list of conditions and the following +;; disclaimer in the documentation and/or other materials provided +;; with the distribution. +;; +;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +;; CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +;; INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +;; MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +;; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +;; CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +;; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +;; NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +;; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +;; HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +;; CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +;; OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +;; EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +;; +;; -------------------------------------------------------------------------- +;; +;; List of global NASM directives (including backend-specific ones) +;; + +; --- Global directives +absolute +bits +common +cpu +debug +default +extern +float +global +list +section +segment +warning + +; --- Format-specific directives +export ; outcoff, outobj +group ; outobj +import ; outobj +library ; outrdf2 +map ; outbin +module ; outrdf2 +org ; outbin +osabi ; outelf +safeseh ; outcoff +uppercase ; outieee, outobj diff --git a/directives.h b/directives.h new file mode 100644 index 0000000..97d5325 --- /dev/null +++ b/directives.h @@ -0,0 +1,39 @@ +/* + * This file is generated from directives.dat + * by directives.pl; do not edit. + */ + +#ifndef NASM_DIRECTIVES_H +#define NASM_DIRECTIVES_H + +enum directives { + D_NONE, + D_ABSOLUTE, + D_BITS, + D_COMMON, + D_CPU, + D_DEBUG, + D_DEFAULT, + D_EXTERN, + D_FLOAT, + D_GLOBAL, + D_LIST, + D_SECTION, + D_SEGMENT, + D_WARNING, + D_EXPORT, + D_GROUP, + D_IMPORT, + D_LIBRARY, + D_MAP, + D_MODULE, + D_ORG, + D_OSABI, + D_SAFESEH, + D_UPPERCASE +}; + +extern const char * const directives[24]; +enum directives find_directive(const char *token); + +#endif /* NASM_DIRECTIVES_H */ diff --git a/directives.pl b/directives.pl new file mode 100755 index 0000000..d8bc6e8 --- /dev/null +++ b/directives.pl @@ -0,0 +1,171 @@ +#!/usr/bin/perl +## -------------------------------------------------------------------------- +## +## Copyright 1996-2009 The NASM Authors - All Rights Reserved +## See the file AUTHORS included with the NASM distribution for +## the specific copyright holders. +## +## Redistribution and use in source and binary forms, with or without +## modification, are permitted provided that the following +## conditions are met: +## +## * Redistributions of source code must retain the above copyright +## notice, this list of conditions and the following disclaimer. +## * Redistributions in binary form must reproduce the above +## copyright notice, this list of conditions and the following +## disclaimer in the documentation and/or other materials provided +## with the distribution. +## +## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +## CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +## INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +## DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +## NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +## LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +## HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +## CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +## OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +## EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +## +## -------------------------------------------------------------------------- + +# +# Generate a perfect hash for directive parsing +# +# Usage: directives.pl directives.dat directives.c directives.h +# + +require 'phash.ph'; + +my($output, $directives_dat, $outfile) = @ARGV; + +@directives = (); + +open(DD, "< ${directives_dat}\0") + or die "$0: cannot open: ${directives_dat}: $!\n"; +while (defined($line =
)) { + chomp $line; + if ($line =~ /^\s*([[:alnum:]]+)\s*(|[\;\#].*)$/) { + push(@directives, $1); + } +} +close(DD); + +if ($output eq 'h') { + open(H, "> ${outfile}\0") + or die "$0: cannot create: ${outfile}: $!\n"; + + print H "/*\n"; + print H " * This file is generated from directives.dat\n"; + print H " * by directives.pl; do not edit.\n"; + print H " */\n"; + print H "\n"; + + print H "#ifndef NASM_DIRECTIVES_H\n"; + print H "#define NASM_DIRECTIVES_H\n"; + print H "\n"; + + print H "enum directives {\n"; + print H " D_NONE"; + foreach $d (@directives) { + print H ",\n D_\U$d"; + } + print H "\n};\n\n"; + printf H "extern const char * const directives[%d];\n", + scalar(@directives)+1; + print H "enum directives find_directive(const char *token);\n\n"; + print H "#endif /* NASM_DIRECTIVES_H */\n"; +} elsif ($output eq 'c') { + %directive = (); + $n = 0; + foreach $d (@directives) { + if (exists($directive{$d})) { + die "$0: $directives_dat: duplicate directive: $d\n"; + } + $directive{$d} = $n++; # This is zero-based, unlike the enum! + } + + @hashinfo = gen_perfect_hash(\%directive); + if (!defined(@hashinfo)) { + die "$0: no hash found\n"; + } + + # Paranoia... + verify_hash_table(\%directive, \@hashinfo); + + ($n, $sv, $g) = @hashinfo; + $sv2 = $sv+2; + + die if ($n & ($n-1)); + + open(C, "> ${outfile}\0") + or die "$0: cannot create: ${directives_c}: $!\n"; + + print C "/*\n"; + print C " * This file is generated from directives.dat\n"; + print C " * by directives.pl; do not edit.\n"; + print C " */\n"; + print C "\n"; + + print C "#include \"compiler.h\"\n"; + print C "#include \n"; + print C "#include \"nasm.h\"\n"; + print C "#include \"hashtbl.h\"\n"; + print C "#include \"directives.h\"\n"; + print C "\n"; + + printf C "const char * const directives[%d] = {\n", + scalar(@directives)+1; + print C " NULL"; + foreach $d (@directives) { + print C ",\n \"$d\""; + } + print C "\n};\n\n"; + + print C "enum directives find_directive(const char *token)\n"; + print C "{\n"; + + # Put a large value in unused slots. This makes it extremely unlikely + # that any combination that involves unused slot will pass the range test. + # This speeds up rejection of unrecognized tokens, i.e. identifiers. + print C "#define UNUSED 16383\n"; + + print C " static const int16_t hash1[$n] = {\n"; + for ($i = 0; $i < $n; $i++) { + my $h = ${$g}[$i*2+0]; + print C " ", defined($h) ? $h : 'UNUSED', ",\n"; + } + print C " };\n"; + + print C " static const int16_t hash2[$n] = {\n"; + for ($i = 0; $i < $n; $i++) { + my $h = ${$g}[$i*2+1]; + print C " ", defined($h) ? $h : 'UNUSED', ",\n"; + } + print C " };\n"; + + print C " uint32_t k1, k2;\n"; + print C " uint64_t crc;\n"; + # For correct overflow behavior, "ix" should be unsigned of the same + # width as the hash arrays. + print C " uint16_t ix;\n"; + print C "\n"; + printf C " crc = crc64i(UINT64_C(0x%08x%08x), token);\n", + $$sv[0], $$sv[1]; + print C " k1 = (uint32_t)crc;\n"; + print C " k2 = (uint32_t)(crc >> 32);\n"; + print C "\n"; + printf C " ix = hash1[k1 & 0x%x] + hash2[k2 & 0x%x];\n", $n-1, $n-1; + printf C " if (ix >= %d)\n", scalar(@directives); + print C " return D_NONE;\n"; + print C "\n"; + print C " ix++;\n"; # Account for D_NONE + print C " if (nasm_stricmp(token, directives[ix]))\n"; + print C " return D_NONE;\n"; + print C "\n"; + print C " return ix;\n"; + print C "}\n"; +} diff --git a/disasm.c b/disasm.c new file mode 100644 index 0000000..561851a --- /dev/null +++ b/disasm.c @@ -0,0 +1,1559 @@ +/* ----------------------------------------------------------------------- * + * + * Copyright 1996-2009 The NASM Authors - All Rights Reserved + * See the file AUTHORS included with the NASM distribution for + * the specific copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following + * conditions are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ----------------------------------------------------------------------- */ + +/* + * disasm.c where all the _work_ gets done in the Netwide Disassembler + */ + +#include "compiler.h" + +#include +#include +#include +#include + +#include "nasm.h" +#include "disasm.h" +#include "sync.h" +#include "insns.h" +#include "tables.h" +#include "regdis.h" + +/* + * Flags that go into the `segment' field of `insn' structures + * during disassembly. + */ +#define SEG_RELATIVE 1 +#define SEG_32BIT 2 +#define SEG_RMREG 4 +#define SEG_DISP8 8 +#define SEG_DISP16 16 +#define SEG_DISP32 32 +#define SEG_NODISP 64 +#define SEG_SIGNED 128 +#define SEG_64BIT 256 + +/* + * Prefix information + */ +struct prefix_info { + uint8_t osize; /* Operand size */ + uint8_t asize; /* Address size */ + uint8_t osp; /* Operand size prefix present */ + uint8_t asp; /* Address size prefix present */ + uint8_t rep; /* Rep prefix present */ + uint8_t seg; /* Segment override prefix present */ + uint8_t wait; /* WAIT "prefix" present */ + uint8_t lock; /* Lock prefix present */ + uint8_t vex[3]; /* VEX prefix present */ + uint8_t vex_c; /* VEX "class" (VEX, XOP, ...) */ + uint8_t vex_m; /* VEX.M field */ + uint8_t vex_v; + uint8_t vex_lp; /* VEX.LP fields */ + uint32_t rex; /* REX prefix present */ +}; + +#define getu8(x) (*(uint8_t *)(x)) +#if X86_MEMORY +/* Littleendian CPU which can handle unaligned references */ +#define getu16(x) (*(uint16_t *)(x)) +#define getu32(x) (*(uint32_t *)(x)) +#define getu64(x) (*(uint64_t *)(x)) +#else +static uint16_t getu16(uint8_t *data) +{ + return (uint16_t)data[0] + ((uint16_t)data[1] << 8); +} +static uint32_t getu32(uint8_t *data) +{ + return (uint32_t)getu16(data) + ((uint32_t)getu16(data+2) << 16); +} +static uint64_t getu64(uint8_t *data) +{ + return (uint64_t)getu32(data) + ((uint64_t)getu32(data+4) << 32); +} +#endif + +#define gets8(x) ((int8_t)getu8(x)) +#define gets16(x) ((int16_t)getu16(x)) +#define gets32(x) ((int32_t)getu32(x)) +#define gets64(x) ((int64_t)getu64(x)) + +/* Important: regval must already have been adjusted for rex extensions */ +static enum reg_enum whichreg(opflags_t regflags, int regval, int rex) +{ + if (!(regflags & (REGISTER|REGMEM))) + return 0; /* Registers not permissible?! */ + + regflags |= REGISTER; + + if (!(REG_AL & ~regflags)) + return R_AL; + if (!(REG_AX & ~regflags)) + return R_AX; + if (!(REG_EAX & ~regflags)) + return R_EAX; + if (!(REG_RAX & ~regflags)) + return R_RAX; + if (!(REG_DL & ~regflags)) + return R_DL; + if (!(REG_DX & ~regflags)) + return R_DX; + if (!(REG_EDX & ~regflags)) + return R_EDX; + if (!(REG_RDX & ~regflags)) + return R_RDX; + if (!(REG_CL & ~regflags)) + return R_CL; + if (!(REG_CX & ~regflags)) + return R_CX; + if (!(REG_ECX & ~regflags)) + return R_ECX; + if (!(REG_RCX & ~regflags)) + return R_RCX; + if (!(FPU0 & ~regflags)) + return R_ST0; + if (!(XMM0 & ~regflags)) + return R_XMM0; + if (!(YMM0 & ~regflags)) + return R_YMM0; + if (!(REG_CS & ~regflags)) + return (regval == 1) ? R_CS : 0; + if (!(REG_DESS & ~regflags)) + return (regval == 0 || regval == 2 + || regval == 3 ? nasm_rd_sreg[regval] : 0); + if (!(REG_FSGS & ~regflags)) + return (regval == 4 || regval == 5 ? nasm_rd_sreg[regval] : 0); + if (!(REG_SEG67 & ~regflags)) + return (regval == 6 || regval == 7 ? nasm_rd_sreg[regval] : 0); + + /* All the entries below look up regval in an 16-entry array */ + if (regval < 0 || regval > 15) + return 0; + + if (!(REG8 & ~regflags)) { + if (rex & (REX_P|REX_NH)) + return nasm_rd_reg8_rex[regval]; + else + return nasm_rd_reg8[regval]; + } + if (!(REG16 & ~regflags)) + return nasm_rd_reg16[regval]; + if (!(REG32 & ~regflags)) + return nasm_rd_reg32[regval]; + if (!(REG64 & ~regflags)) + return nasm_rd_reg64[regval]; + if (!(REG_SREG & ~regflags)) + return nasm_rd_sreg[regval & 7]; /* Ignore REX */ + if (!(REG_CREG & ~regflags)) + return nasm_rd_creg[regval]; + if (!(REG_DREG & ~regflags)) + return nasm_rd_dreg[regval]; + if (!(REG_TREG & ~regflags)) { + if (regval > 7) + return 0; /* TR registers are ill-defined with rex */ + return nasm_rd_treg[regval]; + } + if (!(FPUREG & ~regflags)) + return nasm_rd_fpureg[regval & 7]; /* Ignore REX */ + if (!(MMXREG & ~regflags)) + return nasm_rd_mmxreg[regval & 7]; /* Ignore REX */ + if (!(XMMREG & ~regflags)) + return nasm_rd_xmmreg[regval]; + if (!(YMMREG & ~regflags)) + return nasm_rd_ymmreg[regval]; + + return 0; +} + +/* + * Process a DREX suffix + */ +static uint8_t *do_drex(uint8_t *data, insn *ins) +{ + uint8_t drex = *data++; + operand *dst = &ins->oprs[ins->drexdst]; + + if ((drex & 8) != ((ins->rex & REX_OC) ? 8 : 0)) + return NULL; /* OC0 mismatch */ + ins->rex = (ins->rex & ~7) | (drex & 7); + + dst->segment = SEG_RMREG; + dst->basereg = drex >> 4; + return data; +} + + +/* + * Process an effective address (ModRM) specification. + */ +static uint8_t *do_ea(uint8_t *data, int modrm, int asize, + int segsize, operand * op, insn *ins) +{ + int mod, rm, scale, index, base; + int rex; + uint8_t sib = 0; + + mod = (modrm >> 6) & 03; + rm = modrm & 07; + + if (mod != 3 && rm == 4 && asize != 16) + sib = *data++; + + if (ins->rex & REX_D) { + data = do_drex(data, ins); + if (!data) + return NULL; + } + rex = ins->rex; + + if (mod == 3) { /* pure register version */ + op->basereg = rm+(rex & REX_B ? 8 : 0); + op->segment |= SEG_RMREG; + return data; + } + + op->disp_size = 0; + op->eaflags = 0; + + if (asize == 16) { + /* + * specifies the displacement size (none, byte or + * word), and specifies the register combination. + * Exception: mod=0,rm=6 does not specify [BP] as one might + * expect, but instead specifies [disp16]. + */ + op->indexreg = op->basereg = -1; + op->scale = 1; /* always, in 16 bits */ + switch (rm) { + case 0: + op->basereg = R_BX; + op->indexreg = R_SI; + break; + case 1: + op->basereg = R_BX; + op->indexreg = R_DI; + break; + case 2: + op->basereg = R_BP; + op->indexreg = R_SI; + break; + case 3: + op->basereg = R_BP; + op->indexreg = R_DI; + break; + case 4: + op->basereg = R_SI; + break; + case 5: + op->basereg = R_DI; + break; + case 6: + op->basereg = R_BP; + break; + case 7: + op->basereg = R_BX; + break; + } + if (rm == 6 && mod == 0) { /* special case */ + op->basereg = -1; + if (segsize != 16) + op->disp_size = 16; + mod = 2; /* fake disp16 */ + } + switch (mod) { + case 0: + op->segment |= SEG_NODISP; + break; + case 1: + op->segment |= SEG_DISP8; + op->offset = (int8_t)*data++; + break; + case 2: + op->segment |= SEG_DISP16; + op->offset = *data++; + op->offset |= ((unsigned)*data++) << 8; + break; + } + return data; + } else { + /* + * Once again, specifies displacement size (this time + * none, byte or *dword*), while specifies the base + * register. Again, [EBP] is missing, replaced by a pure + * disp32 (this time that's mod=0,rm=*5*) in 32-bit mode, + * and RIP-relative addressing in 64-bit mode. + * + * However, rm=4 + * indicates not a single base register, but instead the + * presence of a SIB byte... + */ + int a64 = asize == 64; + + op->indexreg = -1; + + if (a64) + op->basereg = nasm_rd_reg64[rm | ((rex & REX_B) ? 8 : 0)]; + else + op->basereg = nasm_rd_reg32[rm | ((rex & REX_B) ? 8 : 0)]; + + if (rm == 5 && mod == 0) { + if (segsize == 64) { + op->eaflags |= EAF_REL; + op->segment |= SEG_RELATIVE; + mod = 2; /* fake disp32 */ + } + + if (asize != 64) + op->disp_size = asize; + + op->basereg = -1; + mod = 2; /* fake disp32 */ + } + + if (rm == 4) { /* process SIB */ + scale = (sib >> 6) & 03; + index = (sib >> 3) & 07; + base = sib & 07; + + op->scale = 1 << scale; + + if (index == 4 && !(rex & REX_X)) + op->indexreg = -1; /* ESP/RSP cannot be an index */ + else if (a64) + op->indexreg = nasm_rd_reg64[index | ((rex & REX_X) ? 8 : 0)]; + else + op->indexreg = nasm_rd_reg32[index | ((rex & REX_X) ? 8 : 0)]; + + if (base == 5 && mod == 0) { + op->basereg = -1; + mod = 2; /* Fake disp32 */ + } else if (a64) + op->basereg = nasm_rd_reg64[base | ((rex & REX_B) ? 8 : 0)]; + else + op->basereg = nasm_rd_reg32[base | ((rex & REX_B) ? 8 : 0)]; + + if (segsize == 16) + op->disp_size = 32; + } + + switch (mod) { + case 0: + op->segment |= SEG_NODISP; + break; + case 1: + op->segment |= SEG_DISP8; + op->offset = gets8(data); + data++; + break; + case 2: + op->segment |= SEG_DISP32; + op->offset = gets32(data); + data += 4; + break; + } + return data; + } +} + +/* + * Determine whether the instruction template in t corresponds to the data + * stream in data. Return the number of bytes matched if so. + */ +#define case4(x) case (x): case (x)+1: case (x)+2: case (x)+3 + +static int matches(const struct itemplate *t, uint8_t *data, + const struct prefix_info *prefix, int segsize, insn *ins) +{ + uint8_t *r = (uint8_t *)(t->code); + uint8_t *origdata = data; + bool a_used = false, o_used = false; + enum prefixes drep = 0; + enum prefixes dwait = 0; + uint8_t lock = prefix->lock; + int osize = prefix->osize; + int asize = prefix->asize; + int i, c; + int op1, op2; + struct operand *opx, *opy; + uint8_t opex = 0; + int s_field_for = -1; /* No 144/154 series code encountered */ + bool vex_ok = false; + int regmask = (segsize == 64) ? 15 : 7; + + for (i = 0; i < MAX_OPERANDS; i++) { + ins->oprs[i].segment = ins->oprs[i].disp_size = + (segsize == 64 ? SEG_64BIT : segsize == 32 ? SEG_32BIT : 0); + } + ins->condition = -1; + ins->rex = prefix->rex; + memset(ins->prefixes, 0, sizeof ins->prefixes); + + if (t->flags & (segsize == 64 ? IF_NOLONG : IF_LONG)) + return false; + + if (prefix->rep == 0xF2) + drep = P_REPNE; + else if (prefix->rep == 0xF3) + drep = P_REP; + + dwait = prefix->wait ? P_WAIT : 0; + + while ((c = *r++) != 0) { + op1 = (c & 3) + ((opex & 1) << 2); + op2 = ((c >> 3) & 3) + ((opex & 2) << 1); + opx = &ins->oprs[op1]; + opy = &ins->oprs[op2]; + opex = 0; + + switch (c) { + case 01: + case 02: + case 03: + case 04: + while (c--) + if (*r++ != *data++) + return false; + break; + + case 05: + case 06: + case 07: + opex = c; + break; + + case4(010): + { + int t = *r++, d = *data++; + if (d < t || d > t + 7) + return false; + else { + opx->basereg = (d-t)+ + (ins->rex & REX_B ? 8 : 0); + opx->segment |= SEG_RMREG; + } + break; + } + + case4(014): + case4(0274): + opx->offset = (int8_t)*data++; + opx->segment |= SEG_SIGNED; + break; + + case4(020): + opx->offset = *data++; + break; + + case4(024): + opx->offset = *data++; + break; + + case4(030): + opx->offset = getu16(data); + data += 2; + break; + + case4(034): + if (osize == 32) { + opx->offset = getu32(data); + data += 4; + } else { + opx->offset = getu16(data); + data += 2; + } + if (segsize != asize) + opx->disp_size = asize; + break; + + case4(040): + case4(0254): + opx->offset = getu32(data); + data += 4; + break; + + case4(044): + switch (asize) { + case 16: + opx->offset = getu16(data); + data += 2; + if (segsize != 16) + opx->disp_size = 16; + break; + case 32: + opx->offset = getu32(data); + data += 4; + if (segsize == 16) + opx->disp_size = 32; + break; + case 64: + opx->offset = getu64(data); + opx->disp_size = 64; + data += 8; + break; + } + break; + + case4(050): + opx->offset = gets8(data++); + opx->segment |= SEG_RELATIVE; + break; + + case4(054): + opx->offset = getu64(data); + data += 8; + break; + + case4(060): + opx->offset = gets16(data); + data += 2; + opx->segment |= SEG_RELATIVE; + opx->segment &= ~SEG_32BIT; + break; + + case4(064): + opx->segment |= SEG_RELATIVE; + if (osize == 16) { + opx->offset = gets16(data); + data += 2; + opx->segment &= ~(SEG_32BIT|SEG_64BIT); + } else if (osize == 32) { + opx->offset = gets32(data); + data += 4; + opx->segment &= ~SEG_64BIT; + opx->segment |= SEG_32BIT; + } + if (segsize != osize) { + opx->type = + (opx->type & ~SIZE_MASK) + | ((osize == 16) ? BITS16 : BITS32); + } + break; + + case4(070): + opx->offset = gets32(data); + data += 4; + opx->segment |= SEG_32BIT | SEG_RELATIVE; + break; + + case4(0100): + case4(0110): + case4(0120): + case4(0130): + { + int modrm = *data++; + opx->segment |= SEG_RMREG; + data = do_ea(data, modrm, asize, segsize, opy, ins); + if (!data) + return false; + opx->basereg = ((modrm >> 3) & 7) + (ins->rex & REX_R ? 8 : 0); + break; + } + + case4(0140): + if (s_field_for == op1) { + opx->offset = gets8(data); + data++; + } else { + opx->offset = getu16(data); + data += 2; + } + break; + + case4(0144): + case4(0154): + s_field_for = (*data & 0x02) ? op1 : -1; + if ((*data++ & ~0x02) != *r++) + return false; + break; + + case4(0150): + if (s_field_for == op1) { + opx->offset = gets8(data); + data++; + } else { + opx->offset = getu32(data); + data += 4; + } + break; + + case4(0160): + ins->rex |= REX_D; + ins->drexdst = op1; + break; + + case4(0164): + ins->rex |= REX_D|REX_OC; + ins->drexdst = op1; + break; + + case 0171: + data = do_drex(data, ins); + if (!data) + return false; + break; + + case 0172: + { + uint8_t ximm = *data++; + c = *r++; + ins->oprs[c >> 3].basereg = (ximm >> 4) & regmask; + ins->oprs[c >> 3].segment |= SEG_RMREG; + ins->oprs[c & 7].offset = ximm & 15; + } + break; + + case 0173: + { + uint8_t ximm = *data++; + c = *r++; + + if ((c ^ ximm) & 15) + return false; + + ins->oprs[c >> 4].basereg = (ximm >> 4) & regmask; + ins->oprs[c >> 4].segment |= SEG_RMREG; + } + break; + + case 0174: + { + uint8_t ximm = *data++; + c = *r++; + + ins->oprs[c].basereg = (ximm >> 4) & regmask; + ins->oprs[c].segment |= SEG_RMREG; + } + break; + + case4(0200): + case4(0204): + case4(0210): + case4(0214): + case4(0220): + case4(0224): + case4(0230): + case4(0234): + { + int modrm = *data++; + if (((modrm >> 3) & 07) != (c & 07)) + return false; /* spare field doesn't match up */ + data = do_ea(data, modrm, asize, segsize, opy, ins); + if (!data) + return false; + break; + } + + case4(0260): + { + int vexm = *r++; + int vexwlp = *r++; + ins->rex |= REX_V; + if ((prefix->rex & (REX_V|REX_D|REX_P)) != REX_V) + return false; + + if ((vexm & 0x1f) != prefix->vex_m) + return false; + + switch (vexwlp & 030) { + case 000: + if (prefix->rex & REX_W) + return false; + break; + case 010: + if (!(prefix->rex & REX_W)) + return false; + ins->rex &= ~REX_W; + break; + case 020: /* VEX.W is a don't care */ + ins->rex &= ~REX_W; + break; + case 030: + break; + } + + if ((vexwlp & 007) != prefix->vex_lp) + return false; + + opx->segment |= SEG_RMREG; + opx->basereg = prefix->vex_v; + vex_ok = true; + break; + } + + case 0270: + { + int vexm = *r++; + int vexwlp = *r++; + ins->rex |= REX_V; + if ((prefix->rex & (REX_V|REX_D|REX_P)) != REX_V) + return false; + + if ((vexm & 0x1f) != prefix->vex_m) + return false; + + switch (vexwlp & 030) { + case 000: + if (ins->rex & REX_W) + return false; + break; + case 010: + if (!(ins->rex & REX_W)) + return false; + break; + default: + break; /* Need to do anything special here? */ + } + + if ((vexwlp & 007) != prefix->vex_lp) + return false; + + if (prefix->vex_v != 0) + return false; + + vex_ok = true; + break; + } + + case 0310: + if (asize != 16) + return false; + else + a_used = true; + break; + + case 0311: + if (asize != 32) + return false; + else + a_used = true; + break; + + case 0312: + if (asize != segsize) + return false; + else + a_used = true; + break; + + case 0313: + if (asize != 64) + return false; + else + a_used = true; + break; + + case 0314: + if (prefix->rex & REX_B) + return false; + break; + + case 0315: + if (prefix->rex & REX_X) + return false; + break; + + case 0316: + if (prefix->rex & REX_R) + return false; + break; + + case 0317: + if (prefix->rex & REX_W) + return false; + break; + + case 0320: + if (osize != 16) + return false; + else + o_used = true; + break; + + case 0321: + if (osize != 32) + return false; + else + o_used = true; + break; + + case 0322: + if (osize != (segsize == 16) ? 16 : 32) + return false; + else + o_used = true; + break; + + case 0323: + ins->rex |= REX_W; /* 64-bit only instruction */ + osize = 64; + o_used = true; + break; + + case 0324: + if (!(ins->rex & (REX_P|REX_W)) || osize != 64) + return false; + o_used = true; + break; + + case 0325: + ins->rex |= REX_NH; + break; + + case 0330: + { + int t = *r++, d = *data++; + if (d < t || d > t + 15) + return false; + else + ins->condition = d - t; + break; + } + + case 0331: + if (prefix->rep) + return false; + break; + + case 0332: + if (prefix->rep != 0xF2) + return false; + drep = 0; + break; + + case 0333: + if (prefix->rep != 0xF3) + return false; + drep = 0; + break; + + case 0334: + if (lock) { + ins->rex |= REX_R; + lock = 0; + } + break; + + case 0335: + if (drep == P_REP) + drep = P_REPE; + break; + + case 0336: + case 0337: + break; + + case 0340: + return false; + + case 0341: + if (prefix->wait != 0x9B) + return false; + dwait = 0; + break; + + case4(0344): + ins->oprs[0].basereg = (*data++ >> 3) & 7; + break; + + case 0360: + if (prefix->osp || prefix->rep) + return false; + break; + + case 0361: + if (!prefix->osp || prefix->rep) + return false; + o_used = true; + break; + + case 0362: + if (prefix->osp || prefix->rep != 0xf2) + return false; + drep = 0; + break; + + case 0363: + if (prefix->osp || prefix->rep != 0xf3) + return false; + drep = 0; + break; + + case 0364: + if (prefix->osp) + return false; + break; + + case 0365: + if (prefix->asp) + return false; + break; + + case 0366: + if (!prefix->osp) + return false; + o_used = true; + break; + + case 0367: + if (!prefix->asp) + return false; + a_used = true; + break; + + default: + return false; /* Unknown code */ + } + } + + if (!vex_ok && (ins->rex & REX_V)) + return false; + + /* REX cannot be combined with DREX or VEX */ + if ((ins->rex & (REX_D|REX_V)) && (prefix->rex & REX_P)) + return false; + + /* + * Check for unused rep or a/o prefixes. + */ + for (i = 0; i < t->operands; i++) { + if (ins->oprs[i].segment != SEG_RMREG) + a_used = true; + } + + if (lock) { + if (ins->prefixes[PPS_LREP]) + return false; + ins->prefixes[PPS_LREP] = P_LOCK; + } + if (drep) { + if (ins->prefixes[PPS_LREP]) + return false; + ins->prefixes[PPS_LREP] = drep; + } + ins->prefixes[PPS_WAIT] = dwait; + if (!o_used) { + if (osize != ((segsize == 16) ? 16 : 32)) { + enum prefixes pfx = 0; + + switch (osize) { + case 16: + pfx = P_O16; + break; + case 32: + pfx = P_O32; + break; + case 64: + pfx = P_O64; + break; + } + + if (ins->prefixes[PPS_OSIZE]) + return false; + ins->prefixes[PPS_OSIZE] = pfx; + } + } + if (!a_used && asize != segsize) { + if (ins->prefixes[PPS_ASIZE]) + return false; + ins->prefixes[PPS_ASIZE] = asize == 16 ? P_A16 : P_A32; + } + + /* Fix: check for redundant REX prefixes */ + + return data - origdata; +} + +/* Condition names for disassembly, sorted by x86 code */ +static const char * const condition_name[16] = { + "o", "no", "c", "nc", "z", "nz", "na", "a", + "s", "ns", "pe", "po", "l", "nl", "ng", "g" +}; + +int32_t disasm(uint8_t *data, char *output, int outbufsize, int segsize, + int32_t offset, int autosync, uint32_t prefer) +{ + const struct itemplate * const *p, * const *best_p; + const struct disasm_index *ix; + uint8_t *dp; + int length, best_length = 0; + char *segover; + int i, slen, colon, n; + uint8_t *origdata; + int works; + insn tmp_ins, ins; + uint32_t goodness, best; + int best_pref; + struct prefix_info prefix; + bool end_prefix; + + memset(&ins, 0, sizeof ins); + + /* + * Scan for prefixes. + */ + memset(&prefix, 0, sizeof prefix); + prefix.asize = segsize; + prefix.osize = (segsize == 64) ? 32 : segsize; + segover = NULL; + origdata = data; + + ix = itable; + + end_prefix = false; + while (!end_prefix) { + switch (*data) { + case 0xF2: + case 0xF3: + prefix.rep = *data++; + break; + + case 0x9B: + prefix.wait = *data++; + break; + + case 0xF0: + prefix.lock = *data++; + break; + + case 0x2E: + segover = "cs", prefix.seg = *data++; + break; + case 0x36: + segover = "ss", prefix.seg = *data++; + break; + case 0x3E: + segover = "ds", prefix.seg = *data++; + break; + case 0x26: + segover = "es", prefix.seg = *data++; + break; + case 0x64: + segover = "fs", prefix.seg = *data++; + break; + case 0x65: + segover = "gs", prefix.seg = *data++; + break; + + case 0x66: + prefix.osize = (segsize == 16) ? 32 : 16; + prefix.osp = *data++; + break; + case 0x67: + prefix.asize = (segsize == 32) ? 16 : 32; + prefix.asp = *data++; + break; + + case 0xC4: + case 0xC5: + if (segsize == 64 || (data[1] & 0xc0) == 0xc0) { + prefix.vex[0] = *data++; + prefix.vex[1] = *data++; + + prefix.rex = REX_V; + prefix.vex_c = RV_VEX; + + if (prefix.vex[0] == 0xc4) { + prefix.vex[2] = *data++; + prefix.rex |= (~prefix.vex[1] >> 5) & 7; /* REX_RXB */ + prefix.rex |= (prefix.vex[2] >> (7-3)) & REX_W; + prefix.vex_m = prefix.vex[1] & 0x1f; + prefix.vex_v = (~prefix.vex[2] >> 3) & 15; + prefix.vex_lp = prefix.vex[2] & 7; + } else { + prefix.rex |= (~prefix.vex[1] >> (7-2)) & REX_R; + prefix.vex_m = 1; + prefix.vex_v = (~prefix.vex[1] >> 3) & 15; + prefix.vex_lp = prefix.vex[1] & 7; + } + + ix = itable_vex[RV_VEX][prefix.vex_m][prefix.vex_lp]; + } + end_prefix = true; + break; + + case 0x8F: + if ((data[1] & 030) != 0 && + (segsize == 64 || (data[1] & 0xc0) == 0xc0)) { + prefix.vex[0] = *data++; + prefix.vex[1] = *data++; + prefix.vex[2] = *data++; + + prefix.rex = REX_V; + prefix.vex_c = RV_XOP; + + prefix.rex |= (~prefix.vex[1] >> 5) & 7; /* REX_RXB */ + prefix.rex |= (prefix.vex[2] >> (7-3)) & REX_W; + prefix.vex_m = prefix.vex[1] & 0x1f; + prefix.vex_v = (~prefix.vex[2] >> 3) & 15; + prefix.vex_lp = prefix.vex[2] & 7; + + ix = itable_vex[RV_XOP][prefix.vex_m][prefix.vex_lp]; + } + end_prefix = true; + break; + + case REX_P + 0x0: + case REX_P + 0x1: + case REX_P + 0x2: + case REX_P + 0x3: + case REX_P + 0x4: + case REX_P + 0x5: + case REX_P + 0x6: + case REX_P + 0x7: + case REX_P + 0x8: + case REX_P + 0x9: + case REX_P + 0xA: + case REX_P + 0xB: + case REX_P + 0xC: + case REX_P + 0xD: + case REX_P + 0xE: + case REX_P + 0xF: + if (segsize == 64) { + prefix.rex = *data++; + if (prefix.rex & REX_W) + prefix.osize = 64; + } + end_prefix = true; + break; + + default: + end_prefix = true; + break; + } + } + + best = -1; /* Worst possible */ + best_p = NULL; + best_pref = INT_MAX; + + if (!ix) + return 0; /* No instruction table at all... */ + + dp = data; + ix += *dp++; + while (ix->n == -1) { + ix = (const struct disasm_index *)ix->p + *dp++; + } + + p = (const struct itemplate * const *)ix->p; + for (n = ix->n; n; n--, p++) { + if ((length = matches(*p, data, &prefix, segsize, &tmp_ins))) { + works = true; + /* + * Final check to make sure the types of r/m match up. + * XXX: Need to make sure this is actually correct. + */ + for (i = 0; i < (*p)->operands; i++) { + if (!((*p)->opd[i] & SAME_AS) && + ( + /* If it's a mem-only EA but we have a + register, die. */ + ((tmp_ins.oprs[i].segment & SEG_RMREG) && + is_class(MEMORY, (*p)->opd[i])) || + /* If it's a reg-only EA but we have a memory + ref, die. */ + (!(tmp_ins.oprs[i].segment & SEG_RMREG) && + !(REG_EA & ~(*p)->opd[i]) && + !((*p)->opd[i] & REG_SMASK)) || + /* Register type mismatch (eg FS vs REG_DESS): + die. */ + ((((*p)->opd[i] & (REGISTER | FPUREG)) || + (tmp_ins.oprs[i].segment & SEG_RMREG)) && + !whichreg((*p)->opd[i], + tmp_ins.oprs[i].basereg, tmp_ins.rex)) + )) { + works = false; + break; + } + } + + /* + * Note: we always prefer instructions which incorporate + * prefixes in the instructions themselves. This is to allow + * e.g. PAUSE to be preferred to REP NOP, and deal with + * MMX/SSE instructions where prefixes are used to select + * between MMX and SSE register sets or outright opcode + * selection. + */ + if (works) { + int i, nprefix; + goodness = ((*p)->flags & IF_PFMASK) ^ prefer; + nprefix = 0; + for (i = 0; i < MAXPREFIX; i++) + if (tmp_ins.prefixes[i]) + nprefix++; + if (nprefix < best_pref || + (nprefix == best_pref && goodness < best)) { + /* This is the best one found so far */ + best = goodness; + best_p = p; + best_pref = nprefix; + best_length = length; + ins = tmp_ins; + } + } + } + } + + if (!best_p) + return 0; /* no instruction was matched */ + + /* Pick the best match */ + p = best_p; + length = best_length; + + slen = 0; + + /* TODO: snprintf returns the value that the string would have if + * the buffer were long enough, and not the actual length of + * the returned string, so each instance of using the return + * value of snprintf should actually be checked to assure that + * the return value is "sane." Maybe a macro wrapper could + * be used for that purpose. + */ + for (i = 0; i < MAXPREFIX; i++) { + const char *prefix = prefix_name(ins.prefixes[i]); + if (prefix) + slen += snprintf(output+slen, outbufsize-slen, "%s ", prefix); + } + + i = (*p)->opcode; + if (i >= FIRST_COND_OPCODE) + slen += snprintf(output + slen, outbufsize - slen, "%s%s", + nasm_insn_names[i], condition_name[ins.condition]); + else + slen += snprintf(output + slen, outbufsize - slen, "%s", + nasm_insn_names[i]); + + colon = false; + length += data - origdata; /* fix up for prefixes */ + for (i = 0; i < (*p)->operands; i++) { + opflags_t t = (*p)->opd[i]; + const operand *o = &ins.oprs[i]; + int64_t offs; + + if (t & SAME_AS) { + o = &ins.oprs[t & ~SAME_AS]; + t = (*p)->opd[t & ~SAME_AS]; + } + + output[slen++] = (colon ? ':' : i == 0 ? ' ' : ','); + + offs = o->offset; + if (o->segment & SEG_RELATIVE) { + offs += offset + length; + /* + * sort out wraparound + */ + if (!(o->segment & (SEG_32BIT|SEG_64BIT))) + offs &= 0xffff; + else if (segsize != 64) + offs &= 0xffffffff; + + /* + * add sync marker, if autosync is on + */ + if (autosync) + add_sync(offs, 0L); + } + + if (t & COLON) + colon = true; + else + colon = false; + + if ((t & (REGISTER | FPUREG)) || + (o->segment & SEG_RMREG)) { + enum reg_enum reg; + reg = whichreg(t, o->basereg, ins.rex); + if (t & TO) + slen += snprintf(output + slen, outbufsize - slen, "to "); + slen += snprintf(output + slen, outbufsize - slen, "%s", + nasm_reg_names[reg-EXPR_REG_START]); + } else if (!(UNITY & ~t)) { + output[slen++] = '1'; + } else if (t & IMMEDIATE) { + if (t & BITS8) { + slen += + snprintf(output + slen, outbufsize - slen, "byte "); + if (o->segment & SEG_SIGNED) { + if (offs < 0) { + offs *= -1; + output[slen++] = '-'; + } else + output[slen++] = '+'; + } + } else if (t & BITS16) { + slen += + snprintf(output + slen, outbufsize - slen, "word "); + } else if (t & BITS32) { + slen += + snprintf(output + slen, outbufsize - slen, "dword "); + } else if (t & BITS64) { + slen += + snprintf(output + slen, outbufsize - slen, "qword "); + } else if (t & NEAR) { + slen += + snprintf(output + slen, outbufsize - slen, "near "); + } else if (t & SHORT) { + slen += + snprintf(output + slen, outbufsize - slen, "short "); + } + slen += + snprintf(output + slen, outbufsize - slen, "0x%"PRIx64"", + offs); + } else if (!(MEM_OFFS & ~t)) { + slen += + snprintf(output + slen, outbufsize - slen, + "[%s%s%s0x%"PRIx64"]", + (segover ? segover : ""), + (segover ? ":" : ""), + (o->disp_size == 64 ? "qword " : + o->disp_size == 32 ? "dword " : + o->disp_size == 16 ? "word " : ""), offs); + segover = NULL; + } else if (is_class(REGMEM, t)) { + int started = false; + if (t & BITS8) + slen += + snprintf(output + slen, outbufsize - slen, "byte "); + if (t & BITS16) + slen += + snprintf(output + slen, outbufsize - slen, "word "); + if (t & BITS32) + slen += + snprintf(output + slen, outbufsize - slen, "dword "); + if (t & BITS64) + slen += + snprintf(output + slen, outbufsize - slen, "qword "); + if (t & BITS80) + slen += + snprintf(output + slen, outbufsize - slen, "tword "); + if (t & BITS128) + slen += + snprintf(output + slen, outbufsize - slen, "oword "); + if (t & BITS256) + slen += + snprintf(output + slen, outbufsize - slen, "yword "); + if (t & FAR) + slen += snprintf(output + slen, outbufsize - slen, "far "); + if (t & NEAR) + slen += + snprintf(output + slen, outbufsize - slen, "near "); + output[slen++] = '['; + if (o->disp_size) + slen += snprintf(output + slen, outbufsize - slen, "%s", + (o->disp_size == 64 ? "qword " : + o->disp_size == 32 ? "dword " : + o->disp_size == 16 ? "word " : + "")); + if (o->eaflags & EAF_REL) + slen += snprintf(output + slen, outbufsize - slen, "rel "); + if (segover) { + slen += + snprintf(output + slen, outbufsize - slen, "%s:", + segover); + segover = NULL; + } + if (o->basereg != -1) { + slen += snprintf(output + slen, outbufsize - slen, "%s", + nasm_reg_names[(o->basereg-EXPR_REG_START)]); + started = true; + } + if (o->indexreg != -1) { + if (started) + output[slen++] = '+'; + slen += snprintf(output + slen, outbufsize - slen, "%s", + nasm_reg_names[(o->indexreg-EXPR_REG_START)]); + if (o->scale > 1) + slen += + snprintf(output + slen, outbufsize - slen, "*%d", + o->scale); + started = true; + } + + + if (o->segment & SEG_DISP8) { + const char *prefix; + uint8_t offset = offs; + if ((int8_t)offset < 0) { + prefix = "-"; + offset = -offset; + } else { + prefix = "+"; + } + slen += + snprintf(output + slen, outbufsize - slen, "%s0x%"PRIx8"", + prefix, offset); + } else if (o->segment & SEG_DISP16) { + const char *prefix; + uint16_t offset = offs; + if ((int16_t)offset < 0 && started) { + offset = -offset; + prefix = "-"; + } else { + prefix = started ? "+" : ""; + } + slen += + snprintf(output + slen, outbufsize - slen, + "%s0x%"PRIx16"", prefix, offset); + } else if (o->segment & SEG_DISP32) { + if (prefix.asize == 64) { + const char *prefix; + uint64_t offset = (int64_t)(int32_t)offs; + if ((int32_t)offs < 0 && started) { + offset = -offset; + prefix = "-"; + } else { + prefix = started ? "+" : ""; + } + slen += + snprintf(output + slen, outbufsize - slen, + "%s0x%"PRIx64"", prefix, offset); + } else { + const char *prefix; + uint32_t offset = offs; + if ((int32_t) offset < 0 && started) { + offset = -offset; + prefix = "-"; + } else { + prefix = started ? "+" : ""; + } + slen += + snprintf(output + slen, outbufsize - slen, + "%s0x%"PRIx32"", prefix, offset); + } + } + output[slen++] = ']'; + } else { + slen += + snprintf(output + slen, outbufsize - slen, "", + i); + } + } + output[slen] = '\0'; + if (segover) { /* unused segment override */ + char *p = output; + int count = slen + 1; + while (count--) + p[count + 3] = p[count]; + strncpy(output, segover, 2); + output[2] = ' '; + } + return length; +} + +/* + * This is called when we don't have a complete instruction. If it + * is a standalone *single-byte* prefix show it as such, otherwise + * print it as a literal. + */ +int32_t eatbyte(uint8_t *data, char *output, int outbufsize, int segsize) +{ + uint8_t byte = *data; + const char *str = NULL; + + switch (byte) { + case 0xF2: + str = "repne"; + break; + case 0xF3: + str = "rep"; + break; + case 0x9B: + str = "wait"; + break; + case 0xF0: + str = "lock"; + break; + case 0x2E: + str = "cs"; + break; + case 0x36: + str = "ss"; + break; + case 0x3E: + str = "ss"; + break; + case 0x26: + str = "es"; + break; + case 0x64: + str = "fs"; + break; + case 0x65: + str = "gs"; + break; + case 0x66: + str = (segsize == 16) ? "o32" : "o16"; + break; + case 0x67: + str = (segsize == 32) ? "a16" : "a32"; + break; + case REX_P + 0x0: + case REX_P + 0x1: + case REX_P + 0x2: + case REX_P + 0x3: + case REX_P + 0x4: + case REX_P + 0x5: + case REX_P + 0x6: + case REX_P + 0x7: + case REX_P + 0x8: + case REX_P + 0x9: + case REX_P + 0xA: + case REX_P + 0xB: + case REX_P + 0xC: + case REX_P + 0xD: + case REX_P + 0xE: + case REX_P + 0xF: + if (segsize == 64) { + snprintf(output, outbufsize, "rex%s%s%s%s%s", + (byte == REX_P) ? "" : ".", + (byte & REX_W) ? "w" : "", + (byte & REX_R) ? "r" : "", + (byte & REX_X) ? "x" : "", + (byte & REX_B) ? "b" : ""); + break; + } + /* else fall through */ + default: + snprintf(output, outbufsize, "db 0x%02x", byte); + break; + } + + if (str) + snprintf(output, outbufsize, "%s", str); + + return 1; +} diff --git a/disasm.h b/disasm.h new file mode 100644 index 0000000..3edbfd5 --- /dev/null +++ b/disasm.h @@ -0,0 +1,47 @@ +/* ----------------------------------------------------------------------- * + * + * Copyright 1996-2009 The NASM Authors - All Rights Reserved + * See the file AUTHORS included with the NASM distribution for + * the specific copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following + * conditions are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ----------------------------------------------------------------------- */ + +/* + * disasm.h header file for disasm.c + */ + +#ifndef NASM_DISASM_H +#define NASM_DISASM_H + +#define INSN_MAX 32 /* one instruction can't be longer than this */ + +int32_t disasm(uint8_t *data, char *output, int outbufsize, int segsize, + int32_t offset, int autosync, uint32_t prefer); +int32_t eatbyte(uint8_t *data, char *output, int outbufsize, int segsize); + +#endif diff --git a/doc/Makefile b/doc/Makefile new file mode 100644 index 0000000..ae31229 --- /dev/null +++ b/doc/Makefile @@ -0,0 +1,102 @@ +# +# UNIX Makefile for NASM documentation +# + +srcdir = . + +prefix = /usr/local +exec_prefix = ${prefix} +bindir = ${exec_prefix}/bin +mandir = ${datarootdir}/man +docdir = $(prefix)/doc/nasm +infodir = ${datarootdir}/info +datarootdir = ${prefix}/share + +INSTALL = /usr/bin/install -c +INSTALL_PROGRAM = ${INSTALL} +INSTALL_DATA = ${INSTALL} -m 644 + +PERL = perl +MAKEINFO = makeinfo +TEXI2DVI = texi2dvi +TEXI2IPF = texi2ipf +IPFC = ipfc + +ACRODIST = false # Acrobat Distiller +PSTOPDF = false # BSD/MacOS X utility +PS2PDF = ps2pdf # Part of GhostScript + +SRCS = nasmdoc.src inslist.src changes.src +OUT = info html nasmdoc.txt nasmdoc.ps nasmdoc.pdf + +# exports +export srcdir +export PERL + +all: $(OUT) + +os2: nasm.inf + +inslist.src: inslist.pl ../insns.dat + $(PERL) $(srcdir)/inslist.pl + +.PHONY: html +html: html/nasmdoc0.html + +html/nasmdoc0.html: $(SRCS) rdsrc.pl + mkdir -p html + $(PERL) $(srcdir)/rdsrc.pl html < $< + mv -f *.html html + +nasmdoc.dip: $(SRCS) rdsrc.pl + $(PERL) $(srcdir)/rdsrc.pl dip < $< + +nasmdoc.texi: $(SRCS) rdsrc.pl + $(PERL) $(srcdir)/rdsrc.pl texi < $< + +nasmdoc.txt: $(SRCS) rdsrc.pl + $(PERL) $(srcdir)/rdsrc.pl txt < $< + +nasmdoc.ps: nasmdoc.dip nasmlogo.eps $(srcdir)/../version genpsdriver.pl \ + genps.pl psfonts.ph pswidth.ph head.ps + $(PERL) $(srcdir)/genpsdriver.pl > nasmdoc.ps + +nasmdoc.pdf: nasmdoc.ps + $(ACRODIST) -n -q --nosecurity -o $@ $< || \ + $(PS2PDF) $< $@ || \ + $(PSTOPDF) $< -o $@ + +.PHONY: info +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 + +# Rules for building an OS/2 book +nasmdoc.ipf: nasmdoc.texi + $(TEXI2IPF) $< >$@ + +nasm.inf: nasmdoc.ipf + $(IPFC) -i -s $< $@ + +clean: + -rm -f *.rtf *.hpj *.texi *.gid *.ipf *.dip + -rm -f *.aux *.cp *.fn *.ky *.pg *.log *.toc *.tp *.vr + +spotless: clean + -rm -rf html info + -rm -f *.hlp nasmdoc.txt *.inf *.pdf *.dvi + -rm -f nasmdoc*.ps inslist.src + +install: all + mkdir -p $(INSTALLROOT)$(infodir) + $(INSTALL_DATA) info/* $(INSTALLROOT)$(infodir) + mkdir -p $(INSTALLROOT)$(docdir)/html + $(INSTALL_DATA) html/* $(INSTALLROOT)$(docdir)/html + $(INSTALL_DATA) nasmdoc.ps nasmdoc.pdf nasmdoc.txt $(INSTALLROOT)$(docdir) diff --git a/doc/Makefile.in b/doc/Makefile.in new file mode 100644 index 0000000..a2ef4e3 --- /dev/null +++ b/doc/Makefile.in @@ -0,0 +1,102 @@ +# +# UNIX Makefile for NASM documentation +# + +srcdir = @srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ +bindir = @bindir@ +mandir = @mandir@ +docdir = $(prefix)/doc/nasm +infodir = @infodir@ +datarootdir = @datarootdir@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ + +PERL = perl +MAKEINFO = makeinfo +TEXI2DVI = texi2dvi +TEXI2IPF = texi2ipf +IPFC = ipfc + +ACRODIST = @ACRODIST@ # Acrobat Distiller +PSTOPDF = @PSTOPDF@ # BSD/MacOS X utility +PS2PDF = @PS2PDF@ # Part of GhostScript + +SRCS = nasmdoc.src inslist.src changes.src +OUT = info html nasmdoc.txt nasmdoc.ps nasmdoc.pdf + +# exports +export srcdir +export PERL + +all: $(OUT) + +os2: nasm.inf + +inslist.src: inslist.pl ../insns.dat + $(PERL) $(srcdir)/inslist.pl + +.PHONY: html +html: html/nasmdoc0.html + +html/nasmdoc0.html: $(SRCS) rdsrc.pl + mkdir -p html + $(PERL) $(srcdir)/rdsrc.pl html < $< + mv -f *.html html + +nasmdoc.dip: $(SRCS) rdsrc.pl + $(PERL) $(srcdir)/rdsrc.pl dip < $< + +nasmdoc.texi: $(SRCS) rdsrc.pl + $(PERL) $(srcdir)/rdsrc.pl texi < $< + +nasmdoc.txt: $(SRCS) rdsrc.pl + $(PERL) $(srcdir)/rdsrc.pl txt < $< + +nasmdoc.ps: nasmdoc.dip nasmlogo.eps $(srcdir)/../version genpsdriver.pl \ + genps.pl psfonts.ph pswidth.ph head.ps + $(PERL) $(srcdir)/genpsdriver.pl > nasmdoc.ps + +nasmdoc.pdf: nasmdoc.ps + $(ACRODIST) -n -q --nosecurity -o $@ $< || \ + $(PS2PDF) $< $@ || \ + $(PSTOPDF) $< -o $@ + +.PHONY: info +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 + +# Rules for building an OS/2 book +nasmdoc.ipf: nasmdoc.texi + $(TEXI2IPF) $< >$@ + +nasm.inf: nasmdoc.ipf + $(IPFC) -i -s $< $@ + +clean: + -rm -f *.rtf *.hpj *.texi *.gid *.ipf *.dip + -rm -f *.aux *.cp *.fn *.ky *.pg *.log *.toc *.tp *.vr + +spotless: clean + -rm -rf html info + -rm -f *.hlp nasmdoc.txt *.inf *.pdf *.dvi + -rm -f nasmdoc*.ps inslist.src + +install: all + mkdir -p $(INSTALLROOT)$(infodir) + $(INSTALL_DATA) info/* $(INSTALLROOT)$(infodir) + mkdir -p $(INSTALLROOT)$(docdir)/html + $(INSTALL_DATA) html/* $(INSTALLROOT)$(docdir)/html + $(INSTALL_DATA) nasmdoc.ps nasmdoc.pdf nasmdoc.txt $(INSTALLROOT)$(docdir) diff --git a/doc/afmmetrics.pl b/doc/afmmetrics.pl new file mode 100755 index 0000000..6d7bfc2 --- /dev/null +++ b/doc/afmmetrics.pl @@ -0,0 +1,130 @@ +#!/usr/bin/perl +## -------------------------------------------------------------------------- +## +## Copyright 1996-2009 The NASM Authors - All Rights Reserved +## See the file AUTHORS included with the NASM distribution for +## the specific copyright holders. +## +## Redistribution and use in source and binary forms, with or without +## modification, are permitted provided that the following +## conditions are met: +## +## * Redistributions of source code must retain the above copyright +## notice, this list of conditions and the following disclaimer. +## * Redistributions in binary form must reproduce the above +## copyright notice, this list of conditions and the following +## disclaimer in the documentation and/or other materials provided +## with the distribution. +## +## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +## CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +## INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +## DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +## NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +## LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +## HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +## CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +## OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +## EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +## +## -------------------------------------------------------------------------- + +# +# Parse AFM metric files +# + +@widths = ((undef)x256); + +while ( $line = ) { + if ( $line =~ /^\s*FontName\s+(.*)\s*$/ ) { + $fontname = $1; + } elsif ( $line =~ /^\s*StartCharMetrics\b/ ) { + $charmetrics = 1; + } elsif ( $line =~ /^\s*EndCharMetrics\b/ ) { + $charmetrics = 0; + } elsif ( $line =~ /^\s*StartKernPairs\b/ ) { + $kerndata = 1; + } elsif ( $line =~ /^\s*EndKernPairs\b/ ) { + $kerndata = 0; + } elsif ( $charmetrics ) { + @data = split(/\s*;\s*/, $line); + undef $charcode, $width, $name; + foreach $d ( @data ) { + @dd = split(/\s+/, $d); + if ( $dd[0] eq 'C' ) { + $charcode = $dd[1]; + } elsif ( $dd[0] eq 'WX' ) { + $width = $dd[1]; + } elsif ( $dd[0] eq 'W' ) { + $width = $dd[2]; + } elsif ( $dd[0] eq 'N' ) { + $name = $dd[1]; + } + } + if ( defined($name) && defined($width) ) { + $charwidth{$name} = $width; + } + } elsif ( $kerndata ) { + @data = split(/\s+/, $line); + if ( $data[0] eq 'KPX' ) { + if ( defined($charcodes{$data[1]}) && + defined($charcodes{$data[2]}) && + $data[3] != 0 ) { + $kernpairs{chr($charcodes{$data[1]}). + chr($charcodes{$data[2]})} = $data[3]; + } + } + } +} + +sub qstr($) { + my($s) = @_; + my($o,$c,$i); + $o = '"'; + for ( $i = 0 ; $i < length($s) ; $i++ ) { + $c = substr($s,$i,1); + if ( $c lt ' ' || $c gt '~' ) { + $o .= sprintf("\\%03o", ord($c)); + } elsif ( $c eq "\'" || $c eq "\"" || $c eq "\\" ) { + $o .= "\\".$c; + } else { + $o .= $c; + } + } + return $o.'"'; +} + +$psfont = $fontname; +$psfont =~ s/[^A-Za-z0-9]/_/g; + +print "%PS_${psfont} = (\n"; +print " name => \'$fontname\',\n"; +print " widths => {"; +$lw = 100000; +foreach $cc ( keys(%charwidth) ) { + $ss = sprintf('%s => %d, ', qstr($cc), $charwidth{$cc}); + $lw += length($ss); + if ( $lw > 72 ) { + print "\n "; + $lw = 4 + length($ss); + } + print $ss; +} +print "\n }\n"; +#print " kern => {"; +#$lw = 100000; +#foreach $kp ( keys(%kernpairs) ) { +# $ss = sprintf('%s => %d, ', qstr($kp), $kernpairs{$kp}); +# $lw += length($ss); +# if ( $lw > 72 ) { +# print "\n "; +# $lw = 4 + length($ss); +# } +# print $ss; +#} +#print " }\n"; +print ");\n"; +print "1;\n"; diff --git a/doc/changes.src b/doc/changes.src new file mode 100644 index 0000000..0592f22 --- /dev/null +++ b/doc/changes.src @@ -0,0 +1,1938 @@ +\# +\# NASM revision history in nasmdoc format +\# + +\H{cl-2.xx} NASM 2 Series + +The NASM 2 series support x86-64, and is the production version of NASM +since 2007. + + +\S{cl-2.08} Version 2.08 + +\b A number of enhancements/fixes in macros area. + +\b Support for arbitrarily terminating macro expansions \c{%exitmacro}. + See \k{exitmacro}. + +\b Support for recursive macro expansion \c{%rmacro/irmacro}. + See \k{mlrmacro}. + +\b Support for converting strings to tokens. See \k{deftok}. + +\b Fuzzy operand size logic introduced. + +\b Fix COFF stack overrun on too long export identifiers. + +\b Fix Macho-O alignment bug. + +\b Fix crashes with -fwin32 on file with many exports. + +\b Fix stack overrun for too long [DEBUG id]. + +\b Fix incorrect sbyte usage in IMUL (hit only if optimization + flag passed). + +\b Append ending token for \c{.stabs} records in the ELF output format. + +\b New NSIS script which uses ModernUI and MultiUser approach. + +\b Visual Studio 2008 NASM integration (rules file). + +\b Warn a user if a constant is too long (and as result will be stripped). + +\b The obsoleted pre-XOP AMD SSE5 instruction set which was never actualized + was removed. + +\b Fix stack overrun on too long error file name passed from the command line. + +\b Bind symbols to the .text section by default (ie in case if SECTION + directive was omitted) in the ELF output format. + +\b Fix sync points array index wrapping. + +\b A few fixes for FMA4 and XOP instruction templates. + +\b Add AMD Lightweight Profiling (LWP) instructions. + +\S{cl-2.07} Version 2.07 + +\b NASM is now under the 2-clause BSD license. See \k{legal}. + +\b Fix the section type for the \c{.strtab} section in the \c{elf64} + output format. + +\b Fix the handling of \c{COMMON} directives in the \c{obj} output format. + +\b New \c{ith} and \c{srec} output formats; these are variants of the + \c{bin} output format which output Intel hex and Motorola S-records, + respectively. See \k{ithfmt} and \k{srecfmt}. + +\b \c{rdf2ihx} replaced with an enhanced \c{rdf2bin}, which can output + binary, COM, Intel hex or Motorola S-records. + +\b The Windows installer now puts the NASM directory first in the + \c{PATH} of the "NASM Shell". + +\b Revert the early expansion behavior of \c{%+} to pre-2.06 behavior: + \c{%+} is only expanded late. + +\b Yet another Mach-O alignment fix. + +\b Don't delete the list file on errors. Also, include error and + warning information in the list file. + +\b Support for 64-bit Mach-O output, see \k{machofmt}. + +\b Fix assert failure on certain operations that involve strings with + high-bit bytes. + + +\S{cl-2.06} Version 2.06 + +\b This release is dedicated to the memory of Charles A. Crayne, long + time NASM developer as well as moderator of \c{comp.lang.asm.x86} and + author of the book \e{Serious Assembler}. We miss you, Chuck. + +\b Support for indirect macro expansion (\c{%[...]}). See \k{indmacro}. + +\b \c{%pop} can now take an argument, see \k{pushpop}. + +\b The argument to \c{%use} is no longer macro-expanded. Use + \c{%[...]} if macro expansion is desired. + +\b Support for thread-local storage in ELF32 and ELF64. See \k{elftls}. + +\b Fix crash on \c{%ifmacro} without an argument. + +\b Correct the arguments to the \c{POPCNT} instruction. + +\b Fix section alignment in the Mach-O format. + +\b Update AVX support to version 5 of the Intel specification. + +\b Fix the handling of accesses to context-local macros from higher + levels in the context stack. + +\b Treat \c{WAIT} as a prefix rather than as an instruction, thereby + allowing constructs like \c{O16 FSAVE} to work correctly. + +\b Support for structures with a non-zero base offset. See \k{struc}. + +\b Correctly handle preprocessor token concatenation (see \k{concat}) + involving floating-point numbers. + +\b The \c{PINSR} series of instructions have been corrected and + rationalized. + +\b Removed AMD SSE5, replaced with the new XOP/FMA4/CVT16 (rev 3.03) + spec. + +\b The ELF backends no longer automatically generate a \c{.comment} section. + +\b Add additional "well-known" ELF sections with default attributes. See + \k{elfsect}. + + +\S{cl-2.05.01} Version 2.05.01 + +\b Fix the \c{-w}/\c{-W} option parsing, which was broken in NASM 2.05. + + +\S{cl-2.05} Version 2.05 + +\b Fix redundant REX.W prefix on \c{JMP reg64}. + +\b Make the behaviour of \c{-O0} match NASM 0.98 legacy behavior. + See \k{opt-O}. + +\b \c{-w-user} can be used to suppress the output of \c{%warning} directives. + See \k{opt-w}. + +\b Fix bug where \c{ALIGN} would issue a full alignment datum instead of + zero bytes. + +\b Fix offsets in list files. + +\b Fix \c{%include} inside multi-line macros or loops. + +\b Fix error where NASM would generate a spurious warning on valid + optimizations of immediate values. + +\b Fix arguments to a number of the \c{CVT} SSE instructions. + +\b Fix RIP-relative offsets when the instruction carries an immediate. + +\b Massive overhaul of the ELF64 backend for spec compliance. + +\b Fix the Geode \c{PFRCPV} and \c{PFRSQRTV} instruction. + +\b Fix the SSE 4.2 \c{CRC32} instruction. + + +\S{cl-2.04} Version 2.04 + +\b Sanitize macro handing in the \c{%error} directive. + +\b New \c{%warning} directive to issue user-controlled warnings. + +\b \c{%error} directives are now deferred to the final assembly phase. + +\b New \c{%fatal} directive to immediately terminate assembly. + +\b New \c{%strcat} directive to join quoted strings together. + +\b New \c{%use} macro directive to support standard macro directives. See + \k{use}. + +\b Excess default parameters to \c{%macro} now issues a warning by default. + See \k{mlmacro}. + +\b Fix \c{%ifn} and \c{%elifn}. + +\b Fix nested \c{%else} clauses. + +\b Correct the handling of nested \c{%rep}s. + +\b New \c{%unmacro} directive to undeclare a multi-line macro. + See \k{unmacro}. + +\b Builtin macro \c{__PASS__} which expands to the current assembly pass. + See \k{pass_macro}. + +\b \c{__utf16__} and \c{__utf32__} operators to generate UTF-16 and UTF-32 + strings. See \k{unicode}. + +\b Fix bug in case-insensitive matching when compiled on platforms that + don't use the \c{configure} script. Of the official release binaries, + that only affected the OS/2 binary. + +\b Support for x87 packed BCD constants. See \k{bcdconst}. + +\b Correct the \c{LTR} and \c{SLDT} instructions in 64-bit mode. + +\b Fix unnecessary REX.W prefix on indirect jumps in 64-bit mode. + +\b Add AVX versions of the AES instructions (\c{VAES}...). + +\b Fix the 256-bit FMA instructions. + +\b Add 256-bit AVX stores per the latest AVX spec. + +\b VIA XCRYPT instructions can now be written either with or without + \c{REP}, apparently different versions of the VIA spec wrote them + differently. + +\b Add missing 64-bit \c{MOVNTI} instruction. + +\b Fix the operand size of \c{VMREAD} and \c{VMWRITE}. + +\b Numerous bug fixes, especially to the AES, AVX and VTX instructions. + +\b The optimizer now always runs until it converges. It also runs even + when disabled, but doesn't optimize. This allows most forward references + to be resolved properly. + +\b \c{%push} no longer needs a context identifier; omitting the context + identifier results in an anonymous context. + + +\S{cl-2.03.01} Version 2.03.01 + +\b Fix buffer overflow in the listing module. + +\b Fix the handling of hexadecimal escape codes in `...` strings. + +\b The Postscript/PDF documentation has been reformatted. + +\b The \c{-F} option now implies \c{-g}. + + +\S{cl-2.03} Version 2.03 + +\b Add support for Intel AVX, CLMUL and FMA instructions, +including YMM registers. + +\b \c{dy}, \c{resy} and \c{yword} for 32-byte operands. + +\b Fix some SSE5 instructions. + +\b Intel \c{INVEPT}, \c{INVVPID} and \c{MOVBE} instructions. + +\b Fix checking for critical expressions when the optimizer is enabled. + +\b Support the DWARF debugging format for ELF targets. + +\b Fix optimizations of signed bytes. + +\b Fix operation on bigendian machines. + +\b Fix buffer overflow in the preprocessor. + +\b \c{SAFESEH} support for Win32, \c{IMAGEREL} for Win64 (SEH). + +\b \c{%?} and \c{%??} to refer to the name of a macro itself. In particular, +\c{%idefine keyword $%?} can be used to make a keyword "disappear". + +\b New options for dependency generation: \c{-MD}, \c{-MF}, +\c{-MP}, \c{-MT}, \c{-MQ}. + +\b New preprocessor directives \c{%pathsearch} and \c{%depend}; INCBIN +reimplemented as a macro. + +\b \c{%include} now resolves macros in a sane manner. + +\b \c{%substr} can now be used to get other than one-character substrings. + +\b New type of character/string constants, using backquotes (\c{`...`}), +which support C-style escape sequences. + +\b \c{%defstr} and \c{%idefstr} to stringize macro definitions before +creation. + +\b Fix forward references used in \c{EQU} statements. + + +\S{cl-2.02} Version 2.02 + +\b Additional fixes for MMX operands with explicit \c{qword}, as well as + (hopefully) SSE operands with \c{oword}. + +\b Fix handling of truncated strings with \c{DO}. + +\b Fix segfaults due to memory overwrites when floating-point constants + were used. + +\b Fix segfaults due to missing include files. + +\b Fix OpenWatcom Makefiles for DOS and OS/2. + +\b Add autogenerated instruction list back into the documentation. + +\b ELF: Fix segfault when generating stabs, and no symbols have been + defined. + +\b ELF: Experimental support for DWARF debugging information. + +\b New compile date and time standard macros. + +\b \c{%ifnum} now returns true for negative numbers. + +\b New \c{%iftoken} test for a single token. + +\b New \c{%ifempty} test for empty expansion. + +\b Add support for the \c{XSAVE} instruction group. + +\b Makefile for Netware/gcc. + +\b Fix issue with some warnings getting emitted way too many times. + +\b Autogenerated instruction list added to the documentation. + + +\S{cl-2.01} Version 2.01 + +\b Fix the handling of MMX registers with explicit \c{qword} tags on + memory (broken in 2.00 due to 64-bit changes.) + +\b Fix the PREFETCH instructions. + +\b Fix the documentation. + +\b Fix debugging info when using \c{-f elf} +(backwards compatibility alias for \c{-f elf32}). + +\b Man pages for rdoff tools (from the Debian project.) + +\b ELF: handle large numbers of sections. + +\b Fix corrupt output when the optimizer runs out of passes. + + +\S{cl-2.00} Version 2.00 + +\b Added c99 data-type compliance. + +\b Added general x86-64 support. + +\b Added win64 (x86-64 COFF) output format. + +\b Added \c{__BITS__} standard macro. + +\b Renamed the \c{elf} output format to \c{elf32} for clarity. + +\b Added \c{elf64} and \c{macho} (MacOS X) output formats. + +\b Added Numeric constants in \c{dq} directive. + +\b Added \c{oword}, \c{do} and \c{reso} pseudo operands. + +\b Allow underscores in numbers. + +\b Added 8-, 16- and 128-bit floating-point formats. + +\b Added binary, octal and hexadecimal floating-point. + +\b Correct the generation of floating-point constants. + +\b Added floating-point option control. + +\b Added Infinity and NaN floating point support. + +\b Added ELF Symbol Visibility support. + +\b Added setting OSABI value in ELF header directive. + +\b Added Generate Makefile Dependencies option. + +\b Added Unlimited Optimization Passes option. + +\b Added \c{%IFN} and \c{%ELIFN} support. + +\b Added Logical Negation Operator. + +\b Enhanced Stack Relative Preprocessor Directives. + +\b Enhanced ELF Debug Formats. + +\b Enhanced Send Errors to a File option. + +\b Added SSSE3, SSE4.1, SSE4.2, SSE5 support. + +\b Added a large number of additional instructions. + +\b Significant performance improvements. + +\b \c{-w+warning} and \c{-w-warning} can now be written as -Wwarning and + -Wno-warning, respectively. See \k{opt-w}. + +\b Add \c{-w+error} to treat warnings as errors. See \k{opt-w}. + +\b Add \c{-w+all} and \c{-w-all} to enable or disable all suppressible + warnings. See \k{opt-w}. + + +\H{cl-0.98.xx} NASM 0.98 Series + +The 0.98 series was the production versions of NASM from 1999 to 2007. + + +\S{cl-0.98.39} Version 0.98.39 + +\b fix buffer overflow + +\b fix outas86's \c{.bss} handling + +\b "make spotless" no longer deletes config.h.in. + +\b \c{%(el)if(n)idn} insensitivity to string quotes difference (#809300). + +\b (nasm.c)\c{__OUTPUT_FORMAT__} changed to string value instead of symbol. + +\S{cl-0.98.38} Version 0.98.38 + + +\b Add Makefile for 16-bit DOS binaries under OpenWatcom, and modify + \c{mkdep.pl} to be able to generate completely pathless dependencies, as + required by OpenWatcom wmake (it supports path searches, but not + explicit paths.) + +\b Fix the \c{STR} instruction. + +\b Fix the ELF output format, which was broken under certain + circumstances due to the addition of stabs support. + +\b Quick-fix Borland format debug-info for \c{-f obj} + +\b Fix for \c{%rep} with no arguments (#560568) + +\b Fix concatenation of preprocessor function call (#794686) + +\b Fix long label causes coredump (#677841) + +\b Use autoheader as well as autoconf to keep configure from generating + ridiculously long command lines. + +\b Make sure that all of the formats which support debugging output + actually will suppress debugging output when \c{-g} not specified. + +\S{cl-0.98.37} Version 0.98.37 + + +\b Paths given in \c{-I} switch searched for \c{incbin}-ed as + well as \c{%include}-ed files. + +\b Added stabs debugging for the ELF output format, patch from + Martin Wawro. + +\b Fix \c{output/outbin.c} to allow origin > 80000000h. + +\b Make \c{-U} switch work. + +\b Fix the use of relative offsets with explicit prefixes, e.g. +\c{a32 loop foo}. + +\b Remove \c{backslash()}. + +\b Fix the \c{SMSW} and \c{SLDT} instructions. + +\b \c{-O2} and \c{-O3} are no longer aliases for \c{-O10} and \c{-O15}. +If you mean the latter, please say so! :) + +\S{cl-0.98.36} Version 0.98.36 + + +\b Update rdoff - librarian/archiver - common rec - docs! + +\b Fix signed/unsigned problems. + +\b Fix \c{JMP FAR label} and \c{CALL FAR label}. + +\b Add new multisection support - map files - fix align bug + +\b Fix sysexit, movhps/movlps reg,reg bugs in insns.dat + +\b \c{Q} or \c{O} suffixes indicate octal + +\b Support Prescott new instructions (PNI). + +\b Cyrix \c{XSTORE} instruction. + + +\S{cl-0.98.35} Version 0.98.35 + +\b Fix build failure on 16-bit DOS (Makefile.bc3 workaround for compiler bug.) + +\b Fix dependencies and compiler warnings. + +\b Add "const" in a number of places. + +\b Add -X option to specify error reporting format (use -Xvc to + integrate with Microsoft Visual Studio.) + +\b Minor changes for code legibility. + +\b Drop use of tmpnam() in rdoff (security fix.) + + +\S{cl-0.98.34} Version 0.98.34 + +\b Correct additional address-size vs. operand-size confusions. + +\b Generate dependencies for all Makefiles automatically. + +\b Add support for unimplemented (but theoretically available) + registers such as tr0 and cr5. Segment registers 6 and 7 are called + segr6 and segr7 for the operations which they can be represented. + +\b Correct some disassembler bugs related to redundant address-size prefixes. + Some work still remains in this area. + +\b Correctly generate an error for things like "SEG eax". + +\b Add the JMPE instruction, enabled by "CPU IA64". + +\b Correct compilation on newer gcc/glibc platforms. + +\b Issue an error on things like "jmp far eax". + + +\S{cl-0.98.33} Version 0.98.33 + +\b New __NASM_PATCHLEVEL__ and __NASM_VERSION_ID__ standard macros to + round out the version-query macros. version.pl now understands + X.YYplWW or X.YY.ZZplWW as a version number, equivalent to + X.YY.ZZ.WW (or X.YY.0.WW, as appropriate). + +\b New keyword "strict" to disable the optimization of specific + operands. + +\b Fix the handing of size overrides with JMP instructions + (instructions such as "jmp dword foo".) + +\b Fix the handling of "ABSOLUTE label", where "label" points into a + relocatable segment. + +\b Fix OBJ output format with lots of externs. + +\b More documentation updates. + +\b Add -Ov option to get verbose information about optimizations. + +\b Undo a braindead change which broke \c{%elif} directives. + +\b Makefile updates. + + +\S{cl-0.98.32} Version 0.98.32 + +\b Fix NASM crashing when \c{%macro} directives were left unterminated. + +\b Lots of documentation updates. + +\b Complete rewrite of the PostScript/PDF documentation generator. + +\b The MS Visual C++ Makefile was updated and corrected. + +\b Recognize .rodata as a standard section name in ELF. + +\b Fix some obsolete Perl4-isms in Perl scripts. + +\b Fix configure.in to work with autoconf 2.5x. + +\b Fix a couple of "make cleaner" misses. + +\b Make the normal "./configure && make" work with Cygwin. + + +\S{cl-0.98.31} Version 0.98.31 + +\b Correctly build in a separate object directory again. + +\b Derive all references to the version number from the version file. + +\b New standard macros __NASM_SUBMINOR__ and __NASM_VER__ macros. + +\b Lots of Makefile updates and bug fixes. + +\b New \c{%ifmacro} directive to test for multiline macros. + +\b Documentation updates. + +\b Fixes for 16-bit OBJ format output. + +\b Changed the NASM environment variable to NASMENV. + + +\S{cl-0.98.30} Version 0.98.30 + +\b Changed doc files a lot: completely removed old READMExx and + Wishlist files, incorporating all information in CHANGES and TODO. + +\b I waited a long time to rename zoutieee.c to (original) outieee.c + +\b moved all output modules to output/ subdirectory. + +\b Added 'make strip' target to strip debug info from nasm & ndisasm. + +\b Added INSTALL file with installation instructions. + +\b Added -v option description to nasm man. + +\b Added dist makefile target to produce source distributions. + +\b 16-bit support for ELF output format (GNU extension, but useful.) + + +\S{cl-0.98.28} Version 0.98.28 + +\b Fastcooked this for Debian's Woody release: +Frank applied the INCBIN bug patch to 0.98.25alt and called +it 0.98.28 to not confuse poor little apt-get. + + +\S{cl-0.98.26} Version 0.98.26 + +\b Reorganised files even better from 0.98.25alt + + +\S{cl-0.98.25alt} Version 0.98.25alt + +\b Prettified the source tree. Moved files to more reasonable places. + +\b Added findleak.pl script to misc/ directory. + +\b Attempted to fix doc. + + +\S{cl-0.98.25} Version 0.98.25 + +\b Line continuation character \c{\\}. + +\b Docs inadvertantly reverted - "dos packaging". + + +\S{cl-0.98.24p1} Version 0.98.24p1 + +\b FIXME: Someone, document this please. + + +\S{cl-0.98.24} Version 0.98.24 + +\b Documentation - Ndisasm doc added to Nasm.doc. + + +\S{cl-0.98.23} Version 0.98.23 + +\b Attempted to remove rdoff version1 + +\b Lino Mastrodomenico's patches to preproc.c (%$$ bug?). + + +\S{cl-0.98.22} Version 0.98.22 + +\b Update rdoff2 - attempt to remove v1. + + +\S{cl-0.98.21} Version 0.98.21 + +\b Optimization fixes. + + +\S{cl-0.98.20} Version 0.98.20 + +\b Optimization fixes. + + +\S{cl-0.98.19} Version 0.98.19 + +\b H. J. Lu's patch back out. + + +\S{cl-0.98.18} Version 0.98.18 + +\b Added ".rdata" to "-f win32". + + +\S{cl-0.98.17} Version 0.98.17 + +\b H. J. Lu's "bogus elf" patch. (Red Hat problem?) + + +\S{cl-0.98.16} Version 0.98.16 + +\b Fix whitespace before "[section ..." bug. + + +\S{cl-0.98.15} Version 0.98.15 + +\b Rdoff changes (?). + +\b Fix fixes to memory leaks. + + +\S{cl-0.98.14} Version 0.98.14 + +\b Fix memory leaks. + + +\S{cl-0.98.13} Version 0.98.13 + +\b There was no 0.98.13 + + +\S{cl-0.98.12} Version 0.98.12 + +\b Update optimization (new function of "-O1") + +\b Changes to test/bintest.asm (?). + + +\S{cl-0.98.11} Version 0.98.11 + +\b Optimization changes. + +\b Ndisasm fixed. + + +\S{cl-0.98.10} Version 0.98.10 + +\b There was no 0.98.10 + + +\S{cl-0.98.09} Version 0.98.09 + +\b Add multiple sections support to "-f bin". + +\b Changed GLOBAL_TEMP_BASE in outelf.c from 6 to 15. + +\b Add "-v" as an alias to the "-r" switch. + +\b Remove "#ifdef" from Tasm compatibility options. + +\b Remove redundant size-overrides on "mov ds, ex", etc. + +\b Fixes to SSE2, other insns.dat (?). + +\b Enable uppercase "I" and "P" switches. + +\b Case insinsitive "seg" and "wrt". + +\b Update install.sh (?). + +\b Allocate tokens in blocks. + +\b Improve "invalid effective address" messages. + + +\S{cl-0.98.08} Version 0.98.08 + +\b Add "\c{%strlen}" and "\c{%substr}" macro operators + +\b Fixed broken c16.mac. + +\b Unterminated string error reported. + +\b Fixed bugs as per 0.98bf + + +\S{cl-0.98.09b with John Coffman patches released 28-Oct-2001} Version 0.98.09b with John Coffman patches released 28-Oct-2001 + +Changes from 0.98.07 release to 98.09b as of 28-Oct-2001 + +\b More closely compatible with 0.98 when -O0 is implied +or specified. Not strictly identical, since backward +branches in range of short offsets are recognized, and signed +byte values with no explicit size specification will be +assembled as a single byte. + +\b More forgiving with the PUSH instruction. 0.98 requires +a size to be specified always. 0.98.09b will imply the size +from the current BITS setting (16 or 32). + +\b Changed definition of the optimization flag: + + -O0 strict two-pass assembly, JMP and Jcc are + handled more like 0.98, except that back- + ward JMPs are short, if possible. + + -O1 strict two-pass assembly, but forward + branches are assembled with code guaranteed + to reach; may produce larger code than + -O0, but will produce successful assembly + more often if branch offset sizes are not + specified. + + -O2 multi-pass optimization, minimize branch + offsets; also will minimize signed immed- + iate bytes, overriding size specification. + + -O3 like -O2, but more passes taken, if needed + + +\S{cl-0.98.07 released 01/28/01} Version 0.98.07 released 01/28/01 + +\b Added Stepane Denis' SSE2 instructions to a *working* + version of the code - some earlier versions were based on + broken code - sorry 'bout that. version "0.98.07" + + +01/28/01 + + +\b Cosmetic modifications to nasm.c, nasm.h, + AUTHORS, MODIFIED + + +\S{cl-0.98.06f released 01/18/01} Version 0.98.06f released 01/18/01 + + +\b - Add "metalbrain"s jecxz bug fix in insns.dat + - alter nasmdoc.src to match - version "0.98.06f" + + +\S{cl-0.98.06e released 01/09/01} Version 0.98.06e released 01/09/01 + + +\b Removed the "outforms.h" file - it appears to be + someone's old backup of "outform.h". version "0.98.06e" + +01/09/01 + +\b fbk - finally added the fix for the "multiple %includes bug", + known since 7/27/99 - reported originally (?) and sent to + us by Austin Lunnen - he reports that John Fine had a fix + within the day. Here it is... + +\b Nelson Rush resigns from the group. Big thanks to Nelson for + his leadership and enthusiasm in getting these changes + incorporated into Nasm! + +\b fbk - [list +], [list -] directives - ineptly implemented, should + be re-written or removed, perhaps. + +\b Brian Raiter / fbk - "elfso bug" fix - applied to aoutb format + as well - testing might be desirable... + +08/07/00 + +\b James Seter - -postfix, -prefix command line switches. + +\b Yuri Zaporogets - rdoff utility changes. + + +\S{cl-0.98p1} Version 0.98p1 + +\b GAS-like palign (Panos Minos) + +\b FIXME: Someone, fill this in with details + + +\S{cl-0.98bf (bug-fixed)} Version 0.98bf (bug-fixed) + +\b Fixed - elf and aoutb bug - shared libraries + - multiple "%include" bug in "-f obj" + - jcxz, jecxz bug + - unrecognized option bug in ndisasm + +\S{cl-0.98.03 with John Coffman's changes released 27-Jul-2000} Version 0.98.03 with John Coffman's changes released 27-Jul-2000 + +\b Added signed byte optimizations for the 0x81/0x83 class +of instructions: ADC, ADD, AND, CMP, OR, SBB, SUB, XOR: +when used as 'ADD reg16,imm' or 'ADD reg32,imm.' Also +optimization of signed byte form of 'PUSH imm' and 'IMUL +reg,imm'/'IMUL reg,reg,imm.' No size specification is needed. + +\b Added multi-pass JMP and Jcc offset optimization. Offsets +on forward references will preferentially use the short form, +without the need to code a specific size (short or near) for +the branch. Added instructions for 'Jcc label' to use the +form 'Jnotcc $+3/JMP label', in cases where a short offset +is out of bounds. If compiling for a 386 or higher CPU, then +the 386 form of Jcc will be used instead. + +This feature is controlled by a new command-line switch: "O", +(upper case letter O). "-O0" reverts the assembler to no +extra optimization passes, "-O1" allows up to 5 extra passes, +and "-O2"(default), allows up to 10 extra optimization passes. + +\b Added a new directive: 'cpu XXX', where XXX is any of: +8086, 186, 286, 386, 486, 586, pentium, 686, PPro, P2, P3 or +Katmai. All are case insensitive. All instructions will +be selected only if they apply to the selected cpu or lower. +Corrected a couple of bugs in cpu-dependence in 'insns.dat'. + +\b Added to 'standard.mac', the "use16" and "use32" forms of +the "bits 16/32" directive. This is nothing new, just conforms +to a lot of other assemblers. (minor) + +\b Changed label allocation from 320/32 (10000 labels @ 200K+) +to 32/37 (1000 labels); makes running under DOS much easier. +Since additional label space is allocated dynamically, this +should have no effect on large programs with lots of labels. +The 37 is a prime, believed to be better for hashing. (minor) + + +\S{cl-0.98.03} Version 0.98.03 + +"Integrated patchfile 0.98-0.98.01. I call this version 0.98.03 for +historical reasons: 0.98.02 was trashed." --John Coffman +, 27-Jul-2000 + +\b Kendall Bennett's SciTech MGL changes + +\b Note that you must define "TASM_COMPAT" at compile-time +to get the Tasm Ideal Mode compatibility. + +\b All changes can be compiled in and out using the TASM_COMPAT macros, +and when compiled without TASM_COMPAT defined we get the exact same +binary as the unmodified 0.98 sources. + +\b standard.mac, macros.c: Added macros to ignore TASM directives before +first include + +\b nasm.h: Added extern declaration for tasm_compatible_mode + +\b nasm.c: Added global variable tasm_compatible_mode + +\b Added command line switch for TASM compatible mode (-t) + +\b Changed version command line to reflect when compiled with TASM additions + +\b Added response file processing to allow all arguments on a single +line (response file is @resp rather than -@resp for NASM format). + +\b labels.c: Changes islocal() macro to support TASM style @@local labels. + +\b Added islocalchar() macro to support TASM style @@local labels. + +\b parser.c: Added support for TASM style memory references (ie: mov +[DWORD eax],10 rather than the NASM style mov DWORD [eax],10). + +\b preproc.c: Added new directives, \c{%arg}, \c{%local}, \c{%stacksize} to directives +table + +\b Added support for TASM style directives without a leading % symbol. + +\b Integrated a block of changes from Andrew Zabolotny : + +\b A new keyword \c{%xdefine} and its case-insensitive counterpart \c{%ixdefine}. +They work almost the same way as \c{%define} and \c{%idefine} but expand +the definition immediately, not on the invocation. Something like a cross +between \c{%define} and \c{%assign}. The "x" suffix stands for "eXpand", so +"xdefine" can be deciphered as "expand-and-define". Thus you can do +things like this: + +\c %assign ofs 0 +\c +\c %macro arg 1 +\c %xdefine %1 dword [esp+ofs] +\c %assign ofs ofs+4 +\c %endmacro + +\b Changed the place where the expansion of %$name macros are expanded. +Now they are converted into ..@ctxnum.name form when detokenizing, so +there are no quirks as before when using %$name arguments to macros, +in macros etc. For example: + +\c %macro abc 1 +\c %define %1 hello +\c %endm +\c +\c abc %$here +\c %$here + + Now last line will be expanded into "hello" as expected. This also allows + for lots of goodies, a good example are extended "proc" macros included + in this archive. + +\b Added a check for "cstk" in smacro_defined() before calling get_ctx() - + this allows for things like: + +\c %ifdef %$abc +\c %endif + + to work without warnings even in no context. + +\b Added a check for "cstk" in %if*ctx and %elif*ctx directives - + this allows to use \c{%ifctx} without excessive warnings. If there is + no active context, \c{%ifctx} goes through "false" branch. + +\b Removed "user error: " prefix with \c{%error} directive: it just clobbers the + output and has absolutely no functionality. Besides, this allows to write + macros that does not differ from built-in functions in any way. + +\b Added expansion of string that is output by \c{%error} directive. Now you + can do things like: + +\c %define hello(x) Hello, x! +\c +\c %define %$name andy +\c %error "hello(%$name)" + + Same happened with \c{%include} directive. + +\b Now all directives that expect an identifier will try to expand and + concatenate everything without whitespaces in between before usage. + For example, with "unfixed" nasm the commands + +\c %define %$abc hello +\c %define __%$abc goodbye +\c __%$abc + + would produce "incorrect" output: last line will expand to + +\c hello goodbyehello + + Not quite what you expected, eh? :-) The answer is that preprocessor + treats the \c{%define} construct as if it would be + +\c %define __ %$abc goodbye + + (note the white space between __ and %$abc). After my "fix" it + will "correctly" expand into + +\c goodbye + + as expected. Note that I use quotes around words "correct", "incorrect" + etc because this is rather a feature not a bug; however current behaviour + is more logical (and allows more advanced macro usage :-). + + Same change was applied to: + \c{%push},\c{%macro},\c{%imacro},\c{%define},\c{%idefine},\c{%xdefine},\c{%ixdefine}, + \c{%assign},\c{%iassign},\c{%undef} + +\b A new directive [WARNING {+|-}warning-id] have been added. It works only + if the assembly phase is enabled (i.e. it doesn't work with nasm -e). + +\b A new warning type: macro-selfref. By default this warning is disabled; + when enabled NASM warns when a macro self-references itself; for example + the following source: + +\c [WARNING macro-selfref] +\c +\c %macro push 1-* +\c %rep %0 +\c push %1 +\c %rotate 1 +\c %endrep +\c %endmacro +\c +\c push eax,ebx,ecx + + will produce a warning, but if we remove the first line we won't see it + anymore (which is The Right Thing To Do {tm} IMHO since C preprocessor + eats such constructs without warnings at all). + +\b Added a "error" routine to preprocessor which always will set ERR_PASS1 + bit in severity_code. This removes annoying repeated errors on first + and second passes from preprocessor. + +\b Added the %+ operator in single-line macros for concatenating two + identifiers. Usage example: + +\c %define _myfunc _otherfunc +\c %define cextern(x) _ %+ x +\c cextern (myfunc) + + After first expansion, third line will become "_myfunc". After this + expansion is performed again so it becomes "_otherunc". + +\b Now if preprocessor is in a non-emitting state, no warning or error + will be emitted. Example: + +\c %if 1 +\c mov eax,ebx +\c %else +\c put anything you want between these two brackets, +\c even macro-parameter references %1 or local +\c labels %$zz or macro-local labels %%zz - no +\c warning will be emitted. +\c %endif + +\b Context-local variables on expansion as a last resort are looked up + in outer contexts. For example, the following piece: + +\c %push outer +\c %define %$a [esp] +\c +\c %push inner +\c %$a +\c %pop +\c %pop + + will expand correctly the fourth line to [esp]; if we'll define another + %$a inside the "inner" context, it will take precedence over outer + definition. However, this modification has been applied only to + expand_smacro and not to smacro_define: as a consequence expansion + looks in outer contexts, but \c{%ifdef} won't look in outer contexts. + + This behaviour is needed because we don't want nested contexts to + act on already defined local macros. Example: + +\c %define %$arg1 [esp+4] +\c test eax,eax +\c if nz +\c mov eax,%$arg1 +\c endif + + In this example the "if" mmacro enters into the "if" context, so %$arg1 + is not valid anymore inside "if". Of course it could be worked around + by using explicitely %$$arg1 but this is ugly IMHO. + +\b Fixed memory leak in \c{%undef}. The origline wasn't freed before + exiting on success. + +\b Fixed trap in preprocessor when line expanded to empty set of tokens. + This happens, for example, in the following case: + +\c #define SOMETHING +\c SOMETHING + + +\S{cl-0.98} Version 0.98 + +All changes since NASM 0.98p3 have been produced by H. Peter Anvin . + +\b The documentation comment delimiter is \# not #. + +\b Allow EQU definitions to refer to external labels; reported by + Pedro Gimeno. + +\b Re-enable support for RDOFF v1; reported by Pedro Gimeno. + +\b Updated License file per OK from Simon and Julian. + + +\S{cl-0.98p9} Version 0.98p9 + +\b Update documentation (although the instruction set reference will + have to wait; I don't want to hold up the 0.98 release for it.) + +\b Verified that the NASM implementation of the PEXTRW and PMOVMSKB + instructions is correct. The encoding differs from what the Intel + manuals document, but the Pentium III behaviour matches NASM, not + the Intel manuals. + +\b Fix handling of implicit sizes in PSHUFW and PINSRW, reported by + Stefan Hoffmeister. + +\b Resurrect the -s option, which was removed when changing the + diagnostic output to stdout. + + +\S{cl-0.98p8} Version 0.98p8 + +\b Fix for "DB" when NASM is running on a bigendian machine. + +\b Invoke insns.pl once for each output script, making Makefile.in + legal for "make -j". + +\b Improve the Unix configure-based makefiles to make package + creation easier. + +\b Included an RPM .spec file for building RPM (RedHat Package Manager) + packages on Linux or Unix systems. + +\b Fix Makefile dependency problems. + +\b Change src/rdsrc.pl to include sectioning information in info + output; required for install-info to work. + +\b Updated the RDOFF distribution to version 2 from Jules; minor + massaging to make it compile in my environment. + +\b Split doc files that can be built by anyone with a Perl interpreter off + into a separate archive. + +\b "Dress rehearsal" release! + + +\S{cl-0.98p7} Version 0.98p7 + +\b Fixed opcodes with a third byte-sized immediate argument to not + complain if given "byte" on the immediate. + +\b Allow \c{%undef} to remove single-line macros with arguments. This + matches the behaviour of #undef in the C preprocessor. + +\b Allow -d, -u, -i and -p to be specified as -D, -U, -I and -P for + compatibility with most C compilers and preprocessors. This allows + Makefile options to be shared between cc and nasm, for example. + +\b Minor cleanups. + +\b Went through the list of Katmai instructions and hopefully fixed the + (rather few) mistakes in it. + +\b (Hopefully) fixed a number of disassembler bugs related to ambiguous + instructions (disambiguated by -p) and SSE instructions with REP. + +\b Fix for bug reported by Mark Junger: "call dword 0x12345678" should + work and may add an OSP (affected CALL, JMP, Jcc). + +\b Fix for environments when "stderr" isn't a compile-time constant. + + +\S{cl-0.98p6} Version 0.98p6 + + +\b Took officially over coordination of the 0.98 release; so drop + the p3.x notation. Skipped p4 and p5 to avoid confusion with John + Fine's J4 and J5 releases. + +\b Update the documentation; however, it still doesn't include + documentation for the various new instructions. I somehow wonder if + it makes sense to have an instruction set reference in the assembler + manual when Intel et al have PDF versions of their manuals online. + +\b Recognize "idt" or "centaur" for the -p option to ndisasm. + +\b Changed error messages back to stderr where they belong, but add an + -E option to redirect them elsewhere (the DOS shell cannot redirect + stderr.) + +\b -M option to generate Makefile dependencies (based on code from Alex + Verstak.) + +\b \c{%undef} preprocessor directive, and -u option, that undefines a + single-line macro. + +\b OS/2 Makefile (Mkfiles/Makefile.os2) for Borland under OS/2; from + Chuck Crayne. + +\b Various minor bugfixes (reported by): + - Dangling \c{%s} in preproc.c (Martin Junker) + +\b THERE ARE KNOWN BUGS IN SSE AND THE OTHER KATMAI INSTRUCTIONS. I am + on a trip and didn't bring the Katmai instruction reference, so I + can't work on them right now. + +\b Updated the License file per agreement with Simon and Jules to + include a GPL distribution clause. + + +\S{cl-0.98p3.7} Version 0.98p3.7 + +\b (Hopefully) fixed the canned Makefiles to include the outrdf2 and + zoutieee modules. + +\b Renamed changes.asm to changed.asm. + + +\S{cl-0.98p3.6} Version 0.98p3.6 + +\b Fixed a bunch of instructions that were added in 0.98p3.5 which had + memory operands, and the address-size prefix was missing from the + instruction pattern. + + +\S{cl-0.98p3.5} Version 0.98p3.5 + +\b Merged in changes from John S. Fine's 0.98-J5 release. John's based + 0.98-J5 on my 0.98p3.3 release; this merges the changes. + +\b Expanded the instructions flag field to a long so we can fit more + flags; mark SSE (KNI) and AMD or Katmai-specific instructions as + such. + +\b Fix the "PRIV" flag on a bunch of instructions, and create new + "PROT" flag for protected-mode-only instructions (orthogonal to if + the instruction is privileged!) and new "SMM" flag for SMM-only + instructions. + +\b Added AMD-only SYSCALL and SYSRET instructions. + +\b Make SSE actually work, and add new Katmai MMX instructions. + +\b Added a -p (preferred vendor) option to ndisasm so that it can + distinguish e.g. Cyrix opcodes also used in SSE. For example: + +\c ndisasm -p cyrix aliased.bin +\c 00000000 670F514310 paddsiw mm0,[ebx+0x10] +\c 00000005 670F514320 paddsiw mm0,[ebx+0x20] +\c ndisasm -p intel aliased.bin +\c 00000000 670F514310 sqrtps xmm0,[ebx+0x10] +\c 00000005 670F514320 sqrtps xmm0,[ebx+0x20] + +\b Added a bunch of Cyrix-specific instructions. + + +\S{cl-0.98p3.4} Version 0.98p3.4 + +\b Made at least an attempt to modify all the additional Makefiles (in + the Mkfiles directory). I can't test it, but this was the best I + could do. + +\b DOS DJGPP+"Opus Make" Makefile from John S. Fine. + +\b changes.asm changes from John S. Fine. + + +\S{cl-0.98p3.3} Version 0.98p3.3 + +\b Patch from Conan Brink to allow nesting of \c{%rep} directives. + +\b If we're going to allow INT01 as an alias for INT1/ICEBP (one of + Jules 0.98p3 changes), then we should allow INT03 as an alias for INT3 + as well. + +\b Updated changes.asm to include the latest changes. + +\b Tried to clean up the s that had snuck in from a DOS/Windows + environment into my Unix environment, and try to make sure than + DOS/Windows users get them back. + +\b We would silently generate broken tools if insns.dat wasn't sorted + properly. Change insns.pl so that the order doesn't matter. + +\b Fix bug in insns.pl (introduced by me) which would cause conditional + instructions to have an extra "cc" in disassembly, e.g. "jnz" + disassembled as "jccnz". + + +\S{cl-0.98p3.2} Version 0.98p3.2 + +\b Merged in John S. Fine's changes from his 0.98-J4 prerelease; see + http://www.csoft.net/cz/johnfine/ + +\b Changed previous "spotless" Makefile target (appropriate for distribution) + to "distclean", and added "cleaner" target which is same as "clean" + except deletes files generated by Perl scripts; "spotless" is union. + +\b Removed BASIC programs from distribution. Get a Perl interpreter + instead (see below.) + +\b Calling this "pre-release 3.2" rather than "p3-hpa2" because of + John's contributions. + +\b Actually link in the IEEE output format (zoutieee.c); fix a bunch of + compiler warnings in that file. Note I don't know what IEEE output + is supposed to look like, so these changes were made "blind". + + +\S{cl-0.98p3-hpa} Version 0.98p3-hpa + +\b Merged nasm098p3.zip with nasm-0.97.tar.gz to create a fully + buildable version for Unix systems (Makefile.in updates, etc.) + +\b Changed insns.pl to create the instruction tables in nasm.h and + names.c, so that a new instruction can be added by adding it *only* + to insns.dat. + +\b Added the following new instructions: SYSENTER, SYSEXIT, FXSAVE, + FXRSTOR, UD1, UD2 (the latter two are two opcodes that Intel + guarantee will never be used; one of them is documented as UD2 in + Intel documentation, the other one just as "Undefined Opcode" -- + calling it UD1 seemed to make sense.) + +\b MAX_SYMBOL was defined to be 9, but LOADALL286 and LOADALL386 are 10 + characters long. Now MAX_SYMBOL is derived from insns.dat. + +\b A note on the BASIC programs included: forget them. insns.bas is + already out of date. Get yourself a Perl interpreter for your + platform of choice at + \W{http://www.cpan.org/ports/index.html}{http://www.cpan.org/ports/index.html}. + + +\S{cl-0.98p3} Version 0.98 pre-release 3 + +\b added response file support, improved command line handling, new layout +help screen + +\b fixed limit checking bug, 'OUT byte nn, reg' bug, and a couple of rdoff +related bugs, updated Wishlist; 0.98 Prerelease 3. + + +\S{cl-0.98p2} Version 0.98 pre-release 2 + +\b fixed bug in outcoff.c to do with truncating section names longer +than 8 characters, referencing beyond end of string; 0.98 pre-release 2 + + +\S{cl-0.98p1} Version 0.98 pre-release 1 + +\b Fixed a bug whereby STRUC didn't work at all in RDF. + +\b Fixed a problem with group specification in PUBDEFs in OBJ. + +\b Improved ease of adding new output formats. Contribution due to +Fox Cutter. + +\b Fixed a bug in relocations in the `bin' format: was showing up when +a relocatable reference crossed an 8192-byte boundary in any output +section. + +\b Fixed a bug in local labels: local-label lookups were inconsistent +between passes one and two if an EQU occurred between the definition +of a global label and the subsequent use of a local label local to +that global. + +\b Fixed a seg-fault in the preprocessor (again) which happened when +you use a blank line as the first line of a multi-line macro +definition and then defined a label on the same line as a call to +that macro. + +\b Fixed a stale-pointer bug in the handling of the NASM environment +variable. Thanks to Thomas McWilliams. + +\b ELF had a hard limit on the number of sections which caused +segfaults when transgressed. Fixed. + +\b Added ability for ndisasm to read from stdin by using `-' as the +filename. + +\b ndisasm wasn't outputting the TO keyword. Fixed. + +\b Fixed error cascade on bogus expression in \c{%if} - an error in +evaluation was causing the entire \c{%if} to be discarded, thus creating +trouble later when the \c{%else} or \c{%endif} was encountered. + +\b Forward reference tracking was instruction-granular not operand- +granular, which was causing 286-specific code to be generated +needlessly on code of the form `shr word [forwardref],1'. Thanks to +Jim Hague for sending a patch. + +\b All messages now appear on stdout, as sending them to stderr serves +no useful purpose other than to make redirection difficult. + +\b Fixed the problem with EQUs pointing to an external symbol - this +now generates an error message. + +\b Allowed multiple size prefixes to an operand, of which only the first +is taken into account. + +\b Incorporated John Fine's changes, including fixes of a large number +of preprocessor bugs, some small problems in OBJ, and a reworking of +label handling to define labels before their line is assembled, rather +than after. + +\b Reformatted a lot of the source code to be more readable. Included +'coding.txt' as a guideline for how to format code for contributors. + +\b Stopped nested \c{%reps} causing a panic - they now cause a slightly more +friendly error message instead. + +\b Fixed floating point constant problems (patch by Pedro Gimeno) + +\b Fixed the return value of insn_size() not being checked for -1, indicating +an error. + +\b Incorporated 3Dnow! instructions. + +\b Fixed the 'mov eax, eax + ebx' bug. + +\b Fixed the GLOBAL EQU bug in ELF. Released developers release 3. + +\b Incorporated John Fine's command line parsing changes + +\b Incorporated David Lindauer's OMF debug support + +\b Made changes for LCC 4.0 support (\c{__NASM_CDecl__}, removed register size +specification warning when sizes agree). + + +\H{cl-0.9x} NASM 0.9 Series + +Revisions before 0.98. + + +\S{cl-0.97} Version 0.97 released December 1997 + +\b This was entirely a bug-fix release to 0.96, which seems to have got +cursed. Silly me. + +\b Fixed stupid mistake in OBJ which caused `MOV EAX,' to +fail. Caused by an error in the `MOV EAX,' support. + +\b ndisasm hung at EOF when compiled with lcc on Linux because lcc on +Linux somehow breaks feof(). ndisasm now does not rely on feof(). + +\b A heading in the documentation was missing due to a markup error in +the indexing. Fixed. + +\b Fixed failure to update all pointers on realloc() within extended- +operand code in parser.c. Was causing wrong behaviour and seg faults +on lines such as `dd 0.0,0.0,0.0,0.0,...' + +\b Fixed a subtle preprocessor bug whereby invoking one multi-line +macro on the first line of the expansion of another, when the second +had been invoked with a label defined before it, didn't expand the +inner macro. + +\b Added internal.doc back in to the distribution archives - it was +missing in 0.96 *blush* + +\b Fixed bug causing 0.96 to be unable to assemble its own test files, +specifically objtest.asm. *blush again* + +\b Fixed seg-faults and bogus error messages caused by mismatching +\c{%rep} and \c{%endrep} within multi-line macro definitions. + +\b Fixed a problem with buffer overrun in OBJ, which was causing +corruption at ends of long PUBDEF records. + +\b Separated DOS archives into main-program and documentation to reduce +download size. + + +\S{cl-0.96} Version 0.96 released November 1997 + +\b Fixed a bug whereby, if `nasm sourcefile' would cause a filename +collision warning and put output into `nasm.out', then `nasm +sourcefile -o outputfile' still gave the warning even though the +`-o' was honoured. +Fixed name pollution under Digital UNIX: one of its header files +defined R_SP, which broke the enum in nasm.h. + +\b Fixed minor instruction table problems: FUCOM and FUCOMP didn't have +two-operand forms; NDISASM didn't recognise the longer register +forms of PUSH and POP (eg FF F3 for PUSH BX); TEST mem,imm32 was +flagged as undocumented; the 32-bit forms of CMOV had 16-bit operand +size prefixes; `AAD imm' and `AAM imm' are no longer flagged as +undocumented because the Intel Architecture reference documents +them. + +\b Fixed a problem with the local-label mechanism, whereby strange +types of symbol (EQUs, auto-defined OBJ segment base symbols) +interfered with the `previous global label' value and screwed up +local labels. + +\b Fixed a bug whereby the stub preprocessor didn't communicate with +the listing file generator, so that the -a and -l options in +conjunction would produce a useless listing file. + +\b Merged `os2' object file format back into `obj', after discovering +that `obj' _also_ shouldn't have a link pass separator in a module +containing a non-trivial MODEND. Flat segments are now declared +using the FLAT attribute. `os2' is no longer a valid object format +name: use `obj'. + +\b Removed the fixed-size temporary storage in the evaluator. Very very +long expressions (like `mov ax,1+1+1+1+...' for two hundred 1s or +so) should now no longer crash NASM. + +\b Fixed a bug involving segfaults on disassembly of MMX instructions, +by changing the meaning of one of the operand-type flags in nasm.h. +This may cause other apparently unrelated MMX problems; it needs to +be tested thoroughly. + +\b Fixed some buffer overrun problems with large OBJ output files. +Thanks to DJ Delorie for the bug report and fix. + +\b Made preprocess-only mode actually listen to the \c{%line} markers as it +prints them, so that it can report errors more sanely. + +\b Re-designed the evaluator to keep more sensible track of expressions +involving forward references: can now cope with previously-nightmare +situations such as: + +\c mov ax,foo | bar +\c foo equ 1 +\c bar equ 2 + +\b Added the ALIGN and ALIGNB standard macros. + +\b Added PIC support in ELF: use of WRT to obtain the four extra +relocation types needed. + +\b Added the ability for output file formats to define their own +extensions to the GLOBAL, COMMON and EXTERN directives. + +\b Implemented common-variable alignment, and global-symbol type and +size declarations, in ELF. + +\b Implemented NEAR and FAR keywords for common variables, plus +far-common element size specification, in OBJ. + +\b Added a feature whereby EXTERNs and COMMONs in OBJ can be given a +default WRT specification (either a segment or a group). + +\b Transformed the Unix NASM archive into an auto-configuring package. + +\b Added a sanity-check for people applying SEG to things which are +already segment bases: this previously went unnoticed by the SEG +processing and caused OBJ-driver panics later. + +\b Added the ability, in OBJ format, to deal with `MOV EAX,' +type references: OBJ doesn't directly support dword-size segment +base fixups, but as long as the low two bytes of the constant term +are zero, a word-size fixup can be generated instead and it will +work. + +\b Added the ability to specify sections' alignment requirements in +Win32 object files and pure binary files. + +\b Added preprocess-time expression evaluation: the \c{%assign} (and +\c{%iassign}) directive and the bare \c{%if} (and \c{%elif}) conditional. Added +relational operators to the evaluator, for use only in \c{%if} +constructs: the standard relationals = < > <= >= <> (and C-like +synonyms == and !=) plus low-precedence logical operators &&, ^^ and +||. + +\b Added a preprocessor repeat construct: \c{%rep} / \c{%exitrep} / \c{%endrep}. + +\b Added the __FILE__ and __LINE__ standard macros. + +\b Added a sanity check for number constants being greater than +0xFFFFFFFF. The warning can be disabled. + +\b Added the %0 token whereby a variadic multi-line macro can tell how +many parameters it's been given in a specific invocation. + +\b Added \c{%rotate}, allowing multi-line macro parameters to be cycled. + +\b Added the `*' option for the maximum parameter count on multi-line +macros, allowing them to take arbitrarily many parameters. + +\b Added the ability for the user-level forms of EXTERN, GLOBAL and +COMMON to take more than one argument. + +\b Added the IMPORT and EXPORT directives in OBJ format, to deal with +Windows DLLs. + +\b Added some more preprocessor \c{%if} constructs: \c{%ifidn} / \c{%ifidni} (exact +textual identity), and \c{%ifid} / \c{%ifnum} / \c{%ifstr} (token type testing). + +\b Added the ability to distinguish SHL AX,1 (the 8086 version) from +SHL AX,BYTE 1 (the 286-and-upwards version whose constant happens to +be 1). + +\b Added NetBSD/FreeBSD/OpenBSD's variant of a.out format, complete +with PIC shared library features. + +\b Changed NASM's idiosyncratic handling of FCLEX, FDISI, FENI, FINIT, +FSAVE, FSTCW, FSTENV, and FSTSW to bring it into line with the +otherwise accepted standard. The previous behaviour, though it was a +deliberate feature, was a deliberate feature based on a +misunderstanding. Apologies for the inconvenience. + +\b Improved the flexibility of ABSOLUTE: you can now give it an +expression rather than being restricted to a constant, and it can +take relocatable arguments as well. + +\b Added the ability for a variable to be declared as EXTERN multiple +times, and the subsequent definitions are just ignored. + +\b We now allow instruction prefixes (CS, DS, LOCK, REPZ etc) to be +alone on a line (without a following instruction). + +\b Improved sanity checks on whether the arguments to EXTERN, GLOBAL +and COMMON are valid identifiers. + +\b Added misc/exebin.mac to allow direct generation of .EXE files by +hacking up an EXE header using DB and DW; also added test/binexe.asm +to demonstrate the use of this. Thanks to Yann Guidon for +contributing the EXE header code. + +\b ndisasm forgot to check whether the input file had been successfully +opened. Now it does. Doh! + +\b Added the Cyrix extensions to the MMX instruction set. + +\b Added a hinting mechanism to allow [EAX+EBX] and [EBX+EAX] to be +assembled differently. This is important since [ESI+EBP] and +[EBP+ESI] have different default base segment registers. + +\b Added support for the PharLap OMF extension for 4096-byte segment +alignment. + + +\S{cl-0.95 released July 1997} Version 0.95 released July 1997 + +\b Fixed yet another ELF bug. This one manifested if the user relied on +the default segment, and attempted to define global symbols without +first explicitly declaring the target segment. + +\b Added makefiles (for NASM and the RDF tools) to build Win32 console +apps under Symantec C++. Donated by Mark Junker. + +\b Added `macros.bas' and `insns.bas', QBasic versions of the Perl +scripts that convert `standard.mac' to `macros.c' and convert +`insns.dat' to `insnsa.c' and `insnsd.c'. Also thanks to Mark +Junker. + +\b Changed the diassembled forms of the conditional instructions so +that JB is now emitted as JC, and other similar changes. Suggested +list by Ulrich Doewich. + +\b Added `@' to the list of valid characters to begin an identifier +with. + +\b Documentary changes, notably the addition of the `Common Problems' +section in nasm.doc. + +\b Fixed a bug relating to 32-bit PC-relative fixups in OBJ. + +\b Fixed a bug in perm_copy() in labels.c which was causing exceptions +in cleanup_labels() on some systems. + +\b Positivity sanity check in TIMES argument changed from a warning to +an error following a further complaint. + +\b Changed the acceptable limits on byte and word operands to allow +things like `~10111001b' to work. + +\b Fixed a major problem in the preprocessor which caused seg-faults if +macro definitions contained blank lines or comment-only lines. + +\b Fixed inadequate error checking on the commas separating the +arguments to `db', `dw' etc. + +\b Fixed a crippling bug in the handling of macros with operand counts +defined with a `+' modifier. + +\b Fixed a bug whereby object file formats which stored the input file +name in the output file (such as OBJ and COFF) weren't doing so +correctly when the output file name was specified on the command +line. + +\b Removed [INC] and [INCLUDE] support for good, since they were +obsolete anyway. + +\b Fixed a bug in OBJ which caused all fixups to be output in 16-bit +(old-format) FIXUPP records, rather than putting the 32-bit ones in +FIXUPP32 (new-format) records. + +\b Added, tentatively, OS/2 object file support (as a minor variant on +OBJ). + +\b Updates to Fox Cutter's Borland C makefile, Makefile.bc2. + +\b Removed a spurious second fclose() on the output file. + +\b Added the `-s' command line option to redirect all messages which +would go to stderr (errors, help text) to stdout instead. + +\b Added the `-w' command line option to selectively suppress some +classes of assembly warning messages. + +\b Added the `-p' pre-include and `-d' pre-define command-line options. + +\b Added an include file search path: the `-i' command line option. + +\b Fixed a silly little preprocessor bug whereby starting a line with a +`%!' environment-variable reference caused an `unknown directive' +error. + +\b Added the long-awaited listing file support: the `-l' command line +option. + +\b Fixed a problem with OBJ format whereby, in the absence of any +explicit segment definition, non-global symbols declared in the +implicit default segment generated spurious EXTDEF records in the +output. + +\b Added the NASM environment variable. + +\b From this version forward, Win32 console-mode binaries will be +included in the DOS distribution in addition to the 16-bit binaries. +Added Makefile.vc for this purpose. + +\b Added `return 0;' to test/objlink.c to prevent compiler warnings. + +\b Added the __NASM_MAJOR__ and __NASM_MINOR__ standard defines. + +\b Added an alternative memory-reference syntax in which prefixing an +operand with `&' is equivalent to enclosing it in square brackets, +at the request of Fox Cutter. + +\b Errors in pass two now cause the program to return a non-zero error +code, which they didn't before. + +\b Fixed the single-line macro cycle detection, which didn't work at +all on macros with no parameters (caused an infinite loop). Also +changed the behaviour of single-line macro cycle detection to work +like cpp, so that macros like `extrn' as given in the documentation +can be implemented. + +\b Fixed the implementation of WRT, which was too restrictive in that +you couldn't do `mov ax,[di+abc wrt dgroup]' because (di+abc) wasn't +a relocatable reference. + + +\S{cl-0.94 released April 1997} Version 0.94 released April 1997 + + +\b Major item: added the macro processor. + +\b Added undocumented instructions SMI, IBTS, XBTS and LOADALL286. Also +reorganised CMPXCHG instruction into early-486 and Pentium forms. +Thanks to Thobias Jones for the information. + +\b Fixed two more stupid bugs in ELF, which were causing `ld' to +continue to seg-fault in a lot of non-trivial cases. + +\b Fixed a seg-fault in the label manager. + +\b Stopped FBLD and FBSTP from _requiring_ the TWORD keyword, which is +the only option for BCD loads/stores in any case. + +\b Ensured FLDCW, FSTCW and FSTSW can cope with the WORD keyword, if +anyone bothers to provide it. Previously they complained unless no +keyword at all was present. + +\b Some forms of FDIV/FDIVR and FSUB/FSUBR were still inverted: a +vestige of a bug that I thought had been fixed in 0.92. This was +fixed, hopefully for good this time... + +\b Another minor phase error (insofar as a phase error can _ever_ be +minor) fixed, this one occurring in code of the form + +\c rol ax,forward_reference +\c forward_reference equ 1 + +\b The number supplied to TIMES is now sanity-checked for positivity, +and also may be greater than 64K (which previously didn't work on +16-bit systems). + +\b Added Watcom C makefiles, and misc/pmw.bat, donated by Dominik Behr. + +\b Added the INCBIN pseudo-opcode. + +\b Due to the advent of the preprocessor, the [INCLUDE] and [INC] +directives have become obsolete. They are still supported in this +version, with a warning, but won't be in the next. + +\b Fixed a bug in OBJ format, which caused incorrect object records to +be output when absolute labels were made global. + +\b Updates to RDOFF subdirectory, and changes to outrdf.c. + + +\S{cl-0.93 released January 1997} Version 0.93 released January 1997 + +This release went out in a great hurry after semi-crippling bugs +were found in 0.92. + +\b Really \e{did} fix the stack overflows this time. *blush* + +\b Had problems with EA instruction sizes changing between passes, when +an offset contained a forward reference and so 4 bytes were +allocated for the offset in pass one; by pass two the symbol had +been defined and happened to be a small absolute value, so only 1 +byte got allocated, causing instruction size mismatch between passes +and hence incorrect address calculations. Fixed. + +\b Stupid bug in the revised ELF section generation fixed (associated +string-table section for .symtab was hard-coded as 7, even when this +didn't fit with the real section table). Was causing `ld' to +seg-fault under Linux. + +\b Included a new Borland C makefile, Makefile.bc2, donated by Fox +Cutter . + + +\S{cl-0.92 released January 1997} Version 0.92 released January 1997 + +\b The FDIVP/FDIVRP and FSUBP/FSUBRP pairs had been inverted: this was +fixed. This also affected the LCC driver. + +\b Fixed a bug regarding 32-bit effective addresses of the form +\c{[other_register+ESP]}. + +\b Documentary changes, notably documentation of the fact that Borland +Win32 compilers use `obj' rather than `win32' object format. + +\b Fixed the COMENT record in OBJ files, which was formatted +incorrectly. + +\b Fixed a bug causing segfaults in large RDF files. + +\b OBJ format now strips initial periods from segment and group +definitions, in order to avoid complications with the local label +syntax. + +\b Fixed a bug in disassembling far calls and jumps in NDISASM. + +\b Added support for user-defined sections in COFF and ELF files. + +\b Compiled the DOS binaries with a sensible amount of stack, to +prevent stack overflows on any arithmetic expression containing +parentheses. + +\b Fixed a bug in handling of files that do not terminate in a newline. + + +\S{cl-0.91 released November 1996} Version 0.91 released November 1996 + +\b Loads of bug fixes. + +\b Support for RDF added. + +\b Support for DBG debugging format added. + +\b Support for 32-bit extensions to Microsoft OBJ format added. + +\b Revised for Borland C: some variable names changed, makefile added. + +\b LCC support revised to actually work. + +\b JMP/CALL NEAR/FAR notation added. + +\b `a16', `o16', `a32' and `o32' prefixes added. + +\b Range checking on short jumps implemented. + +\b MMX instruction support added. + +\b Negative floating point constant support added. + +\b Memory handling improved to bypass 64K barrier under DOS. + +\b \c{$} prefix to force treatment of reserved words as identifiers added. + +\b Default-size mechanism for object formats added. + +\b Compile-time configurability added. + +\b \c{#}, \c{@}, \c{~} and c\{?} are now valid characters in labels. + +\b \c{-e} and \c{-k} options in NDISASM added. + + +\S{cl-0.90 released October 1996} Version 0.90 released October 1996 + +First release version. First support for object file output. Other +changes from previous version (0.3x) too numerous to document. diff --git a/doc/genps.pl b/doc/genps.pl new file mode 100755 index 0000000..c7c23cf --- /dev/null +++ b/doc/genps.pl @@ -0,0 +1,1231 @@ +#!/usr/bin/perl +## -------------------------------------------------------------------------- +## +## Copyright 1996-2009 The NASM Authors - All Rights Reserved +## See the file AUTHORS included with the NASM distribution for +## the specific copyright holders. +## +## Redistribution and use in source and binary forms, with or without +## modification, are permitted provided that the following +## conditions are met: +## +## * Redistributions of source code must retain the above copyright +## notice, this list of conditions and the following disclaimer. +## * Redistributions in binary form must reproduce the above +## copyright notice, this list of conditions and the following +## disclaimer in the documentation and/or other materials provided +## with the distribution. +## +## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +## CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +## INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +## DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +## NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +## LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +## HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +## CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +## OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +## EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +## +## -------------------------------------------------------------------------- + +# +# Format the documentation as PostScript +# + +use Env; +use lib $srcdir; + +require 'psfonts.ph'; # The fonts we want to use +require 'pswidth.ph'; # PostScript string width + +use Fcntl; + +# +# PostScript configurables; these values are also available to the +# PostScript code itself +# +%psconf = ( + pagewidth => 595, # Page width in PostScript points + pageheight => 792, # Page height in PostScript points + lmarg => 100, # Left margin in PostScript points + rmarg => 50, # Right margin in PostScript points + topmarg => 100, # Top margin in PostScript points + botmarg => 100, # Bottom margin in PostScript points + plmarg => 50, # Page number position relative to left margin + prmarg => 0, # Page number position relative to right margin + pymarg => 50, # Page number position relative to bot margin + startcopyright => 75, # How much above the bottom margin is the + # copyright notice stuff + bulladj => 12, # How much to indent a bullet paragraph + tocind => 12, # TOC indentation per level + tocpnz => 24, # Width of TOC page number only zone + tocdots => 8, # Spacing between TOC dots + idxspace => 24, # Minimum space between index title and pg# + idxindent => 24, # How much to indent a subindex entry + idxgutter => 24, # Space between index columns + idxcolumns => 2, # Number of index columns + ); + +%psbool = ( + colorlinks => 0, # Set links in blue rather than black + ); + +# Known paper sizes +%papersizes = ( + 'a5' => [421, 595], # ISO half paper size + 'b5' => [501, 709], # ISO small paper size + 'a4' => [595, 842], # ISO standard paper size + 'letter' => [612, 792], # US common paper size + 'pa4' => [595, 792], # Compromise ("portable a4") + 'b4' => [709,1002], # ISO intermediate paper size + 'legal' => [612,1008], # US intermediate paper size + 'a3' => [842,1190], # ISO double paper size + '11x17' => [792,1224], # US double paper size + ); + +# +# Parse the command line +# +undef $input; +while ( $arg = shift(@ARGV) ) { + if ( $arg =~ /^\-(|no\-)(.*)$/ ) { + $parm = $2; + $true = ($1 eq '') ? 1 : 0; + if ( $true && defined($papersizes{$parm}) ) { + $psconf{pagewidth} = $papersizes{$parm}->[0]; + $psconf{pageheight} = $papersizes{$parm}->[1]; + } elsif ( defined($psbool{$parm}) ) { + $psbool{$parm} = $true; + } elsif ( $true && defined($psconf{$parm}) ) { + $psconf{$parm} = shift(@ARGV); + } elsif ( $parm =~ /^(title|subtitle|year|author|license)$/ ) { + $metadata{$parm} = shift(@ARGV); + } else { + die "$0: Unknown option: $arg\n"; + } + } else { + $input = $arg; + } +} + +# +# Document formatting parameters +# +$paraskip = 6; # Space between paragraphs +$chapstart = 30; # Space before a chapter heading +$chapskip = 24; # Space after a chapter heading +$tocskip = 6; # Space between TOC entries + +# Configure post-paragraph skips for each kind of paragraph +%skiparray = ('chap' => $chapskip, 'appn' => $chapstart, + 'head' => $paraskip, 'subh' => $paraskip, + 'norm' => $paraskip, 'bull' => $paraskip, + 'code' => $paraskip, 'toc0' => $tocskip, + 'toc1' => $tocskip, 'toc2' => $tocskip); + +# Custom encoding vector. This is basically the same as +# ISOLatin1Encoding (a level 2 feature, so we dont want to use it), +# but with the "naked" accents at \200-\237 moved to the \000-\037 +# range (ASCII control characters), and a few extra characters thrown +# in. It is basically a modified Windows 1252 codepage, minus, for +# now, the euro sign (\200 is reserved for euro.) + +@NASMEncoding = +( + undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, + undef, undef, undef, undef, undef, undef, 'dotlessi', 'grave', + 'acute', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', + 'dieresis', undef, 'ring', 'cedilla', undef, 'hungarumlaut', + 'ogonek', 'caron', 'space', 'exclam', 'quotedbl', 'numbersign', + 'dollar', 'percent', 'ampersand', 'quoteright', 'parenleft', + 'parenright', 'asterisk', 'plus', 'comma', 'minus', 'period', + 'slash', 'zero', 'one', 'two', 'three', 'four', 'five', 'six', + 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', + 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', + 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', + 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', + 'asciicircum', 'underscore', 'quoteleft', 'a', 'b', 'c', 'd', 'e', + 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', + 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', + 'asciitilde', undef, undef, undef, 'quotesinglbase', 'florin', + 'quotedblbase', 'ellipsis', 'dagger', 'dbldagger', 'circumflex', + 'perthousand', 'Scaron', 'guilsinglleft', 'OE', undef, 'Zcaron', + undef, undef, 'grave', 'quotesingle', 'quotedblleft', + 'quotedblright', 'bullet', 'endash', 'emdash', 'tilde', 'trademark', + 'scaron', 'guilsignlright', 'oe', undef, 'zcaron', 'Ydieresis', + 'space', 'exclamdown', 'cent', 'sterling', 'currency', 'yen', + 'brokenbar', 'section', 'dieresis', 'copyright', 'ordfeminine', + 'guillemotleft', 'logicalnot', 'hyphen', 'registered', 'macron', + 'degree', 'plusminus', 'twosuperior', 'threesuperior', 'acute', 'mu', + 'paragraph', 'periodcentered', 'cedilla', 'onesuperior', + 'ordmasculine', 'guillemotright', 'onequarter', 'onehalf', + 'threequarters', 'questiondown', 'Agrave', 'Aacute', 'Acircumflex', + 'Atilde', 'Adieresis', 'Aring', 'AE', 'Ccedilla', 'Egrave', 'Eacute', + 'Ecircumflex', 'Edieresis', 'Igrave', 'Iacute', 'Icircumflex', + 'Idieresis', 'Eth', 'Ntilde', 'Ograve', 'Oacute', 'Ocircumflex', + 'Otilde', 'Odieresis', 'multiply', 'Oslash', 'Ugrave', 'Uacute', + 'Ucircumflex', 'Udieresis', 'Yacute', 'Thorn', 'germandbls', + 'agrave', 'aacute', 'acircumflex', 'atilde', 'adieresis', 'aring', + 'ae', 'ccedilla', 'egrave', 'eacute', 'ecircumflex', 'edieresis', + 'igrave', 'iacute', 'icircumflex', 'idieresis', 'eth', 'ntilde', + 'ograve', 'oacute', 'ocircumflex', 'otilde', 'odieresis', 'divide', + 'oslash', 'ugrave', 'uacute', 'ucircumflex', 'udieresis', 'yacute', + 'thorn', 'ydieresis' +); + +# Name-to-byte lookup hash +%charcode = (); +for ( $i = 0 ; $i < 256 ; $i++ ) { + $charcode{$NASMEncoding[$i]} = chr($i); +} + +# +# First, format the stuff coming from the front end into +# a cleaner representation +# +if ( defined($input) ) { + sysopen(PARAS, $input, O_RDONLY) or + die "$0: cannot open $input: $!\n"; +} else { + open(PARAS, "<&STDIN") or die "$0: $!\n"; +} +while ( defined($line = ) ) { + chomp $line; + $data = ; + chomp $data; + if ( $line =~ /^meta :(.*)$/ ) { + $metakey = $1; + $metadata{$metakey} = $data; + } elsif ( $line =~ /^indx :(.*)$/ ) { + $ixentry = $1; + push(@ixentries, $ixentry); + $ixterms{$ixentry} = [split(/\037/, $data)]; + # Look for commas. This is easier done on the string + # representation, so do it now. + if ( $data =~ /^(.*)\,\037sp\037/ ) { + $ixprefix = $1; + $ixprefix =~ s/\037n $//; # Discard possible font change at end + $ixhasprefix{$ixentry} = $ixprefix; + if ( !$ixprefixes{$ixprefix} ) { + $ixcommafirst{$ixentry}++; + } + $ixprefixes{$ixprefix}++; + } else { + # A complete term can also be used as a prefix + $ixprefixes{$data}++; + } + } else { + push(@ptypes, $line); + push(@paras, [split(/\037/, $data)]); + } +} +close(PARAS); + +# +# Convert an integer to a chosen base +# +sub int2base($$) { + my($i,$b) = @_; + my($s) = ''; + my($n) = ''; + my($z) = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + return '0' if ($i == 0); + if ( $i < 0 ) { $n = '-'; $i = -$i; } + while ( $i ) { + $s = substr($z,$i%$b,1) . $s; + $i = int($i/$b); + } + return $n.$s; +} + +# +# Convert a string to a rendering array +# +sub string2array($) +{ + my($s) = @_; + my(@a) = (); + + $s =~ s/\B\-\-\B/$charcode{'emdash'}/g; + $s =~ s/\B\-\B/ $charcode{'endash'} /g; + + while ( $s =~ /^(\s+|\S+)(.*)$/ ) { + push(@a, [0,$1]); + $s = $2; + } + + return @a; +} + +# +# Take a crossreference name and generate the PostScript name for it. +# +# This hack produces a somewhat smaller PDF... +#%ps_xref_list = (); +#$ps_xref_next = 0; +#sub ps_xref($) { +# my($s) = @_; +# my $q = $ps_xref_list{$s}; +# return $q if ( defined($ps_xref_list{$s}) ); +# $q = 'X'.int2base($ps_xref_next++, 52); +# $ps_xref_list{$s} = $q; +# return $q; +#} + +# Somewhat bigger PDF, but one which obeys # URLs +sub ps_xref($) { + return @_[0]; +} + +# +# Flow lines according to a particular font set and width +# +# A "font set" is represented as an array containing +# arrays of pairs: [, ] +# +# Each line is represented as: +# [ [type,first|last,aux,fontset,page,ypos,optional col], +# [rendering array] ] +# +# A space character may be "squeezed" by up to this much +# (as a fraction of the normal width of a space.) +# +$ps_space_squeeze = 0.00; # Min space width 100% +sub ps_flow_lines($$$@) { + my($wid, $fontset, $type, @data) = @_; + my($fonts) = $$fontset{fonts}; + my($e); + my($w) = 0; # Width of current line + my($sw) = 0; # Width of current line due to spaces + my(@l) = (); # Current line + my(@ls) = (); # Accumulated output lines + my(@xd) = (); # Metadata that goes with subsequent text + my $hasmarker = 0; # Line has -6 marker + my $pastmarker = 0; # -6 marker found + + # If there is a -6 marker anywhere in the paragraph, + # *each line* output needs to have a -6 marker + foreach $e ( @data ) { + $hasmarker = 1 if ( $$e[0] == -6 ); + } + + $w = 0; + foreach $e ( @data ) { + if ( $$e[0] < 0 ) { + # Type is metadata. Zero width. + if ( $$e[0] == -6 ) { + $pastmarker = 1; + } + if ( $$e[0] == -1 || $$e[0] == -6 ) { + # -1 (end anchor) or -6 (marker) goes with the preceeding + # text, otherwise with the subsequent text + push(@l, $e); + } else { + push(@xd, $e); + } + } else { + my $ew = ps_width($$e[1], $fontset->{fonts}->[$$e[0]][1], + \@NASMEncoding) * + ($fontset->{fonts}->[$$e[0]][0]/1000); + my $sp = $$e[1]; + $sp =~ tr/[^ ]//d; # Delete nonspaces + my $esw = ps_width($sp, $fontset->{fonts}->[$$e[0]][1], + \@NASMEncoding) * + ($fontset->{fonts}->[$$e[0]][0]/1000); + + if ( ($w+$ew) - $ps_space_squeeze*($sw+$esw) > $wid ) { + # Begin new line + # Search backwards for previous space chunk + my $lx = scalar(@l)-1; + my @rm = (); + while ( $lx >= 0 ) { + while ( $lx >= 0 && $l[$lx]->[0] < 0 ) { + # Skip metadata + $pastmarker = 0 if ( $l[$lx]->[0] == -6 ); + $lx--; + }; + if ( $lx >= 0 ) { + if ( $l[$lx]->[1] eq ' ' ) { + splice(@l, $lx, 1); + @rm = splice(@l, $lx); + last; # Found place to break + } else { + $lx--; + } + } + } + + # Now @l contains the stuff to remain on the old line + # If we broke the line inside a link, then split the link + # into two. + my $lkref = undef; + foreach my $lc ( @l ) { + if ( $$lc[0] == -2 || $$lc[0] == -3 || $lc[0] == -7 ) { + $lkref = $lc; + } elsif ( $$lc[0] == -1 ) { + undef $lkref; + } + } + + if ( defined($lkref) ) { + push(@l, [-1,undef]); # Terminate old reference + unshift(@rm, $lkref); # Duplicate reference on new line + } + + if ( $hasmarker ) { + if ( $pastmarker ) { + unshift(@rm,[-6,undef]); # New line starts with marker + } else { + push(@l,[-6,undef]); # Old line ends with marker + } + } + + push(@ls, [[$type,0,undef,$fontset,0,0],[@l]]); + @l = @rm; + + $w = $sw = 0; + # Compute the width of the remainder array + for my $le ( @l ) { + if ( $$le[0] >= 0 ) { + my $xew = ps_width($$le[1], + $fontset->{fonts}->[$$le[0]][1], + \@NASMEncoding) * + ($fontset->{fonts}->[$$le[0]][0]/1000); + my $xsp = $$le[1]; + $xsp =~ tr/[^ ]//d; # Delete nonspaces + my $xsw = ps_width($xsp, + $fontset->{fonts}->[$$le[0]][1], + \@NASMEncoding) * + ($fontset->{fonts}->[$$le[0]][0]/1000); + $w += $xew; $sw += $xsw; + } + } + } + push(@l, @xd); # Accumulated metadata + @xd = (); + if ( $$e[1] ne '' ) { + push(@l, $e); + $w += $ew; $sw += $esw; + } + } + } + push(@l,@xd); + if ( scalar(@l) ) { + push(@ls, [[$type,0,undef,$fontset,0,0],[@l]]); # Final line + } + + # Mark the first line as first and the last line as last + if ( scalar(@ls) ) { + $ls[0]->[0]->[1] |= 1; # First in para + $ls[-1]->[0]->[1] |= 2; # Last in para + } + return @ls; +} + +# +# Once we have broken things into lines, having multiple chunks +# with the same font index is no longer meaningful. Merge +# adjacent chunks to keep down the size of the whole file. +# +sub ps_merge_chunks(@) { + my(@ci) = @_; + my($c, $lc); + my(@co, $eco); + + undef $lc; + @co = (); + $eco = -1; # Index of the last entry in @co + foreach $c ( @ci ) { + if ( defined($lc) && $$c[0] == $lc && $$c[0] >= 0 ) { + $co[$eco]->[1] .= $$c[1]; + } else { + push(@co, $c); $eco++; + $lc = $$c[0]; + } + } + return @co; +} + +# +# Convert paragraphs to rendering arrays. Each +# element in the array contains (font, string), +# where font can be one of: +# -1 end link +# -2 begin crossref +# -3 begin weblink +# -4 index item anchor +# -5 crossref anchor +# -6 left/right marker (used in the index) +# -7 page link (used in the index) +# 0 normal +# 1 empatic (italic) +# 2 code (fixed spacing) +# + +sub mkparaarray($@) { + my($ptype, @chunks) = @_; + + my @para = (); + my $in_e = 0; + my $chunk; + + if ( $ptype =~ /^code/ ) { + foreach $chunk ( @chunks ) { + push(@para, [2, $chunk]); + } + } else { + foreach $chunk ( @chunks ) { + my $type = substr($chunk,0,2); + my $text = substr($chunk,2); + + if ( $type eq 'sp' ) { + push(@para, [$in_e?1:0, ' ']); + } elsif ( $type eq 'da' ) { + push(@para, [$in_e?1:0, $charcode{'endash'}]); + } elsif ( $type eq 'n ' ) { + push(@para, [0, $text]); + $in_e = 0; + } elsif ( $type =~ '^e' ) { + push(@para, [1, $text]); + $in_e = ($type eq 'es' || $type eq 'e '); + } elsif ( $type eq 'c ' ) { + push(@para, [2, $text]); + $in_e = 0; + } elsif ( $type eq 'x ' ) { + push(@para, [-2, ps_xref($text)]); + } elsif ( $type eq 'xe' ) { + push(@para, [-1, undef]); + } elsif ( $type eq 'wc' || $type eq 'w ' ) { + $text =~ /\<(.*)\>(.*)$/; + my $link = $1; $text = $2; + push(@para, [-3, $link]); + push(@para, [($type eq 'wc') ? 2:0, $text]); + push(@para, [-1, undef]); + $in_e = 0; + } elsif ( $type eq 'i ' ) { + push(@para, [-4, $text]); + } else { + die "Unexpected paragraph chunk: $chunk"; + } + } + } + return @para; +} + +$npara = scalar(@paras); +for ( $i = 0 ; $i < $npara ; $i++ ) { + $paras[$i] = [mkparaarray($ptypes[$i], @{$paras[$i]})]; +} + +# +# This converts a rendering array to a simple string +# +sub ps_arraytostr(@) { + my $s = ''; + my $c; + foreach $c ( @_ ) { + $s .= $$c[1] if ( $$c[0] >= 0 ); + } + return $s; +} + +# +# This generates a duplicate of a paragraph +# +sub ps_dup_para(@) { + my(@i) = @_; + my(@o) = (); + my($c); + + foreach $c ( @i ) { + my @cc = @{$c}; + push(@o, [@cc]); + } + return @o; +} + +# +# This generates a duplicate of a paragraph, stripping anchor +# tags (-4 and -5) +# +sub ps_dup_para_noanchor(@) { + my(@i) = @_; + my(@o) = (); + my($c); + + foreach $c ( @i ) { + my @cc = @{$c}; + push(@o, [@cc]) unless ( $cc[0] == -4 || $cc[0] == -5 ); + } + return @o; +} + +# +# Scan for header paragraphs and fix up their contents; +# also generate table of contents and PDF bookmarks. +# +@tocparas = ([[-5, 'contents'], [0,'Contents']]); +@tocptypes = ('chap'); +@bookmarks = (['title', 0, 'Title'], ['contents', 0, 'Contents']); +%bookref = (); +for ( $i = 0 ; $i < $npara ; $i++ ) { + my $xtype = $ptypes[$i]; + my $ptype = substr($xtype,0,4); + my $str; + my $book; + + if ( $ptype eq 'chap' || $ptype eq 'appn' ) { + unless ( $xtype =~ /^\S+ (\S+) :(.*)$/ ) { + die "Bad para"; + } + my $secn = $1; + my $sech = $2; + my $xref = ps_xref($sech); + my $chap = ($ptype eq 'chap')?'Chapter':'Appendix'; + + $book = [$xref, 0, ps_arraytostr(@{$paras[$i]})]; + push(@bookmarks, $book); + $bookref{$secn} = $book; + + push(@tocparas, [ps_dup_para_noanchor(@{$paras[$i]})]); + push(@tocptypes, 'toc0'.' :'.$sech.':'.$chap.' '.$secn.':'); + + unshift(@{$paras[$i]}, + [-5, $xref], [0,$chap.' '.$secn.':'], [0, ' ']); + } elsif ( $ptype eq 'head' || $ptype eq 'subh' ) { + unless ( $xtype =~ /^\S+ (\S+) :(.*)$/ ) { + die "Bad para"; + } + my $secn = $1; + my $sech = $2; + my $xref = ps_xref($sech); + my $pref; + $pref = $secn; $pref =~ s/\.[^\.]+$//; # Find parent node + + $book = [$xref, 0, ps_arraytostr(@{$paras[$i]})]; + push(@bookmarks, $book); + $bookref{$secn} = $book; + $bookref{$pref}->[1]--; # Adjust count for parent node + + push(@tocparas, [ps_dup_para_noanchor(@{$paras[$i]})]); + push(@tocptypes, + (($ptype eq 'subh') ? 'toc2':'toc1').' :'.$sech.':'.$secn); + + unshift(@{$paras[$i]}, [-5, $xref]); + } +} + +# +# Add TOC to beginning of paragraph list +# +unshift(@paras, @tocparas); undef @tocparas; +unshift(@ptypes, @tocptypes); undef @tocptypes; + +# +# Add copyright notice to the beginning +# +@copyright_page = +([[0, $charcode{'copyright'}], + [0, ' '], [0, $metadata{'year'}], + [0, ' '], string2array($metadata{'author'}), + [0, ' '], string2array($metadata{'copyright_tail'})], + [string2array($metadata{'license'})], + [string2array($metadata{'auxinfo'})]); + +unshift(@paras, @copyright_page); +unshift(@ptypes, ('norm') x scalar(@copyright_page)); + +$npara = scalar(@paras); + +# +# No lines generated, yet. +# +@pslines = (); + +# +# Line Auxilliary Information Types +# +$AuxStr = 1; # String +$AuxPage = 2; # Page number (from xref) +$AuxPageStr = 3; # Page number as a PostScript string +$AuxXRef = 4; # Cross reference as a name +$AuxNum = 5; # Number + +# +# Break or convert paragraphs into lines, and push them +# onto the @pslines array. +# +sub ps_break_lines($$) { + my ($paras,$ptypes) = @_; + + my $linewidth = $psconf{pagewidth}-$psconf{lmarg}-$psconf{rmarg}; + my $bullwidth = $linewidth-$psconf{bulladj}; + my $indxwidth = ($linewidth-$psconf{idxgutter})/$psconf{idxcolumns} + -$psconf{idxspace}; + + my $npara = scalar(@{$paras}); + my $i; + + for ( $i = 0 ; $i < $npara ; $i++ ) { + my $xtype = $ptypes->[$i]; + my $ptype = substr($xtype,0,4); + my @data = @{$paras->[$i]}; + my @ls = (); + if ( $ptype eq 'code' ) { + my $p; + # Code paragraph; each chunk is a line + foreach $p ( @data ) { + push(@ls, [[$ptype,0,undef,\%BodyFont,0,0],[$p]]); + } + $ls[0]->[0]->[1] |= 1; # First in para + $ls[-1]->[0]->[1] |= 2; # Last in para + } elsif ( $ptype eq 'chap' || $ptype eq 'appn' ) { + # Chapters are flowed normally, but in an unusual font + @ls = ps_flow_lines($linewidth, \%ChapFont, $ptype, @data); + } elsif ( $ptype eq 'head' || $ptype eq 'subh' ) { + unless ( $xtype =~ /^\S+ (\S+) :(.*)$/ ) { + die "Bad para"; + } + my $secn = $1; + my $sech = $2; + my $font = ($ptype eq 'head') ? \%HeadFont : \%SubhFont; + @ls = ps_flow_lines($linewidth, $font, $ptype, @data); + # We need the heading number as auxillary data + $ls[0]->[0]->[2] = [[$AuxStr,$secn]]; + } elsif ( $ptype eq 'norm' ) { + @ls = ps_flow_lines($linewidth, \%BodyFont, $ptype, @data); + } elsif ( $ptype eq 'bull' ) { + @ls = ps_flow_lines($bullwidth, \%BodyFont, $ptype, @data); + } elsif ( $ptype =~ /^toc/ ) { + unless ( $xtype =~/^\S+ :([^:]*):(.*)$/ ) { + die "Bad para"; + } + my $xref = $1; + my $refname = $2.' '; + my $ntoc = substr($ptype,3,1)+0; + my $refwidth = ps_width($refname, $BodyFont{fonts}->[0][1], + \@NASMEncoding) * + ($BodyFont{fonts}->[0][0]/1000); + + @ls = ps_flow_lines($linewidth-$ntoc*$psconf{tocind}- + $psconf{tocpnz}-$refwidth, + \%BodyFont, $ptype, @data); + + # Auxilliary data: for the first line, the cross reference symbol + # and the reference name; for all lines but the first, the + # reference width; and for the last line, the page number + # as a string. + my $nl = scalar(@ls); + $ls[0]->[0]->[2] = [[$AuxStr,$refname], [$AuxXRef,$xref]]; + for ( $j = 1 ; $j < $nl ; $j++ ) { + $ls[$j]->[0]->[2] = [[$AuxNum,$refwidth]]; + } + push(@{$ls[$nl-1]->[0]->[2]}, [$AuxPageStr,$xref]); + } elsif ( $ptype =~ /^idx/ ) { + my $lvl = substr($ptype,3,1)+0; + + @ls = ps_flow_lines($indxwidth-$lvl*$psconf{idxindent}, + \%BodyFont, $ptype, @data); + } else { + die "Unknown para type: $ptype"; + } + # Merge adjacent identical chunks + foreach $l ( @ls ) { + @{$$l[1]} = ps_merge_chunks(@{$$l[1]}); + } + push(@pslines,@ls); + } +} + +# Break the main body text into lines. +ps_break_lines(\@paras, \@ptypes); + +# +# Break lines in to pages +# + +# Where to start on page 2, the copyright page +$curpage = 2; # Start on page 2 +$curypos = $psconf{pageheight}-$psconf{topmarg}-$psconf{botmarg}- + $psconf{startcopyright}; +undef $columnstart; # Not outputting columnar text +undef $curcolumn; # Current column +$nlines = scalar(@pslines); + +# +# This formats lines inside the global @pslines array into pages, +# updating the page and y-coordinate entries. Start at the +# $startline position in @pslines and go to but not including +# $endline. The global variables $curpage, $curypos, $columnstart +# and $curcolumn are updated appropriately. +# +sub ps_break_pages($$) { + my($startline, $endline) = @_; + + # Paragraph types which should never be broken + my $nobreakregexp = "^(chap|appn|head|subh|toc.|idx.)\$"; + # Paragraph types which are heading (meaning they should not be broken + # immediately after) + my $nobreakafter = "^(chap|appn|head|subh)\$"; + # Paragraph types which should never be broken *before* + my $nobreakbefore = "^idx[1-9]\$"; + # Paragraph types which are set in columnar format + my $columnregexp = "^idx.\$"; + + my $upageheight = $psconf{pageheight}-$psconf{topmarg}-$psconf{botmarg}; + + my $i; + + for ( $i = $startline ; $i < $endline ; $i++ ) { + my $linfo = $pslines[$i]->[0]; + if ( ($$linfo[0] eq 'chap' || $$linfo[0] eq 'appn' ) + && ($$linfo[1] & 1) ) { + # First line of a new chapter heading. Start a new page. + undef $columnstart; + $curpage++ if ( $curypos > 0 || defined($columnstart) ); + $curypos = $chapstart; + } elsif ( defined($columnstart) && $$linfo[0] !~ /$columnregexp/o ) { + undef $columnstart; + $curpage++; + $curypos = 0; + } + + if ( $$linfo[0] =~ /$columnregexp/o && !defined($columnstart) ) { + $columnstart = $curypos; + $curcolumn = 0; + } + + # Adjust position by the appropriate leading + $curypos += $$linfo[3]->{leading}; + + # Record the page and y-position + $$linfo[4] = $curpage; + $$linfo[5] = $curypos; + $$linfo[6] = $curcolumn if ( defined($columnstart) ); + + if ( $curypos > $upageheight ) { + # We need to break the page before this line. + my $broken = 0; # No place found yet + while ( !$broken && $pslines[$i]->[0]->[4] == $curpage ) { + my $linfo = $pslines[$i]->[0]; + my $pinfo = $pslines[$i-1]->[0]; + + if ( $$linfo[1] == 2 ) { + # This would be an orphan, don't break. + } elsif ( $$linfo[1] & 1 ) { + # Sole line or start of paragraph. Break unless + # the previous line was part of a heading. + $broken = 1 if ( $$pinfo[0] !~ /$nobreakafter/o && + $$linfo[0] !~ /$nobreakbefore/o ); + } else { + # Middle of paragraph. Break unless we're in a + # no-break paragraph, or the previous line would + # end up being a widow. + $broken = 1 if ( $$linfo[0] !~ /$nobreakregexp/o && + $$pinfo[1] != 1 ); + } + $i--; + } + die "Nowhere to break page $curpage\n" if ( !$broken ); + # Now $i should point to line immediately before the break, i.e. + # the next paragraph should be the first on the new page + if ( defined($columnstart) && + ++$curcolumn < $psconf{idxcolumns} ) { + # We're actually breaking text into columns, not pages + $curypos = $columnstart; + } else { + undef $columnstart; + $curpage++; + $curypos = 0; + } + next; + } + + # Add end of paragraph skip + if ( $$linfo[1] & 2 ) { + $curypos += $skiparray{$$linfo[0]}; + } + } +} + +ps_break_pages(0,$nlines); # Break the main text body into pages + +# +# Find the page number of all the indices +# +%ps_xref_page = (); # Crossref anchor pages +%ps_index_pages = (); # Index item pages +$nlines = scalar(@pslines); +for ( $i = 0 ; $i < $nlines ; $i++ ) { + my $linfo = $pslines[$i]->[0]; + foreach my $c ( @{$pslines[$i]->[1]} ) { + if ( $$c[0] == -4 ) { + if ( !defined($ps_index_pages{$$c[1]}) ) { + $ps_index_pages{$$c[1]} = []; + } elsif ( $ps_index_pages{$$c[1]}->[-1] eq $$linfo[4] ) { + # Pages are emitted in order; if this is a duplicated + # entry it will be the last one + next; # Duplicate + } + push(@{$ps_index_pages{$$c[1]}}, $$linfo[4]); + } elsif ( $$c[0] == -5 ) { + $ps_xref_page{$$c[1]} = $$linfo[4]; + } + } +} + +# +# Emit index paragraphs +# +$startofindex = scalar(@pslines); +@ixparas = ([[-5,'index'],[0,'Index']]); +@ixptypes = ('chap'); + +foreach $k ( @ixentries ) { + my $n,$i; + my $ixptype = 'idx0'; + my $prefix = $ixhasprefix{$k}; + my @ixpara = mkparaarray($ixptype,@{$ixterms{$k}}); + my $commapos = undef; + + if ( defined($prefix) && $ixprefixes{$prefix} > 1 ) { + # This entry has a "hanging comma" + for ( $i = 0 ; $i < scalar(@ixpara)-1 ; $i++ ) { + if ( substr($ixpara[$i]->[1],-1,1) eq ',' && + $ixpara[$i+1]->[1] eq ' ' ) { + $commapos = $i; + last; + } + } + } + if ( defined($commapos) ) { + if ( $ixcommafirst{$k} ) { + # This is the first entry; generate the + # "hanging comma" entry + my @precomma = splice(@ixpara,0,$commapos); + if ( $ixpara[0]->[1] eq ',' ) { + shift(@ixpara); # Discard lone comma + } else { + # Discard attached comma + $ixpara[0]->[1] =~ s/\,$//; + push(@precomma,shift(@ixpara)); + } + push(@precomma, [-6,undef]); + push(@ixparas, [@precomma]); + push(@ixptypes, $ixptype); + shift(@ixpara); # Remove space + } else { + splice(@ixpara,0,$commapos+2); + } + $ixptype = 'idx1'; + } + + push(@ixpara, [-6,undef]); # Left/right marker + $i = 1; $n = scalar(@{$ps_index_pages{$k}}); + foreach $p ( @{$ps_index_pages{$k}} ) { + if ( $i++ == $n ) { + push(@ixpara,[-7,$p],[0,"$p"],[-1,undef]); + } else { + push(@ixpara,[-7,$p],[0,"$p,"],[-1,undef],[0,' ']); + } + } + + push(@ixparas, [@ixpara]); + push(@ixptypes, $ixptype); +} + +# +# Flow index paragraphs into lines +# +ps_break_lines(\@ixparas, \@ixptypes); + +# +# Format index into pages +# +$nlines = scalar(@pslines); +ps_break_pages($startofindex, $nlines); + +# +# Push index onto bookmark list +# +push(@bookmarks, ['index', 0, 'Index']); + +# Get the list of fonts used +%ps_all_fonts = (); +foreach $fset ( @AllFonts ) { + foreach $font ( @{$fset->{fonts}} ) { + $ps_all_fonts{$font->[1]->{name}}++; + } +} + +# Emit the PostScript DSC header +print "%!PS-Adobe-3.0\n"; +print "%%Pages: $curpage\n"; +print "%%BoundingBox: 0 0 ", $psconf{pagewidth}, ' ', $psconf{pageheight}, "\n"; +print "%%Creator: (NASM psflow.pl)\n"; +print "%%DocumentData: Clean7Bit\n"; +print "%%DocumentFonts: ", join(' ', keys(%ps_all_fonts)), "\n"; +print "%%DocumentNeededFonts: ", join(' ', keys(%ps_all_fonts)), "\n"; +print "%%Orientation: Portrait\n"; +print "%%PageOrder: Ascend\n"; +print "%%EndComments\n"; +print "%%BeginProlog\n"; + +# Emit the configurables as PostScript tokens +foreach $c ( keys(%psconf) ) { + print "/$c ", $psconf{$c}, " def\n"; +} +foreach $c ( keys(%psbool) ) { + print "/$c ", ($psbool{$c}?'true':'false'), " def\n"; +} + +# Emit custom encoding vector +$zstr = '/NASMEncoding [ '; +foreach $c ( @NASMEncoding ) { + my $z = '/'.(defined($c)?$c:'.notdef ').' '; + if ( length($zstr)+length($z) > 72 ) { + print $zstr,"\n"; + $zstr = ' '; + } + $zstr .= $z; +} +print $zstr, "] def\n"; + +# Font recoding routine +# newname fontname -- +print "/nasmenc {\n"; +print " findfont dup length dict begin\n"; +print " { 1 index /FID ne {def}{pop pop} ifelse } forall\n"; +print " /Encoding NASMEncoding def\n"; +print " currentdict\n"; +print " end\n"; +print " definefont pop\n"; +print "} def\n"; + +# Emit fontset definitions +foreach $font ( keys(%ps_all_fonts) ) { + print '/',$font,'-NASM /',$font," nasmenc\n"; +} + +foreach $fset ( @AllFonts ) { + my $i = 0; + my @zfonts = (); + foreach $font ( @{$fset->{fonts}} ) { + print '/', $fset->{name}, $i, ' ', + '/', $font->[1]->{name}, '-NASM findfont ', + $font->[0], " scalefont def\n"; + push(@zfonts, $fset->{name}.$i); + $i++; + } + print '/', $fset->{name}, ' [', join(' ',@zfonts), "] def\n"; +} + +# This is used by the bullet-paragraph PostScript methods +print "/bullet [",ps_string($charcode{'bullet'}),"] def\n"; + +# Emit the canned PostScript prologue +open(PSHEAD, "< head.ps"); +while ( defined($line = ) ) { + print $line; +} +close(PSHEAD); +print "%%EndProlog\n"; + +# Generate a PostScript string +sub ps_string($) { + my ($s) = @_; + my ($i,$c); + my ($o) = '('; + my ($l) = length($s); + for ( $i = 0 ; $i < $l ; $i++ ) { + $c = substr($s,$i,1); + if ( ord($c) < 32 || ord($c) > 126 ) { + $o .= sprintf("\\%03o", ord($c)); + } elsif ( $c eq '(' || $c eq ')' || $c eq "\\" ) { + $o .= "\\".$c; + } else { + $o .= $c; + } + } + return $o.')'; +} + +# Generate PDF bookmarks +print "%%BeginSetup\n"; +foreach $b ( @bookmarks ) { + print '[/Title ', ps_string($b->[2]), "\n"; + print '/Count ', $b->[1], ' ' if ( $b->[1] ); + print '/Dest /',$b->[0]," /OUT pdfmark\n"; +} + +# Ask the PostScript interpreter for the proper size media +print "setpagesize\n"; +print "%%EndSetup\n"; + +# Start a PostScript page +sub ps_start_page() { + $ps_page++; + print "%%Page: $ps_page $ps_page\n"; + print "%%BeginPageSetup\n"; + print "save\n"; + print "%%EndPageSetup\n"; + print '/', $ps_page, " pa\n"; +} + +# End a PostScript page +sub ps_end_page($) { + my($pn) = @_; + if ( $pn ) { + print "($ps_page)", (($ps_page & 1) ? 'pageodd' : 'pageeven'), "\n"; + } + print "restore showpage\n"; +} + +$ps_page = 0; + +# Title page +ps_start_page(); +$title = $metadata{'title'} || ''; +$title =~ s/ \- / $charcode{'emdash'} /; + +$subtitle = $metadata{'subtitle'} || ''; +$subtitle =~ s/ \- / $charcode{'emdash'} /; + +# Print title +print "/ti ", ps_string($title), " def\n"; +print "/sti ", ps_string($subtitle), " def\n"; +print "lmarg pageheight 2 mul 3 div moveto\n"; +print "tfont0 setfont\n"; +print "/title linkdest ti show\n"; +print "lmarg pageheight 2 mul 3 div 10 sub moveto\n"; +print "0 setlinecap 3 setlinewidth\n"; +print "pagewidth lmarg sub rmarg sub 0 rlineto currentpoint stroke moveto\n"; +print "hfont1 setfont sti stringwidth pop neg ", + -$HeadFont{leading}, " rmoveto\n"; +print "sti show\n"; + +# Print logo, if there is one +# FIX: To be 100% correct, this should look for DocumentNeeded* +# and DocumentFonts in the header of the EPSF and add those to the +# global header. +if ( defined($metadata{epslogo}) && + sysopen(EPS, $metadata{epslogo}, O_RDONLY) ) { + my @eps = (); + my ($bbllx,$bblly,$bburx,$bbury) = (undef,undef,undef,undef); + my $line; + my $scale = 1; + my $maxwidth = $psconf{pagewidth}-$psconf{lmarg}-$psconf{rmarg}; + my $maxheight = $psconf{pageheight}/3-40; + my $width, $height; + my $x, $y; + + while ( defined($line = ) ) { + last if ( $line =~ /^%%EOF/ ); + if ( !defined($bbllx) && + $line =~ /^\%\%BoundingBox\:\s*([0-9\.]+)\s+([0-9\.]+)\s+([0-9\.]+)\s+([0-9\.]+)/i ) { + $bbllx = $1+0; $bblly = $2+0; + $bburx = $3+0; $bbury = $4+0; + } + push(@eps,$line); + } + close(EPS); + + if ( defined($bbllx) ) { + $width = $bburx-$bbllx; + $height = $bbury-$bblly; + + if ( $width > $maxwidth ) { + $scale = $maxwidth/$width; + } + if ( $height*$scale > $maxheight ) { + $scale = $maxheight/$height; + } + + $x = ($psconf{pagewidth}-$width*$scale)/2; + $y = ($psconf{pageheight}-$height*$scale)/2; + + print "BeginEPSF\n"; + print $x, ' ', $y, " translate\n"; + print $scale, " dup scale\n" unless ( $scale == 1 ); + print -$bbllx, ' ', -$bblly, " translate\n"; + print "$bbllx $bblly moveto\n"; + print "$bburx $bblly lineto\n"; + print "$bburx $bbury lineto\n"; + print "$bbllx $bbury lineto\n"; + print "$bbllx $bblly lineto clip newpath\n"; + print "%%BeginDocument: ",ps_string($metadata{epslogo}),"\n"; + print @eps; + print "%%EndDocument\n"; + print "EndEPSF\n"; + } +} +ps_end_page(0); + +# Emit the rest of the document (page 2 and on) +$curpage = 2; +ps_start_page(); +foreach $line ( @pslines ) { + my $linfo = $line->[0]; + + if ( $$linfo[4] != $curpage ) { + ps_end_page($curpage > 2); + ps_start_page(); + $curpage = $$linfo[4]; + } + + print '['; + my $curfont = 0; + foreach my $c ( @{$line->[1]} ) { + if ( $$c[0] >= 0 ) { + if ( $curfont != $$c[0] ) { + print ($curfont = $$c[0]); + } + print ps_string($$c[1]); + } elsif ( $$c[0] == -1 ) { + print '{el}'; # End link + } elsif ( $$c[0] == -2 ) { + print '{/',$$c[1],' xl}'; # xref link + } elsif ( $$c[0] == -3 ) { + print '{',ps_string($$c[1]),'wl}'; # web link + } elsif ( $$c[0] == -4 ) { + # Index anchor -- ignore + } elsif ( $$c[0] == -5 ) { + print '{/',$$c[1],' xa}'; #xref anchor + } elsif ( $$c[0] == -6 ) { + print ']['; # Start a new array + $curfont = 0; + } elsif ( $$c[0] == -7 ) { + print '{/',$$c[1],' pl}'; # page link + } else { + die "Unknown annotation"; + } + } + print ']'; + if ( defined($$linfo[2]) ) { + foreach my $x ( @{$$linfo[2]} ) { + if ( $$x[0] == $AuxStr ) { + print ps_string($$x[1]); + } elsif ( $$x[0] == $AuxPage ) { + print $ps_xref_page{$$x[1]},' '; + } elsif ( $$x[0] == $AuxPageStr ) { + print ps_string($ps_xref_page{$$x[1]}); + } elsif ( $$x[0] == $AuxXRef ) { + print '/',ps_xref($$x[1]),' '; + } elsif ( $$x[0] == $AuxNum ) { + print $$x[1],' '; + } else { + die "Unknown auxilliary data type"; + } + } + } + print ($psconf{pageheight}-$psconf{topmarg}-$$linfo[5]); + print ' ', $$linfo[6] if ( defined($$linfo[6]) ); + print ' ', $$linfo[0].$$linfo[1], "\n"; +} + +ps_end_page(1); +print "%%EOF\n"; diff --git a/doc/genpsdriver.pl b/doc/genpsdriver.pl new file mode 100644 index 0000000..58e1f9a --- /dev/null +++ b/doc/genpsdriver.pl @@ -0,0 +1,64 @@ +#!/usr/bin/perl +## -------------------------------------------------------------------------- +## +## Copyright 1996-2009 The NASM Authors - All Rights Reserved +## See the file AUTHORS included with the NASM distribution for +## the specific copyright holders. +## +## Redistribution and use in source and binary forms, with or without +## modification, are permitted provided that the following +## conditions are met: +## +## * Redistributions of source code must retain the above copyright +## notice, this list of conditions and the following disclaimer. +## * Redistributions in binary form must reproduce the above +## copyright notice, this list of conditions and the following +## disclaimer in the documentation and/or other materials provided +## with the distribution. +## +## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +## CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +## INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +## DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +## NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +## LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +## HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +## CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +## OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +## EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +## +## -------------------------------------------------------------------------- + +# +# Runs the equivalent of the following command line: +# +# $(PERL) $(srcdir)/genps.pl -subtitle "version `cat ../version`" \ +# nasmdoc.dip +# +# This is implemented as a Perl script since `cat ...` doesn't +# necessarily work on non-Unix systems. +# + +use File::Spec; +use Fcntl; +use Env; + +$perl = $ENV{PERL} || 'perl'; +$srcdir = $ENV{srcdir} || File::Spec->curdir(); + +$versionfile = File::Spec->catfile($srcdir, File::Spec->updir(), 'version'); +$genps = File::Spec->catfile($srcdir, 'genps.pl'); + +sysopen(VERSION, $versionfile, O_RDONLY) + or die "$0: cannot open $versionfile\n"; +$version = ; +chomp $version; +close(VERSION); + +# \240 = no-break space, see @NASMEncoding in genps.pl. +# If we use a normal space, it breaks on 'doze platforms... +system($perl, $genps, '-subtitle', "version\240".$version, + @ARGV, 'nasmdoc.dip'); diff --git a/doc/head.ps b/doc/head.ps new file mode 100644 index 0000000..48b7af2 --- /dev/null +++ b/doc/head.ps @@ -0,0 +1,391 @@ +% +% PostScript header for NASM documentation +% + +% Avoid barfing on old PS implementations +/pdfmark where +{pop} {userdict /pdfmark /cleartomark load put} ifelse +/setpagedevice where +{pop} {userdict /setpagedevice /pop load put} ifelse + +% Useful definition +/space 32 def + +% +% This asks the PostScript interpreter for the proper size paper +% +/setpagesize { + 1 dict dup /PageSize [pagewidth pageheight] put setpagedevice +} def + +% +% Code to handle links +% +/min { 2 copy gt { exch } if pop } def +/max { 2 copy lt { exch } if pop } def + +/lkbegun 0 def +/lktype null def +/lkury 0 def +/lkurx 0 def +/lklly 0 def +/lkllx 0 def +/lkxmarg 1 def % Extra space for link in x dir +/lkymarg 1 def % Extra space for link in y dir +/lktarget () def + +% target type -- +/linkbegin { + userdict begin + /lkbegun 1 def + /lktype exch def + /lktarget exch def + colorlinks { 0 0 0.4 setrgbcolor } if + end +} def + +% target -- +/linkbegindest { + /Dest linkbegin +} def + +% uristring -- +/linkbeginuri { + /URI linkbegin +} def + +% pageno -- +/linkbeginpage { + /Page linkbegin +} def + +% string spacepadding -- +/linkshow { + userdict begin + /lspad exch def /lss exch def + lkbegun 0 ne { + gsave lss true charpath flattenpath pathbbox grestore + lkbegun 1 eq { + /lkury exch def + lss spacecount lspad mul add /lkurx exch def + /lklly exch def + /lkllx exch def + /lkbegun 2 def + } { + lkury max /lkury exch def + lss spacecount lspad mul add lkurx max /lkurx exch def + lklly min /lklly exch def + lkllx min /lkllx exch def + } ifelse + } if + lspad 0 space lss widthshow + end +} def + +% -- +/linkend { + userdict begin + [ lktype /URI eq { + /Action 2 dict dup /Subtype /URI put dup /URI lktarget put + } { + /Dest lktarget + } ifelse + /Border [0 0 0] + /Rect [ lkllx lkxmarg sub + lklly lkymarg sub + lkurx lkxmarg add + lkury lkymarg add ] + /Subtype /Link + /ANN pdfmark + /lkbegun 0 def + colorlinks { 0 setgray } if + end +} def + +% targetname -- +/linkdest { + [ /Dest 3 -1 roll + /View [ /XYZ currentpoint null ] + /DEST pdfmark +} def + +% A "fontset" is an array of fonts; a "stream" is an array of strings +% and numbers or procedures: +% [ 0 (Foo) ( ) (mani) ( ) 1 (padme) 0 ( ) (hum.) ] +% A number choses a font from the current fontset. +% A procedure is invoked as-is when printing the stream. +% +% When printing justified, an equal amount of space is added in +% between each string. + +% string -- spacecount +% Count space characters in a string +/spacecount { + 0 exch { + space eq { 1 add } if + } forall +} def + +% stream fontset -- spacecount width +% Get the width of a stream in the given fontset, and the +% number of space characters in the stream +/streamwidth { + gsave + 6 dict begin + /f exch def + /w 0 def + /s 0 def + f 0 get setfont + /integertype { + f exch get setfont + } def + /stringtype { + dup stringwidth pop w add /w exch def + spacecount s add /s exch def + } def + /arraytype { pop } def + % The input stream is on the top of the stack now + { + dup type exec + } forall + s w + end + grestore +} def + +% stream fontset spacer -- +% Show the stream in the given fontset, but add a certain amount +% of space to each space character +/showstreamspc { + 5 dict begin + /spc exch def + /f exch def + f 0 get setfont + /integertype { + f exch get setfont + } def + /stringtype { + spc linkshow + } def + /arraytype { + exec + } def + % Now stream is on the top of the stack + { + dup type exec + } forall + end +} def + +% stream fontset -- +% Show the stream in the given fontset, with no extra spacing +/showstream { + 0 showstreamspc +} def + +% stream fontset totalspace -- +% Show the stream justified to fit into a certain number of pixels +/showstreamjust { + userdict begin + /ts exch def /fs exch def /st exch def + st fs + st fs streamwidth ts exch sub exch + dup 0 gt { div } { pop } ifelse + showstreamspc + end +} def + +/bullmarg lmarg bulladj add def +/lwidth pagewidth lmarg sub rmarg sub def +/bwidth lwidth bulladj sub def + +% +% The various paragraph types +% The number at the end indicates start (1) of para, end (2) of para +% +/chapline { + currentpoint exch pop 10 sub lmarg exch moveto + 0 setlinecap 3 setlinewidth + lwidth 0 rlineto stroke +} def + +/chap0 { lmarg exch moveto cfont lwidth showstreamjust } def +/chap1 { lmarg exch moveto cfont lwidth showstreamjust } def +/chap2 { lmarg exch moveto cfont showstream chapline } def +/chap3 { lmarg exch moveto cfont showstream chapline } def + +/appn0 {chap0} def +/appn1 {chap1} def +/appn2 {chap2} def +/appn3 {chap3} def + +% lbl ypos fontset -- ypos +/headlbl { + 3 -1 roll [exch ( )] exch % ypos strm fontset + 2 copy % ypos strm fontset strm fontset + streamwidth % ypos strm fontset spccount width + lmarg exch sub % ypos strm fontset spccount xpos + 4 index % ypos strm fontset spccount xpos ypos + moveto % ypos strm fontset spccount + pop % ypos strm fontset spccount + showstream % ypos +} def + +/head0 { lmarg exch moveto hfont lwidth showstreamjust } def +/head1 { hfont headlbl lmarg exch moveto hfont lwidth showstreamjust } def +/head2 { lmarg exch moveto hfont showstream } def +/head3 { hfont headlbl lmarg exch moveto hfont showstream } def + +/subh0 { lmarg exch moveto sfont lwidth showstreamjust } def +/subh1 { sfont headlbl lmarg exch moveto sfont lwidth showstreamjust } def +/subh2 { lmarg exch moveto sfont showstream } def +/subh3 { sfont headlbl lmarg exch moveto sfont showstream } def + +/norm0 { lmarg exch moveto bfont lwidth showstreamjust } def +/norm1 { lmarg exch moveto bfont lwidth showstreamjust } def +/norm2 { lmarg exch moveto bfont showstream } def +/norm3 { lmarg exch moveto bfont showstream } def + +/code0 { lmarg exch moveto bfont showstream } def +/code1 { lmarg exch moveto bfont showstream } def +/code2 { lmarg exch moveto bfont showstream } def +/code3 { lmarg exch moveto bfont showstream } def + +/bull0 { bullmarg exch moveto bfont bwidth showstreamjust } def +/bull1 { dup lmarg exch moveto bullet bfont showstream + bullmarg exch moveto bfont bwidth showstreamjust } def +/bull2 { bullmarg exch moveto bfont showstream } def +/bull3 { dup lmarg exch moveto bullet bfont showstream + bullmarg exch moveto bfont showstream } def + +/tocw0 lwidth tocpnz sub def +/tocw1 tocw0 tocind sub def +/tocw2 tocw1 tocind sub def + +/tocx0 lmarg def +/tocx1 tocx0 tocind add def +/tocx2 tocx1 tocind add def + +/tocpn { + bfont0 setfont + 3 dict begin + /s exch def + /x s stringwidth pop pagewidth rmarg sub exch sub def + currentpoint /y exch def + lmarg sub tocdots div ceiling tocdots mul lmarg add + tocdots x { + y moveto (.) 0 linkshow + } for + x y moveto s 0 linkshow + end + linkend +} def + +/toc00 { tocx0 exch moveto 0 rmoveto bfont showstream } def +/toc01 { tocx0 exch moveto + linkbegindest bfont0 setfont 0 linkshow bfont showstream } def +/toc02 { tocx0 exch moveto 3 1 roll + 0 rmoveto bfont showstream tocpn } def +/toc03 { tocx0 exch moveto 4 1 roll + linkbegindest bfont0 setfont 0 linkshow bfont showstream tocpn } def + +/toc10 { tocx1 exch moveto 0 rmoveto bfont showstream } def +/toc11 { tocx1 exch moveto + linkbegindest bfont0 setfont 0 linkshow bfont showstream } def +/toc12 { tocx1 exch moveto 3 1 roll + 0 rmoveto bfont showstream tocpn } def +/toc13 { tocx1 exch moveto 4 1 roll + linkbegindest bfont0 setfont 0 linkshow bfont showstream tocpn } def + +/toc20 { tocx2 exch moveto 0 rmoveto bfont showstream } def +/toc21 { tocx2 exch moveto + linkbegindest bfont0 setfont 0 linkshow bfont showstream } def +/toc22 { tocx2 exch moveto 3 1 roll + 0 rmoveto bfont showstream tocpn } def +/toc23 { tocx2 exch moveto 4 1 roll + linkbegindest bfont0 setfont 0 linkshow bfont showstream tocpn } def + +% Spacing between index columns +/indexcolumn pagewidth lmarg sub rmarg sub idxgutter add idxcolumns div def +% Width of an individual index column +/indexcolwid indexcolumn idxgutter sub def + +/idx03 { + 2 dict begin + indexcolumn mul lmarg add + /x exch def /y exch def x y moveto + exch bfont showstream + dup bfont streamwidth + x indexcolwid add exch sub exch pop y moveto + bfont showstream + end +} def +/idx00 {idx03} def +/idx01 {idx03} def +/idx02 {idx03} def + +/idx13 { + 2 dict begin + indexcolumn mul lmarg add idxindent add + /x exch def /y exch def x y moveto + exch bfont showstream + dup bfont streamwidth + x indexcolwid idxindent sub add exch sub exch pop y moveto + bfont showstream + end +} def +/idx10 {idx13} def +/idx11 {idx13} def +/idx12 {idx13} def + +% +% Page numbers +% +/pagey botmarg pymarg sub def +/pagel lmarg plmarg sub def +/pager pagewidth rmarg sub prmarg add def + +/pageeven { pagel pagey moveto bfont1 setfont show } def +/pageodd { bfont1 setfont dup stringwidth pop pager exch sub + pagey moveto show } def + +% +% Functions invoked during parsing +% +/xa { linkdest } def +/pa { 0 pageheight moveto linkdest } def +/xl { linkbegindest } def +/wl { linkbeginuri } def +/pl { linkbeginpage } def +/el { linkend } def + +% +% PDF viewer options +% +[/PageMode /UseOutlines /DOCVIEW pdfmark % Display bookmarks + +% +% Functions to include EPS +% +/BeginEPSF { + /Before_EPSF_State save def + /dict_count countdictstack def + /op_count count 1 sub def + userdict begin + /showpage {} def + 0 setgray 0 setlinecap + 1 setlinewidth 0 setlinejoin + 10 setmiterlimit [ ] 0 setdash newpath + /languagelevel where + { + pop languagelevel + 1 ne { + false setstrokeadjust false setoverprint + } if + } if +} bind def +/EndEPSF { + count op_count sub {pop} repeat + countdictstack dict_count sub {end} repeat + Before_EPSF_State restore +} bind def diff --git a/doc/inslist.pl b/doc/inslist.pl new file mode 100644 index 0000000..509de00 --- /dev/null +++ b/doc/inslist.pl @@ -0,0 +1,98 @@ +#!/usr/bin/perl +## -------------------------------------------------------------------------- +## +## Copyright 1996-2009 The NASM Authors - All Rights Reserved +## See the file AUTHORS included with the NASM distribution for +## the specific copyright holders. +## +## Redistribution and use in source and binary forms, with or without +## modification, are permitted provided that the following +## conditions are met: +## +## * Redistributions of source code must retain the above copyright +## notice, this list of conditions and the following disclaimer. +## * Redistributions in binary form must reproduce the above +## copyright notice, this list of conditions and the following +## disclaimer in the documentation and/or other materials provided +## with the distribution. +## +## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +## CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +## INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +## DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +## NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +## LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +## HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +## CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +## OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +## EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +## +## -------------------------------------------------------------------------- + +# +# inslist.pl produce inslist.src +# + +# Opcode prefixes which need their own opcode tables +# LONGER PREFIXES FIRST! +@disasm_prefixes = qw(0F24 0F25 0F38 0F3A 0F7A 0FA6 0FA7 0F); + +print STDERR "Reading insns.dat...\n"; + +@args = (); +undef $output; +foreach $arg ( @ARGV ) { + if ( $arg =~ /^\-/ ) { + if ( $arg =~ /^\-([adins])$/ ) { + $output = $1; + } else { + die "$0: Unknown option: ${arg}\n"; + } + } else { + push (@args, $arg); + } +} + +$fname = "../insns.dat" unless $fname = $args[0]; +open (F, $fname) || die "unable to open $fname"; +print STDERR "Writing inslist.src...\n"; +open S, ">inslist.src"; +$line = 0; +$insns = 0; +while () { + $line++; + next if (/^\s*$/); # blank lines + if ( /^\s*;/ ) # comments + { + if ( /^\s*;\#\s*(.+)/ ) # section subheader + { + print S "\n\\S{} $1\n\n"; + } + next; + } + chomp; + unless (/^\s*(\S+)\s+(\S+)\s+(\S+|\[.*\])\s+(\S+)\s*$/) { + warn "line $line does not contain four fields\n"; + next; + } + my @entry = ($1, $2, $3, $4); + + $entry[1] =~ s/ignore//; + $entry[1] =~ s/void//; + $entry[3] =~ s/ignore//; + $entry[3] =~ s/,SB//; + $entry[3] =~ s/,SM//; + $entry[3] =~ s/,SM2//; + $entry[3] =~ s/,SQ//; + $entry[3] =~ s/,AR2//; + printf S "\\c %-16s %-24s %s\n",$entry[0],$entry[1],$entry[3]; + $insns++; +} +print S "\n"; +close S; +close F; +printf STDERR "Done: %d instructions\n", $insns; + diff --git a/doc/internal.doc b/doc/internal.doc new file mode 100644 index 0000000..88f06bc --- /dev/null +++ b/doc/internal.doc @@ -0,0 +1,290 @@ +Internals of the Netwide Assembler +================================== + +The Netwide Assembler is intended to be a modular, re-usable x86 +assembler, which can be embedded in other programs, for example as +the back end to a compiler. + +The assembler is composed of modules. The interfaces between them +look like: + + +--- preproc.c ----+ + | | + +---- parser.c ----+ + | | | + | float.c | + | | + +--- assemble.c ---+ + | | | + nasm.c ---+ insnsa.c +--- nasmlib.c + | | + +--- listing.c ----+ + | | + +---- labels.c ----+ + | | + +--- outform.c ----+ + | | + +----- *out.c -----+ + +In other words, each of `preproc.c', `parser.c', `assemble.c', +`labels.c', `listing.c', `outform.c' and each of the output format +modules `*out.c' are independent modules, which do not directly +inter-communicate except through the main program. + +The Netwide *Disassembler* is not intended to be particularly +portable or reusable or anything, however. So I won't bother +documenting it here. :-) + +nasmlib.c +--------- + +This is a library module; it contains simple library routines which +may be referenced by all other modules. Among these are a set of +wrappers around the standard `malloc' routines, which will report a +fatal error if they run out of memory, rather than returning NULL. + +preproc.c +--------- + +This contains a macro preprocessor, which takes a file name as input +and returns a sequence of preprocessed source lines. The only symbol +exported from the module is `nasmpp', which is a data structure of +type `Preproc', declared in nasm.h. This structure contains pointers +to all the functions designed to be callable from outside the +module. + +parser.c +-------- + +This contains a source-line parser. It parses `canonical' assembly +source lines, containing some combination of the `label', `opcode', +`operand' and `comment' fields: it does not process directives or +macros. It exports two functions: `parse_line' and `cleanup_insn'. + +`parse_line' is the main parser function: you pass it a source line +in ASCII text form, and it returns you an `insn' structure +containing all the details of the instruction on that line. The +parameters it requires are: + +- The location (segment, offset) where the instruction on this line + will eventually be placed. This is necessary in order to evaluate + expressions containing the Here token, `$'. + +- A function which can be called to retrieve the value of any + symbols the source line references. + +- Which pass the assembler is on: an undefined symbol only causes an + error condition on pass two. + +- The source line to be parsed. + +- A structure to fill with the results of the parse. + +- A function which can be called to report errors. + +Some instructions (DB, DW, DD for example) can require an arbitrary +amount of storage, and so some of the members of the resulting +`insn' structure will be dynamically allocated. The other function +exported by `parser.c' is `cleanup_insn', which can be called to +deallocate any dynamic storage associated with the results of a +parse. + +names.c +------- + +This doesn't count as a module - it defines a few arrays which are +shared between NASM and NDISASM, so it's a separate file which is +#included by both parser.c and disasm.c. + +float.c +------- + +This is essentially a library module: it exports one function, +`float_const', which converts an ASCII representation of a +floating-point number into an x86-compatible binary representation, +without using any built-in floating-point arithmetic (so it will run +on any platform, portably). It calls nothing, and is called only by +`parser.c'. Note that the function `float_const' must be passed an +error reporting routine. + +assemble.c +---------- + +This module contains the code generator: it translates `insn' +structures as returned from the parser module into actual generated +code which can be placed in an output file. It exports two +functions, `assemble' and `insn_size'. + +`insn_size' is designed to be called on pass one of assembly: it +takes an `insn' structure as input, and returns the amount of space +that would be taken up if the instruction described in the structure +were to be converted to real machine code. `insn_size' also requires +to be told the location (as a segment/offset pair) where the +instruction would be assembled, the mode of assembly (16/32 bit +default), and a function it can call to report errors. + +`assemble' is designed to be called on pass two: it takes all the +parameters that `insn_size' does, but has an extra parameter which +is an output driver. `assemble' actually converts the input +instruction into machine code, and outputs the machine code by means +of calling the `output' function of the driver. + +insnsa.c +-------- + +This is another library module: it exports one very big array of +instruction translations. It is generated automatically from the +insns.dat file by the insns.pl script. + +labels.c +-------- + +This module contains a label manager. It exports six functions: + +`init_labels' should be called before any other function in the +module. `cleanup_labels' may be called after all other use of the +module has finished, to deallocate storage. + +`define_label' is called to define new labels: you pass it the name +of the label to be defined, and the (segment,offset) pair giving the +value of the label. It is also passed an error-reporting function, +and an output driver structure (so that it can call the output +driver's label-definition function). `define_label' mentally +prepends the name of the most recently defined non-local label to +any label beginning with a period. + +`define_label_stub' is designed to be called in pass two, once all +the labels have already been defined: it does nothing except to +update the "most-recently-defined-non-local-label" status, so that +references to local labels in pass two will work correctly. + +`declare_as_global' is used to declare that a label should be +global. It must be called _before_ the label in question is defined. + +Finally, `lookup_label' attempts to translate a label name into a +(segment,offset) pair. It returns non-zero on success. + +The label manager module is (theoretically :) restartable: after +calling `cleanup_labels', you can call `init_labels' again, and +start a new assembly with a new set of symbols. + +listing.c +--------- + +This file contains the listing file generator. The interface to the +module is through the one symbol it exports, `nasmlist', which is a +structure containing six function pointers. The calling semantics of +these functions isn't terribly well thought out, as yet, but it +works (just about) so it's going to get left alone for now... + +outform.c +--------- + +This small module contains a set of routines to manage a list of +output formats, and select one given a keyword. It contains three +small routines: `ofmt_register' which registers an output driver as +part of the managed list, `ofmt_list' which lists the available +drivers on stdout, and `ofmt_find' which tries to find the driver +corresponding to a given name. + +The output modules +------------------ + +Each of the output modules, `outbin.o', `outelf.o' and so on, +exports only one symbol, which is an output driver data structure +containing pointers to all the functions needed to produce output +files of the appropriate type. + +The exception to this is `outcoff.o', which exports _two_ output +driver structures, since COFF and Win32 object file formats are very +similar and most of the code is shared between them. + +nasm.c +------ + +This is the main program: it calls all the functions in the above +modules, and puts them together to form a working assembler. We +hope. :-) + +Segment Mechanism +----------------- + +In NASM, the term `segment' is used to separate the different +sections/segments/groups of which an object file is composed. +Essentially, every address NASM is capable of understanding is +expressed as an offset from the beginning of some segment. + +The defining property of a segment is that if two symbols are +declared in the same segment, then the distance between them is +fixed at assembly time. Hence every externally-declared variable +must be declared in its own segment, since none of the locations of +these are known, and so no distances may be computed at assembly +time. + +The special segment value NO_SEG (-1) is used to denote an absolute +value, e.g. a constant whose value does not depend on relocation, +such as the _size_ of a data object. + +Apart from NO_SEG, segment indices all have their least significant +bit clear, if they refer to actual in-memory segments. For each +segment of this type, there is an auxiliary segment value, defined +to be the same number but with the LSB set, which denotes the +segment-base value of that segment, for object formats which support +it (Microsoft .OBJ, for example). + +Hence, if `textsym' is declared in a code segment with index 2, then +referencing `SEG textsym' would return zero offset from +segment-index 3. Or, in object formats which don't understand such +references, it would return an error instead. + +The next twist is SEG_ABS. Some symbols may be declared with a +segment value of SEG_ABS plus a 16-bit constant: this indicates that +they are far-absolute symbols, such as the BIOS keyboard buffer +under MS-DOS, which always resides at 0040h:001Eh. Far-absolutes are +handled with care in the parser, since they are supposed to evaluate +simply to their offset part within expressions, but applying SEG to +one should yield its segment part. A far-absolute should never find +its way _out_ of the parser, unless it is enclosed in a WRT clause, +in which case Microsoft 16-bit object formats will want to know +about it. + +Porting Issues +-------------- + +We have tried to write NASM in portable ANSI C: we do not assume +little-endianness or any hardware characteristics (in order that +NASM should work as a cross-assembler for x86 platforms, even when +run on other, stranger machines). + +Assumptions we _have_ made are: + +- We assume that `short' is at least 16 bits, and `long' at least + 32. This really _shouldn't_ be a problem, since Kernighan and + Ritchie tell us we are entitled to do so. + +- We rely on having more than 6 characters of significance on + externally linked symbols in the NASM sources. This may get fixed + at some point. We haven't yet come across a linker brain-dead + enough to get it wrong anyway. + +- We assume that `fopen' using the mode "wb" can be used to write + binary data files. This may be wrong on systems like VMS, with a + strange file system. Though why you'd want to run NASM on VMS is + beyond me anyway. + +That's it. Subject to those caveats, NASM should be completely +portable. If not, we _really_ want to know about it. + +Porting Non-Issues +------------------ + +The following is _not_ a portability problem, although it looks like +one. + +- When compiling with some versions of DJGPP, you may get errors + such as `warning: ANSI C forbids braced-groups within + expressions'. This isn't NASM's fault - the problem seems to be + that DJGPP's definitions of the macros include a + GNU-specific C extension. So when compiling using -ansi and + -pedantic, DJGPP complains about its own header files. It isn't a + problem anyway, since it still generates correct code. diff --git a/doc/makedocs.bat b/doc/makedocs.bat new file mode 100644 index 0000000..5372394 --- /dev/null +++ b/doc/makedocs.bat @@ -0,0 +1,255 @@ +@echo off +if "%1"=="clean" goto makeclean +if "%1"=="CLEAN" goto makeclean +if "%1"=="spotless" goto spotless +if "%1"=="SPOTLESS" goto spotless +if "%1"=="install" goto install +if "%1"=="INSTALL" goto install + +cls +echo. +echo. +echo. +echo Usage: +echo. +echo makedocs - no parameters - makes all Docs +echo makedocs install - installs already made docs in subdirectories +echo makedocs clean - removes docs from current directory +echo makedocs spotless - removes all - including default install dirs +echo. +echo. +echo. +echo. +echo Makedocs(.bat), with no parameters will create Nasm Documentation +echo in several formats: plain ascii text, ps, html, rtf, Windows help +echo format, and if you've got an "info" system installed, info format. +echo. +echo. +echo This requires Perl, and almost 4MB disk space. +echo. +echo. +choice " Proceed with making docs? " +if errorlevel 2 goto exit + +:makeall + +echo. +echo. +echo This takes a while. Stretch! +echo. +echo. + +perl inslist.pl +perl rdsrc.pltemp1.bat +command /c temp1.bat>temp2.bat +call temp2 +del temp1.bat +del temp2.bat +set prompt=%oldprompt% +set oldprompt= + +echo. +echo. +echo. +echo. +echo Current Directory is %nasdoc% +echo Nasm Documentation will be installed under this +echo as %nasdoc%\text\nasmdoc.txt, etc. +echo. +echo. +choice " Change this directory? " +if errorlevel 2 goto dirok + +echo. +echo. +echo. +echo. +echo Directory *above* the directory you name (at least) should exist. +echo Nasm documentation will be installed *under* the directory you +echo name. E.G. \docs\nasm\html, etc. No trailing backslash! +echo. +echo. + +echo Enter new name for base directory: +set input= +fc con nul /lb1 /n|date|find "1:">magic.bat +echo set input=%%5>enter.bat +call magic +set nasdoc=%input% +del magic.bat +del enter.bat +set input= + +echo. +echo. +md %nasdoc% +echo. +echo. + +choice " Install Text docs in %nasdoc%\text ? " +if errorlevel 2 goto notext +md %nasdoc%\text +copy nasmdoc.txt %nasdoc%\text +:notext + +choice " Install Html docs in %nasdoc%\html ? " +if errorlevel 2 goto nohtml +md %nasdoc%\html +copy *.htm %nasdoc%\html +:nohtml + +choice " Install Info docs in %nasdoc%\info ? " +if errorlevel 2 goto noinfodocs +if not exist nasm.inf goto inofiles +if not exist nasm.i9 goto inofiles +goto gotifiles +:inofiles +echo. +echo. +echo Alert! Files missing! +echo. +echo. +choice " Would you like to make them now? " +if errorlevel 2 goto noinfodocs +if not exist nasmdoc.tex goto makeall +goto makeinfo + +:gotifiles + +md %nasdoc%\info +copy nasm.i* %nasdoc%\info +:noinfodocs + +choice " Install Winhelp docs in %nasdoc%\winhelp ? " +if errorlevel 2 goto nowinhelp +md %nasdoc%\winhelp +copy nasmdoc.rtf %nasdoc%\winhelp +copy nasmdoc.hpj %nasdoc%\winhelp +:nowinhelp + +choice " Install Postscript docs in %nasdoc%\ps ? " +if errorlevel 2 goto nops +md %nasdoc%\ps +copy nasmdoc.ps %nasdoc%\ps +:nops +goto cleanup + +:dirok + +choice " Install Text docs in .\text ? " +if errorlevel 2 goto notext2 +md text +copy nasmdoc.txt text +:notext2 + +choice " Install Html docs in .\html ? " +if errorlevel 2 goto nohtml2 +md html +copy *.htm html +:nohtml2 + +choice " Install Info docs in .\info ? " +if errorlevel 2 goto nid2 + +if not exist nasm.inf goto inof2 +if not exist nasm.i9 goto inof2 +goto gifiles2 +:inof2 +echo. +echo. +echo Alert! Files missing! +echo. +echo. +choice " Would you like to make them now? " +if errorlevel 2 goto nid2 +if not exist nasmdoc.tex goto makeall +goto makeinfo + +:gifiles2 + +md info +copy nasm.i* info +:nid2 + +choice " Install Winhelp docs in .\winhelp ? " +if errorlevel 2 goto nwhelp2 +md winhelp +copy nasmdoc.rtf winhelp +copy nasmdoc.hpj winhelp +:nwhelp2 + +choice " Install Postscript docs in .\ps ? " +if errorlevel 2 goto nops2 +md ps +copy nasmdoc.ps ps +:nops2 + + +:cleanup +set nasdoc= + +echo. +echo. +echo. +echo. +choice " Remove all files created, but not installed?" +if not errorlevel 2 goto makeclean + +goto exit + +:spotless +deltree /y text +deltree /y html +deltree /y info +deltree /y winhelp +deltree /y ps + +:makeclean +del *.htm +del *.rtf +del *.hpj +del *.txt +del *.tex +del *.ps +del nasm.i* + +:exit diff --git a/doc/metrics/pagd8a.ph b/doc/metrics/pagd8a.ph new file mode 100644 index 0000000..729ba29 --- /dev/null +++ b/doc/metrics/pagd8a.ph @@ -0,0 +1,72 @@ +%PS_AvantGarde_Demi = ( + name => 'AvantGarde-Demi', + widths => { + "multiply" => 600, "Ntilde" => 740, "zero" => 560, "eth" => 640, + "Ograve" => 840, "uacute" => 600, "braceleft" => 340, + "Thorn" => 560, "zcaron" => 460, "comma" => 280, "cedilla" => 340, + "plusminus" => 600, "ccedilla" => 640, "circumflex" => 540, + "dotaccent" => 280, "asciitilde" => 600, "colon" => 280, + "onehalf" => 840, "dollar" => 560, "ntilde" => 600, + "Ocircumflex" => 840, "Oacute" => 840, "ogonek" => 340, + "ograve" => 640, "thorn" => 660, "minus" => 600, "degree" => 400, + "yen" => 560, "space" => 280, "registered" => 740, + "questiondown" => 560, "Aring" => 740, "percent" => 860, + "emdash" => 1000, "six" => 560, "Agrave" => 740, + "paragraph" => 600, "three" => 560, "numbersign" => 560, + "two" => 560, "Igrave" => 280, "oacute" => 640, + "ocircumflex" => 640, "A" => 740, "B" => 580, "C" => 780, + "D" => 700, "E" => 520, "onequarter" => 840, "F" => 480, + "G" => 840, "H" => 680, "I" => 280, "J" => 480, "K" => 620, + "L" => 440, "backslash" => 640, "asciicircum" => 600, + "periodcentered" => 280, "M" => 900, "N" => 740, "O" => 840, + "P" => 560, "aring" => 660, "Q" => 840, "R" => 580, + "Aacute" => 740, "caron" => 540, "S" => 520, "T" => 420, + "grave" => 420, "U" => 640, "agrave" => 660, "V" => 700, + "W" => 900, "equal" => 600, "question" => 560, "X" => 680, + "Y" => 620, "Z" => 500, "bracketright" => 320, "Iacute" => 280, + "ampersand" => 680, "four" => 560, "igrave" => 240, "a" => 660, + "b" => 660, "c" => 640, "d" => 660, "plus" => 600, "e" => 640, + "quotesinglbase" => 280, "f" => 280, "g" => 660, "bullet" => 600, + "h" => 600, "i" => 240, "Oslash" => 840, "dagger" => 560, + "j" => 260, "Yacute" => 620, "k" => 580, "l" => 240, "m" => 940, + "n" => 600, "o" => 640, "ordfeminine" => 360, "ring" => 360, + "p" => 660, "threesuperior" => 336, "q" => 660, "acute" => 420, + "r" => 320, "twosuperior" => 336, "aacute" => 660, "s" => 440, + "OE" => 1060, "t" => 300, "divide" => 600, "section" => 560, + "u" => 600, "v" => 560, "w" => 800, "dieresis" => 500, "x" => 560, + "y" => 580, "z" => 460, "iacute" => 240, "quotedblbase" => 480, + "hungarumlaut" => 700, "quotedbl" => 360, "mu" => 576, + "Scaron" => 520, "Lslash" => 480, "semicolon" => 280, + "oslash" => 660, "florin" => 560, "yacute" => 580, "fi" => 520, + "fl" => 520, "Acircumflex" => 740, "parenright" => 380, + "Ecircumflex" => 520, "trademark" => 1000, "Icircumflex" => 280, + "daggerdbl" => 560, "guillemotleft" => 460, "germandbls" => 600, + "macron" => 420, "Otilde" => 840, "seven" => 560, + "ellipsis" => 1000, "scaron" => 440, "ordmasculine" => 360, + "AE" => 900, "Ucircumflex" => 640, "lslash" => 320, + "dotlessi" => 240, "sterling" => 560, "quotedblleft" => 480, + "hyphen" => 420, "guilsinglright" => 240, "quotesingle" => 220, + "eight" => 560, "exclamdown" => 280, "acircumflex" => 660, + "endash" => 500, "oe" => 1080, "ecircumflex" => 640, + "copyright" => 740, "Adieresis" => 740, "Egrave" => 520, + "icircumflex" => 240, "slash" => 460, "braceright" => 340, + "Edieresis" => 520, "quotedblright" => 480, "otilde" => 640, + "Idieresis" => 280, "parenleft" => 380, "one" => 560, + "Odieresis" => 840, "ucircumflex" => 600, "bracketleft" => 320, + "Ugrave" => 640, "cent" => 560, "currency" => 560, + "logicalnot" => 600, "quoteright" => 280, "Udieresis" => 640, + "perthousand" => 1280, "Ydieresis" => 620, "Atilde" => 740, + "breve" => 480, "bar" => 600, "fraction" => 160, "Eacute" => 520, + "less" => 600, "adieresis" => 660, "guilsinglleft" => 240, + "egrave" => 640, "exclam" => 280, "edieresis" => 640, "Eth" => 742, + "idieresis" => 240, "period" => 280, "ae" => 1080, + "asterisk" => 440, "odieresis" => 640, "Uacute" => 640, + "ugrave" => 600, "five" => 560, "nine" => 560, "greater" => 600, + "Zcaron" => 500, "udieresis" => 600, "threequarters" => 840, + "guillemotright" => 460, "Ccedilla" => 780, "ydieresis" => 580, + "tilde" => 480, "atilde" => 660, "at" => 740, "brokenbar" => 600, + "eacute" => 640, "quoteleft" => 280, "underscore" => 500, + "onesuperior" => 336, + } +); +1; diff --git a/doc/metrics/pagdo8a.ph b/doc/metrics/pagdo8a.ph new file mode 100644 index 0000000..727ea00 --- /dev/null +++ b/doc/metrics/pagdo8a.ph @@ -0,0 +1,72 @@ +%PS_AvantGarde_DemiOblique = ( + name => 'AvantGarde-DemiOblique', + widths => { + "multiply" => 600, "Ntilde" => 740, "zero" => 560, "eth" => 640, + "Ograve" => 840, "uacute" => 600, "braceleft" => 340, + "Thorn" => 560, "zcaron" => 460, "comma" => 280, "cedilla" => 340, + "plusminus" => 600, "ccedilla" => 640, "circumflex" => 540, + "dotaccent" => 280, "asciitilde" => 600, "colon" => 280, + "onehalf" => 840, "dollar" => 560, "ntilde" => 600, + "Ocircumflex" => 840, "Oacute" => 840, "ogonek" => 340, + "ograve" => 640, "thorn" => 660, "minus" => 600, "degree" => 400, + "yen" => 560, "space" => 280, "registered" => 740, + "questiondown" => 560, "Aring" => 740, "percent" => 860, + "emdash" => 1000, "six" => 560, "Agrave" => 740, + "paragraph" => 600, "three" => 560, "numbersign" => 560, + "two" => 560, "Igrave" => 280, "oacute" => 640, + "ocircumflex" => 640, "A" => 740, "B" => 580, "C" => 780, + "D" => 700, "E" => 520, "onequarter" => 840, "F" => 480, + "G" => 840, "H" => 680, "I" => 280, "J" => 480, "K" => 620, + "L" => 440, "backslash" => 640, "asciicircum" => 600, + "periodcentered" => 280, "M" => 900, "N" => 740, "O" => 840, + "P" => 560, "aring" => 660, "Q" => 840, "R" => 580, + "Aacute" => 740, "caron" => 540, "S" => 520, "T" => 420, + "grave" => 420, "U" => 640, "agrave" => 660, "V" => 700, + "W" => 900, "equal" => 600, "question" => 560, "X" => 680, + "Y" => 620, "Z" => 500, "bracketright" => 320, "Iacute" => 280, + "ampersand" => 680, "four" => 560, "igrave" => 240, "a" => 660, + "b" => 660, "c" => 640, "d" => 660, "plus" => 600, "e" => 640, + "quotesinglbase" => 280, "f" => 280, "g" => 660, "bullet" => 600, + "h" => 600, "i" => 240, "Oslash" => 840, "dagger" => 560, + "j" => 260, "Yacute" => 620, "k" => 580, "l" => 240, "m" => 940, + "n" => 600, "o" => 640, "ordfeminine" => 360, "ring" => 360, + "p" => 660, "threesuperior" => 336, "q" => 660, "acute" => 420, + "r" => 320, "twosuperior" => 336, "aacute" => 660, "s" => 440, + "OE" => 1060, "t" => 300, "divide" => 600, "section" => 560, + "u" => 600, "v" => 560, "w" => 800, "dieresis" => 500, "x" => 560, + "y" => 580, "z" => 460, "iacute" => 240, "quotedblbase" => 480, + "hungarumlaut" => 700, "quotedbl" => 360, "mu" => 576, + "Scaron" => 520, "Lslash" => 480, "semicolon" => 280, + "oslash" => 660, "florin" => 560, "yacute" => 580, "fi" => 520, + "fl" => 520, "Acircumflex" => 740, "parenright" => 380, + "Ecircumflex" => 520, "trademark" => 1000, "Icircumflex" => 280, + "daggerdbl" => 560, "guillemotleft" => 460, "germandbls" => 600, + "macron" => 420, "Otilde" => 840, "seven" => 560, + "ellipsis" => 1000, "scaron" => 440, "ordmasculine" => 360, + "AE" => 900, "Ucircumflex" => 640, "lslash" => 320, + "dotlessi" => 240, "sterling" => 560, "quotedblleft" => 480, + "hyphen" => 420, "guilsinglright" => 240, "quotesingle" => 220, + "eight" => 560, "exclamdown" => 280, "acircumflex" => 660, + "endash" => 500, "oe" => 1080, "ecircumflex" => 640, + "copyright" => 740, "Adieresis" => 740, "Egrave" => 520, + "icircumflex" => 240, "slash" => 460, "braceright" => 340, + "Edieresis" => 520, "quotedblright" => 480, "otilde" => 640, + "Idieresis" => 280, "parenleft" => 380, "one" => 560, + "Odieresis" => 840, "ucircumflex" => 600, "bracketleft" => 320, + "Ugrave" => 640, "cent" => 560, "currency" => 560, + "logicalnot" => 600, "quoteright" => 280, "Udieresis" => 640, + "perthousand" => 1280, "Ydieresis" => 620, "Atilde" => 740, + "breve" => 480, "bar" => 600, "fraction" => 160, "Eacute" => 520, + "less" => 600, "adieresis" => 660, "guilsinglleft" => 240, + "egrave" => 640, "exclam" => 280, "edieresis" => 640, "Eth" => 742, + "idieresis" => 240, "period" => 280, "ae" => 1080, + "asterisk" => 440, "odieresis" => 640, "Uacute" => 640, + "ugrave" => 600, "five" => 560, "nine" => 560, "greater" => 600, + "Zcaron" => 500, "udieresis" => 600, "threequarters" => 840, + "guillemotright" => 460, "Ccedilla" => 780, "ydieresis" => 580, + "tilde" => 480, "atilde" => 660, "at" => 740, "brokenbar" => 600, + "eacute" => 640, "quoteleft" => 280, "underscore" => 500, + "onesuperior" => 336, + } +); +1; diff --git a/doc/metrics/pagk8a.ph b/doc/metrics/pagk8a.ph new file mode 100644 index 0000000..df90997 --- /dev/null +++ b/doc/metrics/pagk8a.ph @@ -0,0 +1,72 @@ +%PS_AvantGarde_Book = ( + name => 'AvantGarde-Book', + widths => { + "multiply" => 606, "Ntilde" => 740, "zero" => 554, "eth" => 655, + "Ograve" => 869, "uacute" => 608, "braceleft" => 351, + "Thorn" => 592, "zcaron" => 425, "comma" => 277, "cedilla" => 324, + "plusminus" => 606, "ccedilla" => 647, "circumflex" => 502, + "dotaccent" => 222, "asciitilde" => 606, "colon" => 277, + "onehalf" => 831, "dollar" => 554, "ntilde" => 610, + "Ocircumflex" => 869, "Oacute" => 869, "ogonek" => 302, + "ograve" => 655, "thorn" => 682, "minus" => 606, "degree" => 400, + "yen" => 554, "space" => 277, "registered" => 747, + "questiondown" => 591, "Aring" => 740, "percent" => 775, + "emdash" => 1000, "six" => 554, "Agrave" => 740, + "paragraph" => 564, "three" => 554, "numbersign" => 554, + "two" => 554, "Igrave" => 226, "oacute" => 655, + "ocircumflex" => 655, "A" => 740, "B" => 574, "C" => 813, + "D" => 744, "E" => 536, "onequarter" => 831, "F" => 485, + "G" => 872, "H" => 683, "I" => 226, "J" => 482, "K" => 591, + "L" => 462, "backslash" => 605, "asciicircum" => 606, + "periodcentered" => 277, "M" => 919, "N" => 740, "O" => 869, + "P" => 592, "aring" => 683, "Q" => 871, "R" => 607, + "Aacute" => 740, "caron" => 502, "S" => 498, "T" => 426, + "grave" => 378, "U" => 655, "agrave" => 683, "V" => 702, + "W" => 960, "equal" => 606, "question" => 591, "X" => 609, + "Y" => 592, "Z" => 480, "bracketright" => 351, "Iacute" => 226, + "ampersand" => 757, "four" => 554, "igrave" => 200, "a" => 683, + "b" => 682, "c" => 647, "d" => 685, "plus" => 606, "e" => 650, + "quotesinglbase" => 354, "f" => 314, "g" => 673, "bullet" => 606, + "h" => 610, "i" => 200, "Oslash" => 868, "dagger" => 553, + "j" => 203, "Yacute" => 592, "k" => 502, "l" => 200, "m" => 938, + "n" => 610, "o" => 655, "ordfeminine" => 369, "ring" => 332, + "p" => 682, "threesuperior" => 332, "q" => 682, "acute" => 375, + "r" => 301, "twosuperior" => 332, "aacute" => 683, "s" => 388, + "OE" => 1194, "t" => 339, "divide" => 606, "section" => 615, + "u" => 608, "v" => 554, "w" => 831, "dieresis" => 369, "x" => 480, + "y" => 536, "z" => 425, "iacute" => 200, "quotedblbase" => 502, + "hungarumlaut" => 552, "quotedbl" => 309, "mu" => 608, + "Scaron" => 498, "Lslash" => 517, "semicolon" => 277, + "oslash" => 653, "florin" => 554, "yacute" => 536, "fi" => 487, + "fl" => 485, "Acircumflex" => 740, "parenright" => 369, + "Ecircumflex" => 536, "trademark" => 1000, "Icircumflex" => 226, + "daggerdbl" => 553, "guillemotleft" => 425, "germandbls" => 554, + "macron" => 485, "Otilde" => 869, "seven" => 554, + "ellipsis" => 1000, "scaron" => 388, "ordmasculine" => 369, + "AE" => 992, "Ucircumflex" => 655, "lslash" => 300, + "dotlessi" => 200, "sterling" => 554, "quotedblleft" => 502, + "hyphen" => 332, "guilsinglright" => 251, "quotesingle" => 198, + "eight" => 554, "exclamdown" => 295, "acircumflex" => 683, + "endash" => 500, "oe" => 1137, "ecircumflex" => 650, + "copyright" => 747, "Adieresis" => 740, "Egrave" => 536, + "icircumflex" => 200, "slash" => 437, "braceright" => 351, + "Edieresis" => 536, "quotedblright" => 484, "otilde" => 655, + "Idieresis" => 226, "parenleft" => 369, "one" => 554, + "Odieresis" => 869, "ucircumflex" => 608, "bracketleft" => 351, + "Ugrave" => 655, "cent" => 554, "currency" => 554, + "logicalnot" => 606, "quoteright" => 351, "Udieresis" => 655, + "perthousand" => 1174, "Ydieresis" => 592, "Atilde" => 740, + "breve" => 453, "bar" => 672, "fraction" => 166, "Eacute" => 536, + "less" => 606, "adieresis" => 683, "guilsinglleft" => 251, + "egrave" => 650, "exclam" => 295, "edieresis" => 650, "Eth" => 790, + "idieresis" => 200, "period" => 277, "ae" => 1157, + "asterisk" => 425, "odieresis" => 655, "Uacute" => 655, + "ugrave" => 608, "five" => 554, "nine" => 554, "greater" => 606, + "Zcaron" => 480, "udieresis" => 608, "threequarters" => 831, + "guillemotright" => 425, "Ccedilla" => 813, "ydieresis" => 536, + "tilde" => 439, "atilde" => 683, "at" => 867, "brokenbar" => 672, + "eacute" => 650, "quoteleft" => 351, "underscore" => 500, + "onesuperior" => 332, + } +); +1; diff --git a/doc/metrics/pagko8a.ph b/doc/metrics/pagko8a.ph new file mode 100644 index 0000000..0e9ae31 --- /dev/null +++ b/doc/metrics/pagko8a.ph @@ -0,0 +1,72 @@ +%PS_AvantGarde_BookOblique = ( + name => 'AvantGarde-BookOblique', + widths => { + "multiply" => 606, "Ntilde" => 740, "zero" => 554, "eth" => 655, + "Ograve" => 869, "uacute" => 608, "braceleft" => 351, + "Thorn" => 592, "zcaron" => 425, "comma" => 277, "cedilla" => 324, + "plusminus" => 606, "ccedilla" => 647, "circumflex" => 502, + "dotaccent" => 222, "asciitilde" => 606, "colon" => 277, + "onehalf" => 831, "dollar" => 554, "ntilde" => 610, + "Ocircumflex" => 869, "Oacute" => 869, "ogonek" => 302, + "ograve" => 655, "thorn" => 682, "minus" => 606, "degree" => 400, + "yen" => 554, "space" => 277, "registered" => 747, + "questiondown" => 591, "Aring" => 740, "percent" => 775, + "emdash" => 1000, "six" => 554, "Agrave" => 740, + "paragraph" => 564, "three" => 554, "numbersign" => 554, + "two" => 554, "Igrave" => 226, "oacute" => 655, + "ocircumflex" => 655, "A" => 740, "B" => 574, "C" => 813, + "D" => 744, "E" => 536, "onequarter" => 831, "F" => 485, + "G" => 872, "H" => 683, "I" => 226, "J" => 482, "K" => 591, + "L" => 462, "backslash" => 605, "asciicircum" => 606, + "periodcentered" => 277, "M" => 919, "N" => 740, "O" => 869, + "P" => 592, "aring" => 683, "Q" => 871, "R" => 607, + "Aacute" => 740, "caron" => 502, "S" => 498, "T" => 426, + "grave" => 378, "U" => 655, "agrave" => 683, "V" => 702, + "W" => 960, "equal" => 606, "question" => 591, "X" => 609, + "Y" => 592, "Z" => 480, "bracketright" => 351, "Iacute" => 226, + "ampersand" => 757, "four" => 554, "igrave" => 200, "a" => 683, + "b" => 682, "c" => 647, "d" => 685, "plus" => 606, "e" => 650, + "quotesinglbase" => 354, "f" => 314, "g" => 673, "bullet" => 606, + "h" => 610, "i" => 200, "Oslash" => 868, "dagger" => 553, + "j" => 203, "Yacute" => 592, "k" => 502, "l" => 200, "m" => 938, + "n" => 610, "o" => 655, "ordfeminine" => 369, "ring" => 332, + "p" => 682, "threesuperior" => 332, "q" => 682, "acute" => 375, + "r" => 301, "twosuperior" => 332, "aacute" => 683, "s" => 388, + "OE" => 1194, "t" => 339, "divide" => 606, "section" => 615, + "u" => 608, "v" => 554, "w" => 831, "dieresis" => 369, "x" => 480, + "y" => 536, "z" => 425, "iacute" => 200, "quotedblbase" => 502, + "hungarumlaut" => 552, "quotedbl" => 309, "mu" => 608, + "Scaron" => 498, "Lslash" => 517, "semicolon" => 277, + "oslash" => 653, "florin" => 554, "yacute" => 536, "fi" => 487, + "fl" => 485, "Acircumflex" => 740, "parenright" => 369, + "Ecircumflex" => 536, "trademark" => 1000, "Icircumflex" => 226, + "daggerdbl" => 553, "guillemotleft" => 425, "germandbls" => 554, + "macron" => 485, "Otilde" => 869, "seven" => 554, + "ellipsis" => 1000, "scaron" => 388, "ordmasculine" => 369, + "AE" => 992, "Ucircumflex" => 655, "lslash" => 300, + "dotlessi" => 200, "sterling" => 554, "quotedblleft" => 502, + "hyphen" => 332, "guilsinglright" => 251, "quotesingle" => 198, + "eight" => 554, "exclamdown" => 295, "acircumflex" => 683, + "endash" => 500, "oe" => 1137, "ecircumflex" => 650, + "copyright" => 747, "Adieresis" => 740, "Egrave" => 536, + "icircumflex" => 200, "slash" => 437, "braceright" => 351, + "Edieresis" => 536, "quotedblright" => 484, "otilde" => 655, + "Idieresis" => 226, "parenleft" => 369, "one" => 554, + "Odieresis" => 869, "ucircumflex" => 608, "bracketleft" => 351, + "Ugrave" => 655, "cent" => 554, "currency" => 554, + "logicalnot" => 606, "quoteright" => 351, "Udieresis" => 655, + "perthousand" => 1174, "Ydieresis" => 592, "Atilde" => 740, + "breve" => 453, "bar" => 672, "fraction" => 166, "Eacute" => 536, + "less" => 606, "adieresis" => 683, "guilsinglleft" => 251, + "egrave" => 650, "exclam" => 295, "edieresis" => 650, "Eth" => 790, + "idieresis" => 200, "period" => 277, "ae" => 1157, + "asterisk" => 425, "odieresis" => 655, "Uacute" => 655, + "ugrave" => 608, "five" => 554, "nine" => 554, "greater" => 606, + "Zcaron" => 480, "udieresis" => 608, "threequarters" => 831, + "guillemotright" => 425, "Ccedilla" => 813, "ydieresis" => 536, + "tilde" => 439, "atilde" => 683, "at" => 867, "brokenbar" => 672, + "eacute" => 650, "quoteleft" => 351, "underscore" => 500, + "onesuperior" => 332, + } +); +1; diff --git a/doc/metrics/pbkd8a.ph b/doc/metrics/pbkd8a.ph new file mode 100644 index 0000000..5d80089 --- /dev/null +++ b/doc/metrics/pbkd8a.ph @@ -0,0 +1,72 @@ +%PS_Bookman_Demi = ( + name => 'Bookman-Demi', + widths => { + "multiply" => 600, "Ntilde" => 740, "zero" => 660, "eth" => 620, + "Ograve" => 800, "uacute" => 660, "braceleft" => 320, + "Thorn" => 660, "zcaron" => 560, "comma" => 340, "cedilla" => 360, + "plusminus" => 600, "ccedilla" => 580, "circumflex" => 500, + "dotaccent" => 320, "asciitilde" => 600, "colon" => 340, + "onehalf" => 990, "dollar" => 660, "ntilde" => 680, + "Ocircumflex" => 800, "Oacute" => 800, "ogonek" => 320, + "ograve" => 620, "thorn" => 640, "minus" => 600, "degree" => 400, + "yen" => 660, "space" => 340, "registered" => 740, + "questiondown" => 660, "Aring" => 720, "percent" => 940, + "emdash" => 1000, "six" => 660, "Agrave" => 720, + "paragraph" => 800, "three" => 660, "numbersign" => 660, + "two" => 660, "Igrave" => 400, "oacute" => 620, + "ocircumflex" => 620, "A" => 720, "B" => 720, "C" => 740, + "D" => 780, "E" => 720, "onequarter" => 990, "F" => 680, + "G" => 780, "H" => 820, "I" => 400, "J" => 640, "K" => 800, + "L" => 640, "backslash" => 600, "asciicircum" => 600, + "periodcentered" => 340, "M" => 940, "N" => 740, "O" => 800, + "P" => 660, "aring" => 580, "Q" => 800, "R" => 780, + "Aacute" => 720, "caron" => 500, "S" => 660, "T" => 700, + "grave" => 400, "U" => 740, "agrave" => 580, "V" => 720, + "W" => 940, "equal" => 600, "question" => 660, "X" => 780, + "Y" => 700, "Z" => 640, "bracketright" => 300, "Iacute" => 400, + "ampersand" => 800, "four" => 660, "igrave" => 360, "a" => 580, + "b" => 600, "c" => 580, "d" => 640, "plus" => 600, "e" => 580, + "quotesinglbase" => 320, "f" => 380, "g" => 580, "bullet" => 460, + "h" => 680, "i" => 360, "Oslash" => 800, "dagger" => 440, + "j" => 340, "Yacute" => 700, "k" => 660, "l" => 340, "m" => 1000, + "n" => 680, "o" => 620, "ordfeminine" => 400, "ring" => 340, + "p" => 640, "threesuperior" => 396, "q" => 620, "acute" => 400, + "r" => 460, "twosuperior" => 396, "aacute" => 580, "s" => 520, + "OE" => 1220, "t" => 460, "divide" => 600, "section" => 600, + "u" => 660, "v" => 600, "w" => 800, "dieresis" => 500, "x" => 600, + "y" => 620, "z" => 560, "iacute" => 360, "quotedblbase" => 540, + "hungarumlaut" => 440, "quotedbl" => 420, "mu" => 660, + "Scaron" => 660, "Lslash" => 640, "semicolon" => 340, + "oslash" => 620, "florin" => 660, "yacute" => 620, "fi" => 740, + "fl" => 740, "Acircumflex" => 720, "parenright" => 320, + "Ecircumflex" => 720, "trademark" => 980, "Icircumflex" => 400, + "daggerdbl" => 380, "guillemotleft" => 400, "germandbls" => 660, + "macron" => 460, "Otilde" => 800, "seven" => 660, + "ellipsis" => 1000, "scaron" => 520, "ordmasculine" => 400, + "AE" => 1140, "Ucircumflex" => 740, "lslash" => 340, + "dotlessi" => 360, "sterling" => 660, "quotedblleft" => 540, + "hyphen" => 360, "guilsinglright" => 220, "quotesingle" => 240, + "eight" => 660, "exclamdown" => 360, "acircumflex" => 580, + "endash" => 500, "oe" => 940, "ecircumflex" => 580, + "copyright" => 740, "Adieresis" => 720, "Egrave" => 720, + "icircumflex" => 360, "slash" => 600, "braceright" => 320, + "Edieresis" => 720, "quotedblright" => 540, "otilde" => 620, + "Idieresis" => 400, "parenleft" => 320, "one" => 660, + "Odieresis" => 800, "ucircumflex" => 660, "bracketleft" => 300, + "Ugrave" => 740, "cent" => 660, "currency" => 660, + "logicalnot" => 600, "quoteright" => 320, "Udieresis" => 740, + "perthousand" => 1360, "Ydieresis" => 700, "Atilde" => 720, + "breve" => 500, "bar" => 600, "fraction" => 120, "Eacute" => 720, + "less" => 600, "adieresis" => 580, "guilsinglleft" => 220, + "egrave" => 580, "exclam" => 360, "edieresis" => 580, "Eth" => 780, + "idieresis" => 360, "period" => 340, "ae" => 880, + "asterisk" => 460, "odieresis" => 620, "Uacute" => 740, + "ugrave" => 660, "five" => 660, "nine" => 660, "greater" => 600, + "Zcaron" => 640, "udieresis" => 660, "threequarters" => 990, + "guillemotright" => 400, "Ccedilla" => 740, "ydieresis" => 620, + "tilde" => 480, "atilde" => 580, "at" => 820, "brokenbar" => 600, + "eacute" => 580, "quoteleft" => 320, "underscore" => 500, + "onesuperior" => 396, + } +); +1; diff --git a/doc/metrics/pbkdi8a.ph b/doc/metrics/pbkdi8a.ph new file mode 100644 index 0000000..8bf5e25 --- /dev/null +++ b/doc/metrics/pbkdi8a.ph @@ -0,0 +1,72 @@ +%PS_Bookman_DemiItalic = ( + name => 'Bookman-DemiItalic', + widths => { + "multiply" => 600, "Ntilde" => 740, "zero" => 680, "eth" => 600, + "Ograve" => 760, "uacute" => 680, "braceleft" => 300, + "Thorn" => 640, "zcaron" => 560, "comma" => 340, "cedilla" => 360, + "plusminus" => 600, "ccedilla" => 560, "circumflex" => 480, + "dotaccent" => 380, "asciitilde" => 620, "colon" => 340, + "onehalf" => 1020, "dollar" => 680, "ntilde" => 680, + "Ocircumflex" => 760, "Oacute" => 760, "ogonek" => 320, + "ograve" => 600, "thorn" => 660, "minus" => 600, "degree" => 400, + "yen" => 680, "space" => 340, "registered" => 780, + "questiondown" => 620, "Aring" => 720, "percent" => 880, + "emdash" => 1000, "six" => 680, "Agrave" => 720, + "paragraph" => 680, "three" => 680, "numbersign" => 680, + "two" => 680, "Igrave" => 380, "oacute" => 600, + "ocircumflex" => 600, "A" => 720, "B" => 720, "C" => 700, + "D" => 760, "E" => 720, "onequarter" => 1020, "F" => 660, + "G" => 760, "H" => 800, "I" => 380, "J" => 620, "K" => 780, + "L" => 640, "backslash" => 580, "asciicircum" => 620, + "periodcentered" => 340, "M" => 860, "N" => 740, "O" => 760, + "P" => 640, "aring" => 680, "Q" => 760, "R" => 740, + "Aacute" => 720, "caron" => 480, "S" => 700, "T" => 700, + "grave" => 380, "U" => 740, "agrave" => 680, "V" => 660, + "W" => 1000, "equal" => 600, "question" => 620, "X" => 740, + "Y" => 660, "Z" => 680, "bracketright" => 260, "Iacute" => 380, + "ampersand" => 980, "four" => 680, "igrave" => 380, "a" => 680, + "b" => 600, "c" => 560, "d" => 680, "plus" => 600, "e" => 560, + "quotesinglbase" => 300, "f" => 420, "g" => 620, "bullet" => 360, + "h" => 700, "i" => 380, "Oslash" => 760, "dagger" => 420, + "j" => 320, "Yacute" => 660, "k" => 700, "l" => 380, "m" => 960, + "n" => 680, "o" => 600, "ordfeminine" => 440, "ring" => 360, + "p" => 660, "threesuperior" => 408, "q" => 620, "acute" => 340, + "r" => 500, "twosuperior" => 408, "aacute" => 680, "s" => 540, + "OE" => 1180, "t" => 440, "divide" => 600, "section" => 620, + "u" => 680, "v" => 540, "w" => 860, "dieresis" => 520, "x" => 620, + "y" => 600, "z" => 560, "iacute" => 380, "quotedblbase" => 520, + "hungarumlaut" => 560, "quotedbl" => 380, "mu" => 680, + "Scaron" => 700, "Lslash" => 640, "semicolon" => 340, + "oslash" => 600, "florin" => 680, "yacute" => 600, "fi" => 820, + "fl" => 820, "Acircumflex" => 720, "parenright" => 260, + "Ecircumflex" => 720, "trademark" => 940, "Icircumflex" => 380, + "daggerdbl" => 420, "guillemotleft" => 380, "germandbls" => 660, + "macron" => 480, "Otilde" => 760, "seven" => 680, + "ellipsis" => 1000, "scaron" => 540, "ordmasculine" => 440, + "AE" => 1140, "Ucircumflex" => 740, "lslash" => 380, + "dotlessi" => 380, "sterling" => 680, "quotedblleft" => 520, + "hyphen" => 280, "guilsinglright" => 220, "quotesingle" => 180, + "eight" => 680, "exclamdown" => 320, "acircumflex" => 680, + "endash" => 500, "oe" => 920, "ecircumflex" => 560, + "copyright" => 780, "Adieresis" => 720, "Egrave" => 720, + "icircumflex" => 380, "slash" => 360, "braceright" => 300, + "Edieresis" => 720, "quotedblright" => 520, "otilde" => 600, + "Idieresis" => 380, "parenleft" => 260, "one" => 680, + "Odieresis" => 760, "ucircumflex" => 680, "bracketleft" => 260, + "Ugrave" => 740, "cent" => 680, "currency" => 680, + "logicalnot" => 620, "quoteright" => 320, "Udieresis" => 740, + "perthousand" => 1360, "Ydieresis" => 660, "Atilde" => 720, + "breve" => 460, "bar" => 620, "fraction" => 120, "Eacute" => 720, + "less" => 620, "adieresis" => 680, "guilsinglleft" => 220, + "egrave" => 560, "exclam" => 320, "edieresis" => 560, "Eth" => 760, + "idieresis" => 380, "period" => 340, "ae" => 880, + "asterisk" => 460, "odieresis" => 600, "Uacute" => 740, + "ugrave" => 680, "five" => 680, "nine" => 680, "greater" => 620, + "Zcaron" => 680, "udieresis" => 680, "threequarters" => 1020, + "guillemotright" => 380, "Ccedilla" => 700, "ydieresis" => 600, + "tilde" => 480, "atilde" => 680, "at" => 780, "brokenbar" => 620, + "eacute" => 560, "quoteleft" => 320, "underscore" => 500, + "onesuperior" => 408, + } +); +1; diff --git a/doc/metrics/pbkl8a.ph b/doc/metrics/pbkl8a.ph new file mode 100644 index 0000000..bcc2a74 --- /dev/null +++ b/doc/metrics/pbkl8a.ph @@ -0,0 +1,72 @@ +%PS_Bookman_Light = ( + name => 'Bookman-Light', + widths => { + "multiply" => 600, "Ntilde" => 740, "zero" => 620, "eth" => 560, + "Ograve" => 800, "uacute" => 680, "braceleft" => 280, + "Thorn" => 620, "zcaron" => 480, "comma" => 320, "cedilla" => 320, + "plusminus" => 600, "ccedilla" => 520, "circumflex" => 420, + "dotaccent" => 260, "asciitilde" => 600, "colon" => 320, + "onehalf" => 930, "dollar" => 620, "ntilde" => 660, + "Ocircumflex" => 800, "Oacute" => 800, "ogonek" => 320, + "ograve" => 560, "thorn" => 620, "minus" => 600, "degree" => 400, + "yen" => 620, "space" => 320, "registered" => 740, + "questiondown" => 540, "Aring" => 680, "percent" => 900, + "emdash" => 1000, "six" => 620, "Agrave" => 680, + "paragraph" => 600, "three" => 620, "numbersign" => 620, + "two" => 620, "Igrave" => 340, "oacute" => 560, + "ocircumflex" => 560, "A" => 680, "B" => 740, "C" => 740, + "D" => 800, "E" => 720, "onequarter" => 930, "F" => 640, + "G" => 800, "H" => 800, "I" => 340, "J" => 600, "K" => 720, + "L" => 600, "backslash" => 600, "asciicircum" => 600, + "periodcentered" => 320, "M" => 920, "N" => 740, "O" => 800, + "P" => 620, "aring" => 580, "Q" => 820, "R" => 720, + "Aacute" => 680, "caron" => 420, "S" => 660, "T" => 620, + "grave" => 340, "U" => 780, "agrave" => 580, "V" => 700, + "W" => 960, "equal" => 600, "question" => 540, "X" => 720, + "Y" => 640, "Z" => 640, "bracketright" => 300, "Iacute" => 340, + "ampersand" => 800, "four" => 620, "igrave" => 300, "a" => 580, + "b" => 620, "c" => 520, "d" => 620, "plus" => 600, "e" => 520, + "quotesinglbase" => 220, "f" => 320, "g" => 540, "bullet" => 460, + "h" => 660, "i" => 300, "Oslash" => 800, "dagger" => 540, + "j" => 300, "Yacute" => 640, "k" => 620, "l" => 300, "m" => 940, + "n" => 660, "o" => 560, "ordfeminine" => 420, "ring" => 320, + "p" => 620, "threesuperior" => 372, "q" => 580, "acute" => 340, + "r" => 440, "twosuperior" => 372, "aacute" => 580, "s" => 520, + "OE" => 1240, "t" => 380, "divide" => 600, "section" => 520, + "u" => 680, "v" => 520, "w" => 780, "dieresis" => 420, "x" => 560, + "y" => 540, "z" => 480, "iacute" => 300, "quotedblbase" => 400, + "hungarumlaut" => 380, "quotedbl" => 380, "mu" => 680, + "Scaron" => 660, "Lslash" => 600, "semicolon" => 320, + "oslash" => 560, "florin" => 620, "yacute" => 540, "fi" => 620, + "fl" => 620, "Acircumflex" => 680, "parenright" => 300, + "Ecircumflex" => 720, "trademark" => 980, "Icircumflex" => 340, + "daggerdbl" => 540, "guillemotleft" => 360, "germandbls" => 660, + "macron" => 440, "Otilde" => 800, "seven" => 620, + "ellipsis" => 1000, "scaron" => 520, "ordmasculine" => 420, + "AE" => 1260, "Ucircumflex" => 780, "lslash" => 320, + "dotlessi" => 300, "sterling" => 620, "quotedblleft" => 400, + "hyphen" => 400, "guilsinglright" => 240, "quotesingle" => 220, + "eight" => 620, "exclamdown" => 300, "acircumflex" => 580, + "endash" => 500, "oe" => 900, "ecircumflex" => 520, + "copyright" => 740, "Adieresis" => 680, "Egrave" => 720, + "icircumflex" => 300, "slash" => 600, "braceright" => 280, + "Edieresis" => 720, "quotedblright" => 400, "otilde" => 560, + "Idieresis" => 340, "parenleft" => 300, "one" => 620, + "Odieresis" => 800, "ucircumflex" => 680, "bracketleft" => 300, + "Ugrave" => 780, "cent" => 620, "currency" => 620, + "logicalnot" => 600, "quoteright" => 220, "Udieresis" => 780, + "perthousand" => 1280, "Ydieresis" => 640, "Atilde" => 680, + "breve" => 460, "bar" => 600, "fraction" => 140, "Eacute" => 720, + "less" => 600, "adieresis" => 580, "guilsinglleft" => 240, + "egrave" => 520, "exclam" => 300, "edieresis" => 520, "Eth" => 800, + "idieresis" => 300, "period" => 320, "ae" => 860, + "asterisk" => 440, "odieresis" => 560, "Uacute" => 780, + "ugrave" => 680, "five" => 620, "nine" => 620, "greater" => 600, + "Zcaron" => 640, "udieresis" => 680, "threequarters" => 930, + "guillemotright" => 360, "Ccedilla" => 740, "ydieresis" => 540, + "tilde" => 440, "atilde" => 580, "at" => 820, "brokenbar" => 600, + "eacute" => 520, "quoteleft" => 220, "underscore" => 500, + "onesuperior" => 372, + } +); +1; diff --git a/doc/metrics/pbkli8a.ph b/doc/metrics/pbkli8a.ph new file mode 100644 index 0000000..7c5ded3 --- /dev/null +++ b/doc/metrics/pbkli8a.ph @@ -0,0 +1,72 @@ +%PS_Bookman_LightItalic = ( + name => 'Bookman-LightItalic', + widths => { + "multiply" => 600, "Ntilde" => 720, "zero" => 620, "eth" => 540, + "Ograve" => 760, "uacute" => 620, "braceleft" => 360, + "Thorn" => 600, "zcaron" => 520, "comma" => 300, "cedilla" => 320, + "plusminus" => 600, "ccedilla" => 480, "circumflex" => 440, + "dotaccent" => 260, "asciitilde" => 600, "colon" => 300, + "onehalf" => 930, "dollar" => 620, "ntilde" => 620, + "Ocircumflex" => 760, "Oacute" => 760, "ogonek" => 260, + "ograve" => 540, "thorn" => 600, "minus" => 600, "degree" => 400, + "yen" => 620, "space" => 300, "registered" => 740, + "questiondown" => 540, "Aring" => 700, "percent" => 800, + "emdash" => 1000, "six" => 620, "Agrave" => 700, + "paragraph" => 620, "three" => 620, "numbersign" => 620, + "two" => 620, "Igrave" => 320, "oacute" => 540, + "ocircumflex" => 540, "A" => 700, "B" => 720, "C" => 720, + "D" => 740, "E" => 680, "onequarter" => 930, "F" => 620, + "G" => 760, "H" => 800, "I" => 320, "J" => 560, "K" => 720, + "L" => 580, "backslash" => 600, "asciicircum" => 600, + "periodcentered" => 300, "M" => 860, "N" => 720, "O" => 760, + "P" => 600, "aring" => 620, "Q" => 780, "R" => 700, + "Aacute" => 700, "caron" => 440, "S" => 640, "T" => 600, + "grave" => 340, "U" => 720, "agrave" => 620, "V" => 680, + "W" => 960, "equal" => 600, "question" => 540, "X" => 700, + "Y" => 660, "Z" => 580, "bracketright" => 260, "Iacute" => 320, + "ampersand" => 820, "four" => 620, "igrave" => 280, "a" => 620, + "b" => 600, "c" => 480, "d" => 640, "plus" => 600, "e" => 540, + "quotesinglbase" => 320, "f" => 340, "g" => 560, "bullet" => 460, + "h" => 620, "i" => 280, "Oslash" => 760, "dagger" => 620, + "j" => 280, "Yacute" => 660, "k" => 600, "l" => 280, "m" => 880, + "n" => 620, "o" => 540, "ordfeminine" => 440, "ring" => 300, + "p" => 600, "threesuperior" => 372, "q" => 560, "acute" => 320, + "r" => 400, "twosuperior" => 372, "aacute" => 620, "s" => 540, + "OE" => 1180, "t" => 340, "divide" => 600, "section" => 620, + "u" => 620, "v" => 540, "w" => 880, "dieresis" => 420, "x" => 540, + "y" => 600, "z" => 520, "iacute" => 280, "quotedblbase" => 480, + "hungarumlaut" => 340, "quotedbl" => 360, "mu" => 620, + "Scaron" => 640, "Lslash" => 580, "semicolon" => 300, + "oslash" => 540, "florin" => 620, "yacute" => 600, "fi" => 640, + "fl" => 660, "Acircumflex" => 700, "parenright" => 280, + "Ecircumflex" => 680, "trademark" => 980, "Icircumflex" => 320, + "daggerdbl" => 620, "guillemotleft" => 300, "germandbls" => 620, + "macron" => 440, "Otilde" => 760, "seven" => 620, + "ellipsis" => 1000, "scaron" => 540, "ordmasculine" => 400, + "AE" => 1220, "Ucircumflex" => 720, "lslash" => 340, + "dotlessi" => 280, "sterling" => 620, "quotedblleft" => 440, + "hyphen" => 320, "guilsinglright" => 180, "quotesingle" => 200, + "eight" => 620, "exclamdown" => 320, "acircumflex" => 620, + "endash" => 500, "oe" => 900, "ecircumflex" => 540, + "copyright" => 740, "Adieresis" => 700, "Egrave" => 680, + "icircumflex" => 280, "slash" => 600, "braceright" => 380, + "Edieresis" => 680, "quotedblright" => 440, "otilde" => 540, + "Idieresis" => 320, "parenleft" => 280, "one" => 620, + "Odieresis" => 760, "ucircumflex" => 620, "bracketleft" => 260, + "Ugrave" => 720, "cent" => 620, "currency" => 620, + "logicalnot" => 600, "quoteright" => 280, "Udieresis" => 720, + "perthousand" => 1180, "Ydieresis" => 660, "Atilde" => 700, + "breve" => 440, "bar" => 600, "fraction" => 20, "Eacute" => 680, + "less" => 600, "adieresis" => 620, "guilsinglleft" => 180, + "egrave" => 540, "exclam" => 320, "edieresis" => 540, "Eth" => 740, + "idieresis" => 280, "period" => 300, "ae" => 880, + "asterisk" => 440, "odieresis" => 540, "Uacute" => 720, + "ugrave" => 620, "five" => 620, "nine" => 620, "greater" => 600, + "Zcaron" => 580, "udieresis" => 620, "threequarters" => 930, + "guillemotright" => 300, "Ccedilla" => 720, "ydieresis" => 600, + "tilde" => 440, "atilde" => 620, "at" => 780, "brokenbar" => 600, + "eacute" => 540, "quoteleft" => 280, "underscore" => 500, + "onesuperior" => 372, + } +); +1; diff --git a/doc/metrics/pcrb8a.ph b/doc/metrics/pcrb8a.ph new file mode 100644 index 0000000..e4300d7 --- /dev/null +++ b/doc/metrics/pcrb8a.ph @@ -0,0 +1,82 @@ +%PS_Courier_Bold = ( + name => 'Courier-Bold', + widths => { + "Ntilde" => 600, "comma" => 600, "cedilla" => 600, + "arrowup" => 600, "plusminus" => 600, "circumflex" => 600, + "dotaccent" => 600, "LL" => 600, "asciitilde" => 600, + "colon" => 600, "onehalf" => 600, "dollar" => 600, "ntilde" => 600, + "left" => 600, "minus" => 600, "yen" => 600, "space" => 600, + "questiondown" => 600, "emdash" => 600, "Agrave" => 600, + "three" => 600, "numbersign" => 600, "A" => 600, "B" => 600, + "C" => 600, "D" => 600, "E" => 600, "onequarter" => 600, + "F" => 600, "G" => 600, "H" => 600, "I" => 600, "J" => 600, + "K" => 600, "L" => 600, "backslash" => 600, + "periodcentered" => 600, "M" => 600, "N" => 600, "O" => 600, + "P" => 600, "Q" => 600, "R" => 600, "Aacute" => 600, + "caron" => 600, "S" => 600, "T" => 600, "U" => 600, + "agrave" => 600, "V" => 600, "tab" => 600, "W" => 600, "ll" => 600, + "equal" => 600, "question" => 600, "X" => 600, "Y" => 600, + "Z" => 600, "four" => 600, "a" => 600, "b" => 600, "c" => 600, + "d" => 600, "e" => 600, "f" => 600, "g" => 600, "bullet" => 600, + "h" => 600, "i" => 600, "Oslash" => 600, "dagger" => 600, + "j" => 600, "k" => 600, "l" => 600, "m" => 600, "n" => 600, + "o" => 600, "ordfeminine" => 600, "ring" => 600, "p" => 600, + "q" => 600, "r" => 600, "aacute" => 600, "largebullet" => 600, + "twosuperior" => 600, "s" => 600, "OE" => 600, "t" => 600, + "divide" => 600, "u" => 600, "v" => 600, "w" => 600, "x" => 600, + "y" => 600, "z" => 600, "hungarumlaut" => 600, "quotedbl" => 600, + "mu" => 600, "Scaron" => 600, "Lslash" => 600, "semicolon" => 600, + "oslash" => 600, "parenright" => 600, "Ecircumflex" => 600, + "trademark" => 600, "daggerdbl" => 600, "macron" => 600, + "Otilde" => 600, "ellipsis" => 600, "scaron" => 600, "AE" => 600, + "Ucircumflex" => 600, "lslash" => 600, "lira" => 600, + "quotedblleft" => 600, "hyphen" => 600, "guilsinglright" => 600, + "quotesingle" => 600, "eight" => 600, "exclamdown" => 600, + "endash" => 600, "oe" => 600, "ecircumflex" => 600, + "Adieresis" => 600, "copyright" => 600, "Egrave" => 600, + "slash" => 600, "Edieresis" => 600, "otilde" => 600, + "Idieresis" => 600, "parenleft" => 600, "one" => 600, + "ucircumflex" => 600, "Odieresis" => 600, "bracketleft" => 600, + "Ugrave" => 600, "quoteright" => 600, "Udieresis" => 600, + "perthousand" => 600, "Ydieresis" => 600, "Eacute" => 600, + "adieresis" => 600, "egrave" => 600, "edieresis" => 600, + "idieresis" => 600, "Eth" => 600, "ae" => 600, "asterisk" => 600, + "Uacute" => 600, "odieresis" => 600, "ugrave" => 600, + "five" => 600, "nine" => 600, "udieresis" => 600, "Zcaron" => 600, + "threequarters" => 600, "guillemotright" => 600, + "ydieresis" => 600, "Ccedilla" => 600, "tilde" => 600, "at" => 600, + "eacute" => 600, "Gcaron" => 600, "underscore" => 600, + "zero" => 600, "multiply" => 600, "eth" => 600, "Scedilla" => 600, + "Ograve" => 600, "uacute" => 600, "braceleft" => 600, + "Thorn" => 600, "zcaron" => 600, "ccedilla" => 600, + "gcaron" => 600, "Ocircumflex" => 600, "Oacute" => 600, + "scedilla" => 600, "ogonek" => 600, "arrowdown" => 600, + "ograve" => 600, "thorn" => 600, "degree" => 600, + "registered" => 600, "percent" => 600, "Aring" => 600, + "six" => 600, "paragraph" => 600, "two" => 600, "Igrave" => 600, + "oacute" => 600, "ocircumflex" => 600, "asciicircum" => 600, + "aring" => 600, "square" => 600, "grave" => 600, + "bracketright" => 600, "ampersand" => 600, "Iacute" => 600, + "igrave" => 600, "return" => 600, "plus" => 600, + "quotesinglbase" => 600, "Yacute" => 600, "threesuperior" => 600, + "acute" => 600, "notegraphic" => 600, "section" => 600, + "arrowleft" => 600, "dieresis" => 600, "quotedblbase" => 600, + "iacute" => 600, "up" => 600, "florin" => 600, "yacute" => 600, + "fi" => 600, "fl" => 600, "Acircumflex" => 600, + "Icircumflex" => 600, "guillemotleft" => 600, "germandbls" => 600, + "seven" => 600, "prescription" => 600, "indent" => 600, + "dectab" => 600, "ordmasculine" => 600, "dotlessi" => 600, + "sterling" => 600, "IJ" => 600, "acircumflex" => 600, + "overscore" => 600, "icircumflex" => 600, "braceright" => 600, + "graybox" => 600, "quotedblright" => 600, "center" => 600, + "stop" => 600, "cent" => 600, "currency" => 600, + "logicalnot" => 600, "merge" => 600, "Idot" => 600, + "Atilde" => 600, "breve" => 600, "bar" => 600, "fraction" => 600, + "less" => 600, "down" => 600, "guilsinglleft" => 600, + "exclam" => 600, "period" => 600, "format" => 600, + "arrowright" => 600, "greater" => 600, "ij" => 600, + "atilde" => 600, "brokenbar" => 600, "arrowboth" => 600, + "quoteleft" => 600, "onesuperior" => 600, + } +); +1; diff --git a/doc/metrics/pcrbo8a.ph b/doc/metrics/pcrbo8a.ph new file mode 100644 index 0000000..c1554b2 --- /dev/null +++ b/doc/metrics/pcrbo8a.ph @@ -0,0 +1,82 @@ +%PS_Courier_BoldOblique = ( + name => 'Courier-BoldOblique', + widths => { + "Ntilde" => 600, "comma" => 600, "cedilla" => 600, + "arrowup" => 600, "plusminus" => 600, "circumflex" => 600, + "dotaccent" => 600, "LL" => 600, "asciitilde" => 600, + "colon" => 600, "onehalf" => 600, "dollar" => 600, "ntilde" => 600, + "left" => 600, "minus" => 600, "yen" => 600, "space" => 600, + "questiondown" => 600, "emdash" => 600, "Agrave" => 600, + "three" => 600, "numbersign" => 600, "A" => 600, "B" => 600, + "C" => 600, "D" => 600, "E" => 600, "onequarter" => 600, + "F" => 600, "G" => 600, "H" => 600, "I" => 600, "J" => 600, + "K" => 600, "L" => 600, "backslash" => 600, + "periodcentered" => 600, "M" => 600, "N" => 600, "O" => 600, + "P" => 600, "Q" => 600, "R" => 600, "Aacute" => 600, + "caron" => 600, "S" => 600, "T" => 600, "U" => 600, + "agrave" => 600, "V" => 600, "tab" => 600, "W" => 600, "ll" => 600, + "equal" => 600, "question" => 600, "X" => 600, "Y" => 600, + "Z" => 600, "four" => 600, "a" => 600, "b" => 600, "c" => 600, + "d" => 600, "e" => 600, "f" => 600, "g" => 600, "bullet" => 600, + "h" => 600, "i" => 600, "Oslash" => 600, "dagger" => 600, + "j" => 600, "k" => 600, "l" => 600, "m" => 600, "n" => 600, + "o" => 600, "ordfeminine" => 600, "ring" => 600, "p" => 600, + "q" => 600, "r" => 600, "aacute" => 600, "largebullet" => 600, + "twosuperior" => 600, "s" => 600, "OE" => 600, "t" => 600, + "divide" => 600, "u" => 600, "v" => 600, "w" => 600, "x" => 600, + "y" => 600, "z" => 600, "hungarumlaut" => 600, "quotedbl" => 600, + "mu" => 600, "Scaron" => 600, "Lslash" => 600, "semicolon" => 600, + "oslash" => 600, "parenright" => 600, "Ecircumflex" => 600, + "trademark" => 600, "daggerdbl" => 600, "macron" => 600, + "Otilde" => 600, "ellipsis" => 600, "scaron" => 600, "AE" => 600, + "Ucircumflex" => 600, "lslash" => 600, "lira" => 600, + "quotedblleft" => 600, "hyphen" => 600, "guilsinglright" => 600, + "quotesingle" => 600, "eight" => 600, "exclamdown" => 600, + "endash" => 600, "oe" => 600, "ecircumflex" => 600, + "Adieresis" => 600, "copyright" => 600, "Egrave" => 600, + "slash" => 600, "Edieresis" => 600, "otilde" => 600, + "Idieresis" => 600, "parenleft" => 600, "one" => 600, + "ucircumflex" => 600, "Odieresis" => 600, "bracketleft" => 600, + "Ugrave" => 600, "quoteright" => 600, "Udieresis" => 600, + "perthousand" => 600, "Ydieresis" => 600, "Eacute" => 600, + "adieresis" => 600, "egrave" => 600, "edieresis" => 600, + "idieresis" => 600, "Eth" => 600, "ae" => 600, "asterisk" => 600, + "Uacute" => 600, "odieresis" => 600, "ugrave" => 600, + "five" => 600, "nine" => 600, "udieresis" => 600, "Zcaron" => 600, + "threequarters" => 600, "guillemotright" => 600, + "ydieresis" => 600, "Ccedilla" => 600, "tilde" => 600, "at" => 600, + "eacute" => 600, "Gcaron" => 600, "underscore" => 600, + "zero" => 600, "multiply" => 600, "eth" => 600, "Scedilla" => 600, + "Ograve" => 600, "uacute" => 600, "braceleft" => 600, + "Thorn" => 600, "zcaron" => 600, "ccedilla" => 600, + "gcaron" => 600, "Ocircumflex" => 600, "Oacute" => 600, + "scedilla" => 600, "ogonek" => 600, "arrowdown" => 600, + "ograve" => 600, "thorn" => 600, "degree" => 600, + "registered" => 600, "percent" => 600, "Aring" => 600, + "six" => 600, "paragraph" => 600, "two" => 600, "Igrave" => 600, + "oacute" => 600, "ocircumflex" => 600, "asciicircum" => 600, + "aring" => 600, "square" => 600, "grave" => 600, + "bracketright" => 600, "ampersand" => 600, "Iacute" => 600, + "igrave" => 600, "return" => 600, "plus" => 600, + "quotesinglbase" => 600, "Yacute" => 600, "threesuperior" => 600, + "acute" => 600, "notegraphic" => 600, "section" => 600, + "arrowleft" => 600, "dieresis" => 600, "quotedblbase" => 600, + "iacute" => 600, "up" => 600, "florin" => 600, "yacute" => 600, + "fi" => 600, "fl" => 600, "Acircumflex" => 600, + "Icircumflex" => 600, "guillemotleft" => 600, "germandbls" => 600, + "seven" => 600, "prescription" => 600, "indent" => 600, + "dectab" => 600, "ordmasculine" => 600, "dotlessi" => 600, + "sterling" => 600, "IJ" => 600, "acircumflex" => 600, + "overscore" => 600, "icircumflex" => 600, "braceright" => 600, + "graybox" => 600, "quotedblright" => 600, "center" => 600, + "stop" => 600, "cent" => 600, "currency" => 600, + "logicalnot" => 600, "merge" => 600, "Idot" => 600, + "Atilde" => 600, "breve" => 600, "bar" => 600, "fraction" => 600, + "less" => 600, "down" => 600, "guilsinglleft" => 600, + "exclam" => 600, "period" => 600, "format" => 600, + "arrowright" => 600, "greater" => 600, "ij" => 600, + "atilde" => 600, "brokenbar" => 600, "arrowboth" => 600, + "quoteleft" => 600, "onesuperior" => 600, + } +); +1; diff --git a/doc/metrics/pcrr8a.ph b/doc/metrics/pcrr8a.ph new file mode 100644 index 0000000..a8fbb14 --- /dev/null +++ b/doc/metrics/pcrr8a.ph @@ -0,0 +1,82 @@ +%PS_Courier = ( + name => 'Courier', + widths => { + "Ntilde" => 600, "comma" => 600, "cedilla" => 600, + "arrowup" => 600, "plusminus" => 600, "circumflex" => 600, + "dotaccent" => 600, "LL" => 600, "asciitilde" => 600, + "colon" => 600, "onehalf" => 600, "dollar" => 600, "ntilde" => 600, + "left" => 600, "minus" => 600, "yen" => 600, "space" => 600, + "questiondown" => 600, "emdash" => 600, "Agrave" => 600, + "three" => 600, "numbersign" => 600, "A" => 600, "B" => 600, + "C" => 600, "D" => 600, "E" => 600, "onequarter" => 600, + "F" => 600, "G" => 600, "H" => 600, "I" => 600, "J" => 600, + "K" => 600, "L" => 600, "backslash" => 600, + "periodcentered" => 600, "M" => 600, "N" => 600, "O" => 600, + "P" => 600, "Q" => 600, "R" => 600, "Aacute" => 600, + "caron" => 600, "S" => 600, "T" => 600, "U" => 600, + "agrave" => 600, "V" => 600, "tab" => 600, "W" => 600, "ll" => 600, + "equal" => 600, "question" => 600, "X" => 600, "Y" => 600, + "Z" => 600, "four" => 600, "a" => 600, "b" => 600, "c" => 600, + "d" => 600, "e" => 600, "f" => 600, "g" => 600, "bullet" => 600, + "h" => 600, "i" => 600, "Oslash" => 600, "dagger" => 600, + "j" => 600, "k" => 600, "l" => 600, "m" => 600, "n" => 600, + "o" => 600, "ordfeminine" => 600, "ring" => 600, "p" => 600, + "q" => 600, "r" => 600, "aacute" => 600, "largebullet" => 600, + "twosuperior" => 600, "s" => 600, "OE" => 600, "t" => 600, + "divide" => 600, "u" => 600, "v" => 600, "w" => 600, "x" => 600, + "y" => 600, "z" => 600, "hungarumlaut" => 600, "quotedbl" => 600, + "mu" => 600, "Scaron" => 600, "Lslash" => 600, "semicolon" => 600, + "oslash" => 600, "parenright" => 600, "Ecircumflex" => 600, + "trademark" => 600, "daggerdbl" => 600, "macron" => 600, + "Otilde" => 600, "ellipsis" => 600, "scaron" => 600, "AE" => 600, + "Ucircumflex" => 600, "lslash" => 600, "lira" => 600, + "quotedblleft" => 600, "hyphen" => 600, "guilsinglright" => 600, + "quotesingle" => 600, "eight" => 600, "exclamdown" => 600, + "endash" => 600, "oe" => 600, "ecircumflex" => 600, + "Adieresis" => 600, "copyright" => 600, "Egrave" => 600, + "slash" => 600, "Edieresis" => 600, "otilde" => 600, + "Idieresis" => 600, "parenleft" => 600, "one" => 600, + "ucircumflex" => 600, "Odieresis" => 600, "bracketleft" => 600, + "Ugrave" => 600, "quoteright" => 600, "Udieresis" => 600, + "perthousand" => 600, "Ydieresis" => 600, "Eacute" => 600, + "adieresis" => 600, "egrave" => 600, "edieresis" => 600, + "idieresis" => 600, "Eth" => 600, "ae" => 600, "asterisk" => 600, + "Uacute" => 600, "odieresis" => 600, "ugrave" => 600, + "five" => 600, "nine" => 600, "udieresis" => 600, "Zcaron" => 600, + "threequarters" => 600, "guillemotright" => 600, + "ydieresis" => 600, "Ccedilla" => 600, "tilde" => 600, "at" => 600, + "eacute" => 600, "Gcaron" => 600, "underscore" => 600, + "zero" => 600, "multiply" => 600, "eth" => 600, "Scedilla" => 600, + "Ograve" => 600, "uacute" => 600, "braceleft" => 600, + "Thorn" => 600, "zcaron" => 600, "ccedilla" => 600, + "gcaron" => 600, "Ocircumflex" => 600, "Oacute" => 600, + "scedilla" => 600, "ogonek" => 600, "arrowdown" => 600, + "ograve" => 600, "thorn" => 600, "degree" => 600, + "registered" => 600, "percent" => 600, "Aring" => 600, + "six" => 600, "paragraph" => 600, "two" => 600, "Igrave" => 600, + "oacute" => 600, "ocircumflex" => 600, "asciicircum" => 600, + "aring" => 600, "square" => 600, "grave" => 600, + "bracketright" => 600, "ampersand" => 600, "Iacute" => 600, + "igrave" => 600, "return" => 600, "plus" => 600, + "quotesinglbase" => 600, "Yacute" => 600, "threesuperior" => 600, + "acute" => 600, "notegraphic" => 600, "section" => 600, + "arrowleft" => 600, "dieresis" => 600, "quotedblbase" => 600, + "iacute" => 600, "up" => 600, "florin" => 600, "yacute" => 600, + "fi" => 600, "fl" => 600, "Acircumflex" => 600, + "Icircumflex" => 600, "guillemotleft" => 600, "germandbls" => 600, + "seven" => 600, "prescription" => 600, "indent" => 600, + "dectab" => 600, "ordmasculine" => 600, "dotlessi" => 600, + "sterling" => 600, "IJ" => 600, "acircumflex" => 600, + "overscore" => 600, "icircumflex" => 600, "braceright" => 600, + "graybox" => 600, "quotedblright" => 600, "center" => 600, + "stop" => 600, "cent" => 600, "currency" => 600, + "logicalnot" => 600, "merge" => 600, "Idot" => 600, + "Atilde" => 600, "breve" => 600, "bar" => 600, "fraction" => 600, + "less" => 600, "down" => 600, "guilsinglleft" => 600, + "exclam" => 600, "period" => 600, "format" => 600, + "arrowright" => 600, "greater" => 600, "ij" => 600, + "atilde" => 600, "brokenbar" => 600, "arrowboth" => 600, + "quoteleft" => 600, "onesuperior" => 600, + } +); +1; diff --git a/doc/metrics/pcrro8a.ph b/doc/metrics/pcrro8a.ph new file mode 100644 index 0000000..59e5026 --- /dev/null +++ b/doc/metrics/pcrro8a.ph @@ -0,0 +1,82 @@ +%PS_Courier_Oblique = ( + name => 'Courier-Oblique', + widths => { + "Ntilde" => 600, "comma" => 600, "cedilla" => 600, + "arrowup" => 600, "plusminus" => 600, "circumflex" => 600, + "dotaccent" => 600, "LL" => 600, "asciitilde" => 600, + "colon" => 600, "onehalf" => 600, "dollar" => 600, "ntilde" => 600, + "left" => 600, "minus" => 600, "yen" => 600, "space" => 600, + "questiondown" => 600, "emdash" => 600, "Agrave" => 600, + "three" => 600, "numbersign" => 600, "A" => 600, "B" => 600, + "C" => 600, "D" => 600, "E" => 600, "onequarter" => 600, + "F" => 600, "G" => 600, "H" => 600, "I" => 600, "J" => 600, + "K" => 600, "L" => 600, "backslash" => 600, + "periodcentered" => 600, "M" => 600, "N" => 600, "O" => 600, + "P" => 600, "Q" => 600, "R" => 600, "Aacute" => 600, + "caron" => 600, "S" => 600, "T" => 600, "U" => 600, + "agrave" => 600, "V" => 600, "tab" => 600, "W" => 600, "ll" => 600, + "equal" => 600, "question" => 600, "X" => 600, "Y" => 600, + "Z" => 600, "four" => 600, "a" => 600, "b" => 600, "c" => 600, + "d" => 600, "e" => 600, "f" => 600, "g" => 600, "bullet" => 600, + "h" => 600, "i" => 600, "Oslash" => 600, "dagger" => 600, + "j" => 600, "k" => 600, "l" => 600, "m" => 600, "n" => 600, + "o" => 600, "ordfeminine" => 600, "ring" => 600, "p" => 600, + "q" => 600, "r" => 600, "aacute" => 600, "largebullet" => 600, + "twosuperior" => 600, "s" => 600, "OE" => 600, "t" => 600, + "divide" => 600, "u" => 600, "v" => 600, "w" => 600, "x" => 600, + "y" => 600, "z" => 600, "hungarumlaut" => 600, "quotedbl" => 600, + "mu" => 600, "Scaron" => 600, "Lslash" => 600, "semicolon" => 600, + "oslash" => 600, "parenright" => 600, "Ecircumflex" => 600, + "trademark" => 600, "daggerdbl" => 600, "macron" => 600, + "Otilde" => 600, "ellipsis" => 600, "scaron" => 600, "AE" => 600, + "Ucircumflex" => 600, "lslash" => 600, "lira" => 600, + "quotedblleft" => 600, "hyphen" => 600, "guilsinglright" => 600, + "quotesingle" => 600, "eight" => 600, "exclamdown" => 600, + "endash" => 600, "oe" => 600, "ecircumflex" => 600, + "Adieresis" => 600, "copyright" => 600, "Egrave" => 600, + "slash" => 600, "Edieresis" => 600, "otilde" => 600, + "Idieresis" => 600, "parenleft" => 600, "one" => 600, + "ucircumflex" => 600, "Odieresis" => 600, "bracketleft" => 600, + "Ugrave" => 600, "quoteright" => 600, "Udieresis" => 600, + "perthousand" => 600, "Ydieresis" => 600, "Eacute" => 600, + "adieresis" => 600, "egrave" => 600, "edieresis" => 600, + "idieresis" => 600, "Eth" => 600, "ae" => 600, "asterisk" => 600, + "Uacute" => 600, "odieresis" => 600, "ugrave" => 600, + "five" => 600, "nine" => 600, "udieresis" => 600, "Zcaron" => 600, + "threequarters" => 600, "guillemotright" => 600, + "ydieresis" => 600, "Ccedilla" => 600, "tilde" => 600, "at" => 600, + "eacute" => 600, "Gcaron" => 600, "underscore" => 600, + "zero" => 600, "multiply" => 600, "eth" => 600, "Scedilla" => 600, + "Ograve" => 600, "uacute" => 600, "braceleft" => 600, + "Thorn" => 600, "zcaron" => 600, "ccedilla" => 600, + "gcaron" => 600, "Ocircumflex" => 600, "Oacute" => 600, + "scedilla" => 600, "ogonek" => 600, "arrowdown" => 600, + "ograve" => 600, "thorn" => 600, "degree" => 600, + "registered" => 600, "percent" => 600, "Aring" => 600, + "six" => 600, "paragraph" => 600, "two" => 600, "Igrave" => 600, + "oacute" => 600, "ocircumflex" => 600, "asciicircum" => 600, + "aring" => 600, "square" => 600, "grave" => 600, + "bracketright" => 600, "ampersand" => 600, "Iacute" => 600, + "igrave" => 600, "return" => 600, "plus" => 600, + "quotesinglbase" => 600, "Yacute" => 600, "threesuperior" => 600, + "acute" => 600, "notegraphic" => 600, "section" => 600, + "arrowleft" => 600, "dieresis" => 600, "quotedblbase" => 600, + "iacute" => 600, "up" => 600, "florin" => 600, "yacute" => 600, + "fi" => 600, "fl" => 600, "Acircumflex" => 600, + "Icircumflex" => 600, "guillemotleft" => 600, "germandbls" => 600, + "seven" => 600, "prescription" => 600, "indent" => 600, + "dectab" => 600, "ordmasculine" => 600, "dotlessi" => 600, + "sterling" => 600, "IJ" => 600, "acircumflex" => 600, + "overscore" => 600, "icircumflex" => 600, "braceright" => 600, + "graybox" => 600, "quotedblright" => 600, "center" => 600, + "stop" => 600, "cent" => 600, "currency" => 600, + "logicalnot" => 600, "merge" => 600, "Idot" => 600, + "Atilde" => 600, "breve" => 600, "bar" => 600, "fraction" => 600, + "less" => 600, "down" => 600, "guilsinglleft" => 600, + "exclam" => 600, "period" => 600, "format" => 600, + "arrowright" => 600, "greater" => 600, "ij" => 600, + "atilde" => 600, "brokenbar" => 600, "arrowboth" => 600, + "quoteleft" => 600, "onesuperior" => 600, + } +); +1; diff --git a/doc/metrics/phvb8a.ph b/doc/metrics/phvb8a.ph new file mode 100644 index 0000000..3c692f1 --- /dev/null +++ b/doc/metrics/phvb8a.ph @@ -0,0 +1,72 @@ +%PS_Helvetica_Bold = ( + name => 'Helvetica-Bold', + widths => { + "multiply" => 584, "Ntilde" => 722, "zero" => 556, "eth" => 611, + "Ograve" => 778, "uacute" => 611, "braceleft" => 389, + "Thorn" => 667, "zcaron" => 500, "comma" => 278, "cedilla" => 333, + "plusminus" => 584, "ccedilla" => 556, "circumflex" => 333, + "dotaccent" => 333, "asciitilde" => 584, "colon" => 333, + "onehalf" => 834, "dollar" => 556, "ntilde" => 611, + "Oacute" => 778, "Ocircumflex" => 778, "ogonek" => 333, + "ograve" => 611, "thorn" => 611, "degree" => 400, "minus" => 584, + "yen" => 556, "space" => 278, "registered" => 737, + "questiondown" => 611, "Aring" => 722, "percent" => 889, + "emdash" => 1000, "six" => 556, "Agrave" => 722, + "paragraph" => 556, "three" => 556, "numbersign" => 556, + "two" => 556, "Igrave" => 278, "oacute" => 611, + "ocircumflex" => 611, "A" => 722, "B" => 722, "C" => 722, + "D" => 722, "E" => 667, "onequarter" => 834, "F" => 611, + "G" => 778, "H" => 722, "I" => 278, "J" => 556, "K" => 722, + "L" => 611, "backslash" => 278, "asciicircum" => 584, + "periodcentered" => 278, "M" => 833, "N" => 722, "O" => 778, + "P" => 667, "aring" => 556, "Q" => 778, "R" => 722, + "Aacute" => 722, "caron" => 333, "S" => 667, "T" => 611, + "grave" => 333, "U" => 722, "agrave" => 556, "V" => 667, + "W" => 944, "equal" => 584, "question" => 611, "X" => 667, + "Y" => 667, "Z" => 611, "bracketright" => 333, "Iacute" => 278, + "ampersand" => 722, "four" => 556, "igrave" => 278, "a" => 556, + "b" => 611, "c" => 556, "d" => 611, "plus" => 584, "e" => 556, + "quotesinglbase" => 278, "f" => 333, "g" => 611, "bullet" => 350, + "h" => 611, "i" => 278, "Oslash" => 778, "dagger" => 556, + "j" => 278, "Yacute" => 667, "k" => 556, "l" => 278, "m" => 889, + "n" => 611, "o" => 611, "ordfeminine" => 370, "ring" => 333, + "p" => 611, "threesuperior" => 333, "q" => 611, "acute" => 333, + "r" => 389, "aacute" => 556, "twosuperior" => 333, "s" => 556, + "OE" => 1000, "t" => 333, "divide" => 584, "section" => 556, + "u" => 611, "v" => 556, "w" => 778, "dieresis" => 333, "x" => 556, + "y" => 556, "z" => 500, "iacute" => 278, "quotedblbase" => 500, + "hungarumlaut" => 333, "quotedbl" => 474, "mu" => 611, + "Scaron" => 667, "Lslash" => 611, "semicolon" => 333, + "oslash" => 611, "florin" => 556, "yacute" => 556, "fi" => 611, + "fl" => 611, "Acircumflex" => 722, "parenright" => 333, + "Ecircumflex" => 667, "Icircumflex" => 278, "trademark" => 1000, + "daggerdbl" => 556, "guillemotleft" => 556, "germandbls" => 611, + "macron" => 333, "Otilde" => 778, "seven" => 556, + "ellipsis" => 1000, "scaron" => 556, "ordmasculine" => 365, + "AE" => 1000, "Ucircumflex" => 722, "lslash" => 278, + "dotlessi" => 278, "sterling" => 556, "quotedblleft" => 500, + "hyphen" => 333, "guilsinglright" => 333, "quotesingle" => 238, + "eight" => 556, "exclamdown" => 333, "acircumflex" => 556, + "endash" => 556, "oe" => 944, "ecircumflex" => 556, + "Adieresis" => 722, "copyright" => 737, "Egrave" => 667, + "icircumflex" => 278, "slash" => 278, "braceright" => 389, + "Edieresis" => 667, "quotedblright" => 500, "Idieresis" => 278, + "otilde" => 611, "parenleft" => 333, "one" => 556, + "Odieresis" => 778, "ucircumflex" => 611, "bracketleft" => 333, + "Ugrave" => 722, "cent" => 556, "currency" => 556, + "logicalnot" => 584, "quoteright" => 278, "Udieresis" => 722, + "perthousand" => 1000, "Ydieresis" => 667, "Atilde" => 722, + "breve" => 333, "bar" => 280, "fraction" => 167, "Eacute" => 667, + "less" => 584, "adieresis" => 556, "guilsinglleft" => 333, + "egrave" => 556, "exclam" => 333, "edieresis" => 556, + "idieresis" => 278, "Eth" => 722, "period" => 278, "ae" => 889, + "asterisk" => 389, "odieresis" => 611, "Uacute" => 722, + "ugrave" => 611, "five" => 556, "nine" => 556, "greater" => 584, + "udieresis" => 611, "Zcaron" => 611, "threequarters" => 834, + "guillemotright" => 556, "Ccedilla" => 722, "ydieresis" => 556, + "tilde" => 333, "atilde" => 556, "at" => 975, "brokenbar" => 280, + "eacute" => 556, "quoteleft" => 278, "underscore" => 556, + "onesuperior" => 333, + } +); +1; diff --git a/doc/metrics/phvb8an.ph b/doc/metrics/phvb8an.ph new file mode 100644 index 0000000..cb2c96f --- /dev/null +++ b/doc/metrics/phvb8an.ph @@ -0,0 +1,71 @@ +%PS_Helvetica_Narrow_Bold = ( + name => 'Helvetica-Narrow-Bold', + widths => { + "multiply" => 479, "Ntilde" => 592, "zero" => 456, "eth" => 501, + "Ograve" => 638, "uacute" => 501, "braceleft" => 319, + "Thorn" => 547, "zcaron" => 410, "comma" => 228, "cedilla" => 273, + "plusminus" => 479, "ccedilla" => 456, "circumflex" => 273, + "dotaccent" => 273, "asciitilde" => 479, "colon" => 273, + "onehalf" => 684, "dollar" => 456, "ntilde" => 501, + "Oacute" => 638, "Ocircumflex" => 638, "ogonek" => 273, + "ograve" => 501, "thorn" => 501, "degree" => 328, "minus" => 479, + "yen" => 456, "space" => 228, "registered" => 604, + "questiondown" => 501, "Aring" => 592, "percent" => 729, + "emdash" => 820, "six" => 456, "Agrave" => 592, "paragraph" => 456, + "three" => 456, "numbersign" => 456, "two" => 456, "Igrave" => 228, + "oacute" => 501, "ocircumflex" => 501, "A" => 592, "B" => 592, + "C" => 592, "D" => 592, "E" => 547, "onequarter" => 684, + "F" => 501, "G" => 638, "H" => 592, "I" => 228, "J" => 456, + "K" => 592, "L" => 501, "backslash" => 228, "asciicircum" => 479, + "periodcentered" => 228, "M" => 683, "N" => 592, "O" => 638, + "P" => 547, "aring" => 456, "Q" => 638, "R" => 592, + "Aacute" => 592, "caron" => 273, "S" => 547, "T" => 501, + "grave" => 273, "U" => 592, "agrave" => 456, "V" => 547, + "W" => 774, "equal" => 479, "question" => 501, "X" => 547, + "Y" => 547, "Z" => 501, "bracketright" => 273, "Iacute" => 228, + "ampersand" => 592, "four" => 456, "igrave" => 228, "a" => 456, + "b" => 501, "c" => 456, "d" => 501, "plus" => 479, "e" => 456, + "quotesinglbase" => 228, "f" => 273, "g" => 501, "bullet" => 287, + "h" => 501, "i" => 228, "Oslash" => 638, "dagger" => 456, + "j" => 228, "Yacute" => 547, "k" => 456, "l" => 228, "m" => 729, + "n" => 501, "o" => 501, "ordfeminine" => 303, "ring" => 273, + "p" => 501, "threesuperior" => 273, "q" => 501, "acute" => 273, + "r" => 319, "aacute" => 456, "twosuperior" => 273, "s" => 456, + "OE" => 820, "t" => 273, "divide" => 479, "section" => 456, + "u" => 501, "v" => 456, "w" => 638, "dieresis" => 273, "x" => 456, + "y" => 456, "z" => 410, "iacute" => 228, "quotedblbase" => 410, + "hungarumlaut" => 273, "quotedbl" => 389, "mu" => 501, + "Scaron" => 547, "Lslash" => 501, "semicolon" => 273, + "oslash" => 501, "florin" => 456, "yacute" => 456, "fi" => 501, + "fl" => 501, "Acircumflex" => 592, "parenright" => 273, + "Ecircumflex" => 547, "Icircumflex" => 228, "trademark" => 820, + "daggerdbl" => 456, "guillemotleft" => 456, "germandbls" => 501, + "macron" => 273, "Otilde" => 638, "seven" => 456, + "ellipsis" => 820, "scaron" => 456, "ordmasculine" => 299, + "AE" => 820, "Ucircumflex" => 592, "lslash" => 228, + "dotlessi" => 228, "sterling" => 456, "quotedblleft" => 410, + "hyphen" => 273, "guilsinglright" => 273, "quotesingle" => 195, + "eight" => 456, "exclamdown" => 273, "acircumflex" => 456, + "endash" => 456, "oe" => 774, "ecircumflex" => 456, + "Adieresis" => 592, "copyright" => 604, "Egrave" => 547, + "icircumflex" => 228, "slash" => 228, "braceright" => 319, + "Edieresis" => 547, "quotedblright" => 410, "Idieresis" => 228, + "otilde" => 501, "parenleft" => 273, "one" => 456, + "Odieresis" => 638, "ucircumflex" => 501, "bracketleft" => 273, + "Ugrave" => 592, "cent" => 456, "currency" => 456, + "logicalnot" => 479, "quoteright" => 228, "Udieresis" => 592, + "perthousand" => 820, "Ydieresis" => 547, "Atilde" => 592, + "breve" => 273, "bar" => 230, "fraction" => 137, "Eacute" => 547, + "less" => 479, "adieresis" => 456, "guilsinglleft" => 273, + "egrave" => 456, "exclam" => 273, "edieresis" => 456, + "idieresis" => 228, "Eth" => 592, "period" => 228, "ae" => 729, + "asterisk" => 319, "odieresis" => 501, "Uacute" => 592, + "ugrave" => 501, "five" => 456, "nine" => 456, "greater" => 479, + "udieresis" => 501, "Zcaron" => 501, "threequarters" => 684, + "guillemotright" => 456, "Ccedilla" => 592, "ydieresis" => 456, + "tilde" => 273, "atilde" => 456, "at" => 800, "brokenbar" => 230, + "eacute" => 456, "quoteleft" => 228, "underscore" => 456, + "onesuperior" => 273, + } +); +1; diff --git a/doc/metrics/phvbo8a.ph b/doc/metrics/phvbo8a.ph new file mode 100644 index 0000000..644a0f9 --- /dev/null +++ b/doc/metrics/phvbo8a.ph @@ -0,0 +1,72 @@ +%PS_Helvetica_BoldOblique = ( + name => 'Helvetica-BoldOblique', + widths => { + "multiply" => 584, "Ntilde" => 722, "zero" => 556, "eth" => 611, + "Ograve" => 778, "uacute" => 611, "braceleft" => 389, + "Thorn" => 667, "zcaron" => 500, "comma" => 278, "cedilla" => 333, + "plusminus" => 584, "ccedilla" => 556, "circumflex" => 333, + "dotaccent" => 333, "asciitilde" => 584, "colon" => 333, + "onehalf" => 834, "dollar" => 556, "ntilde" => 611, + "Oacute" => 778, "Ocircumflex" => 778, "ogonek" => 333, + "ograve" => 611, "thorn" => 611, "degree" => 400, "minus" => 584, + "yen" => 556, "space" => 278, "registered" => 737, + "questiondown" => 611, "Aring" => 722, "percent" => 889, + "emdash" => 1000, "six" => 556, "Agrave" => 722, + "paragraph" => 556, "three" => 556, "numbersign" => 556, + "two" => 556, "Igrave" => 278, "oacute" => 611, + "ocircumflex" => 611, "A" => 722, "B" => 722, "C" => 722, + "D" => 722, "E" => 667, "onequarter" => 834, "F" => 611, + "G" => 778, "H" => 722, "I" => 278, "J" => 556, "K" => 722, + "L" => 611, "backslash" => 278, "asciicircum" => 584, + "periodcentered" => 278, "M" => 833, "N" => 722, "O" => 778, + "P" => 667, "aring" => 556, "Q" => 778, "R" => 722, + "Aacute" => 722, "caron" => 333, "S" => 667, "T" => 611, + "grave" => 333, "U" => 722, "agrave" => 556, "V" => 667, + "W" => 944, "equal" => 584, "question" => 611, "X" => 667, + "Y" => 667, "Z" => 611, "bracketright" => 333, "Iacute" => 278, + "ampersand" => 722, "four" => 556, "igrave" => 278, "a" => 556, + "b" => 611, "c" => 556, "d" => 611, "plus" => 584, "e" => 556, + "quotesinglbase" => 278, "f" => 333, "g" => 611, "bullet" => 350, + "h" => 611, "i" => 278, "Oslash" => 778, "dagger" => 556, + "j" => 278, "Yacute" => 667, "k" => 556, "l" => 278, "m" => 889, + "n" => 611, "o" => 611, "ordfeminine" => 370, "ring" => 333, + "p" => 611, "threesuperior" => 333, "q" => 611, "acute" => 333, + "r" => 389, "aacute" => 556, "twosuperior" => 333, "s" => 556, + "OE" => 1000, "t" => 333, "divide" => 584, "section" => 556, + "u" => 611, "v" => 556, "w" => 778, "dieresis" => 333, "x" => 556, + "y" => 556, "z" => 500, "iacute" => 278, "quotedblbase" => 500, + "hungarumlaut" => 333, "quotedbl" => 474, "mu" => 611, + "Scaron" => 667, "Lslash" => 611, "semicolon" => 333, + "oslash" => 611, "florin" => 556, "yacute" => 556, "fi" => 611, + "fl" => 611, "Acircumflex" => 722, "parenright" => 333, + "Ecircumflex" => 667, "Icircumflex" => 278, "trademark" => 1000, + "daggerdbl" => 556, "guillemotleft" => 556, "germandbls" => 611, + "macron" => 333, "Otilde" => 778, "seven" => 556, + "ellipsis" => 1000, "scaron" => 556, "ordmasculine" => 365, + "AE" => 1000, "Ucircumflex" => 722, "lslash" => 278, + "dotlessi" => 278, "sterling" => 556, "quotedblleft" => 500, + "hyphen" => 333, "guilsinglright" => 333, "quotesingle" => 238, + "eight" => 556, "exclamdown" => 333, "acircumflex" => 556, + "endash" => 556, "oe" => 944, "ecircumflex" => 556, + "Adieresis" => 722, "copyright" => 737, "Egrave" => 667, + "icircumflex" => 278, "slash" => 278, "braceright" => 389, + "Edieresis" => 667, "quotedblright" => 500, "Idieresis" => 278, + "otilde" => 611, "parenleft" => 333, "one" => 556, + "Odieresis" => 778, "ucircumflex" => 611, "bracketleft" => 333, + "Ugrave" => 722, "cent" => 556, "currency" => 556, + "logicalnot" => 584, "quoteright" => 278, "Udieresis" => 722, + "perthousand" => 1000, "Ydieresis" => 667, "Atilde" => 722, + "breve" => 333, "bar" => 280, "fraction" => 167, "Eacute" => 667, + "less" => 584, "adieresis" => 556, "guilsinglleft" => 333, + "egrave" => 556, "exclam" => 333, "edieresis" => 556, + "idieresis" => 278, "Eth" => 722, "period" => 278, "ae" => 889, + "asterisk" => 389, "odieresis" => 611, "Uacute" => 722, + "ugrave" => 611, "five" => 556, "nine" => 556, "greater" => 584, + "udieresis" => 611, "Zcaron" => 611, "threequarters" => 834, + "guillemotright" => 556, "Ccedilla" => 722, "ydieresis" => 556, + "tilde" => 333, "atilde" => 556, "at" => 975, "brokenbar" => 280, + "eacute" => 556, "quoteleft" => 278, "underscore" => 556, + "onesuperior" => 333, + } +); +1; diff --git a/doc/metrics/phvbo8an.ph b/doc/metrics/phvbo8an.ph new file mode 100644 index 0000000..6e8b448 --- /dev/null +++ b/doc/metrics/phvbo8an.ph @@ -0,0 +1,71 @@ +%PS_Helvetica_Narrow_BoldOblique = ( + name => 'Helvetica-Narrow-BoldOblique', + widths => { + "multiply" => 479, "Ntilde" => 592, "zero" => 456, "eth" => 501, + "Ograve" => 638, "uacute" => 501, "braceleft" => 319, + "Thorn" => 547, "zcaron" => 410, "comma" => 228, "cedilla" => 273, + "plusminus" => 479, "ccedilla" => 456, "circumflex" => 273, + "dotaccent" => 273, "asciitilde" => 479, "colon" => 273, + "onehalf" => 684, "dollar" => 456, "ntilde" => 501, + "Oacute" => 638, "Ocircumflex" => 638, "ogonek" => 273, + "ograve" => 501, "thorn" => 501, "degree" => 328, "minus" => 479, + "yen" => 456, "space" => 228, "registered" => 604, + "questiondown" => 501, "Aring" => 592, "percent" => 729, + "emdash" => 820, "six" => 456, "Agrave" => 592, "paragraph" => 456, + "three" => 456, "numbersign" => 456, "two" => 456, "Igrave" => 228, + "oacute" => 501, "ocircumflex" => 501, "A" => 592, "B" => 592, + "C" => 592, "D" => 592, "E" => 547, "onequarter" => 684, + "F" => 501, "G" => 638, "H" => 592, "I" => 228, "J" => 456, + "K" => 592, "L" => 501, "backslash" => 228, "asciicircum" => 479, + "periodcentered" => 228, "M" => 683, "N" => 592, "O" => 638, + "P" => 547, "aring" => 456, "Q" => 638, "R" => 592, + "Aacute" => 592, "caron" => 273, "S" => 547, "T" => 501, + "grave" => 273, "U" => 592, "agrave" => 456, "V" => 547, + "W" => 774, "equal" => 479, "question" => 501, "X" => 547, + "Y" => 547, "Z" => 501, "bracketright" => 273, "Iacute" => 228, + "ampersand" => 592, "four" => 456, "igrave" => 228, "a" => 456, + "b" => 501, "c" => 456, "d" => 501, "plus" => 479, "e" => 456, + "quotesinglbase" => 228, "f" => 273, "g" => 501, "bullet" => 287, + "h" => 501, "i" => 228, "Oslash" => 638, "dagger" => 456, + "j" => 228, "Yacute" => 547, "k" => 456, "l" => 228, "m" => 729, + "n" => 501, "o" => 501, "ordfeminine" => 303, "ring" => 273, + "p" => 501, "threesuperior" => 273, "q" => 501, "acute" => 273, + "r" => 319, "aacute" => 456, "twosuperior" => 273, "s" => 456, + "OE" => 820, "t" => 273, "divide" => 479, "section" => 456, + "u" => 501, "v" => 456, "w" => 638, "dieresis" => 273, "x" => 456, + "y" => 456, "z" => 410, "iacute" => 228, "quotedblbase" => 410, + "hungarumlaut" => 273, "quotedbl" => 389, "mu" => 501, + "Scaron" => 547, "Lslash" => 501, "semicolon" => 273, + "oslash" => 501, "florin" => 456, "yacute" => 456, "fi" => 501, + "fl" => 501, "Acircumflex" => 592, "parenright" => 273, + "Ecircumflex" => 547, "Icircumflex" => 228, "trademark" => 820, + "daggerdbl" => 456, "guillemotleft" => 456, "germandbls" => 501, + "macron" => 273, "Otilde" => 638, "seven" => 456, + "ellipsis" => 820, "scaron" => 456, "ordmasculine" => 299, + "AE" => 820, "Ucircumflex" => 592, "lslash" => 228, + "dotlessi" => 228, "sterling" => 456, "quotedblleft" => 410, + "hyphen" => 273, "guilsinglright" => 273, "quotesingle" => 195, + "eight" => 456, "exclamdown" => 273, "acircumflex" => 456, + "endash" => 456, "oe" => 774, "ecircumflex" => 456, + "Adieresis" => 592, "copyright" => 604, "Egrave" => 547, + "icircumflex" => 228, "slash" => 228, "braceright" => 319, + "Edieresis" => 547, "quotedblright" => 410, "Idieresis" => 228, + "otilde" => 501, "parenleft" => 273, "one" => 456, + "Odieresis" => 638, "ucircumflex" => 501, "bracketleft" => 273, + "Ugrave" => 592, "cent" => 456, "currency" => 456, + "logicalnot" => 479, "quoteright" => 228, "Udieresis" => 592, + "perthousand" => 820, "Ydieresis" => 547, "Atilde" => 592, + "breve" => 273, "bar" => 230, "fraction" => 137, "Eacute" => 547, + "less" => 479, "adieresis" => 456, "guilsinglleft" => 273, + "egrave" => 456, "exclam" => 273, "edieresis" => 456, + "idieresis" => 228, "Eth" => 592, "period" => 228, "ae" => 729, + "asterisk" => 319, "odieresis" => 501, "Uacute" => 592, + "ugrave" => 501, "five" => 456, "nine" => 456, "greater" => 479, + "udieresis" => 501, "Zcaron" => 501, "threequarters" => 684, + "guillemotright" => 456, "Ccedilla" => 592, "ydieresis" => 456, + "tilde" => 273, "atilde" => 456, "at" => 800, "brokenbar" => 230, + "eacute" => 456, "quoteleft" => 228, "underscore" => 456, + "onesuperior" => 273, + } +); +1; diff --git a/doc/metrics/phvl8a.ph b/doc/metrics/phvl8a.ph new file mode 100644 index 0000000..bcd1a18 --- /dev/null +++ b/doc/metrics/phvl8a.ph @@ -0,0 +1,72 @@ +%PS_Helvetica_Light = ( + name => 'Helvetica-Light', + widths => { + "multiply" => 660, "Ntilde" => 722, "zero" => 556, "eth" => 556, + "Ograve" => 778, "uacute" => 556, "braceleft" => 333, + "Thorn" => 611, "zcaron" => 500, "comma" => 278, "cedilla" => 333, + "plusminus" => 660, "ccedilla" => 556, "circumflex" => 333, + "dotaccent" => 333, "asciitilde" => 660, "colon" => 278, + "onehalf" => 834, "dollar" => 556, "ntilde" => 556, + "Ocircumflex" => 778, "Oacute" => 778, "ogonek" => 333, + "ograve" => 556, "thorn" => 611, "minus" => 660, "degree" => 400, + "yen" => 556, "space" => 278, "registered" => 800, + "questiondown" => 500, "Aring" => 667, "percent" => 889, + "emdash" => 1000, "six" => 556, "Agrave" => 667, + "paragraph" => 650, "three" => 556, "numbersign" => 556, + "two" => 556, "Igrave" => 278, "ocircumflex" => 556, + "oacute" => 556, "A" => 667, "B" => 667, "C" => 722, "D" => 722, + "E" => 611, "onequarter" => 834, "F" => 556, "G" => 778, + "H" => 722, "I" => 278, "J" => 500, "K" => 667, "L" => 556, + "backslash" => 278, "asciicircum" => 660, "periodcentered" => 278, + "M" => 833, "N" => 722, "O" => 778, "P" => 611, "aring" => 556, + "Q" => 778, "R" => 667, "Aacute" => 667, "caron" => 333, + "S" => 611, "T" => 556, "grave" => 333, "U" => 722, + "agrave" => 556, "V" => 611, "W" => 889, "equal" => 660, + "question" => 500, "X" => 611, "Y" => 611, "Z" => 611, + "bracketright" => 333, "Iacute" => 278, "ampersand" => 667, + "four" => 556, "igrave" => 222, "a" => 556, "b" => 611, "c" => 556, + "d" => 611, "plus" => 660, "e" => 556, "quotesinglbase" => 222, + "f" => 278, "g" => 611, "bullet" => 500, "h" => 556, "i" => 222, + "Oslash" => 778, "dagger" => 556, "j" => 222, "Yacute" => 611, + "k" => 500, "l" => 222, "m" => 833, "n" => 556, "o" => 556, + "ordfeminine" => 334, "ring" => 333, "p" => 611, + "threesuperior" => 333, "q" => 611, "acute" => 333, "r" => 333, + "twosuperior" => 333, "aacute" => 556, "s" => 500, "OE" => 1000, + "t" => 278, "divide" => 660, "section" => 556, "u" => 556, + "v" => 500, "w" => 722, "dieresis" => 333, "x" => 500, "y" => 500, + "z" => 500, "iacute" => 222, "quotedblbase" => 389, + "hungarumlaut" => 333, "quotedbl" => 278, "mu" => 556, + "Scaron" => 611, "Lslash" => 556, "semicolon" => 278, + "oslash" => 556, "florin" => 556, "yacute" => 500, "fi" => 500, + "fl" => 500, "Acircumflex" => 667, "parenright" => 333, + "Ecircumflex" => 611, "trademark" => 940, "Icircumflex" => 278, + "daggerdbl" => 556, "guillemotleft" => 556, "germandbls" => 500, + "macron" => 333, "Otilde" => 778, "seven" => 556, + "ellipsis" => 1000, "scaron" => 500, "ordmasculine" => 334, + "AE" => 1000, "Ucircumflex" => 722, "lslash" => 222, + "dotlessi" => 222, "sterling" => 556, "quotedblleft" => 389, + "hyphen" => 333, "guilsinglright" => 389, "quotesingle" => 222, + "eight" => 556, "exclamdown" => 333, "acircumflex" => 556, + "endash" => 500, "oe" => 944, "ecircumflex" => 556, + "copyright" => 800, "Adieresis" => 667, "Egrave" => 611, + "icircumflex" => 222, "slash" => 278, "braceright" => 333, + "Edieresis" => 611, "quotedblright" => 389, "otilde" => 556, + "Idieresis" => 278, "parenleft" => 333, "one" => 556, + "ucircumflex" => 556, "Odieresis" => 778, "bracketleft" => 333, + "Ugrave" => 722, "cent" => 556, "currency" => 556, + "logicalnot" => 660, "quoteright" => 222, "Udieresis" => 722, + "perthousand" => 1000, "Ydieresis" => 611, "Atilde" => 667, + "breve" => 333, "bar" => 222, "fraction" => 167, "Eacute" => 611, + "less" => 660, "adieresis" => 556, "guilsinglleft" => 389, + "egrave" => 556, "exclam" => 333, "edieresis" => 556, + "idieresis" => 222, "Eth" => 722, "period" => 278, "ae" => 889, + "asterisk" => 389, "odieresis" => 556, "Uacute" => 722, + "ugrave" => 556, "five" => 556, "nine" => 556, "greater" => 660, + "udieresis" => 556, "Zcaron" => 611, "threequarters" => 834, + "guillemotright" => 556, "ydieresis" => 500, "Ccedilla" => 722, + "tilde" => 333, "atilde" => 556, "at" => 800, "brokenbar" => 222, + "eacute" => 556, "quoteleft" => 222, "underscore" => 500, + "onesuperior" => 333, + } +); +1; diff --git a/doc/metrics/phvlo8a.ph b/doc/metrics/phvlo8a.ph new file mode 100644 index 0000000..af45efd --- /dev/null +++ b/doc/metrics/phvlo8a.ph @@ -0,0 +1,72 @@ +%PS_Helvetica_LightOblique = ( + name => 'Helvetica-LightOblique', + widths => { + "multiply" => 660, "Ntilde" => 722, "zero" => 556, "eth" => 556, + "Ograve" => 778, "uacute" => 556, "braceleft" => 333, + "Thorn" => 611, "zcaron" => 500, "comma" => 278, "cedilla" => 333, + "plusminus" => 660, "ccedilla" => 556, "circumflex" => 333, + "dotaccent" => 333, "asciitilde" => 660, "colon" => 278, + "onehalf" => 834, "dollar" => 556, "ntilde" => 556, + "Ocircumflex" => 778, "Oacute" => 778, "ogonek" => 333, + "ograve" => 556, "thorn" => 611, "minus" => 660, "degree" => 400, + "yen" => 556, "space" => 278, "registered" => 800, + "questiondown" => 500, "Aring" => 667, "percent" => 889, + "emdash" => 1000, "six" => 556, "Agrave" => 667, + "paragraph" => 650, "three" => 556, "numbersign" => 556, + "two" => 556, "Igrave" => 278, "ocircumflex" => 556, + "oacute" => 556, "A" => 667, "B" => 667, "C" => 722, "D" => 722, + "E" => 611, "onequarter" => 834, "F" => 556, "G" => 778, + "H" => 722, "I" => 278, "J" => 500, "K" => 667, "L" => 556, + "backslash" => 278, "asciicircum" => 660, "periodcentered" => 278, + "M" => 833, "N" => 722, "O" => 778, "P" => 611, "aring" => 556, + "Q" => 778, "R" => 667, "Aacute" => 667, "caron" => 333, + "S" => 611, "T" => 556, "grave" => 333, "U" => 722, + "agrave" => 556, "V" => 611, "W" => 889, "equal" => 660, + "question" => 500, "X" => 611, "Y" => 611, "Z" => 611, + "bracketright" => 333, "Iacute" => 278, "ampersand" => 667, + "four" => 556, "igrave" => 222, "a" => 556, "b" => 611, "c" => 556, + "d" => 611, "plus" => 660, "e" => 556, "quotesinglbase" => 222, + "f" => 278, "g" => 611, "bullet" => 500, "h" => 556, "i" => 222, + "Oslash" => 778, "dagger" => 556, "j" => 222, "Yacute" => 611, + "k" => 500, "l" => 222, "m" => 833, "n" => 556, "o" => 556, + "ordfeminine" => 334, "ring" => 333, "p" => 611, + "threesuperior" => 333, "q" => 611, "acute" => 333, "r" => 333, + "twosuperior" => 333, "aacute" => 556, "s" => 500, "OE" => 1000, + "t" => 278, "divide" => 660, "section" => 556, "u" => 556, + "v" => 500, "w" => 722, "dieresis" => 333, "x" => 500, "y" => 500, + "z" => 500, "iacute" => 222, "quotedblbase" => 389, + "hungarumlaut" => 333, "quotedbl" => 278, "mu" => 556, + "Scaron" => 611, "Lslash" => 556, "semicolon" => 278, + "oslash" => 556, "florin" => 556, "yacute" => 500, "fi" => 500, + "fl" => 500, "Acircumflex" => 667, "parenright" => 333, + "Ecircumflex" => 611, "trademark" => 940, "Icircumflex" => 278, + "daggerdbl" => 556, "guillemotleft" => 556, "germandbls" => 500, + "macron" => 333, "Otilde" => 778, "seven" => 556, + "ellipsis" => 1000, "scaron" => 500, "ordmasculine" => 334, + "AE" => 1000, "Ucircumflex" => 722, "lslash" => 222, + "dotlessi" => 222, "sterling" => 556, "quotedblleft" => 389, + "hyphen" => 333, "guilsinglright" => 389, "quotesingle" => 222, + "eight" => 556, "exclamdown" => 333, "acircumflex" => 556, + "endash" => 500, "oe" => 944, "ecircumflex" => 556, + "copyright" => 800, "Adieresis" => 667, "Egrave" => 611, + "icircumflex" => 222, "slash" => 278, "braceright" => 333, + "Edieresis" => 611, "quotedblright" => 389, "otilde" => 556, + "Idieresis" => 278, "parenleft" => 333, "one" => 556, + "ucircumflex" => 556, "Odieresis" => 778, "bracketleft" => 333, + "Ugrave" => 722, "cent" => 556, "currency" => 556, + "logicalnot" => 660, "quoteright" => 222, "Udieresis" => 722, + "perthousand" => 1000, "Ydieresis" => 611, "Atilde" => 667, + "breve" => 333, "bar" => 222, "fraction" => 167, "Eacute" => 611, + "less" => 660, "adieresis" => 556, "guilsinglleft" => 389, + "egrave" => 556, "exclam" => 333, "edieresis" => 556, + "idieresis" => 222, "Eth" => 722, "period" => 278, "ae" => 889, + "asterisk" => 389, "odieresis" => 556, "Uacute" => 722, + "ugrave" => 556, "five" => 556, "nine" => 556, "greater" => 660, + "udieresis" => 556, "Zcaron" => 611, "threequarters" => 834, + "guillemotright" => 556, "ydieresis" => 500, "Ccedilla" => 722, + "tilde" => 333, "atilde" => 556, "at" => 800, "brokenbar" => 222, + "eacute" => 556, "quoteleft" => 222, "underscore" => 500, + "onesuperior" => 333, + } +); +1; diff --git a/doc/metrics/phvr8a.ph b/doc/metrics/phvr8a.ph new file mode 100644 index 0000000..70dad5b --- /dev/null +++ b/doc/metrics/phvr8a.ph @@ -0,0 +1,72 @@ +%PS_Helvetica = ( + name => 'Helvetica', + widths => { + "multiply" => 584, "Ntilde" => 722, "zero" => 556, "eth" => 556, + "Ograve" => 778, "uacute" => 556, "braceleft" => 334, + "Thorn" => 667, "zcaron" => 500, "comma" => 278, "cedilla" => 333, + "plusminus" => 584, "ccedilla" => 500, "circumflex" => 333, + "dotaccent" => 333, "asciitilde" => 584, "colon" => 278, + "onehalf" => 834, "dollar" => 556, "ntilde" => 556, + "Oacute" => 778, "Ocircumflex" => 778, "ogonek" => 333, + "ograve" => 556, "thorn" => 556, "degree" => 400, "minus" => 584, + "yen" => 556, "space" => 278, "registered" => 737, + "questiondown" => 611, "Aring" => 667, "percent" => 889, + "emdash" => 1000, "six" => 556, "Agrave" => 667, + "paragraph" => 537, "three" => 556, "numbersign" => 556, + "two" => 556, "Igrave" => 278, "oacute" => 556, + "ocircumflex" => 556, "A" => 667, "B" => 667, "C" => 722, + "D" => 722, "E" => 667, "onequarter" => 834, "F" => 611, + "G" => 778, "H" => 722, "I" => 278, "J" => 500, "K" => 667, + "L" => 556, "backslash" => 278, "asciicircum" => 469, + "periodcentered" => 278, "M" => 833, "N" => 722, "O" => 778, + "P" => 667, "aring" => 556, "Q" => 778, "R" => 722, + "Aacute" => 667, "caron" => 333, "S" => 667, "T" => 611, + "grave" => 333, "U" => 722, "agrave" => 556, "V" => 667, + "W" => 944, "equal" => 584, "question" => 556, "X" => 667, + "Y" => 667, "Z" => 611, "bracketright" => 278, "Iacute" => 278, + "ampersand" => 667, "four" => 556, "igrave" => 278, "a" => 556, + "b" => 556, "c" => 500, "d" => 556, "plus" => 584, "e" => 556, + "quotesinglbase" => 222, "f" => 278, "g" => 556, "bullet" => 350, + "h" => 556, "i" => 222, "Oslash" => 778, "dagger" => 556, + "j" => 222, "Yacute" => 667, "k" => 500, "l" => 222, "m" => 833, + "n" => 556, "o" => 556, "ordfeminine" => 370, "ring" => 333, + "p" => 556, "threesuperior" => 333, "q" => 556, "acute" => 333, + "r" => 333, "aacute" => 556, "twosuperior" => 333, "s" => 500, + "OE" => 1000, "t" => 278, "divide" => 584, "section" => 556, + "u" => 556, "v" => 500, "w" => 722, "dieresis" => 333, "x" => 500, + "y" => 500, "z" => 500, "iacute" => 278, "quotedblbase" => 333, + "hungarumlaut" => 333, "quotedbl" => 355, "mu" => 556, + "Scaron" => 667, "Lslash" => 556, "semicolon" => 278, + "oslash" => 611, "florin" => 556, "yacute" => 500, "fi" => 500, + "fl" => 500, "Acircumflex" => 667, "parenright" => 333, + "Ecircumflex" => 667, "Icircumflex" => 278, "trademark" => 1000, + "daggerdbl" => 556, "guillemotleft" => 556, "germandbls" => 611, + "macron" => 333, "Otilde" => 778, "seven" => 556, + "ellipsis" => 1000, "scaron" => 500, "ordmasculine" => 365, + "AE" => 1000, "Ucircumflex" => 722, "lslash" => 222, + "dotlessi" => 278, "sterling" => 556, "quotedblleft" => 333, + "hyphen" => 333, "guilsinglright" => 333, "quotesingle" => 191, + "eight" => 556, "exclamdown" => 333, "acircumflex" => 556, + "endash" => 556, "oe" => 944, "ecircumflex" => 556, + "Adieresis" => 667, "copyright" => 737, "Egrave" => 667, + "icircumflex" => 278, "slash" => 278, "braceright" => 334, + "Edieresis" => 667, "quotedblright" => 333, "Idieresis" => 278, + "otilde" => 556, "parenleft" => 333, "one" => 556, + "Odieresis" => 778, "ucircumflex" => 556, "bracketleft" => 278, + "Ugrave" => 722, "cent" => 556, "currency" => 556, + "logicalnot" => 584, "quoteright" => 222, "Udieresis" => 722, + "perthousand" => 1000, "Ydieresis" => 667, "Atilde" => 667, + "breve" => 333, "bar" => 260, "fraction" => 167, "Eacute" => 667, + "less" => 584, "adieresis" => 556, "guilsinglleft" => 333, + "egrave" => 556, "exclam" => 278, "edieresis" => 556, + "idieresis" => 278, "Eth" => 722, "period" => 278, "ae" => 889, + "asterisk" => 389, "odieresis" => 556, "Uacute" => 722, + "ugrave" => 556, "five" => 556, "nine" => 556, "greater" => 584, + "udieresis" => 556, "Zcaron" => 611, "threequarters" => 834, + "guillemotright" => 556, "Ccedilla" => 722, "ydieresis" => 500, + "tilde" => 333, "atilde" => 556, "at" => 1015, "brokenbar" => 260, + "eacute" => 556, "quoteleft" => 222, "underscore" => 556, + "onesuperior" => 333, + } +); +1; diff --git a/doc/metrics/phvr8an.ph b/doc/metrics/phvr8an.ph new file mode 100644 index 0000000..7112c03 --- /dev/null +++ b/doc/metrics/phvr8an.ph @@ -0,0 +1,71 @@ +%PS_Helvetica_Narrow = ( + name => 'Helvetica-Narrow', + widths => { + "multiply" => 479, "Ntilde" => 592, "zero" => 456, "eth" => 456, + "Ograve" => 638, "uacute" => 456, "braceleft" => 274, + "Thorn" => 547, "zcaron" => 410, "comma" => 228, "cedilla" => 273, + "plusminus" => 479, "ccedilla" => 410, "circumflex" => 273, + "dotaccent" => 273, "asciitilde" => 479, "colon" => 228, + "onehalf" => 684, "dollar" => 456, "ntilde" => 456, + "Oacute" => 638, "Ocircumflex" => 638, "ogonek" => 273, + "ograve" => 456, "thorn" => 456, "degree" => 328, "minus" => 479, + "yen" => 456, "space" => 228, "registered" => 604, + "questiondown" => 501, "Aring" => 547, "percent" => 729, + "emdash" => 820, "six" => 456, "Agrave" => 547, "paragraph" => 440, + "three" => 456, "numbersign" => 456, "two" => 456, "Igrave" => 228, + "oacute" => 456, "ocircumflex" => 456, "A" => 547, "B" => 547, + "C" => 592, "D" => 592, "E" => 547, "onequarter" => 684, + "F" => 501, "G" => 638, "H" => 592, "I" => 228, "J" => 410, + "K" => 547, "L" => 456, "backslash" => 228, "asciicircum" => 385, + "periodcentered" => 228, "M" => 683, "N" => 592, "O" => 638, + "P" => 547, "aring" => 456, "Q" => 638, "R" => 592, + "Aacute" => 547, "caron" => 273, "S" => 547, "T" => 501, + "grave" => 273, "U" => 592, "agrave" => 456, "V" => 547, + "W" => 774, "equal" => 479, "question" => 456, "X" => 547, + "Y" => 547, "Z" => 501, "bracketright" => 228, "Iacute" => 228, + "ampersand" => 547, "four" => 456, "igrave" => 228, "a" => 456, + "b" => 456, "c" => 410, "d" => 456, "plus" => 479, "e" => 456, + "quotesinglbase" => 182, "f" => 228, "g" => 456, "bullet" => 287, + "h" => 456, "i" => 182, "Oslash" => 638, "dagger" => 456, + "j" => 182, "Yacute" => 547, "k" => 410, "l" => 182, "m" => 683, + "n" => 456, "o" => 456, "ordfeminine" => 303, "ring" => 273, + "p" => 456, "threesuperior" => 273, "q" => 456, "acute" => 273, + "r" => 273, "aacute" => 456, "twosuperior" => 273, "s" => 410, + "OE" => 820, "t" => 228, "divide" => 479, "section" => 456, + "u" => 456, "v" => 410, "w" => 592, "dieresis" => 273, "x" => 410, + "y" => 410, "z" => 410, "iacute" => 228, "quotedblbase" => 273, + "hungarumlaut" => 273, "quotedbl" => 291, "mu" => 456, + "Scaron" => 547, "Lslash" => 456, "semicolon" => 228, + "oslash" => 501, "florin" => 456, "yacute" => 410, "fi" => 410, + "fl" => 410, "Acircumflex" => 547, "parenright" => 273, + "Ecircumflex" => 547, "Icircumflex" => 228, "trademark" => 820, + "daggerdbl" => 456, "guillemotleft" => 456, "germandbls" => 501, + "macron" => 273, "Otilde" => 638, "seven" => 456, + "ellipsis" => 820, "scaron" => 410, "ordmasculine" => 299, + "AE" => 820, "Ucircumflex" => 592, "lslash" => 182, + "dotlessi" => 228, "sterling" => 456, "quotedblleft" => 273, + "hyphen" => 273, "guilsinglright" => 273, "quotesingle" => 157, + "eight" => 456, "exclamdown" => 273, "acircumflex" => 456, + "endash" => 456, "oe" => 774, "ecircumflex" => 456, + "Adieresis" => 547, "copyright" => 604, "Egrave" => 547, + "icircumflex" => 228, "slash" => 228, "braceright" => 274, + "Edieresis" => 547, "quotedblright" => 273, "Idieresis" => 228, + "otilde" => 456, "parenleft" => 273, "one" => 456, + "Odieresis" => 638, "ucircumflex" => 456, "bracketleft" => 228, + "Ugrave" => 592, "cent" => 456, "currency" => 456, + "logicalnot" => 479, "quoteright" => 182, "Udieresis" => 592, + "perthousand" => 820, "Ydieresis" => 547, "Atilde" => 547, + "breve" => 273, "bar" => 213, "fraction" => 137, "Eacute" => 547, + "less" => 479, "adieresis" => 456, "guilsinglleft" => 273, + "egrave" => 456, "exclam" => 228, "edieresis" => 456, + "idieresis" => 228, "Eth" => 592, "period" => 228, "ae" => 729, + "asterisk" => 319, "odieresis" => 456, "Uacute" => 592, + "ugrave" => 456, "five" => 456, "nine" => 456, "greater" => 479, + "udieresis" => 456, "Zcaron" => 501, "threequarters" => 684, + "guillemotright" => 456, "Ccedilla" => 592, "ydieresis" => 410, + "tilde" => 273, "atilde" => 456, "at" => 832, "brokenbar" => 213, + "eacute" => 456, "quoteleft" => 182, "underscore" => 456, + "onesuperior" => 273, + } +); +1; diff --git a/doc/metrics/phvro8a.ph b/doc/metrics/phvro8a.ph new file mode 100644 index 0000000..010903e --- /dev/null +++ b/doc/metrics/phvro8a.ph @@ -0,0 +1,72 @@ +%PS_Helvetica_Oblique = ( + name => 'Helvetica-Oblique', + widths => { + "multiply" => 584, "Ntilde" => 722, "zero" => 556, "eth" => 556, + "Ograve" => 778, "uacute" => 556, "braceleft" => 334, + "Thorn" => 667, "zcaron" => 500, "comma" => 278, "cedilla" => 333, + "plusminus" => 584, "ccedilla" => 500, "circumflex" => 333, + "dotaccent" => 333, "asciitilde" => 584, "colon" => 278, + "onehalf" => 834, "dollar" => 556, "ntilde" => 556, + "Oacute" => 778, "Ocircumflex" => 778, "ogonek" => 333, + "ograve" => 556, "thorn" => 556, "degree" => 400, "minus" => 584, + "yen" => 556, "space" => 278, "registered" => 737, + "questiondown" => 611, "Aring" => 667, "percent" => 889, + "emdash" => 1000, "six" => 556, "Agrave" => 667, + "paragraph" => 537, "three" => 556, "numbersign" => 556, + "two" => 556, "Igrave" => 278, "oacute" => 556, + "ocircumflex" => 556, "A" => 667, "B" => 667, "C" => 722, + "D" => 722, "E" => 667, "onequarter" => 834, "F" => 611, + "G" => 778, "H" => 722, "I" => 278, "J" => 500, "K" => 667, + "L" => 556, "backslash" => 278, "asciicircum" => 469, + "periodcentered" => 278, "M" => 833, "N" => 722, "O" => 778, + "P" => 667, "aring" => 556, "Q" => 778, "R" => 722, + "Aacute" => 667, "caron" => 333, "S" => 667, "T" => 611, + "grave" => 333, "U" => 722, "agrave" => 556, "V" => 667, + "W" => 944, "equal" => 584, "question" => 556, "X" => 667, + "Y" => 667, "Z" => 611, "bracketright" => 278, "Iacute" => 278, + "ampersand" => 667, "four" => 556, "igrave" => 278, "a" => 556, + "b" => 556, "c" => 500, "d" => 556, "plus" => 584, "e" => 556, + "quotesinglbase" => 222, "f" => 278, "g" => 556, "bullet" => 350, + "h" => 556, "i" => 222, "Oslash" => 778, "dagger" => 556, + "j" => 222, "Yacute" => 667, "k" => 500, "l" => 222, "m" => 833, + "n" => 556, "o" => 556, "ordfeminine" => 370, "ring" => 333, + "p" => 556, "threesuperior" => 333, "q" => 556, "acute" => 333, + "r" => 333, "aacute" => 556, "twosuperior" => 333, "s" => 500, + "OE" => 1000, "t" => 278, "divide" => 584, "section" => 556, + "u" => 556, "v" => 500, "w" => 722, "dieresis" => 333, "x" => 500, + "y" => 500, "z" => 500, "iacute" => 278, "quotedblbase" => 333, + "hungarumlaut" => 333, "quotedbl" => 355, "mu" => 556, + "Scaron" => 667, "Lslash" => 556, "semicolon" => 278, + "oslash" => 611, "florin" => 556, "yacute" => 500, "fi" => 500, + "fl" => 500, "Acircumflex" => 667, "parenright" => 333, + "Ecircumflex" => 667, "Icircumflex" => 278, "trademark" => 1000, + "daggerdbl" => 556, "guillemotleft" => 556, "germandbls" => 611, + "macron" => 333, "Otilde" => 778, "seven" => 556, + "ellipsis" => 1000, "scaron" => 500, "ordmasculine" => 365, + "AE" => 1000, "Ucircumflex" => 722, "lslash" => 222, + "dotlessi" => 278, "sterling" => 556, "quotedblleft" => 333, + "hyphen" => 333, "guilsinglright" => 333, "quotesingle" => 191, + "eight" => 556, "exclamdown" => 333, "acircumflex" => 556, + "endash" => 556, "oe" => 944, "ecircumflex" => 556, + "Adieresis" => 667, "copyright" => 737, "Egrave" => 667, + "icircumflex" => 278, "slash" => 278, "braceright" => 334, + "Edieresis" => 667, "quotedblright" => 333, "Idieresis" => 278, + "otilde" => 556, "parenleft" => 333, "one" => 556, + "Odieresis" => 778, "ucircumflex" => 556, "bracketleft" => 278, + "Ugrave" => 722, "cent" => 556, "currency" => 556, + "logicalnot" => 584, "quoteright" => 222, "Udieresis" => 722, + "perthousand" => 1000, "Ydieresis" => 667, "Atilde" => 667, + "breve" => 333, "bar" => 260, "fraction" => 167, "Eacute" => 667, + "less" => 584, "adieresis" => 556, "guilsinglleft" => 333, + "egrave" => 556, "exclam" => 278, "edieresis" => 556, + "idieresis" => 278, "Eth" => 722, "period" => 278, "ae" => 889, + "asterisk" => 389, "odieresis" => 556, "Uacute" => 722, + "ugrave" => 556, "five" => 556, "nine" => 556, "greater" => 584, + "udieresis" => 556, "Zcaron" => 611, "threequarters" => 834, + "guillemotright" => 556, "Ccedilla" => 722, "ydieresis" => 500, + "tilde" => 333, "atilde" => 556, "at" => 1015, "brokenbar" => 260, + "eacute" => 556, "quoteleft" => 222, "underscore" => 556, + "onesuperior" => 333, + } +); +1; diff --git a/doc/metrics/phvro8an.ph b/doc/metrics/phvro8an.ph new file mode 100644 index 0000000..717e18e --- /dev/null +++ b/doc/metrics/phvro8an.ph @@ -0,0 +1,71 @@ +%PS_Helvetica_Narrow_Oblique = ( + name => 'Helvetica-Narrow-Oblique', + widths => { + "multiply" => 479, "Ntilde" => 592, "zero" => 456, "eth" => 456, + "Ograve" => 638, "uacute" => 456, "braceleft" => 274, + "Thorn" => 547, "zcaron" => 410, "comma" => 228, "cedilla" => 273, + "plusminus" => 479, "ccedilla" => 410, "circumflex" => 273, + "dotaccent" => 273, "asciitilde" => 479, "colon" => 228, + "onehalf" => 684, "dollar" => 456, "ntilde" => 456, + "Oacute" => 638, "Ocircumflex" => 638, "ogonek" => 273, + "ograve" => 456, "thorn" => 456, "degree" => 328, "minus" => 479, + "yen" => 456, "space" => 228, "registered" => 604, + "questiondown" => 501, "Aring" => 547, "percent" => 729, + "emdash" => 820, "six" => 456, "Agrave" => 547, "paragraph" => 440, + "three" => 456, "numbersign" => 456, "two" => 456, "Igrave" => 228, + "oacute" => 456, "ocircumflex" => 456, "A" => 547, "B" => 547, + "C" => 592, "D" => 592, "E" => 547, "onequarter" => 684, + "F" => 501, "G" => 638, "H" => 592, "I" => 228, "J" => 410, + "K" => 547, "L" => 456, "backslash" => 228, "asciicircum" => 385, + "periodcentered" => 228, "M" => 683, "N" => 592, "O" => 638, + "P" => 547, "aring" => 456, "Q" => 638, "R" => 592, + "Aacute" => 547, "caron" => 273, "S" => 547, "T" => 501, + "grave" => 273, "U" => 592, "agrave" => 456, "V" => 547, + "W" => 774, "equal" => 479, "question" => 456, "X" => 547, + "Y" => 547, "Z" => 501, "bracketright" => 228, "Iacute" => 228, + "ampersand" => 547, "four" => 456, "igrave" => 228, "a" => 456, + "b" => 456, "c" => 410, "d" => 456, "plus" => 479, "e" => 456, + "quotesinglbase" => 182, "f" => 228, "g" => 456, "bullet" => 287, + "h" => 456, "i" => 182, "Oslash" => 638, "dagger" => 456, + "j" => 182, "Yacute" => 547, "k" => 410, "l" => 182, "m" => 683, + "n" => 456, "o" => 456, "ordfeminine" => 303, "ring" => 273, + "p" => 456, "threesuperior" => 273, "q" => 456, "acute" => 273, + "r" => 273, "aacute" => 456, "twosuperior" => 273, "s" => 410, + "OE" => 820, "t" => 228, "divide" => 479, "section" => 456, + "u" => 456, "v" => 410, "w" => 592, "dieresis" => 273, "x" => 410, + "y" => 410, "z" => 410, "iacute" => 228, "quotedblbase" => 273, + "hungarumlaut" => 273, "quotedbl" => 291, "mu" => 456, + "Scaron" => 547, "Lslash" => 456, "semicolon" => 228, + "oslash" => 501, "florin" => 456, "yacute" => 410, "fi" => 410, + "fl" => 410, "Acircumflex" => 547, "parenright" => 273, + "Ecircumflex" => 547, "Icircumflex" => 228, "trademark" => 820, + "daggerdbl" => 456, "guillemotleft" => 456, "germandbls" => 501, + "macron" => 273, "Otilde" => 638, "seven" => 456, + "ellipsis" => 820, "scaron" => 410, "ordmasculine" => 299, + "AE" => 820, "Ucircumflex" => 592, "lslash" => 182, + "dotlessi" => 228, "sterling" => 456, "quotedblleft" => 273, + "hyphen" => 273, "guilsinglright" => 273, "quotesingle" => 157, + "eight" => 456, "exclamdown" => 273, "acircumflex" => 456, + "endash" => 456, "oe" => 774, "ecircumflex" => 456, + "Adieresis" => 547, "copyright" => 604, "Egrave" => 547, + "icircumflex" => 228, "slash" => 228, "braceright" => 274, + "Edieresis" => 547, "quotedblright" => 273, "Idieresis" => 228, + "otilde" => 456, "parenleft" => 273, "one" => 456, + "Odieresis" => 638, "ucircumflex" => 456, "bracketleft" => 228, + "Ugrave" => 592, "cent" => 456, "currency" => 456, + "logicalnot" => 479, "quoteright" => 182, "Udieresis" => 592, + "perthousand" => 820, "Ydieresis" => 547, "Atilde" => 547, + "breve" => 273, "bar" => 213, "fraction" => 137, "Eacute" => 547, + "less" => 479, "adieresis" => 456, "guilsinglleft" => 273, + "egrave" => 456, "exclam" => 228, "edieresis" => 456, + "idieresis" => 228, "Eth" => 592, "period" => 228, "ae" => 729, + "asterisk" => 319, "odieresis" => 456, "Uacute" => 592, + "ugrave" => 456, "five" => 456, "nine" => 456, "greater" => 479, + "udieresis" => 456, "Zcaron" => 501, "threequarters" => 684, + "guillemotright" => 456, "Ccedilla" => 592, "ydieresis" => 410, + "tilde" => 273, "atilde" => 456, "at" => 832, "brokenbar" => 213, + "eacute" => 456, "quoteleft" => 182, "underscore" => 456, + "onesuperior" => 273, + } +); +1; diff --git a/doc/metrics/pncb8a.ph b/doc/metrics/pncb8a.ph new file mode 100644 index 0000000..009ab6d --- /dev/null +++ b/doc/metrics/pncb8a.ph @@ -0,0 +1,72 @@ +%PS_NewCenturySchlbk_Bold = ( + name => 'NewCenturySchlbk-Bold', + widths => { + "multiply" => 606, "Ntilde" => 833, "zero" => 574, "eth" => 611, + "Ograve" => 833, "uacute" => 685, "braceleft" => 389, + "Thorn" => 759, "zcaron" => 537, "comma" => 278, "cedilla" => 333, + "plusminus" => 606, "ccedilla" => 556, "circumflex" => 333, + "dotaccent" => 333, "asciitilde" => 606, "colon" => 278, + "onehalf" => 861, "dollar" => 574, "ntilde" => 685, + "Ocircumflex" => 833, "Oacute" => 833, "ogonek" => 333, + "ograve" => 611, "thorn" => 667, "minus" => 606, "degree" => 400, + "yen" => 574, "space" => 287, "registered" => 747, + "questiondown" => 500, "Aring" => 759, "percent" => 833, + "emdash" => 1000, "six" => 574, "Agrave" => 759, + "paragraph" => 747, "three" => 574, "numbersign" => 574, + "two" => 574, "Igrave" => 444, "oacute" => 611, + "ocircumflex" => 611, "A" => 759, "B" => 778, "C" => 778, + "D" => 833, "E" => 759, "onequarter" => 861, "F" => 722, + "G" => 833, "H" => 870, "I" => 444, "J" => 648, "K" => 815, + "L" => 722, "backslash" => 606, "asciicircum" => 606, + "periodcentered" => 278, "M" => 981, "N" => 833, "O" => 833, + "P" => 759, "aring" => 611, "Q" => 833, "R" => 815, + "Aacute" => 759, "caron" => 333, "S" => 667, "T" => 722, + "grave" => 333, "U" => 833, "agrave" => 611, "V" => 759, + "W" => 981, "equal" => 606, "question" => 500, "X" => 722, + "Y" => 722, "Z" => 667, "bracketright" => 389, "Iacute" => 444, + "ampersand" => 852, "four" => 574, "igrave" => 370, "a" => 611, + "b" => 648, "c" => 556, "d" => 667, "plus" => 606, "e" => 574, + "quotesinglbase" => 241, "f" => 389, "g" => 611, "bullet" => 606, + "h" => 685, "i" => 370, "Oslash" => 833, "dagger" => 500, + "j" => 352, "Yacute" => 722, "k" => 667, "l" => 352, "m" => 963, + "n" => 685, "o" => 611, "ordfeminine" => 367, "ring" => 333, + "p" => 667, "threesuperior" => 344, "q" => 648, "acute" => 333, + "r" => 519, "twosuperior" => 344, "aacute" => 611, "s" => 500, + "OE" => 1000, "t" => 426, "divide" => 606, "section" => 500, + "u" => 685, "v" => 611, "w" => 889, "dieresis" => 333, "x" => 611, + "y" => 611, "z" => 537, "iacute" => 370, "quotedblbase" => 481, + "hungarumlaut" => 333, "quotedbl" => 333, "mu" => 685, + "Scaron" => 667, "Lslash" => 722, "semicolon" => 278, + "oslash" => 611, "florin" => 574, "yacute" => 611, "fi" => 685, + "fl" => 685, "Acircumflex" => 759, "parenright" => 389, + "Ecircumflex" => 759, "trademark" => 1000, "Icircumflex" => 444, + "daggerdbl" => 500, "guillemotleft" => 500, "germandbls" => 611, + "macron" => 333, "Otilde" => 833, "seven" => 574, + "ellipsis" => 1000, "scaron" => 500, "ordmasculine" => 367, + "AE" => 981, "Ucircumflex" => 833, "lslash" => 352, + "dotlessi" => 370, "sterling" => 574, "quotedblleft" => 481, + "hyphen" => 333, "guilsinglright" => 333, "quotesingle" => 241, + "eight" => 574, "exclamdown" => 296, "acircumflex" => 611, + "endash" => 500, "oe" => 907, "ecircumflex" => 574, + "copyright" => 747, "Adieresis" => 759, "Egrave" => 759, + "icircumflex" => 370, "slash" => 278, "braceright" => 389, + "Edieresis" => 759, "quotedblright" => 481, "otilde" => 611, + "Idieresis" => 444, "parenleft" => 389, "one" => 574, + "Odieresis" => 833, "ucircumflex" => 685, "bracketleft" => 389, + "Ugrave" => 833, "cent" => 574, "currency" => 574, + "logicalnot" => 606, "quoteright" => 241, "Udieresis" => 833, + "perthousand" => 1000, "Ydieresis" => 722, "Atilde" => 759, + "breve" => 333, "bar" => 606, "fraction" => 167, "Eacute" => 759, + "less" => 606, "adieresis" => 611, "guilsinglleft" => 333, + "egrave" => 574, "exclam" => 296, "edieresis" => 574, "Eth" => 833, + "idieresis" => 370, "period" => 278, "ae" => 870, + "asterisk" => 500, "odieresis" => 611, "Uacute" => 833, + "ugrave" => 685, "five" => 574, "nine" => 574, "greater" => 606, + "Zcaron" => 667, "udieresis" => 685, "threequarters" => 861, + "guillemotright" => 500, "Ccedilla" => 778, "ydieresis" => 611, + "tilde" => 333, "atilde" => 611, "at" => 747, "brokenbar" => 606, + "eacute" => 574, "quoteleft" => 241, "underscore" => 500, + "onesuperior" => 344, + } +); +1; diff --git a/doc/metrics/pncbi8a.ph b/doc/metrics/pncbi8a.ph new file mode 100644 index 0000000..76ce18b --- /dev/null +++ b/doc/metrics/pncbi8a.ph @@ -0,0 +1,72 @@ +%PS_NewCenturySchlbk_BoldItalic = ( + name => 'NewCenturySchlbk-BoldItalic', + widths => { + "multiply" => 606, "Ntilde" => 852, "zero" => 574, "eth" => 574, + "Ograve" => 833, "uacute" => 685, "braceleft" => 407, + "Thorn" => 741, "zcaron" => 519, "comma" => 287, "cedilla" => 333, + "plusminus" => 606, "ccedilla" => 537, "circumflex" => 333, + "dotaccent" => 333, "asciitilde" => 606, "colon" => 287, + "onehalf" => 861, "dollar" => 574, "ntilde" => 685, + "Ocircumflex" => 833, "Oacute" => 833, "ogonek" => 333, + "ograve" => 574, "thorn" => 648, "minus" => 606, "degree" => 400, + "yen" => 574, "space" => 287, "registered" => 747, + "questiondown" => 481, "Aring" => 741, "percent" => 889, + "emdash" => 1000, "six" => 574, "Agrave" => 741, + "paragraph" => 650, "three" => 574, "numbersign" => 574, + "two" => 574, "Igrave" => 444, "oacute" => 574, + "ocircumflex" => 574, "A" => 741, "B" => 759, "C" => 759, + "D" => 833, "E" => 741, "onequarter" => 861, "F" => 704, + "G" => 815, "H" => 870, "I" => 444, "J" => 667, "K" => 778, + "L" => 704, "backslash" => 606, "asciicircum" => 606, + "periodcentered" => 287, "M" => 944, "N" => 852, "O" => 833, + "P" => 741, "aring" => 667, "Q" => 833, "R" => 796, + "Aacute" => 741, "caron" => 333, "S" => 685, "T" => 722, + "grave" => 333, "U" => 833, "agrave" => 667, "V" => 741, + "W" => 944, "equal" => 606, "question" => 481, "X" => 741, + "Y" => 704, "Z" => 704, "bracketright" => 407, "Iacute" => 444, + "ampersand" => 889, "four" => 574, "igrave" => 389, "a" => 667, + "b" => 611, "c" => 537, "d" => 667, "plus" => 606, "e" => 519, + "quotesinglbase" => 259, "f" => 389, "g" => 611, "bullet" => 606, + "h" => 685, "i" => 389, "Oslash" => 833, "dagger" => 500, + "j" => 370, "Yacute" => 704, "k" => 648, "l" => 389, "m" => 944, + "n" => 685, "o" => 574, "ordfeminine" => 412, "ring" => 333, + "p" => 648, "threesuperior" => 344, "q" => 630, "acute" => 333, + "r" => 519, "twosuperior" => 344, "aacute" => 667, "s" => 481, + "OE" => 963, "t" => 407, "divide" => 606, "section" => 500, + "u" => 685, "v" => 556, "w" => 833, "dieresis" => 333, "x" => 574, + "y" => 519, "z" => 519, "iacute" => 389, "quotedblbase" => 481, + "hungarumlaut" => 333, "quotedbl" => 400, "mu" => 685, + "Scaron" => 685, "Lslash" => 704, "semicolon" => 287, + "oslash" => 574, "florin" => 574, "yacute" => 519, "fi" => 685, + "fl" => 685, "Acircumflex" => 741, "parenright" => 407, + "Ecircumflex" => 741, "trademark" => 950, "Icircumflex" => 444, + "daggerdbl" => 500, "guillemotleft" => 481, "germandbls" => 574, + "macron" => 333, "Otilde" => 833, "seven" => 574, + "ellipsis" => 1000, "scaron" => 481, "ordmasculine" => 356, + "AE" => 889, "Ucircumflex" => 833, "lslash" => 389, + "dotlessi" => 389, "sterling" => 574, "quotedblleft" => 481, + "hyphen" => 333, "guilsinglright" => 278, "quotesingle" => 287, + "eight" => 574, "exclamdown" => 333, "acircumflex" => 667, + "endash" => 500, "oe" => 852, "ecircumflex" => 519, + "copyright" => 747, "Adieresis" => 741, "Egrave" => 741, + "icircumflex" => 389, "slash" => 278, "braceright" => 407, + "Edieresis" => 741, "quotedblright" => 481, "otilde" => 574, + "Idieresis" => 444, "parenleft" => 407, "one" => 574, + "Odieresis" => 833, "ucircumflex" => 685, "bracketleft" => 407, + "Ugrave" => 833, "cent" => 574, "currency" => 574, + "logicalnot" => 606, "quoteright" => 259, "Udieresis" => 833, + "perthousand" => 1167, "Ydieresis" => 704, "Atilde" => 741, + "breve" => 333, "bar" => 606, "fraction" => 167, "Eacute" => 741, + "less" => 606, "adieresis" => 667, "guilsinglleft" => 278, + "egrave" => 519, "exclam" => 333, "edieresis" => 519, "Eth" => 833, + "idieresis" => 389, "period" => 287, "ae" => 815, + "asterisk" => 500, "odieresis" => 574, "Uacute" => 833, + "ugrave" => 685, "five" => 574, "nine" => 574, "greater" => 606, + "Zcaron" => 704, "udieresis" => 685, "threequarters" => 861, + "guillemotright" => 481, "Ccedilla" => 759, "ydieresis" => 519, + "tilde" => 333, "atilde" => 667, "at" => 747, "brokenbar" => 606, + "eacute" => 519, "quoteleft" => 259, "underscore" => 500, + "onesuperior" => 344, + } +); +1; diff --git a/doc/metrics/pncr8a.ph b/doc/metrics/pncr8a.ph new file mode 100644 index 0000000..d42c2f9 --- /dev/null +++ b/doc/metrics/pncr8a.ph @@ -0,0 +1,72 @@ +%PS_NewCenturySchlbk_Roman = ( + name => 'NewCenturySchlbk-Roman', + widths => { + "multiply" => 606, "Ntilde" => 815, "zero" => 556, "eth" => 500, + "Ograve" => 778, "uacute" => 611, "braceleft" => 333, + "Thorn" => 667, "zcaron" => 481, "comma" => 278, "cedilla" => 333, + "plusminus" => 606, "ccedilla" => 444, "circumflex" => 333, + "dotaccent" => 333, "asciitilde" => 606, "colon" => 278, + "onehalf" => 834, "dollar" => 556, "ntilde" => 611, + "Ocircumflex" => 778, "Oacute" => 778, "ogonek" => 333, + "ograve" => 500, "thorn" => 574, "minus" => 606, "degree" => 400, + "yen" => 556, "space" => 278, "registered" => 737, + "questiondown" => 444, "Aring" => 722, "percent" => 833, + "emdash" => 1000, "six" => 556, "Agrave" => 722, + "paragraph" => 606, "three" => 556, "numbersign" => 556, + "two" => 556, "Igrave" => 407, "oacute" => 500, + "ocircumflex" => 500, "A" => 722, "B" => 722, "C" => 722, + "D" => 778, "E" => 722, "onequarter" => 834, "F" => 667, + "G" => 778, "H" => 833, "I" => 407, "J" => 556, "K" => 778, + "L" => 667, "backslash" => 606, "asciicircum" => 606, + "periodcentered" => 278, "M" => 944, "N" => 815, "O" => 778, + "P" => 667, "aring" => 556, "Q" => 778, "R" => 722, + "Aacute" => 722, "caron" => 333, "S" => 630, "T" => 667, + "grave" => 333, "U" => 815, "agrave" => 556, "V" => 722, + "W" => 981, "equal" => 606, "question" => 444, "X" => 704, + "Y" => 704, "Z" => 611, "bracketright" => 333, "Iacute" => 407, + "ampersand" => 815, "four" => 556, "igrave" => 315, "a" => 556, + "b" => 556, "c" => 444, "d" => 574, "plus" => 606, "e" => 500, + "quotesinglbase" => 204, "f" => 333, "g" => 537, "bullet" => 606, + "h" => 611, "i" => 315, "Oslash" => 778, "dagger" => 500, + "j" => 296, "Yacute" => 704, "k" => 593, "l" => 315, "m" => 889, + "n" => 611, "o" => 500, "ordfeminine" => 334, "ring" => 333, + "p" => 574, "threesuperior" => 333, "q" => 556, "acute" => 333, + "r" => 444, "twosuperior" => 333, "aacute" => 556, "s" => 463, + "OE" => 1000, "t" => 389, "divide" => 606, "section" => 500, + "u" => 611, "v" => 537, "w" => 778, "dieresis" => 333, "x" => 537, + "y" => 537, "z" => 481, "iacute" => 315, "quotedblbase" => 389, + "hungarumlaut" => 333, "quotedbl" => 389, "mu" => 611, + "Scaron" => 630, "Lslash" => 667, "semicolon" => 278, + "oslash" => 500, "florin" => 556, "yacute" => 537, "fi" => 611, + "fl" => 611, "Acircumflex" => 722, "parenright" => 333, + "Ecircumflex" => 722, "trademark" => 1000, "Icircumflex" => 407, + "daggerdbl" => 500, "guillemotleft" => 426, "germandbls" => 574, + "macron" => 333, "Otilde" => 778, "seven" => 556, + "ellipsis" => 1000, "scaron" => 463, "ordmasculine" => 300, + "AE" => 1000, "Ucircumflex" => 815, "lslash" => 315, + "dotlessi" => 315, "sterling" => 556, "quotedblleft" => 389, + "hyphen" => 333, "guilsinglright" => 259, "quotesingle" => 204, + "eight" => 556, "exclamdown" => 296, "acircumflex" => 556, + "endash" => 556, "oe" => 833, "ecircumflex" => 500, + "copyright" => 737, "Adieresis" => 722, "Egrave" => 722, + "icircumflex" => 315, "slash" => 278, "braceright" => 333, + "Edieresis" => 722, "quotedblright" => 389, "otilde" => 500, + "Idieresis" => 407, "parenleft" => 333, "one" => 556, + "Odieresis" => 778, "ucircumflex" => 611, "bracketleft" => 333, + "Ugrave" => 815, "cent" => 556, "currency" => 556, + "logicalnot" => 606, "quoteright" => 204, "Udieresis" => 815, + "perthousand" => 1000, "Ydieresis" => 704, "Atilde" => 722, + "breve" => 333, "bar" => 606, "fraction" => 167, "Eacute" => 722, + "less" => 606, "adieresis" => 556, "guilsinglleft" => 259, + "egrave" => 500, "exclam" => 296, "edieresis" => 500, "Eth" => 778, + "idieresis" => 315, "period" => 278, "ae" => 796, + "asterisk" => 500, "odieresis" => 500, "Uacute" => 815, + "ugrave" => 611, "five" => 556, "nine" => 556, "greater" => 606, + "Zcaron" => 611, "udieresis" => 611, "threequarters" => 834, + "guillemotright" => 426, "Ccedilla" => 722, "ydieresis" => 537, + "tilde" => 333, "atilde" => 556, "at" => 737, "brokenbar" => 606, + "eacute" => 500, "quoteleft" => 204, "underscore" => 500, + "onesuperior" => 333, + } +); +1; diff --git a/doc/metrics/pncri8a.ph b/doc/metrics/pncri8a.ph new file mode 100644 index 0000000..c4c700f --- /dev/null +++ b/doc/metrics/pncri8a.ph @@ -0,0 +1,72 @@ +%PS_NewCenturySchlbk_Italic = ( + name => 'NewCenturySchlbk-Italic', + widths => { + "multiply" => 606, "Ntilde" => 815, "zero" => 556, "eth" => 500, + "Ograve" => 778, "uacute" => 611, "braceleft" => 333, + "Thorn" => 667, "zcaron" => 463, "comma" => 278, "cedilla" => 333, + "plusminus" => 606, "ccedilla" => 444, "circumflex" => 333, + "dotaccent" => 333, "asciitilde" => 606, "colon" => 278, + "onehalf" => 834, "dollar" => 556, "ntilde" => 611, + "Ocircumflex" => 778, "Oacute" => 778, "ogonek" => 333, + "ograve" => 500, "thorn" => 574, "minus" => 606, "degree" => 400, + "yen" => 556, "space" => 278, "registered" => 747, + "questiondown" => 444, "Aring" => 704, "percent" => 833, + "emdash" => 1000, "six" => 556, "Agrave" => 704, + "paragraph" => 650, "three" => 556, "numbersign" => 556, + "two" => 556, "Igrave" => 407, "oacute" => 500, + "ocircumflex" => 500, "A" => 704, "B" => 722, "C" => 722, + "D" => 778, "E" => 722, "onequarter" => 834, "F" => 667, + "G" => 778, "H" => 833, "I" => 407, "J" => 611, "K" => 741, + "L" => 667, "backslash" => 606, "asciicircum" => 606, + "periodcentered" => 278, "M" => 944, "N" => 815, "O" => 778, + "P" => 667, "aring" => 574, "Q" => 778, "R" => 741, + "Aacute" => 704, "caron" => 333, "S" => 667, "T" => 685, + "grave" => 333, "U" => 815, "agrave" => 574, "V" => 704, + "W" => 926, "equal" => 606, "question" => 444, "X" => 704, + "Y" => 685, "Z" => 667, "bracketright" => 333, "Iacute" => 407, + "ampersand" => 852, "four" => 556, "igrave" => 333, "a" => 574, + "b" => 556, "c" => 444, "d" => 611, "plus" => 606, "e" => 444, + "quotesinglbase" => 204, "f" => 333, "g" => 537, "bullet" => 606, + "h" => 611, "i" => 333, "Oslash" => 778, "dagger" => 500, + "j" => 315, "Yacute" => 685, "k" => 556, "l" => 333, "m" => 889, + "n" => 611, "o" => 500, "ordfeminine" => 422, "ring" => 333, + "p" => 574, "threesuperior" => 333, "q" => 556, "acute" => 333, + "r" => 444, "twosuperior" => 333, "aacute" => 574, "s" => 444, + "OE" => 981, "t" => 352, "divide" => 606, "section" => 500, + "u" => 611, "v" => 519, "w" => 778, "dieresis" => 333, "x" => 500, + "y" => 500, "z" => 463, "iacute" => 333, "quotedblbase" => 389, + "hungarumlaut" => 333, "quotedbl" => 400, "mu" => 611, + "Scaron" => 667, "Lslash" => 667, "semicolon" => 278, + "oslash" => 500, "florin" => 556, "yacute" => 500, "fi" => 611, + "fl" => 611, "Acircumflex" => 704, "parenright" => 333, + "Ecircumflex" => 722, "trademark" => 950, "Icircumflex" => 407, + "daggerdbl" => 500, "guillemotleft" => 426, "germandbls" => 556, + "macron" => 333, "Otilde" => 778, "seven" => 556, + "ellipsis" => 1000, "scaron" => 444, "ordmasculine" => 372, + "AE" => 870, "Ucircumflex" => 815, "lslash" => 333, + "dotlessi" => 333, "sterling" => 556, "quotedblleft" => 389, + "hyphen" => 333, "guilsinglright" => 333, "quotesingle" => 278, + "eight" => 556, "exclamdown" => 333, "acircumflex" => 574, + "endash" => 500, "oe" => 778, "ecircumflex" => 444, + "copyright" => 747, "Adieresis" => 704, "Egrave" => 722, + "icircumflex" => 333, "slash" => 606, "braceright" => 333, + "Edieresis" => 722, "quotedblright" => 389, "otilde" => 500, + "Idieresis" => 407, "parenleft" => 333, "one" => 556, + "Odieresis" => 778, "ucircumflex" => 611, "bracketleft" => 333, + "Ugrave" => 815, "cent" => 556, "currency" => 556, + "logicalnot" => 606, "quoteright" => 204, "Udieresis" => 815, + "perthousand" => 1000, "Ydieresis" => 685, "Atilde" => 704, + "breve" => 333, "bar" => 606, "fraction" => 167, "Eacute" => 722, + "less" => 606, "adieresis" => 574, "guilsinglleft" => 333, + "egrave" => 444, "exclam" => 333, "edieresis" => 444, "Eth" => 778, + "idieresis" => 333, "period" => 278, "ae" => 722, + "asterisk" => 500, "odieresis" => 500, "Uacute" => 815, + "ugrave" => 611, "five" => 556, "nine" => 556, "greater" => 606, + "Zcaron" => 667, "udieresis" => 611, "threequarters" => 834, + "guillemotright" => 426, "Ccedilla" => 722, "ydieresis" => 500, + "tilde" => 333, "atilde" => 574, "at" => 747, "brokenbar" => 606, + "eacute" => 444, "quoteleft" => 204, "underscore" => 500, + "onesuperior" => 333, + } +); +1; diff --git a/doc/metrics/pplb8a.ph b/doc/metrics/pplb8a.ph new file mode 100644 index 0000000..c624356 --- /dev/null +++ b/doc/metrics/pplb8a.ph @@ -0,0 +1,72 @@ +%PS_Palatino_Bold = ( + name => 'Palatino-Bold', + widths => { + "multiply" => 606, "Ntilde" => 833, "zero" => 500, "eth" => 556, + "Ograve" => 833, "uacute" => 611, "braceleft" => 310, + "Thorn" => 611, "zcaron" => 500, "comma" => 250, "cedilla" => 333, + "plusminus" => 606, "ccedilla" => 444, "circumflex" => 333, + "dotaccent" => 333, "asciitilde" => 606, "colon" => 250, + "onehalf" => 750, "dollar" => 500, "ntilde" => 611, + "Oacute" => 833, "Ocircumflex" => 833, "ogonek" => 333, + "ograve" => 556, "thorn" => 611, "degree" => 400, "minus" => 606, + "yen" => 500, "space" => 250, "registered" => 747, + "questiondown" => 444, "Aring" => 778, "percent" => 889, + "emdash" => 1000, "six" => 500, "Agrave" => 778, + "paragraph" => 641, "three" => 500, "numbersign" => 500, + "two" => 500, "Igrave" => 389, "oacute" => 556, + "ocircumflex" => 556, "A" => 778, "B" => 667, "C" => 722, + "D" => 833, "E" => 611, "onequarter" => 750, "F" => 556, + "G" => 833, "H" => 833, "I" => 389, "J" => 389, "K" => 778, + "L" => 611, "backslash" => 606, "asciicircum" => 606, + "periodcentered" => 250, "M" => 1000, "N" => 833, "O" => 833, + "P" => 611, "aring" => 500, "Q" => 833, "R" => 722, + "Aacute" => 778, "caron" => 333, "S" => 611, "T" => 667, + "grave" => 333, "U" => 778, "agrave" => 500, "V" => 778, + "W" => 1000, "equal" => 606, "question" => 444, "X" => 667, + "Y" => 667, "Z" => 667, "bracketright" => 333, "Iacute" => 389, + "ampersand" => 833, "four" => 500, "igrave" => 333, "a" => 500, + "b" => 611, "c" => 444, "d" => 611, "plus" => 606, "e" => 500, + "quotesinglbase" => 333, "f" => 389, "g" => 556, "bullet" => 606, + "h" => 611, "i" => 333, "Oslash" => 833, "dagger" => 500, + "j" => 333, "Yacute" => 667, "k" => 611, "l" => 333, "m" => 889, + "n" => 611, "o" => 556, "ordfeminine" => 438, "ring" => 333, + "p" => 611, "threesuperior" => 300, "q" => 611, "acute" => 333, + "r" => 389, "aacute" => 500, "twosuperior" => 300, "s" => 444, + "OE" => 1000, "t" => 333, "divide" => 606, "section" => 500, + "u" => 611, "v" => 556, "w" => 833, "dieresis" => 333, "x" => 500, + "y" => 556, "z" => 500, "iacute" => 333, "quotedblbase" => 500, + "hungarumlaut" => 333, "quotedbl" => 402, "mu" => 611, + "Scaron" => 611, "Lslash" => 611, "semicolon" => 250, + "oslash" => 556, "florin" => 500, "yacute" => 556, "fi" => 611, + "fl" => 611, "Acircumflex" => 778, "parenright" => 333, + "Ecircumflex" => 611, "Icircumflex" => 389, "trademark" => 998, + "daggerdbl" => 500, "guillemotleft" => 500, "germandbls" => 611, + "macron" => 333, "Otilde" => 833, "seven" => 500, + "ellipsis" => 1000, "scaron" => 444, "ordmasculine" => 488, + "AE" => 1000, "Ucircumflex" => 778, "lslash" => 333, + "dotlessi" => 333, "sterling" => 500, "quotedblleft" => 500, + "hyphen" => 333, "guilsinglright" => 389, "quotesingle" => 227, + "eight" => 500, "exclamdown" => 278, "acircumflex" => 500, + "endash" => 500, "oe" => 833, "ecircumflex" => 500, + "Adieresis" => 778, "copyright" => 747, "Egrave" => 611, + "icircumflex" => 333, "slash" => 296, "braceright" => 310, + "Edieresis" => 611, "quotedblright" => 500, "Idieresis" => 389, + "otilde" => 556, "parenleft" => 333, "one" => 500, + "Odieresis" => 833, "ucircumflex" => 611, "bracketleft" => 333, + "Ugrave" => 778, "cent" => 500, "currency" => 500, + "logicalnot" => 606, "quoteright" => 278, "Udieresis" => 778, + "perthousand" => 1000, "Ydieresis" => 667, "Atilde" => 778, + "breve" => 333, "bar" => 606, "fraction" => 167, "Eacute" => 611, + "less" => 606, "adieresis" => 500, "guilsinglleft" => 389, + "egrave" => 500, "exclam" => 278, "edieresis" => 500, + "idieresis" => 333, "Eth" => 833, "period" => 250, "ae" => 778, + "asterisk" => 444, "odieresis" => 556, "Uacute" => 778, + "ugrave" => 611, "five" => 500, "nine" => 500, "greater" => 606, + "udieresis" => 611, "Zcaron" => 667, "threequarters" => 750, + "guillemotright" => 500, "Ccedilla" => 722, "ydieresis" => 556, + "tilde" => 333, "atilde" => 500, "at" => 747, "brokenbar" => 606, + "eacute" => 500, "quoteleft" => 278, "underscore" => 500, + "onesuperior" => 300, + } +); +1; diff --git a/doc/metrics/pplbi8a.ph b/doc/metrics/pplbi8a.ph new file mode 100644 index 0000000..31cf0a7 --- /dev/null +++ b/doc/metrics/pplbi8a.ph @@ -0,0 +1,72 @@ +%PS_Palatino_BoldItalic = ( + name => 'Palatino-BoldItalic', + widths => { + "multiply" => 606, "Ntilde" => 778, "zero" => 500, "eth" => 556, + "Ograve" => 833, "uacute" => 556, "braceleft" => 333, + "Thorn" => 667, "zcaron" => 500, "comma" => 250, "cedilla" => 333, + "plusminus" => 606, "ccedilla" => 444, "circumflex" => 333, + "dotaccent" => 333, "asciitilde" => 606, "colon" => 250, + "onehalf" => 750, "dollar" => 500, "ntilde" => 556, + "Oacute" => 833, "Ocircumflex" => 833, "ogonek" => 333, + "ograve" => 556, "thorn" => 556, "degree" => 400, "minus" => 606, + "yen" => 500, "space" => 250, "registered" => 747, + "questiondown" => 444, "Aring" => 722, "percent" => 889, + "emdash" => 1000, "six" => 500, "Agrave" => 722, + "paragraph" => 556, "three" => 500, "numbersign" => 500, + "two" => 500, "Igrave" => 389, "oacute" => 556, + "ocircumflex" => 556, "A" => 722, "B" => 667, "C" => 685, + "D" => 778, "E" => 611, "onequarter" => 750, "F" => 556, + "G" => 778, "H" => 778, "I" => 389, "J" => 389, "K" => 722, + "L" => 611, "backslash" => 606, "asciicircum" => 606, + "periodcentered" => 250, "M" => 944, "N" => 778, "O" => 833, + "P" => 667, "aring" => 556, "Q" => 833, "R" => 722, + "Aacute" => 722, "caron" => 333, "S" => 556, "T" => 611, + "grave" => 333, "U" => 778, "agrave" => 556, "V" => 667, + "W" => 1000, "equal" => 606, "question" => 444, "X" => 722, + "Y" => 611, "Z" => 667, "bracketright" => 333, "Iacute" => 389, + "ampersand" => 833, "four" => 500, "igrave" => 333, "a" => 556, + "b" => 537, "c" => 444, "d" => 556, "plus" => 606, "e" => 444, + "quotesinglbase" => 250, "f" => 333, "g" => 500, "bullet" => 606, + "h" => 556, "i" => 333, "Oslash" => 833, "dagger" => 556, + "j" => 333, "Yacute" => 611, "k" => 556, "l" => 333, "m" => 833, + "n" => 556, "o" => 556, "ordfeminine" => 333, "ring" => 556, + "p" => 556, "threesuperior" => 300, "q" => 537, "acute" => 333, + "r" => 389, "aacute" => 556, "twosuperior" => 300, "s" => 444, + "OE" => 944, "t" => 389, "divide" => 606, "section" => 556, + "u" => 556, "v" => 556, "w" => 833, "dieresis" => 333, "x" => 500, + "y" => 556, "z" => 500, "iacute" => 333, "quotedblbase" => 500, + "hungarumlaut" => 333, "quotedbl" => 500, "mu" => 556, + "Scaron" => 556, "Lslash" => 611, "semicolon" => 250, + "oslash" => 556, "florin" => 500, "yacute" => 556, "fi" => 611, + "fl" => 611, "Acircumflex" => 722, "parenright" => 333, + "Ecircumflex" => 611, "Icircumflex" => 389, "trademark" => 1000, + "daggerdbl" => 556, "guillemotleft" => 500, "germandbls" => 556, + "macron" => 333, "Otilde" => 833, "seven" => 500, + "ellipsis" => 1000, "scaron" => 444, "ordmasculine" => 333, + "AE" => 944, "Ucircumflex" => 778, "lslash" => 333, + "dotlessi" => 333, "sterling" => 500, "quotedblleft" => 500, + "hyphen" => 389, "guilsinglright" => 333, "quotesingle" => 250, + "eight" => 500, "exclamdown" => 333, "acircumflex" => 556, + "endash" => 500, "oe" => 778, "ecircumflex" => 444, + "Adieresis" => 722, "copyright" => 747, "Egrave" => 611, + "icircumflex" => 333, "slash" => 315, "braceright" => 333, + "Edieresis" => 611, "quotedblright" => 500, "Idieresis" => 389, + "otilde" => 556, "parenleft" => 333, "one" => 500, + "Odieresis" => 833, "ucircumflex" => 556, "bracketleft" => 333, + "Ugrave" => 778, "cent" => 500, "currency" => 500, + "logicalnot" => 606, "quoteright" => 278, "Udieresis" => 778, + "perthousand" => 1000, "Ydieresis" => 611, "Atilde" => 722, + "breve" => 333, "bar" => 606, "fraction" => 167, "Eacute" => 611, + "less" => 606, "adieresis" => 556, "guilsinglleft" => 333, + "egrave" => 444, "exclam" => 333, "edieresis" => 444, + "idieresis" => 333, "Eth" => 778, "period" => 250, "ae" => 738, + "asterisk" => 444, "odieresis" => 556, "Uacute" => 778, + "ugrave" => 556, "five" => 500, "nine" => 500, "greater" => 606, + "udieresis" => 556, "Zcaron" => 667, "threequarters" => 750, + "guillemotright" => 500, "Ccedilla" => 685, "ydieresis" => 556, + "tilde" => 333, "atilde" => 556, "at" => 833, "brokenbar" => 606, + "eacute" => 444, "quoteleft" => 278, "underscore" => 500, + "onesuperior" => 300, + } +); +1; diff --git a/doc/metrics/pplr8a.ph b/doc/metrics/pplr8a.ph new file mode 100644 index 0000000..4cbd1c9 --- /dev/null +++ b/doc/metrics/pplr8a.ph @@ -0,0 +1,72 @@ +%PS_Palatino_Roman = ( + name => 'Palatino-Roman', + widths => { + "multiply" => 606, "Ntilde" => 831, "zero" => 500, "eth" => 546, + "Ograve" => 786, "uacute" => 603, "braceleft" => 333, + "Thorn" => 604, "zcaron" => 500, "comma" => 250, "cedilla" => 333, + "plusminus" => 606, "ccedilla" => 444, "circumflex" => 333, + "dotaccent" => 250, "asciitilde" => 606, "colon" => 250, + "onehalf" => 750, "dollar" => 500, "ntilde" => 582, + "Oacute" => 786, "Ocircumflex" => 786, "ogonek" => 313, + "ograve" => 546, "thorn" => 601, "degree" => 400, "minus" => 606, + "yen" => 500, "space" => 250, "registered" => 747, + "questiondown" => 444, "Aring" => 778, "percent" => 840, + "emdash" => 1000, "six" => 500, "Agrave" => 778, + "paragraph" => 628, "three" => 500, "numbersign" => 500, + "two" => 500, "Igrave" => 337, "oacute" => 546, + "ocircumflex" => 546, "A" => 778, "B" => 611, "C" => 709, + "D" => 774, "E" => 611, "onequarter" => 750, "F" => 556, + "G" => 763, "H" => 832, "I" => 337, "J" => 333, "K" => 726, + "L" => 611, "backslash" => 606, "asciicircum" => 606, + "periodcentered" => 250, "M" => 946, "N" => 831, "O" => 786, + "P" => 604, "aring" => 500, "Q" => 786, "R" => 668, + "Aacute" => 778, "caron" => 333, "S" => 525, "T" => 613, + "grave" => 333, "U" => 778, "agrave" => 500, "V" => 722, + "W" => 1000, "equal" => 606, "question" => 444, "X" => 667, + "Y" => 667, "Z" => 667, "bracketright" => 333, "Iacute" => 337, + "ampersand" => 778, "four" => 500, "igrave" => 287, "a" => 500, + "b" => 553, "c" => 444, "d" => 611, "plus" => 606, "e" => 479, + "quotesinglbase" => 278, "f" => 333, "g" => 556, "bullet" => 606, + "h" => 582, "i" => 291, "Oslash" => 833, "dagger" => 500, + "j" => 234, "Yacute" => 667, "k" => 556, "l" => 291, "m" => 883, + "n" => 582, "o" => 546, "ordfeminine" => 333, "ring" => 333, + "p" => 601, "threesuperior" => 300, "q" => 560, "acute" => 333, + "r" => 395, "aacute" => 500, "twosuperior" => 300, "s" => 424, + "OE" => 998, "t" => 326, "divide" => 606, "section" => 500, + "u" => 603, "v" => 565, "w" => 834, "dieresis" => 333, "x" => 516, + "y" => 556, "z" => 500, "iacute" => 287, "quotedblbase" => 500, + "hungarumlaut" => 380, "quotedbl" => 371, "mu" => 603, + "Scaron" => 525, "Lslash" => 611, "semicolon" => 250, + "oslash" => 556, "florin" => 500, "yacute" => 556, "fi" => 605, + "fl" => 608, "Acircumflex" => 778, "parenright" => 333, + "Ecircumflex" => 611, "Icircumflex" => 337, "trademark" => 979, + "daggerdbl" => 500, "guillemotleft" => 500, "germandbls" => 556, + "macron" => 333, "Otilde" => 786, "seven" => 500, + "ellipsis" => 1000, "scaron" => 424, "ordmasculine" => 333, + "AE" => 944, "Ucircumflex" => 778, "lslash" => 291, + "dotlessi" => 287, "sterling" => 500, "quotedblleft" => 500, + "hyphen" => 333, "guilsinglright" => 331, "quotesingle" => 208, + "eight" => 500, "exclamdown" => 278, "acircumflex" => 500, + "endash" => 500, "oe" => 827, "ecircumflex" => 479, + "Adieresis" => 778, "copyright" => 747, "Egrave" => 611, + "icircumflex" => 287, "slash" => 606, "braceright" => 333, + "Edieresis" => 611, "quotedblright" => 500, "Idieresis" => 337, + "otilde" => 546, "parenleft" => 333, "one" => 500, + "Odieresis" => 786, "ucircumflex" => 603, "bracketleft" => 333, + "Ugrave" => 778, "cent" => 500, "currency" => 500, + "logicalnot" => 606, "quoteright" => 278, "Udieresis" => 778, + "perthousand" => 1144, "Ydieresis" => 667, "Atilde" => 778, + "breve" => 333, "bar" => 606, "fraction" => 167, "Eacute" => 611, + "less" => 606, "adieresis" => 500, "guilsinglleft" => 331, + "egrave" => 479, "exclam" => 278, "edieresis" => 479, + "idieresis" => 287, "Eth" => 774, "period" => 250, "ae" => 758, + "asterisk" => 389, "odieresis" => 546, "Uacute" => 778, + "ugrave" => 603, "five" => 500, "nine" => 500, "greater" => 606, + "udieresis" => 603, "Zcaron" => 667, "threequarters" => 750, + "guillemotright" => 500, "Ccedilla" => 709, "ydieresis" => 556, + "tilde" => 333, "atilde" => 500, "at" => 747, "brokenbar" => 606, + "eacute" => 479, "quoteleft" => 278, "underscore" => 500, + "onesuperior" => 300, + } +); +1; diff --git a/doc/metrics/pplri8a.ph b/doc/metrics/pplri8a.ph new file mode 100644 index 0000000..b4a5224 --- /dev/null +++ b/doc/metrics/pplri8a.ph @@ -0,0 +1,72 @@ +%PS_Palatino_Italic = ( + name => 'Palatino-Italic', + widths => { + "multiply" => 606, "Ntilde" => 778, "zero" => 500, "eth" => 444, + "Ograve" => 778, "uacute" => 556, "braceleft" => 333, + "Thorn" => 611, "zcaron" => 444, "comma" => 250, "cedilla" => 333, + "plusminus" => 606, "ccedilla" => 407, "circumflex" => 333, + "dotaccent" => 333, "asciitilde" => 606, "colon" => 250, + "onehalf" => 750, "dollar" => 500, "ntilde" => 556, + "Oacute" => 778, "Ocircumflex" => 778, "ogonek" => 333, + "ograve" => 444, "thorn" => 500, "degree" => 400, "minus" => 606, + "yen" => 500, "space" => 250, "registered" => 747, + "questiondown" => 500, "Aring" => 722, "percent" => 889, + "emdash" => 1000, "six" => 500, "Agrave" => 722, + "paragraph" => 500, "three" => 500, "numbersign" => 500, + "two" => 500, "Igrave" => 333, "oacute" => 444, + "ocircumflex" => 444, "A" => 722, "B" => 611, "C" => 667, + "D" => 778, "E" => 611, "onequarter" => 750, "F" => 556, + "G" => 722, "H" => 778, "I" => 333, "J" => 333, "K" => 667, + "L" => 556, "backslash" => 606, "asciicircum" => 606, + "periodcentered" => 250, "M" => 944, "N" => 778, "O" => 778, + "P" => 611, "aring" => 444, "Q" => 778, "R" => 667, + "Aacute" => 722, "caron" => 333, "S" => 556, "T" => 611, + "grave" => 333, "U" => 778, "agrave" => 444, "V" => 722, + "W" => 944, "equal" => 606, "question" => 500, "X" => 722, + "Y" => 667, "Z" => 667, "bracketright" => 333, "Iacute" => 333, + "ampersand" => 778, "four" => 500, "igrave" => 278, "a" => 444, + "b" => 463, "c" => 407, "d" => 500, "plus" => 606, "e" => 389, + "quotesinglbase" => 278, "f" => 278, "g" => 500, "bullet" => 500, + "h" => 500, "i" => 278, "Oslash" => 778, "dagger" => 500, + "j" => 278, "Yacute" => 667, "k" => 444, "l" => 278, "m" => 778, + "n" => 556, "o" => 444, "ordfeminine" => 333, "ring" => 333, + "p" => 500, "threesuperior" => 300, "q" => 463, "acute" => 333, + "r" => 389, "aacute" => 444, "twosuperior" => 300, "s" => 389, + "OE" => 1028, "t" => 333, "divide" => 606, "section" => 500, + "u" => 556, "v" => 500, "w" => 722, "dieresis" => 333, "x" => 500, + "y" => 500, "z" => 444, "iacute" => 278, "quotedblbase" => 500, + "hungarumlaut" => 333, "quotedbl" => 500, "mu" => 556, + "Scaron" => 556, "Lslash" => 556, "semicolon" => 250, + "oslash" => 444, "florin" => 500, "yacute" => 500, "fi" => 528, + "fl" => 545, "Acircumflex" => 722, "parenright" => 333, + "Ecircumflex" => 611, "Icircumflex" => 333, "trademark" => 1000, + "daggerdbl" => 500, "guillemotleft" => 500, "germandbls" => 500, + "macron" => 333, "Otilde" => 778, "seven" => 500, + "ellipsis" => 1000, "scaron" => 389, "ordmasculine" => 333, + "AE" => 941, "Ucircumflex" => 778, "lslash" => 278, + "dotlessi" => 278, "sterling" => 500, "quotedblleft" => 500, + "hyphen" => 333, "guilsinglright" => 333, "quotesingle" => 333, + "eight" => 500, "exclamdown" => 333, "acircumflex" => 444, + "endash" => 500, "oe" => 669, "ecircumflex" => 389, + "Adieresis" => 722, "copyright" => 747, "Egrave" => 611, + "icircumflex" => 278, "slash" => 296, "braceright" => 333, + "Edieresis" => 611, "quotedblright" => 500, "Idieresis" => 333, + "otilde" => 444, "parenleft" => 333, "one" => 500, + "Odieresis" => 778, "ucircumflex" => 556, "bracketleft" => 333, + "Ugrave" => 778, "cent" => 500, "currency" => 500, + "logicalnot" => 606, "quoteright" => 278, "Udieresis" => 778, + "perthousand" => 1000, "Ydieresis" => 667, "Atilde" => 722, + "breve" => 333, "bar" => 606, "fraction" => 167, "Eacute" => 611, + "less" => 606, "adieresis" => 444, "guilsinglleft" => 333, + "egrave" => 389, "exclam" => 333, "edieresis" => 389, + "idieresis" => 278, "Eth" => 778, "period" => 250, "ae" => 638, + "asterisk" => 389, "odieresis" => 444, "Uacute" => 778, + "ugrave" => 556, "five" => 500, "nine" => 500, "greater" => 606, + "udieresis" => 556, "Zcaron" => 667, "threequarters" => 750, + "guillemotright" => 500, "Ccedilla" => 667, "ydieresis" => 500, + "tilde" => 333, "atilde" => 444, "at" => 747, "brokenbar" => 606, + "eacute" => 389, "quoteleft" => 278, "underscore" => 500, + "onesuperior" => 300, + } +); +1; diff --git a/doc/metrics/psyr.ph b/doc/metrics/psyr.ph new file mode 100644 index 0000000..86dd97b --- /dev/null +++ b/doc/metrics/psyr.ph @@ -0,0 +1,68 @@ +%PS_Symbol = ( + name => 'Symbol', + widths => { + "multiply" => 549, "zero" => 500, "bracketleftex" => 384, + "partialdiff" => 494, "alpha" => 631, "angle" => 768, + "arrowdblleft" => 987, "braceleft" => 480, "union" => 768, + "infinity" => 713, "comma" => 250, "copyrightsans" => 790, + "plusminus" => 549, "arrowup" => 603, "parenrightex" => 384, + "Rfraktur" => 795, "apple" => 790, "Zeta" => 611, + "parenleftbt" => 384, "braceex" => 494, "notelement" => 713, + "colon" => 278, "beta" => 549, "braceleftbt" => 494, + "Lambda" => 686, "Phi" => 763, "arrowdblup" => 603, + "arrowdown" => 603, "Ifraktur" => 686, "degree" => 400, + "space" => 250, "minus" => 549, "Iota" => 333, + "perpendicular" => 658, "radical" => 549, "asteriskmath" => 500, + "Sigma" => 592, "percent" => 833, "approxequal" => 549, + "minute" => 247, "zeta" => 494, "six" => 500, "circleplus" => 768, + "Omicron" => 722, "three" => 500, "numbersign" => 500, + "two" => 500, "weierstrass" => 987, "summation" => 713, + "bracketrighttp" => 384, "carriagereturn" => 658, "lambda" => 549, + "phi" => 521, "suchthat" => 439, "arrowvertex" => 603, + "aleph" => 823, "Delta" => 612, "Tau" => 611, "spade" => 753, + "iota" => 329, "logicaland" => 603, "sigma" => 603, + "propersuperset" => 713, "arrowhorizex" => 1000, + "bracketrightex" => 384, "omicron" => 549, "equal" => 549, + "question" => 444, "Epsilon" => 611, "bracketright" => 333, + "emptyset" => 823, "ampersand" => 778, "diamond" => 753, + "four" => 500, "Mu" => 889, "plus" => 549, "parenlefttp" => 384, + "club" => 753, "bullet" => 460, "proportional" => 713, + "Omega" => 768, "tau" => 439, "delta" => 494, "Upsilon" => 690, + "bracelefttp" => 494, "copyrightserif" => 790, "heart" => 753, + "bracerightmid" => 494, "divide" => 549, "arrowleft" => 987, + "epsilon" => 439, "logicalor" => 603, "second" => 411, + "parenleftex" => 384, "mu" => 576, "greaterequal" => 549, + "Nu" => 722, "therefore" => 863, "notsubset" => 713, + "semicolon" => 278, "omega" => 686, "arrowdblboth" => 1042, + "element" => 713, "existential" => 549, "upsilon" => 576, + "florin" => 500, "integralbt" => 686, "Psi" => 795, + "lessequal" => 549, "bracerightbt" => 494, "phi1" => 603, + "lozenge" => 494, "trademarkserif" => 890, "parenright" => 333, + "bracketleftbt" => 384, "reflexsuperset" => 713, "seven" => 500, + "braceleftmid" => 494, "sigma1" => 439, "Gamma" => 603, + "nu" => 521, "angleright" => 329, "ellipsis" => 1000, "Rho" => 556, + "notequal" => 549, "parenrightbt" => 384, "psi" => 686, + "radicalex" => 500, "eight" => 500, "angleleft" => 329, + "equivalence" => 549, "arrowdbldown" => 603, "congruent" => 549, + "Theta" => 741, "intersection" => 768, "universal" => 713, + "Pi" => 768, "arrowdblright" => 987, "slash" => 278, + "braceright" => 480, "reflexsubset" => 713, "registerserif" => 790, + "Xi" => 645, "parenleft" => 333, "one" => 500, "gamma" => 411, + "bracketleft" => 333, "theta1" => 631, "rho" => 549, + "logicalnot" => 713, "Kappa" => 722, "similar" => 549, + "circlemultiply" => 768, "Chi" => 722, "bar" => 200, + "theta" => 521, "fraction" => 167, "less" => 549, "pi" => 549, + "integraltp" => 686, "registersans" => 790, "Eta" => 722, + "exclam" => 333, "omega1" => 713, "Upsilon1" => 620, + "bracerighttp" => 494, "product" => 823, "xi" => 493, + "period" => 250, "Alpha" => 722, "arrowright" => 987, + "five" => 500, "nine" => 500, "greater" => 549, + "bracketlefttp" => 384, "kappa" => 549, "gradient" => 713, + "propersubset" => 713, "bracketrightbt" => 384, + "trademarksans" => 786, "dotmath" => 250, "integralex" => 686, + "chi" => 549, "integral" => 274, "parenrighttp" => 384, + "arrowboth" => 1042, "underscore" => 500, "eta" => 603, + "Beta" => 667, + } +); +1; diff --git a/doc/metrics/ptmb8a.ph b/doc/metrics/ptmb8a.ph new file mode 100644 index 0000000..5cf9564 --- /dev/null +++ b/doc/metrics/ptmb8a.ph @@ -0,0 +1,72 @@ +%PS_Times_Bold = ( + name => 'Times-Bold', + widths => { + "multiply" => 570, "Ntilde" => 722, "zero" => 500, "eth" => 500, + "Ograve" => 778, "uacute" => 556, "braceleft" => 394, + "Thorn" => 611, "zcaron" => 444, "comma" => 250, "cedilla" => 333, + "plusminus" => 570, "ccedilla" => 444, "circumflex" => 333, + "dotaccent" => 333, "asciitilde" => 520, "colon" => 333, + "onehalf" => 750, "dollar" => 500, "ntilde" => 556, + "Oacute" => 778, "Ocircumflex" => 778, "ogonek" => 333, + "ograve" => 500, "thorn" => 556, "degree" => 400, "minus" => 570, + "yen" => 500, "space" => 250, "registered" => 747, + "questiondown" => 500, "Aring" => 722, "percent" => 1000, + "emdash" => 1000, "six" => 500, "Agrave" => 722, + "paragraph" => 540, "three" => 500, "numbersign" => 500, + "two" => 500, "Igrave" => 389, "oacute" => 500, + "ocircumflex" => 500, "A" => 722, "B" => 667, "C" => 722, + "D" => 722, "E" => 667, "onequarter" => 750, "F" => 611, + "G" => 778, "H" => 778, "I" => 389, "J" => 500, "K" => 778, + "L" => 667, "backslash" => 278, "asciicircum" => 581, + "periodcentered" => 250, "M" => 944, "N" => 722, "O" => 778, + "P" => 611, "aring" => 500, "Q" => 778, "R" => 722, + "Aacute" => 722, "caron" => 333, "S" => 556, "T" => 667, + "grave" => 333, "U" => 722, "agrave" => 500, "V" => 722, + "W" => 1000, "equal" => 570, "question" => 500, "X" => 722, + "Y" => 722, "Z" => 667, "bracketright" => 333, "Iacute" => 389, + "ampersand" => 833, "four" => 500, "igrave" => 278, "a" => 500, + "b" => 556, "c" => 444, "d" => 556, "plus" => 570, "e" => 444, + "quotesinglbase" => 333, "f" => 333, "g" => 500, "bullet" => 350, + "h" => 556, "i" => 278, "Oslash" => 778, "dagger" => 500, + "j" => 333, "Yacute" => 722, "k" => 556, "l" => 278, "m" => 833, + "n" => 556, "o" => 500, "ordfeminine" => 300, "ring" => 333, + "p" => 556, "threesuperior" => 300, "q" => 556, "acute" => 333, + "r" => 444, "aacute" => 500, "twosuperior" => 300, "s" => 389, + "OE" => 1000, "t" => 333, "divide" => 570, "section" => 500, + "u" => 556, "v" => 500, "w" => 722, "dieresis" => 333, "x" => 500, + "y" => 500, "z" => 444, "iacute" => 278, "quotedblbase" => 500, + "hungarumlaut" => 333, "quotedbl" => 555, "mu" => 556, + "Scaron" => 556, "Lslash" => 667, "semicolon" => 333, + "oslash" => 500, "florin" => 500, "yacute" => 500, "fi" => 556, + "fl" => 556, "Acircumflex" => 722, "parenright" => 333, + "Ecircumflex" => 667, "Icircumflex" => 389, "trademark" => 1000, + "daggerdbl" => 500, "guillemotleft" => 500, "germandbls" => 556, + "macron" => 333, "Otilde" => 778, "seven" => 500, + "ellipsis" => 1000, "scaron" => 389, "ordmasculine" => 330, + "AE" => 1000, "Ucircumflex" => 722, "lslash" => 278, + "dotlessi" => 278, "sterling" => 500, "quotedblleft" => 500, + "hyphen" => 333, "guilsinglright" => 333, "quotesingle" => 278, + "eight" => 500, "exclamdown" => 333, "acircumflex" => 500, + "endash" => 500, "oe" => 722, "ecircumflex" => 444, + "Adieresis" => 722, "copyright" => 747, "Egrave" => 667, + "icircumflex" => 278, "slash" => 278, "braceright" => 394, + "Edieresis" => 667, "quotedblright" => 500, "Idieresis" => 389, + "otilde" => 500, "parenleft" => 333, "one" => 500, + "Odieresis" => 778, "ucircumflex" => 556, "bracketleft" => 333, + "Ugrave" => 722, "cent" => 500, "currency" => 500, + "logicalnot" => 570, "quoteright" => 333, "Udieresis" => 722, + "perthousand" => 1000, "Ydieresis" => 722, "Atilde" => 722, + "breve" => 333, "bar" => 220, "fraction" => 167, "Eacute" => 667, + "less" => 570, "adieresis" => 500, "guilsinglleft" => 333, + "egrave" => 444, "exclam" => 333, "edieresis" => 444, + "idieresis" => 278, "Eth" => 722, "period" => 250, "ae" => 722, + "asterisk" => 500, "odieresis" => 500, "Uacute" => 722, + "ugrave" => 556, "five" => 500, "nine" => 500, "greater" => 570, + "udieresis" => 556, "Zcaron" => 667, "threequarters" => 750, + "guillemotright" => 500, "Ccedilla" => 722, "ydieresis" => 500, + "tilde" => 333, "atilde" => 500, "at" => 930, "brokenbar" => 220, + "eacute" => 444, "quoteleft" => 333, "underscore" => 500, + "onesuperior" => 300, + } +); +1; diff --git a/doc/metrics/ptmbi8a.ph b/doc/metrics/ptmbi8a.ph new file mode 100644 index 0000000..ada7e23 --- /dev/null +++ b/doc/metrics/ptmbi8a.ph @@ -0,0 +1,72 @@ +%PS_Times_BoldItalic = ( + name => 'Times-BoldItalic', + widths => { + "multiply" => 570, "Ntilde" => 722, "zero" => 500, "eth" => 500, + "Ograve" => 722, "uacute" => 556, "braceleft" => 348, + "Thorn" => 611, "zcaron" => 389, "comma" => 250, "cedilla" => 333, + "plusminus" => 570, "ccedilla" => 444, "circumflex" => 333, + "dotaccent" => 333, "asciitilde" => 570, "colon" => 333, + "onehalf" => 750, "dollar" => 500, "ntilde" => 556, + "Oacute" => 722, "Ocircumflex" => 722, "ogonek" => 333, + "ograve" => 500, "thorn" => 500, "degree" => 400, "minus" => 606, + "yen" => 500, "space" => 250, "registered" => 747, + "questiondown" => 500, "Aring" => 667, "percent" => 833, + "emdash" => 1000, "six" => 500, "Agrave" => 667, + "paragraph" => 500, "three" => 500, "numbersign" => 500, + "two" => 500, "Igrave" => 389, "oacute" => 500, + "ocircumflex" => 500, "A" => 667, "B" => 667, "C" => 667, + "D" => 722, "E" => 667, "onequarter" => 750, "F" => 667, + "G" => 722, "H" => 778, "I" => 389, "J" => 500, "K" => 667, + "L" => 611, "backslash" => 278, "asciicircum" => 570, + "periodcentered" => 250, "M" => 889, "N" => 722, "O" => 722, + "P" => 611, "aring" => 500, "Q" => 722, "R" => 667, + "Aacute" => 667, "caron" => 333, "S" => 556, "T" => 611, + "grave" => 333, "U" => 722, "agrave" => 500, "V" => 667, + "W" => 889, "equal" => 570, "question" => 500, "X" => 667, + "Y" => 611, "Z" => 611, "bracketright" => 333, "Iacute" => 389, + "ampersand" => 778, "four" => 500, "igrave" => 278, "a" => 500, + "b" => 500, "c" => 444, "d" => 500, "plus" => 570, "e" => 444, + "quotesinglbase" => 333, "f" => 333, "g" => 500, "bullet" => 350, + "h" => 556, "i" => 278, "Oslash" => 722, "dagger" => 500, + "j" => 278, "Yacute" => 611, "k" => 500, "l" => 278, "m" => 778, + "n" => 556, "o" => 500, "ordfeminine" => 266, "ring" => 333, + "p" => 500, "threesuperior" => 300, "q" => 500, "acute" => 333, + "r" => 389, "aacute" => 500, "twosuperior" => 300, "s" => 389, + "OE" => 944, "t" => 278, "divide" => 570, "section" => 500, + "u" => 556, "v" => 444, "w" => 667, "dieresis" => 333, "x" => 500, + "y" => 444, "z" => 389, "iacute" => 278, "quotedblbase" => 500, + "hungarumlaut" => 333, "quotedbl" => 555, "mu" => 576, + "Scaron" => 556, "Lslash" => 611, "semicolon" => 333, + "oslash" => 500, "florin" => 500, "yacute" => 444, "fi" => 556, + "fl" => 556, "Acircumflex" => 667, "parenright" => 333, + "Ecircumflex" => 667, "Icircumflex" => 389, "trademark" => 1000, + "daggerdbl" => 500, "guillemotleft" => 500, "germandbls" => 500, + "macron" => 333, "Otilde" => 722, "seven" => 500, + "ellipsis" => 1000, "scaron" => 389, "ordmasculine" => 300, + "AE" => 944, "Ucircumflex" => 722, "lslash" => 278, + "dotlessi" => 278, "sterling" => 500, "quotedblleft" => 500, + "hyphen" => 333, "guilsinglright" => 333, "quotesingle" => 278, + "eight" => 500, "exclamdown" => 389, "acircumflex" => 500, + "endash" => 500, "oe" => 722, "ecircumflex" => 444, + "Adieresis" => 667, "copyright" => 747, "Egrave" => 667, + "icircumflex" => 278, "slash" => 278, "braceright" => 348, + "Edieresis" => 667, "quotedblright" => 500, "Idieresis" => 389, + "otilde" => 500, "parenleft" => 333, "one" => 500, + "Odieresis" => 722, "ucircumflex" => 556, "bracketleft" => 333, + "Ugrave" => 722, "cent" => 500, "currency" => 500, + "logicalnot" => 606, "quoteright" => 333, "Udieresis" => 722, + "perthousand" => 1000, "Ydieresis" => 611, "Atilde" => 667, + "breve" => 333, "bar" => 220, "fraction" => 167, "Eacute" => 667, + "less" => 570, "adieresis" => 500, "guilsinglleft" => 333, + "egrave" => 444, "exclam" => 389, "edieresis" => 444, + "idieresis" => 278, "Eth" => 722, "period" => 250, "ae" => 722, + "asterisk" => 500, "odieresis" => 500, "Uacute" => 722, + "ugrave" => 556, "five" => 500, "nine" => 500, "greater" => 570, + "udieresis" => 556, "Zcaron" => 611, "threequarters" => 750, + "guillemotright" => 500, "Ccedilla" => 667, "ydieresis" => 444, + "tilde" => 333, "atilde" => 500, "at" => 832, "brokenbar" => 220, + "eacute" => 444, "quoteleft" => 333, "underscore" => 500, + "onesuperior" => 300, + } +); +1; diff --git a/doc/metrics/ptmr8a.ph b/doc/metrics/ptmr8a.ph new file mode 100644 index 0000000..a25fd3e --- /dev/null +++ b/doc/metrics/ptmr8a.ph @@ -0,0 +1,72 @@ +%PS_Times_Roman = ( + name => 'Times-Roman', + widths => { + "multiply" => 564, "Ntilde" => 722, "zero" => 500, "eth" => 500, + "Ograve" => 722, "uacute" => 500, "braceleft" => 480, + "Thorn" => 556, "zcaron" => 444, "comma" => 250, "cedilla" => 333, + "plusminus" => 564, "ccedilla" => 444, "circumflex" => 333, + "dotaccent" => 333, "asciitilde" => 541, "colon" => 278, + "onehalf" => 750, "dollar" => 500, "ntilde" => 500, + "Oacute" => 722, "Ocircumflex" => 722, "ogonek" => 333, + "ograve" => 500, "thorn" => 500, "degree" => 400, "minus" => 564, + "yen" => 500, "space" => 250, "registered" => 760, + "questiondown" => 444, "Aring" => 722, "percent" => 833, + "emdash" => 1000, "six" => 500, "Agrave" => 722, + "paragraph" => 453, "three" => 500, "numbersign" => 500, + "two" => 500, "Igrave" => 333, "oacute" => 500, + "ocircumflex" => 500, "A" => 722, "B" => 667, "C" => 667, + "D" => 722, "E" => 611, "onequarter" => 750, "F" => 556, + "G" => 722, "H" => 722, "I" => 333, "J" => 389, "K" => 722, + "L" => 611, "backslash" => 278, "asciicircum" => 469, + "periodcentered" => 250, "M" => 889, "N" => 722, "O" => 722, + "P" => 556, "aring" => 444, "Q" => 722, "R" => 667, + "Aacute" => 722, "caron" => 333, "S" => 556, "T" => 611, + "grave" => 333, "U" => 722, "agrave" => 444, "V" => 722, + "W" => 944, "equal" => 564, "question" => 444, "X" => 722, + "Y" => 722, "Z" => 611, "bracketright" => 333, "Iacute" => 333, + "ampersand" => 778, "four" => 500, "igrave" => 278, "a" => 444, + "b" => 500, "c" => 444, "d" => 500, "plus" => 564, "e" => 444, + "quotesinglbase" => 333, "f" => 333, "g" => 500, "bullet" => 350, + "h" => 500, "i" => 278, "Oslash" => 722, "dagger" => 500, + "j" => 278, "Yacute" => 722, "k" => 500, "l" => 278, "m" => 778, + "n" => 500, "o" => 500, "ordfeminine" => 276, "ring" => 333, + "p" => 500, "threesuperior" => 300, "q" => 500, "acute" => 333, + "r" => 333, "aacute" => 444, "twosuperior" => 300, "s" => 389, + "OE" => 889, "t" => 278, "divide" => 564, "section" => 500, + "u" => 500, "v" => 500, "w" => 722, "dieresis" => 333, "x" => 500, + "y" => 500, "z" => 444, "iacute" => 278, "quotedblbase" => 444, + "hungarumlaut" => 333, "quotedbl" => 408, "mu" => 500, + "Scaron" => 556, "Lslash" => 611, "semicolon" => 278, + "oslash" => 500, "florin" => 500, "yacute" => 500, "fi" => 556, + "fl" => 556, "Acircumflex" => 722, "parenright" => 333, + "Ecircumflex" => 611, "Icircumflex" => 333, "trademark" => 980, + "daggerdbl" => 500, "guillemotleft" => 500, "germandbls" => 500, + "macron" => 333, "Otilde" => 722, "seven" => 500, + "ellipsis" => 1000, "scaron" => 389, "ordmasculine" => 310, + "AE" => 889, "Ucircumflex" => 722, "lslash" => 278, + "dotlessi" => 278, "sterling" => 500, "quotedblleft" => 444, + "hyphen" => 333, "guilsinglright" => 333, "quotesingle" => 180, + "eight" => 500, "exclamdown" => 333, "acircumflex" => 444, + "endash" => 500, "oe" => 722, "ecircumflex" => 444, + "Adieresis" => 722, "copyright" => 760, "Egrave" => 611, + "icircumflex" => 278, "slash" => 278, "braceright" => 480, + "Edieresis" => 611, "quotedblright" => 444, "Idieresis" => 333, + "otilde" => 500, "parenleft" => 333, "one" => 500, + "Odieresis" => 722, "ucircumflex" => 500, "bracketleft" => 333, + "Ugrave" => 722, "cent" => 500, "currency" => 500, + "logicalnot" => 564, "quoteright" => 333, "Udieresis" => 722, + "perthousand" => 1000, "Ydieresis" => 722, "Atilde" => 722, + "breve" => 333, "bar" => 200, "fraction" => 167, "Eacute" => 611, + "less" => 564, "adieresis" => 444, "guilsinglleft" => 333, + "egrave" => 444, "exclam" => 333, "edieresis" => 444, + "idieresis" => 278, "Eth" => 722, "period" => 250, "ae" => 667, + "asterisk" => 500, "odieresis" => 500, "Uacute" => 722, + "ugrave" => 500, "five" => 500, "nine" => 500, "greater" => 564, + "udieresis" => 500, "Zcaron" => 611, "threequarters" => 750, + "guillemotright" => 500, "Ccedilla" => 667, "ydieresis" => 500, + "tilde" => 333, "atilde" => 444, "at" => 921, "brokenbar" => 200, + "eacute" => 444, "quoteleft" => 333, "underscore" => 500, + "onesuperior" => 300, + } +); +1; diff --git a/doc/metrics/ptmri8a.ph b/doc/metrics/ptmri8a.ph new file mode 100644 index 0000000..2edb4ff --- /dev/null +++ b/doc/metrics/ptmri8a.ph @@ -0,0 +1,71 @@ +%PS_Times_Italic = ( + name => 'Times-Italic', + widths => { + "multiply" => 675, "Ntilde" => 667, "zero" => 500, "eth" => 500, + "Ograve" => 722, "uacute" => 500, "braceleft" => 400, + "Thorn" => 611, "zcaron" => 389, "comma" => 250, "cedilla" => 333, + "plusminus" => 675, "ccedilla" => 444, "circumflex" => 333, + "dotaccent" => 333, "asciitilde" => 541, "colon" => 333, + "onehalf" => 750, "dollar" => 500, "ntilde" => 500, + "Oacute" => 722, "Ocircumflex" => 722, "ogonek" => 333, + "ograve" => 500, "thorn" => 500, "degree" => 400, "minus" => 675, + "yen" => 500, "space" => 250, "registered" => 760, + "questiondown" => 500, "Aring" => 611, "percent" => 833, + "emdash" => 889, "six" => 500, "Agrave" => 611, "paragraph" => 523, + "three" => 500, "numbersign" => 500, "two" => 500, "Igrave" => 333, + "oacute" => 500, "ocircumflex" => 500, "A" => 611, "B" => 611, + "C" => 667, "D" => 722, "E" => 611, "onequarter" => 750, + "F" => 611, "G" => 722, "H" => 722, "I" => 333, "J" => 444, + "K" => 667, "L" => 556, "backslash" => 278, "asciicircum" => 422, + "periodcentered" => 250, "M" => 833, "N" => 667, "O" => 722, + "P" => 611, "aring" => 500, "Q" => 722, "R" => 611, + "Aacute" => 611, "caron" => 333, "S" => 500, "T" => 556, + "grave" => 333, "U" => 722, "agrave" => 500, "V" => 611, + "W" => 833, "equal" => 675, "question" => 500, "X" => 611, + "Y" => 556, "Z" => 556, "bracketright" => 389, "Iacute" => 333, + "ampersand" => 778, "four" => 500, "igrave" => 278, "a" => 500, + "b" => 500, "c" => 444, "d" => 500, "plus" => 675, "e" => 444, + "quotesinglbase" => 333, "f" => 278, "g" => 500, "bullet" => 350, + "h" => 500, "i" => 278, "Oslash" => 722, "dagger" => 500, + "j" => 278, "Yacute" => 556, "k" => 444, "l" => 278, "m" => 722, + "n" => 500, "o" => 500, "ordfeminine" => 276, "ring" => 333, + "p" => 500, "threesuperior" => 300, "q" => 500, "acute" => 333, + "r" => 389, "aacute" => 500, "twosuperior" => 300, "s" => 389, + "OE" => 944, "t" => 278, "divide" => 675, "section" => 500, + "u" => 500, "v" => 444, "w" => 667, "dieresis" => 333, "x" => 444, + "y" => 444, "z" => 389, "iacute" => 278, "quotedblbase" => 556, + "hungarumlaut" => 333, "quotedbl" => 420, "mu" => 500, + "Scaron" => 500, "Lslash" => 556, "semicolon" => 333, + "oslash" => 500, "florin" => 500, "yacute" => 444, "fi" => 500, + "fl" => 500, "Acircumflex" => 611, "parenright" => 333, + "Ecircumflex" => 611, "Icircumflex" => 333, "trademark" => 980, + "daggerdbl" => 500, "guillemotleft" => 500, "germandbls" => 500, + "macron" => 333, "Otilde" => 722, "seven" => 500, + "ellipsis" => 889, "scaron" => 389, "ordmasculine" => 310, + "AE" => 889, "Ucircumflex" => 722, "lslash" => 278, + "dotlessi" => 278, "sterling" => 500, "quotedblleft" => 556, + "hyphen" => 333, "guilsinglright" => 333, "quotesingle" => 214, + "eight" => 500, "exclamdown" => 389, "acircumflex" => 500, + "endash" => 500, "oe" => 667, "ecircumflex" => 444, + "Adieresis" => 611, "copyright" => 760, "Egrave" => 611, + "icircumflex" => 278, "slash" => 278, "braceright" => 400, + "Edieresis" => 611, "quotedblright" => 556, "Idieresis" => 333, + "otilde" => 500, "parenleft" => 333, "one" => 500, + "Odieresis" => 722, "ucircumflex" => 500, "bracketleft" => 389, + "Ugrave" => 722, "cent" => 500, "currency" => 500, + "logicalnot" => 675, "quoteright" => 333, "Udieresis" => 722, + "perthousand" => 1000, "Ydieresis" => 556, "Atilde" => 611, + "breve" => 333, "bar" => 275, "fraction" => 167, "Eacute" => 611, + "less" => 675, "adieresis" => 500, "guilsinglleft" => 333, + "egrave" => 444, "exclam" => 333, "edieresis" => 444, + "idieresis" => 278, "Eth" => 722, "period" => 250, "ae" => 667, + "asterisk" => 500, "odieresis" => 500, "Uacute" => 722, + "ugrave" => 500, "five" => 500, "nine" => 500, "greater" => 675, + "udieresis" => 500, "Zcaron" => 556, "threequarters" => 750, + "guillemotright" => 500, "Ccedilla" => 667, "ydieresis" => 444, + "tilde" => 333, "atilde" => 500, "at" => 920, "brokenbar" => 275, + "eacute" => 444, "quoteleft" => 333, "underscore" => 500, + "onesuperior" => 300, + } +); +1; diff --git a/doc/metrics/putb8a.ph b/doc/metrics/putb8a.ph new file mode 100644 index 0000000..fe8b24d --- /dev/null +++ b/doc/metrics/putb8a.ph @@ -0,0 +1,72 @@ +%PS_Utopia_Bold = ( + name => 'Utopia-Bold', + widths => { + "Ntilde" => 739, "multiply" => 600, "zero" => 560, "eth" => 585, + "Ograve" => 768, "uacute" => 629, "braceleft" => 365, + "Thorn" => 640, "zcaron" => 483, "comma" => 280, "cedilla" => 430, + "plusminus" => 600, "ccedilla" => 494, "circumflex" => 430, + "dotaccent" => 430, "asciitilde" => 600, "colon" => 280, + "onehalf" => 900, "dollar" => 560, "ntilde" => 638, + "Ocircumflex" => 768, "Oacute" => 768, "ogonek" => 430, + "ograve" => 585, "thorn" => 609, "degree" => 396, "minus" => 600, + "yen" => 560, "space" => 210, "registered" => 800, + "questiondown" => 456, "Aring" => 644, "percent" => 887, + "emdash" => 1000, "six" => 560, "Agrave" => 644, + "paragraph" => 552, "three" => 560, "numbersign" => 560, + "two" => 560, "Igrave" => 384, "ocircumflex" => 585, + "oacute" => 585, "A" => 644, "B" => 683, "C" => 689, "D" => 777, + "E" => 629, "onequarter" => 900, "F" => 593, "G" => 726, + "H" => 807, "I" => 384, "J" => 386, "K" => 707, "L" => 585, + "backslash" => 379, "asciicircum" => 600, "periodcentered" => 280, + "M" => 918, "N" => 739, "O" => 768, "P" => 650, "aring" => 544, + "Q" => 768, "R" => 684, "Aacute" => 644, "caron" => 430, + "S" => 561, "T" => 624, "grave" => 430, "U" => 786, + "agrave" => 544, "V" => 645, "W" => 933, "equal" => 600, + "question" => 456, "X" => 634, "Y" => 617, "Z" => 614, + "bracketright" => 335, "Iacute" => 384, "ampersand" => 748, + "four" => 560, "igrave" => 316, "a" => 544, "b" => 605, "c" => 494, + "d" => 605, "plus" => 600, "e" => 519, "quotesinglbase" => 252, + "f" => 342, "g" => 533, "bullet" => 455, "h" => 631, "i" => 316, + "Oslash" => 768, "dagger" => 510, "j" => 316, "Yacute" => 617, + "k" => 582, "l" => 309, "m" => 948, "n" => 638, "o" => 585, + "ordfeminine" => 405, "ring" => 430, "p" => 615, + "threesuperior" => 402, "q" => 597, "acute" => 430, "r" => 440, + "aacute" => 544, "twosuperior" => 402, "s" => 446, "OE" => 1049, + "t" => 370, "divide" => 600, "section" => 566, "u" => 629, + "v" => 520, "w" => 774, "dieresis" => 430, "x" => 522, "y" => 524, + "z" => 483, "iacute" => 316, "quotedblbase" => 473, + "hungarumlaut" => 430, "quotedbl" => 473, "mu" => 629, + "Scaron" => 561, "Lslash" => 591, "semicolon" => 280, + "oslash" => 585, "florin" => 560, "yacute" => 524, "fi" => 639, + "fl" => 639, "Acircumflex" => 644, "parenright" => 365, + "Ecircumflex" => 629, "Icircumflex" => 384, "trademark" => 1090, + "daggerdbl" => 486, "guillemotleft" => 487, "germandbls" => 662, + "macron" => 430, "Otilde" => 768, "seven" => 560, + "ellipsis" => 1000, "scaron" => 446, "ordmasculine" => 427, + "AE" => 879, "Ucircumflex" => 786, "lslash" => 321, + "dotlessi" => 316, "sterling" => 560, "quotedblleft" => 473, + "hyphen" => 392, "guilsinglright" => 287, "quotesingle" => 252, + "eight" => 560, "exclamdown" => 278, "acircumflex" => 544, + "endash" => 500, "oe" => 866, "ecircumflex" => 519, + "copyright" => 800, "Adieresis" => 644, "Egrave" => 629, + "icircumflex" => 316, "slash" => 378, "braceright" => 365, + "Edieresis" => 629, "quotedblright" => 473, "Idieresis" => 384, + "otilde" => 585, "parenleft" => 365, "one" => 560, + "ucircumflex" => 629, "Odieresis" => 768, "bracketleft" => 335, + "Ugrave" => 786, "cent" => 560, "currency" => 560, + "logicalnot" => 600, "quoteright" => 252, "Udieresis" => 786, + "perthousand" => 1289, "Ydieresis" => 617, "Atilde" => 644, + "breve" => 430, "bar" => 284, "fraction" => 100, "Eacute" => 629, + "less" => 600, "adieresis" => 544, "guilsinglleft" => 287, + "egrave" => 519, "exclam" => 278, "edieresis" => 519, "Eth" => 783, + "idieresis" => 316, "period" => 280, "ae" => 806, + "asterisk" => 442, "Uacute" => 786, "odieresis" => 585, + "ugrave" => 629, "five" => 560, "nine" => 560, "greater" => 600, + "udieresis" => 629, "Zcaron" => 614, "threequarters" => 900, + "guillemotright" => 487, "Ccedilla" => 689, "ydieresis" => 524, + "tilde" => 430, "atilde" => 544, "at" => 833, "brokenbar" => 284, + "eacute" => 519, "quoteleft" => 252, "underscore" => 500, + "onesuperior" => 402, + } +); +1; diff --git a/doc/metrics/putbi8a.ph b/doc/metrics/putbi8a.ph new file mode 100644 index 0000000..aeb8174 --- /dev/null +++ b/doc/metrics/putbi8a.ph @@ -0,0 +1,72 @@ +%PS_Utopia_BoldItalic = ( + name => 'Utopia-BoldItalic', + widths => { + "Ntilde" => 741, "multiply" => 600, "zero" => 560, "eth" => 562, + "Ograve" => 761, "uacute" => 634, "braceleft" => 340, + "Thorn" => 629, "zcaron" => 466, "comma" => 280, "cedilla" => 400, + "plusminus" => 600, "ccedilla" => 456, "circumflex" => 400, + "dotaccent" => 402, "asciitilde" => 600, "colon" => 280, + "onehalf" => 940, "dollar" => 560, "ntilde" => 635, + "Ocircumflex" => 761, "Oacute" => 761, "ogonek" => 350, + "ograve" => 562, "thorn" => 600, "degree" => 375, "minus" => 600, + "yen" => 560, "space" => 210, "registered" => 824, + "questiondown" => 454, "Aring" => 634, "percent" => 896, + "emdash" => 1000, "six" => 560, "Agrave" => 634, + "paragraph" => 580, "three" => 560, "numbersign" => 560, + "two" => 560, "Igrave" => 386, "ocircumflex" => 562, + "oacute" => 562, "A" => 634, "B" => 680, "C" => 672, "D" => 774, + "E" => 622, "onequarter" => 940, "F" => 585, "G" => 726, + "H" => 800, "I" => 386, "J" => 388, "K" => 688, "L" => 586, + "backslash" => 460, "asciicircum" => 600, "periodcentered" => 280, + "M" => 921, "N" => 741, "O" => 761, "P" => 660, "aring" => 596, + "Q" => 761, "R" => 681, "Aacute" => 634, "caron" => 400, + "S" => 551, "T" => 616, "grave" => 400, "U" => 776, + "agrave" => 596, "V" => 630, "W" => 920, "equal" => 600, + "question" => 454, "X" => 630, "Y" => 622, "Z" => 618, + "bracketright" => 350, "Iacute" => 386, "ampersand" => 752, + "four" => 560, "igrave" => 339, "a" => 596, "b" => 586, "c" => 456, + "d" => 609, "plus" => 600, "e" => 476, "quotesinglbase" => 246, + "f" => 348, "g" => 522, "bullet" => 465, "h" => 629, "i" => 339, + "Oslash" => 761, "dagger" => 514, "j" => 333, "Yacute" => 622, + "k" => 570, "l" => 327, "m" => 914, "n" => 635, "o" => 562, + "ordfeminine" => 444, "ring" => 400, "p" => 606, + "threesuperior" => 402, "q" => 584, "acute" => 400, "r" => 440, + "aacute" => 596, "twosuperior" => 402, "s" => 417, "OE" => 1016, + "t" => 359, "divide" => 600, "section" => 568, "u" => 634, + "v" => 518, "w" => 795, "dieresis" => 400, "x" => 516, "y" => 489, + "z" => 466, "iacute" => 339, "quotedblbase" => 455, + "hungarumlaut" => 400, "quotedbl" => 455, "mu" => 634, + "Scaron" => 551, "Lslash" => 592, "semicolon" => 280, + "oslash" => 562, "florin" => 560, "yacute" => 489, "fi" => 651, + "fl" => 652, "Acircumflex" => 634, "parenright" => 350, + "Ecircumflex" => 622, "Icircumflex" => 386, "trademark" => 1100, + "daggerdbl" => 490, "guillemotleft" => 560, "germandbls" => 628, + "macron" => 400, "Otilde" => 761, "seven" => 560, + "ellipsis" => 1000, "scaron" => 417, "ordmasculine" => 412, + "AE" => 890, "Ucircumflex" => 776, "lslash" => 339, + "dotlessi" => 339, "sterling" => 560, "quotedblleft" => 455, + "hyphen" => 392, "guilsinglright" => 360, "quotesingle" => 246, + "eight" => 560, "exclamdown" => 285, "acircumflex" => 596, + "endash" => 500, "oe" => 811, "ecircumflex" => 476, + "copyright" => 824, "Adieresis" => 634, "Egrave" => 622, + "icircumflex" => 339, "slash" => 260, "braceright" => 340, + "Edieresis" => 622, "quotedblright" => 455, "Idieresis" => 386, + "otilde" => 562, "parenleft" => 350, "one" => 560, + "ucircumflex" => 634, "Odieresis" => 761, "bracketleft" => 350, + "Ugrave" => 776, "cent" => 560, "currency" => 560, + "logicalnot" => 600, "quoteright" => 246, "Udieresis" => 776, + "perthousand" => 1297, "Ydieresis" => 622, "Atilde" => 634, + "breve" => 400, "bar" => 265, "fraction" => 100, "Eacute" => 622, + "less" => 600, "adieresis" => 596, "guilsinglleft" => 360, + "egrave" => 476, "exclam" => 285, "edieresis" => 476, "Eth" => 780, + "idieresis" => 339, "period" => 280, "ae" => 789, + "asterisk" => 500, "Uacute" => 776, "odieresis" => 562, + "ugrave" => 634, "five" => 560, "nine" => 560, "greater" => 600, + "udieresis" => 634, "Zcaron" => 618, "threequarters" => 940, + "guillemotright" => 560, "Ccedilla" => 672, "ydieresis" => 489, + "tilde" => 400, "atilde" => 596, "at" => 828, "brokenbar" => 265, + "eacute" => 476, "quoteleft" => 246, "underscore" => 500, + "onesuperior" => 402, + } +); +1; diff --git a/doc/metrics/putr8a.ph b/doc/metrics/putr8a.ph new file mode 100644 index 0000000..7f305b8 --- /dev/null +++ b/doc/metrics/putr8a.ph @@ -0,0 +1,72 @@ +%PS_Utopia_Regular = ( + name => 'Utopia-Regular', + widths => { + "Ntilde" => 780, "multiply" => 570, "zero" => 530, "eth" => 577, + "Ograve" => 762, "uacute" => 606, "braceleft" => 340, + "Thorn" => 593, "zcaron" => 480, "comma" => 265, "cedilla" => 400, + "plusminus" => 570, "ccedilla" => 496, "circumflex" => 400, + "dotaccent" => 400, "asciitilde" => 570, "colon" => 265, + "onehalf" => 860, "dollar" => 530, "ntilde" => 619, + "Ocircumflex" => 762, "Oacute" => 762, "ogonek" => 400, + "ograve" => 577, "thorn" => 606, "degree" => 350, "minus" => 570, + "yen" => 530, "space" => 225, "registered" => 818, + "questiondown" => 389, "Aring" => 627, "percent" => 838, + "emdash" => 1000, "six" => 530, "Agrave" => 635, + "paragraph" => 555, "three" => 530, "numbersign" => 530, + "two" => 530, "Igrave" => 349, "ocircumflex" => 577, + "oacute" => 577, "A" => 635, "B" => 646, "C" => 684, "D" => 779, + "E" => 606, "onequarter" => 860, "F" => 580, "G" => 734, + "H" => 798, "I" => 349, "J" => 350, "K" => 658, "L" => 568, + "backslash" => 460, "asciicircum" => 570, "periodcentered" => 265, + "M" => 944, "N" => 780, "O" => 762, "P" => 600, "aring" => 523, + "Q" => 762, "R" => 644, "Aacute" => 635, "caron" => 400, + "S" => 541, "T" => 621, "grave" => 400, "U" => 791, + "agrave" => 523, "V" => 634, "W" => 940, "equal" => 570, + "question" => 389, "X" => 624, "Y" => 588, "Z" => 610, + "bracketright" => 330, "Iacute" => 349, "ampersand" => 706, + "four" => 530, "igrave" => 291, "a" => 523, "b" => 598, "c" => 496, + "d" => 598, "plus" => 570, "e" => 514, "quotesinglbase" => 278, + "f" => 319, "g" => 520, "bullet" => 409, "h" => 607, "i" => 291, + "Oslash" => 762, "dagger" => 504, "j" => 280, "Yacute" => 588, + "k" => 524, "l" => 279, "m" => 923, "n" => 619, "o" => 577, + "ordfeminine" => 390, "ring" => 400, "p" => 608, + "threesuperior" => 380, "q" => 591, "acute" => 400, "r" => 389, + "aacute" => 523, "twosuperior" => 380, "s" => 436, "OE" => 1025, + "t" => 344, "divide" => 570, "section" => 554, "u" => 606, + "v" => 504, "w" => 768, "dieresis" => 400, "x" => 486, "y" => 506, + "z" => 480, "iacute" => 291, "quotedblbase" => 458, + "hungarumlaut" => 400, "quotedbl" => 458, "mu" => 606, + "Scaron" => 541, "Lslash" => 574, "semicolon" => 265, + "oslash" => 577, "florin" => 530, "yacute" => 506, "fi" => 610, + "fl" => 610, "Acircumflex" => 635, "parenright" => 350, + "Ecircumflex" => 606, "Icircumflex" => 349, "trademark" => 1100, + "daggerdbl" => 488, "guillemotleft" => 442, "germandbls" => 601, + "macron" => 400, "Otilde" => 762, "seven" => 530, + "ellipsis" => 1000, "scaron" => 436, "ordmasculine" => 398, + "AE" => 876, "Ucircumflex" => 791, "lslash" => 294, + "dotlessi" => 291, "sterling" => 530, "quotedblleft" => 458, + "hyphen" => 392, "guilsinglright" => 257, "quotesingle" => 278, + "eight" => 530, "exclamdown" => 242, "acircumflex" => 523, + "endash" => 500, "oe" => 882, "ecircumflex" => 514, + "copyright" => 818, "Adieresis" => 635, "Egrave" => 606, + "icircumflex" => 291, "slash" => 460, "braceright" => 340, + "Edieresis" => 606, "quotedblright" => 458, "Idieresis" => 349, + "otilde" => 577, "parenleft" => 350, "one" => 530, + "ucircumflex" => 606, "Odieresis" => 762, "bracketleft" => 330, + "Ugrave" => 791, "cent" => 530, "currency" => 530, + "logicalnot" => 570, "quoteright" => 278, "Udieresis" => 791, + "perthousand" => 1208, "Ydieresis" => 588, "Atilde" => 635, + "breve" => 400, "bar" => 228, "fraction" => 150, "Eacute" => 606, + "less" => 570, "adieresis" => 523, "guilsinglleft" => 257, + "egrave" => 514, "exclam" => 242, "edieresis" => 514, "Eth" => 785, + "idieresis" => 291, "period" => 265, "ae" => 797, + "asterisk" => 412, "Uacute" => 791, "odieresis" => 577, + "ugrave" => 606, "five" => 530, "nine" => 530, "greater" => 570, + "udieresis" => 606, "Zcaron" => 610, "threequarters" => 860, + "guillemotright" => 442, "Ccedilla" => 680, "ydieresis" => 506, + "tilde" => 400, "atilde" => 523, "at" => 793, "brokenbar" => 228, + "eacute" => 514, "quoteleft" => 278, "underscore" => 500, + "onesuperior" => 380, + } +); +1; diff --git a/doc/metrics/putri8a.ph b/doc/metrics/putri8a.ph new file mode 100644 index 0000000..7cb5321 --- /dev/null +++ b/doc/metrics/putri8a.ph @@ -0,0 +1,72 @@ +%PS_Utopia_Italic = ( + name => 'Utopia-Italic', + widths => { + "Ntilde" => 763, "multiply" => 570, "zero" => 530, "eth" => 537, + "Ograve" => 753, "uacute" => 618, "braceleft" => 340, + "Thorn" => 604, "zcaron" => 468, "comma" => 265, "cedilla" => 400, + "plusminus" => 570, "ccedilla" => 441, "circumflex" => 400, + "dotaccent" => 402, "asciitilde" => 570, "colon" => 265, + "onehalf" => 890, "dollar" => 530, "ntilde" => 618, + "Ocircumflex" => 753, "Oacute" => 753, "ogonek" => 350, + "ograve" => 537, "thorn" => 584, "degree" => 400, "minus" => 570, + "yen" => 530, "space" => 225, "registered" => 836, + "questiondown" => 425, "Aring" => 624, "percent" => 826, + "emdash" => 1000, "six" => 530, "Agrave" => 624, + "paragraph" => 560, "three" => 530, "numbersign" => 530, + "two" => 530, "Igrave" => 345, "ocircumflex" => 537, + "oacute" => 537, "A" => 624, "B" => 632, "C" => 661, "D" => 763, + "E" => 596, "onequarter" => 890, "F" => 571, "G" => 709, + "H" => 775, "I" => 345, "J" => 352, "K" => 650, "L" => 565, + "backslash" => 390, "asciicircum" => 570, "periodcentered" => 265, + "M" => 920, "N" => 763, "O" => 753, "P" => 614, "aring" => 561, + "Q" => 753, "R" => 640, "Aacute" => 624, "caron" => 400, + "S" => 533, "T" => 606, "grave" => 400, "U" => 794, + "agrave" => 561, "V" => 637, "W" => 946, "equal" => 570, + "question" => 425, "X" => 632, "Y" => 591, "Z" => 622, + "bracketright" => 330, "Iacute" => 345, "ampersand" => 725, + "four" => 530, "igrave" => 317, "a" => 561, "b" => 559, "c" => 441, + "d" => 587, "plus" => 570, "e" => 453, "quotesinglbase" => 216, + "f" => 315, "g" => 499, "bullet" => 500, "h" => 607, "i" => 317, + "Oslash" => 753, "dagger" => 500, "j" => 309, "Yacute" => 591, + "k" => 545, "l" => 306, "m" => 912, "n" => 618, "o" => 537, + "ordfeminine" => 425, "ring" => 400, "p" => 590, + "threesuperior" => 370, "q" => 559, "acute" => 400, "r" => 402, + "aacute" => 561, "twosuperior" => 370, "s" => 389, "OE" => 1020, + "t" => 341, "divide" => 570, "section" => 530, "u" => 618, + "v" => 510, "w" => 785, "dieresis" => 400, "x" => 516, "y" => 468, + "z" => 468, "iacute" => 317, "quotedblbase" => 402, + "hungarumlaut" => 400, "quotedbl" => 402, "mu" => 618, + "Scaron" => 533, "Lslash" => 571, "semicolon" => 265, + "oslash" => 537, "florin" => 530, "yacute" => 468, "fi" => 607, + "fl" => 603, "Acircumflex" => 624, "parenright" => 350, + "Ecircumflex" => 596, "Icircumflex" => 345, "trademark" => 1100, + "daggerdbl" => 490, "guillemotleft" => 462, "germandbls" => 577, + "macron" => 400, "Otilde" => 753, "seven" => 530, + "ellipsis" => 1000, "scaron" => 389, "ordmasculine" => 389, + "AE" => 880, "Ucircumflex" => 794, "lslash" => 318, + "dotlessi" => 317, "sterling" => 530, "quotedblleft" => 402, + "hyphen" => 392, "guilsinglright" => 277, "quotesingle" => 216, + "eight" => 530, "exclamdown" => 240, "acircumflex" => 561, + "endash" => 500, "oe" => 806, "ecircumflex" => 453, + "copyright" => 836, "Adieresis" => 624, "Egrave" => 596, + "icircumflex" => 317, "slash" => 270, "braceright" => 340, + "Edieresis" => 596, "quotedblright" => 402, "Idieresis" => 345, + "otilde" => 537, "parenleft" => 350, "one" => 530, + "ucircumflex" => 618, "Odieresis" => 753, "bracketleft" => 330, + "Ugrave" => 794, "cent" => 530, "currency" => 530, + "logicalnot" => 570, "quoteright" => 216, "Udieresis" => 794, + "perthousand" => 1200, "Ydieresis" => 591, "Atilde" => 624, + "breve" => 400, "bar" => 270, "fraction" => 100, "Eacute" => 596, + "less" => 570, "adieresis" => 561, "guilsinglleft" => 277, + "egrave" => 453, "exclam" => 240, "edieresis" => 453, "Eth" => 770, + "idieresis" => 317, "period" => 265, "ae" => 779, + "asterisk" => 412, "Uacute" => 794, "odieresis" => 537, + "ugrave" => 618, "five" => 530, "nine" => 530, "greater" => 570, + "udieresis" => 618, "Zcaron" => 622, "threequarters" => 890, + "guillemotright" => 462, "Ccedilla" => 661, "ydieresis" => 468, + "tilde" => 400, "atilde" => 561, "at" => 794, "brokenbar" => 270, + "eacute" => 453, "quoteleft" => 216, "underscore" => 500, + "onesuperior" => 370, + } +); +1; diff --git a/doc/metrics/pzcmi8a.ph b/doc/metrics/pzcmi8a.ph new file mode 100644 index 0000000..a840d26 --- /dev/null +++ b/doc/metrics/pzcmi8a.ph @@ -0,0 +1,72 @@ +%PS_ZapfChancery_MediumItalic = ( + name => 'ZapfChancery-MediumItalic', + widths => { + "multiply" => 520, "Ntilde" => 700, "zero" => 440, "eth" => 400, + "Ograve" => 600, "uacute" => 460, "braceleft" => 240, + "Thorn" => 540, "zcaron" => 440, "comma" => 220, "cedilla" => 300, + "plusminus" => 520, "ccedilla" => 340, "circumflex" => 340, + "dotaccent" => 220, "asciitilde" => 520, "colon" => 260, + "onehalf" => 660, "dollar" => 440, "ntilde" => 460, + "Ocircumflex" => 600, "Oacute" => 600, "ogonek" => 280, + "ograve" => 400, "thorn" => 440, "minus" => 520, "degree" => 400, + "yen" => 440, "space" => 220, "registered" => 740, + "questiondown" => 400, "Aring" => 620, "percent" => 680, + "emdash" => 1000, "six" => 440, "Agrave" => 620, + "paragraph" => 500, "three" => 440, "numbersign" => 440, + "two" => 440, "Igrave" => 380, "oacute" => 400, + "ocircumflex" => 400, "A" => 620, "B" => 600, "C" => 520, + "D" => 700, "E" => 620, "onequarter" => 660, "F" => 580, + "G" => 620, "H" => 680, "I" => 380, "J" => 400, "K" => 660, + "L" => 580, "backslash" => 480, "asciicircum" => 520, + "periodcentered" => 220, "M" => 840, "N" => 700, "O" => 600, + "P" => 540, "aring" => 420, "Q" => 600, "R" => 600, + "Aacute" => 620, "caron" => 340, "S" => 460, "T" => 500, + "grave" => 220, "U" => 740, "agrave" => 420, "V" => 640, + "W" => 880, "equal" => 520, "question" => 380, "X" => 560, + "Y" => 560, "Z" => 620, "bracketright" => 320, "Iacute" => 380, + "ampersand" => 780, "four" => 440, "igrave" => 240, "a" => 420, + "b" => 420, "c" => 340, "d" => 440, "plus" => 520, "e" => 340, + "quotesinglbase" => 180, "f" => 320, "g" => 400, "bullet" => 600, + "h" => 440, "i" => 240, "Oslash" => 660, "dagger" => 460, + "j" => 220, "Yacute" => 560, "k" => 440, "l" => 240, "m" => 620, + "n" => 460, "o" => 400, "ordfeminine" => 260, "ring" => 300, + "p" => 440, "threesuperior" => 264, "q" => 400, "acute" => 300, + "r" => 300, "twosuperior" => 264, "aacute" => 420, "s" => 320, + "OE" => 820, "t" => 320, "divide" => 520, "section" => 420, + "u" => 460, "v" => 440, "w" => 680, "dieresis" => 360, "x" => 420, + "y" => 400, "z" => 440, "iacute" => 240, "quotedblbase" => 280, + "hungarumlaut" => 400, "quotedbl" => 220, "mu" => 460, + "Scaron" => 460, "Lslash" => 580, "semicolon" => 240, + "oslash" => 440, "florin" => 440, "yacute" => 400, "fi" => 520, + "fl" => 520, "Acircumflex" => 620, "parenright" => 220, + "Ecircumflex" => 620, "trademark" => 1000, "Icircumflex" => 380, + "daggerdbl" => 480, "guillemotleft" => 340, "germandbls" => 420, + "macron" => 440, "Otilde" => 600, "seven" => 440, + "ellipsis" => 1000, "scaron" => 320, "ordmasculine" => 260, + "AE" => 740, "Ucircumflex" => 740, "lslash" => 300, + "dotlessi" => 240, "sterling" => 440, "quotedblleft" => 340, + "hyphen" => 280, "guilsinglright" => 260, "quotesingle" => 160, + "eight" => 440, "exclamdown" => 280, "acircumflex" => 420, + "endash" => 500, "oe" => 560, "ecircumflex" => 340, + "copyright" => 740, "Adieresis" => 620, "Egrave" => 620, + "icircumflex" => 240, "slash" => 340, "braceright" => 240, + "Edieresis" => 620, "quotedblright" => 360, "otilde" => 400, + "Idieresis" => 380, "parenleft" => 260, "one" => 440, + "Odieresis" => 600, "ucircumflex" => 460, "bracketleft" => 240, + "Ugrave" => 740, "cent" => 440, "currency" => 440, + "logicalnot" => 520, "quoteright" => 240, "Udieresis" => 740, + "perthousand" => 960, "Ydieresis" => 560, "Atilde" => 620, + "breve" => 440, "bar" => 520, "fraction" => 60, "Eacute" => 620, + "less" => 520, "adieresis" => 420, "guilsinglleft" => 240, + "egrave" => 340, "exclam" => 280, "edieresis" => 340, "Eth" => 700, + "idieresis" => 240, "period" => 220, "ae" => 540, + "asterisk" => 420, "odieresis" => 400, "Uacute" => 740, + "ugrave" => 460, "five" => 440, "nine" => 440, "greater" => 520, + "Zcaron" => 620, "udieresis" => 460, "threequarters" => 660, + "guillemotright" => 380, "Ccedilla" => 520, "ydieresis" => 400, + "tilde" => 440, "atilde" => 420, "at" => 700, "brokenbar" => 520, + "eacute" => 340, "quoteleft" => 240, "underscore" => 500, + "onesuperior" => 264, + } +); +1; diff --git a/doc/metrics/pzdr.ph b/doc/metrics/pzdr.ph new file mode 100644 index 0000000..115caac --- /dev/null +++ b/doc/metrics/pzdr.ph @@ -0,0 +1,57 @@ +%PS_ZapfDingbats = ( + name => 'ZapfDingbats', + widths => { + "a81" => 438, "a82" => 138, "a83" => 277, "a84" => 415, + "a85" => 509, "a86" => 410, "a87" => 234, "a88" => 234, + "a89" => 390, "a140" => 788, "a141" => 788, "a142" => 788, + "a143" => 788, "a144" => 788, "a145" => 788, "a146" => 788, + "a147" => 788, "a148" => 788, "a149" => 788, "a10" => 692, + "a11" => 960, "a12" => 939, "a13" => 549, "a14" => 855, + "a15" => 911, "a16" => 933, "a17" => 945, "a90" => 390, + "a18" => 974, "a91" => 276, "a19" => 755, "a92" => 276, + "space" => 278, "a93" => 317, "a94" => 317, "a95" => 334, + "a96" => 334, "a97" => 392, "a98" => 392, "a99" => 668, + "a150" => 788, "a151" => 788, "a152" => 788, "a153" => 788, + "a154" => 788, "a155" => 788, "a156" => 788, "a157" => 788, + "a158" => 788, "a159" => 788, "a20" => 846, "a21" => 762, + "a22" => 761, "a23" => 571, "a24" => 677, "a25" => 763, + "a26" => 760, "a27" => 759, "a28" => 754, "a29" => 786, + "a160" => 894, "a161" => 838, "a162" => 924, "a163" => 1016, + "a164" => 458, "a165" => 924, "a166" => 918, "a167" => 927, + "a168" => 928, "a169" => 928, "a30" => 788, "a31" => 788, + "a32" => 790, "a33" => 793, "a34" => 794, "a35" => 816, + "a36" => 823, "a37" => 789, "a38" => 841, "a39" => 823, + "a170" => 834, "a171" => 873, "a172" => 828, "a173" => 924, + "a174" => 917, "a175" => 930, "a176" => 931, "a177" => 463, + "a178" => 883, "a179" => 836, "a40" => 833, "a41" => 816, + "a42" => 831, "a43" => 923, "a44" => 744, "a45" => 723, + "a46" => 749, "a47" => 790, "a48" => 792, "a49" => 695, + "a100" => 668, "a101" => 732, "a102" => 544, "a103" => 544, + "a104" => 910, "a105" => 911, "a106" => 667, "a107" => 760, + "a180" => 867, "a108" => 760, "a181" => 696, "a109" => 626, + "a182" => 874, "a183" => 760, "a184" => 946, "a185" => 865, + "a186" => 967, "a187" => 831, "a188" => 873, "a189" => 927, + "a50" => 776, "a51" => 768, "a52" => 792, "a53" => 759, + "a54" => 707, "a55" => 708, "a56" => 682, "a57" => 701, + "a58" => 826, "a59" => 815, "a1" => 974, "a2" => 961, + "a110" => 694, "a3" => 980, "a111" => 595, "a4" => 719, + "a112" => 776, "a5" => 789, "a6" => 494, "a7" => 552, "a8" => 537, + "a117" => 690, "a9" => 577, "a190" => 970, "a118" => 791, + "a191" => 918, "a119" => 790, "a192" => 748, "a193" => 836, + "a194" => 771, "a195" => 888, "a196" => 748, "a197" => 771, + "a198" => 888, "a199" => 867, "a60" => 789, "a61" => 789, + "a62" => 707, "a63" => 687, "a64" => 696, "a65" => 689, + "a66" => 786, "a67" => 787, "a68" => 713, "a69" => 791, + "a200" => 696, "a201" => 874, "a120" => 788, "a202" => 974, + "a121" => 788, "a203" => 762, "a122" => 788, "a204" => 759, + "a123" => 788, "a205" => 509, "a124" => 788, "a206" => 410, + "a125" => 788, "a126" => 788, "a127" => 788, "a128" => 788, + "a129" => 788, "a70" => 785, "a71" => 791, "a72" => 873, + "a73" => 761, "a74" => 762, "a75" => 759, "a76" => 892, + "a77" => 892, "a78" => 788, "a79" => 784, "a130" => 788, + "a131" => 788, "a132" => 788, "a133" => 788, "a134" => 788, + "a135" => 788, "a136" => 788, "a137" => 788, "a138" => 788, + "a139" => 788, + } +); +1; diff --git a/doc/nasmdoc.src b/doc/nasmdoc.src new file mode 100644 index 0000000..b98c3be --- /dev/null +++ b/doc/nasmdoc.src @@ -0,0 +1,7930 @@ +\# -------------------------------------------------------------------------- +\# +\# Copyright 1996-2009 The NASM Authors - All Rights Reserved +\# See the file AUTHORS included with the NASM distribution for +\# the specific copyright holders. +\# +\# Redistribution and use in source and binary forms, with or without +\# modification, are permitted provided that the following +\# conditions are met: +\# +\# * Redistributions of source code must retain the above copyright +\# notice, this list of conditions and the following disclaimer. +\# * Redistributions in binary form must reproduce the above +\# copyright notice, this list of conditions and the following +\# disclaimer in the documentation and/or other materials provided +\# with the distribution. +\# +\# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +\# CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +\# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +\# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +\# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +\# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +\# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +\# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +\# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +\# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +\# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +\# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +\# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +\# +\# -------------------------------------------------------------------------- +\# +\# Source code to NASM documentation +\# +\M{category}{Programming} +\M{title}{NASM - The Netwide Assembler} +\M{year}{1996-2009} +\M{author}{The NASM Development Team} +\M{copyright_tail}{-- All Rights Reserved} +\M{license}{This document is redistributable under the license given in the file "COPYING" distributed in the NASM archive.} +\M{auxinfo}{This release is dedicated to the memory of Charles A. Crayne. We miss you, Chuck.} +\M{summary}{This file documents NASM, the Netwide Assembler: an assembler targetting the Intel x86 series of processors, with portable source.} +\M{infoname}{NASM} +\M{infofile}{nasm} +\M{infotitle}{The Netwide Assembler for x86} +\M{epslogo}{nasmlogo.eps} +\IR{-D} \c{-D} option +\IR{-E} \c{-E} option +\IR{-F} \c{-F} option +\IR{-I} \c{-I} option +\IR{-M} \c{-M} option +\IR{-MD} \c{-MD} option +\IR{-MF} \c{-MF} option +\IR{-MG} \c{-MG} option +\IR{-MP} \c{-MP} option +\IR{-MQ} \c{-MQ} option +\IR{-MT} \c{-MT} option +\IR{-O} \c{-O} option +\IR{-P} \c{-P} option +\IR{-U} \c{-U} option +\IR{-X} \c{-X} option +\IR{-a} \c{-a} option +\IR{-d} \c{-d} option +\IR{-e} \c{-e} option +\IR{-f} \c{-f} option +\IR{-g} \c{-g} option +\IR{-i} \c{-i} option +\IR{-l} \c{-l} option +\IR{-o} \c{-o} option +\IR{-p} \c{-p} option +\IR{-s} \c{-s} option +\IR{-u} \c{-u} option +\IR{-v} \c{-v} option +\IR{-W} \c{-W} option +\IR{-w} \c{-w} option +\IR{-y} \c{-y} option +\IR{-Z} \c{-Z} option +\IR{!=} \c{!=} operator +\IR{$, here} \c{$}, Here token +\IR{$, prefix} \c{$}, prefix +\IR{$$} \c{$$} token +\IR{%} \c{%} operator +\IR{%%} \c{%%} operator +\IR{%+1} \c{%+1} and \c{%-1} syntax +\IA{%-1}{%+1} +\IR{%0} \c{%0} parameter count +\IR{&} \c{&} operator +\IR{&&} \c{&&} operator +\IR{*} \c{*} operator +\IR{..@} \c{..@} symbol prefix +\IR{/} \c{/} operator +\IR{//} \c{//} operator +\IR{<} \c{<} operator +\IR{<<} \c{<<} operator +\IR{<=} \c{<=} operator +\IR{<>} \c{<>} operator +\IR{=} \c{=} operator +\IR{==} \c{==} operator +\IR{>} \c{>} operator +\IR{>=} \c{>=} operator +\IR{>>} \c{>>} operator +\IR{?} \c{?} MASM syntax +\IR{^} \c{^} operator +\IR{^^} \c{^^} operator +\IR{|} \c{|} operator +\IR{||} \c{||} operator +\IR{~} \c{~} operator +\IR{%$} \c{%$} and \c{%$$} prefixes +\IA{%$$}{%$} +\IR{+ opaddition} \c{+} operator, binary +\IR{+ opunary} \c{+} operator, unary +\IR{+ modifier} \c{+} modifier +\IR{- opsubtraction} \c{-} operator, binary +\IR{- opunary} \c{-} operator, unary +\IR{! opunary} \c{!} operator, unary +\IR{alignment, in bin sections} alignment, in \c{bin} sections +\IR{alignment, in elf sections} alignment, in \c{elf} sections +\IR{alignment, in win32 sections} alignment, in \c{win32} sections +\IR{alignment, of elf common variables} alignment, of \c{elf} common +variables +\IR{alignment, in obj sections} alignment, in \c{obj} sections +\IR{a.out, bsd version} \c{a.out}, BSD version +\IR{a.out, linux version} \c{a.out}, Linux version +\IR{autoconf} Autoconf +\IR{bin} bin +\IR{bitwise and} bitwise AND +\IR{bitwise or} bitwise OR +\IR{bitwise xor} bitwise XOR +\IR{block ifs} block IFs +\IR{borland pascal} Borland, Pascal +\IR{borland's win32 compilers} Borland, Win32 compilers +\IR{braces, after % sign} braces, after \c{%} sign +\IR{bsd} BSD +\IR{c calling convention} C calling convention +\IR{c symbol names} C symbol names +\IA{critical expressions}{critical expression} +\IA{command line}{command-line} +\IA{case sensitivity}{case sensitive} +\IA{case-sensitive}{case sensitive} +\IA{case-insensitive}{case sensitive} +\IA{character constants}{character constant} +\IR{common object file format} Common Object File Format +\IR{common variables, alignment in elf} common variables, alignment +in \c{elf} +\IR{common, elf extensions to} \c{COMMON}, \c{elf} extensions to +\IR{common, obj extensions to} \c{COMMON}, \c{obj} extensions to +\IR{declaring structure} declaring structures +\IR{default-wrt mechanism} default-\c{WRT} mechanism +\IR{devpac} DevPac +\IR{djgpp} DJGPP +\IR{dll symbols, exporting} DLL symbols, exporting +\IR{dll symbols, importing} DLL symbols, importing +\IR{dos} DOS +\IR{dos archive} DOS archive +\IR{dos source archive} DOS source archive +\IA{effective address}{effective addresses} +\IA{effective-address}{effective addresses} +\IR{elf} ELF +\IR{elf, 16-bit code and} ELF, 16-bit code and +\IR{elf shared libraries} ELF, shared libraries +\IR{elf32} \c{elf32} +\IR{elf64} \c{elf64} +\IR{executable and linkable format} Executable and Linkable Format +\IR{extern, obj extensions to} \c{EXTERN}, \c{obj} extensions to +\IR{extern, rdf extensions to} \c{EXTERN}, \c{rdf} extensions to +\IR{floating-point, constants} floating-point, constants +\IR{floating-point, packed bcd constants} floating-point, packed BCD constants +\IR{freebsd} FreeBSD +\IR{freelink} FreeLink +\IR{functions, c calling convention} functions, C calling convention +\IR{functions, pascal calling convention} functions, Pascal calling +convention +\IR{global, aoutb extensions to} \c{GLOBAL}, \c{aoutb} extensions to +\IR{global, elf extensions to} \c{GLOBAL}, \c{elf} extensions to +\IR{global, rdf extensions to} \c{GLOBAL}, \c{rdf} extensions to +\IR{got} GOT +\IR{got relocations} \c{GOT} relocations +\IR{gotoff relocation} \c{GOTOFF} relocations +\IR{gotpc relocation} \c{GOTPC} relocations +\IR{intel number formats} Intel number formats +\IR{linux, elf} Linux, ELF +\IR{linux, a.out} Linux, \c{a.out} +\IR{linux, as86} Linux, \c{as86} +\IR{logical and} logical AND +\IR{logical or} logical OR +\IR{logical xor} logical XOR +\IR{mach object file format} Mach, object file format +\IR{mach-o} Mach-O +\IR{macho32} \c{macho32} +\IR{macho64} \c{macho64} +\IR{macos x} MacOS X +\IR{masm} MASM +\IA{memory reference}{memory references} +\IR{minix} Minix +\IA{misc directory}{misc subdirectory} +\IR{misc subdirectory} \c{misc} subdirectory +\IR{microsoft omf} Microsoft OMF +\IR{mmx registers} MMX registers +\IA{modr/m}{modr/m byte} +\IR{modr/m byte} ModR/M byte +\IR{ms-dos} MS-DOS +\IR{ms-dos device drivers} MS-DOS device drivers +\IR{multipush} \c{multipush} macro +\IR{nan} NaN +\IR{nasm version} NASM version +\IR{netbsd} NetBSD +\IR{omf} OMF +\IR{openbsd} OpenBSD +\IR{operating system} operating system +\IR{os/2} OS/2 +\IR{pascal calling convention}Pascal calling convention +\IR{passes} passes, assembly +\IR{perl} Perl +\IR{pic} PIC +\IR{pharlap} PharLap +\IR{plt} PLT +\IR{plt} \c{PLT} relocations +\IA{pre-defining macros}{pre-define} +\IA{preprocessor expressions}{preprocessor, expressions} +\IA{preprocessor loops}{preprocessor, loops} +\IA{preprocessor variables}{preprocessor, variables} +\IA{rdoff subdirectory}{rdoff} +\IR{rdoff} \c{rdoff} subdirectory +\IR{relocatable dynamic object file format} Relocatable Dynamic +Object File Format +\IR{relocations, pic-specific} relocations, PIC-specific +\IA{repeating}{repeating code} +\IR{section alignment, in elf} section alignment, in \c{elf} +\IR{section alignment, in bin} section alignment, in \c{bin} +\IR{section alignment, in obj} section alignment, in \c{obj} +\IR{section alignment, in win32} section alignment, in \c{win32} +\IR{section, elf extensions to} \c{SECTION}, \c{elf} extensions to +\IR{section, win32 extensions to} \c{SECTION}, \c{win32} extensions to +\IR{segment alignment, in bin} segment alignment, in \c{bin} +\IR{segment alignment, in obj} segment alignment, in \c{obj} +\IR{segment, obj extensions to} \c{SEGMENT}, \c{elf} extensions to +\IR{segment names, borland pascal} segment names, Borland Pascal +\IR{shift command} \c{shift} command +\IA{sib}{sib byte} +\IR{sib byte} SIB byte +\IR{align, smart} \c{ALIGN}, smart +\IR{solaris x86} Solaris x86 +\IA{standard section names}{standardized section names} +\IR{symbols, exporting from dlls} symbols, exporting from DLLs +\IR{symbols, importing from dlls} symbols, importing from DLLs +\IR{test subdirectory} \c{test} subdirectory +\IR{tlink} \c{TLINK} +\IR{underscore, in c symbols} underscore, in C symbols +\IR{unicode} Unicode +\IR{unix} Unix +\IR{utf-8} UTF-8 +\IR{utf-16} UTF-16 +\IR{utf-32} UTF-32 +\IA{sco unix}{unix, sco} +\IR{unix, sco} Unix, SCO +\IA{unix source archive}{unix, source archive} +\IR{unix, source archive} Unix, source archive +\IA{unix system v}{unix, system v} +\IR{unix, system v} Unix, System V +\IR{unixware} UnixWare +\IR{val} VAL +\IR{version number of nasm} version number of NASM +\IR{visual c++} Visual C++ +\IR{www page} WWW page +\IR{win32} Win32 +\IR{win32} Win64 +\IR{windows} Windows +\IR{windows 95} Windows 95 +\IR{windows nt} Windows NT +\# \IC{program entry point}{entry point, program} +\# \IC{program entry point}{start point, program} +\# \IC{MS-DOS device drivers}{device drivers, MS-DOS} +\# \IC{16-bit mode, versus 32-bit mode}{32-bit mode, versus 16-bit mode} +\# \IC{c symbol names}{symbol names, in C} + + +\C{intro} Introduction + +\H{whatsnasm} What Is NASM? + +The Netwide Assembler, NASM, is an 80x86 and x86-64 assembler designed +for portability and modularity. It supports a range of object file +formats, including Linux and \c{*BSD} \c{a.out}, \c{ELF}, \c{COFF}, +\c{Mach-O}, Microsoft 16-bit \c{OBJ}, \c{Win32} and \c{Win64}. It will +also output plain binary files. Its syntax is designed to be simple +and easy to understand, similar to Intel's but less complex. It +supports all currently known x86 architectural extensions, and has +strong support for macros. + + +\S{yaasm} Why Yet Another Assembler? + +The Netwide Assembler grew out of an idea on \i\c{comp.lang.asm.x86} +(or possibly \i\c{alt.lang.asm} - I forget which), which was +essentially that there didn't seem to be a good \e{free} x86-series +assembler around, and that maybe someone ought to write one. + +\b \i\c{a86} is good, but not free, and in particular you don't get any +32-bit capability until you pay. It's DOS only, too. + +\b \i\c{gas} is free, and ports over to DOS and Unix, but it's not +very good, since it's designed to be a back end to \i\c{gcc}, which +always feeds it correct code. So its error checking is minimal. Also, +its syntax is horrible, from the point of view of anyone trying to +actually \e{write} anything in it. Plus you can't write 16-bit code in +it (properly.) + +\b \i\c{as86} is specific to Minix and Linux, and (my version at least) +doesn't seem to have much (or any) documentation. + +\b \i\c{MASM} isn't very good, and it's (was) expensive, and it runs only under +DOS. + +\b \i\c{TASM} is better, but still strives for MASM compatibility, +which means millions of directives and tons of red tape. And its syntax +is essentially MASM's, with the contradictions and quirks that +entails (although it sorts out some of those by means of Ideal mode.) +It's expensive too. And it's DOS-only. + +So here, for your coding pleasure, is NASM. At present it's +still in prototype stage - we don't promise that it can outperform +any of these assemblers. But please, \e{please} send us bug reports, +fixes, helpful information, and anything else you can get your hands +on (and thanks to the many people who've done this already! You all +know who you are), and we'll improve it out of all recognition. +Again. + + +\S{legal} \i{License} Conditions + +Please see the file \c{LICENSE}, supplied as part of any NASM +distribution archive, for the license conditions under which you may +use NASM. NASM is now under the so-called 2-clause BSD license, also +known as the simplified BSD license. + +Copyright 1996-2009 the NASM Authors - All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +\b Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +\b Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +\H{contact} Contact Information + +The current version of NASM (since about 0.98.08) is maintained by a +team of developers, accessible through the \c{nasm-devel} mailing list +(see below for the link). +If you want to report a bug, please read \k{bugs} first. + +NASM has a \i{website} at +\W{http://www.nasm.us/}\c{http://www.nasm.us/}. If it's not there, +google for us! + +\i{New releases}, \i{release candidates}, and \I{snapshots, daily +development}\i{daily development snapshots} of NASM are available from +the official web site. + +Announcements are posted to +\W{news:comp.lang.asm.x86}\i\c{comp.lang.asm.x86}, +and to the web site +\W{http://www.freshmeat.net/}\c{http://www.freshmeat.net/}. + +If you want information about the current development status, please +subscribe to the \i\c{nasm-devel} email list; see link from the +website. + + +\H{install} Installation + +\S{instdos} \i{Installing} NASM under MS-\i{DOS} or Windows + +Once you've obtained the appropriate archive for NASM, +\i\c{nasm-XXX-dos.zip} or \i\c{nasm-XXX-win32.zip} (where \c{XXX} +denotes the version number of NASM contained in the archive), unpack +it into its own directory (for example \c{c:\\nasm}). + +The archive will contain a set of executable files: the NASM +executable file \i\c{nasm.exe}, the NDISASM executable file +\i\c{ndisasm.exe}, and possibly additional utilities to handle the +RDOFF file format. + +The only file NASM needs to run is its own executable, so copy +\c{nasm.exe} to a directory on your PATH, or alternatively edit +\i\c{autoexec.bat} to add the \c{nasm} directory to your +\i\c{PATH} (to do that under Windows XP, go to Start > Control Panel > +System > Advanced > Environment Variables; these instructions may work +under other versions of Windows as well.) + +That's it - NASM is installed. You don't need the nasm directory +to be present to run NASM (unless you've added it to your \c{PATH}), +so you can delete it if you need to save space; however, you may +want to keep the documentation or test programs. + +If you've downloaded the \i{DOS source archive}, \i\c{nasm-XXX.zip}, +the \c{nasm} directory will also contain the full NASM \i{source +code}, and a selection of \i{Makefiles} you can (hopefully) use to +rebuild your copy of NASM from scratch. See the file \c{INSTALL} in +the source archive. + +Note that a number of files are generated from other files by Perl +scripts. Although the NASM source distribution includes these +generated files, you will need to rebuild them (and hence, will need a +Perl interpreter) if you change insns.dat, standard.mac or the +documentation. It is possible future source distributions may not +include these files at all. Ports of \i{Perl} for a variety of +platforms, including DOS and Windows, are available from +\W{http://www.cpan.org/ports/}\i{www.cpan.org}. + + +\S{instdos} Installing NASM under \i{Unix} + +Once you've obtained the \i{Unix source archive} for NASM, +\i\c{nasm-XXX.tar.gz} (where \c{XXX} denotes the version number of +NASM contained in the archive), unpack it into a directory such +as \c{/usr/local/src}. The archive, when unpacked, will create its +own subdirectory \c{nasm-XXX}. + +NASM is an \I{Autoconf}\I\c{configure}auto-configuring package: once +you've unpacked it, \c{cd} to the directory it's been unpacked into +and type \c{./configure}. This shell script will find the best C +compiler to use for building NASM and set up \i{Makefiles} +accordingly. + +Once NASM has auto-configured, you can type \i\c{make} to build the +\c{nasm} and \c{ndisasm} binaries, and then \c{make install} to +install them in \c{/usr/local/bin} and install the \i{man pages} +\i\c{nasm.1} and \i\c{ndisasm.1} in \c{/usr/local/man/man1}. +Alternatively, you can give options such as \c{--prefix} to the +configure script (see the file \i\c{INSTALL} for more details), or +install the programs yourself. + +NASM also comes with a set of utilities for handling the \c{RDOFF} +custom object-file format, which are in the \i\c{rdoff} subdirectory +of the NASM archive. You can build these with \c{make rdf} and +install them with \c{make rdf_install}, if you want them. + + +\C{running} Running NASM + +\H{syntax} NASM \i{Command-Line} Syntax + +To assemble a file, you issue a command of the form + +\c nasm -f [-o ] + +For example, + +\c nasm -f elf myfile.asm + +will assemble \c{myfile.asm} into an \c{ELF} object file \c{myfile.o}. And + +\c nasm -f bin myfile.asm -o myfile.com + +will assemble \c{myfile.asm} into a raw binary file \c{myfile.com}. + +To produce a listing file, with the hex codes output from NASM +displayed on the left of the original sources, use the \c{-l} option +to give a listing file name, for example: + +\c nasm -f coff myfile.asm -l myfile.lst + +To get further usage instructions from NASM, try typing + +\c nasm -h + +As \c{-hf}, this will also list the available output file formats, and what they +are. + +If you use Linux but aren't sure whether your system is \c{a.out} +or \c{ELF}, type + +\c file nasm + +(in the directory in which you put the NASM binary when you +installed it). If it says something like + +\c nasm: ELF 32-bit LSB executable i386 (386 and up) Version 1 + +then your system is \c{ELF}, and you should use the option \c{-f elf} +when you want NASM to produce Linux object files. If it says + +\c nasm: Linux/i386 demand-paged executable (QMAGIC) + +or something similar, your system is \c{a.out}, and you should use +\c{-f aout} instead (Linux \c{a.out} systems have long been obsolete, +and are rare these days.) + +Like Unix compilers and assemblers, NASM is silent unless it +goes wrong: you won't see any output at all, unless it gives error +messages. + + +\S{opt-o} The \i\c{-o} Option: Specifying the Output File Name + +NASM will normally choose the name of your output file for you; +precisely how it does this is dependent on the object file format. +For Microsoft object file formats (\c{obj}, \c{win32} and \c{win64}), +it will remove the \c{.asm} \i{extension} (or whatever extension you +like to use - NASM doesn't care) from your source file name and +substitute \c{.obj}. For Unix object file formats (\c{aout}, \c{as86}, +\c{coff}, \c{elf32}, \c{elf64}, \c{ieee}, \c{macho32} and \c{macho64}) +it will substitute \c{.o}. For \c{dbg}, \c{rdf}, \c{ith} and \c{srec}, +it will use \c{.dbg}, \c{.rdf}, \c{.ith} and \c{.srec}, respectively, +and for the \c{bin} format it will simply remove the extension, so +that \c{myfile.asm} produces the output file \c{myfile}. + +If the output file already exists, NASM will overwrite it, unless it +has the same name as the input file, in which case it will give a +warning and use \i\c{nasm.out} as the output file name instead. + +For situations in which this behaviour is unacceptable, NASM +provides the \c{-o} command-line option, which allows you to specify +your desired output file name. You invoke \c{-o} by following it +with the name you wish for the output file, either with or without +an intervening space. For example: + +\c nasm -f bin program.asm -o program.com +\c nasm -f bin driver.asm -odriver.sys + +Note that this is a small o, and is different from a capital O , which +is used to specify the number of optimisation passes required. See \k{opt-O}. + + +\S{opt-f} The \i\c{-f} Option: Specifying the \i{Output File Format} + +If you do not supply the \c{-f} option to NASM, it will choose an +output file format for you itself. In the distribution versions of +NASM, the default is always \i\c{bin}; if you've compiled your own +copy of NASM, you can redefine \i\c{OF_DEFAULT} at compile time and +choose what you want the default to be. + +Like \c{-o}, the intervening space between \c{-f} and the output +file format is optional; so \c{-f elf} and \c{-felf} are both valid. + +A complete list of the available output file formats can be given by +issuing the command \i\c{nasm -hf}. + + +\S{opt-l} The \i\c{-l} Option: Generating a \i{Listing File} + +If you supply the \c{-l} option to NASM, followed (with the usual +optional space) by a file name, NASM will generate a +\i{source-listing file} for you, in which addresses and generated +code are listed on the left, and the actual source code, with +expansions of multi-line macros (except those which specifically +request no expansion in source listings: see \k{nolist}) on the +right. For example: + +\c nasm -f elf myfile.asm -l myfile.lst + +If a list file is selected, you may turn off listing for a +section of your source with \c{[list -]}, and turn it back on +with \c{[list +]}, (the default, obviously). There is no "user +form" (without the brackets). This can be used to list only +sections of interest, avoiding excessively long listings. + + +\S{opt-M} The \i\c{-M} Option: Generate \i{Makefile Dependencies} + +This option can be used to generate makefile dependencies on stdout. +This can be redirected to a file for further processing. For example: + +\c nasm -M myfile.asm > myfile.dep + + +\S{opt-MG} The \i\c{-MG} Option: Generate \i{Makefile Dependencies} + +This option can be used to generate makefile dependencies on stdout. +This differs from the \c{-M} option in that if a nonexisting file is +encountered, it is assumed to be a generated file and is added to the +dependency list without a prefix. + + +\S{opt-MF} The \i\c\{-MF} Option: Set Makefile Dependency File + +This option can be used with the \c{-M} or \c{-MG} options to send the +output to a file, rather than to stdout. For example: + +\c nasm -M -MF myfile.dep myfile.asm + + +\S{opt-MD} The \i\c{-MD} Option: Assemble and Generate Dependencies + +The \c{-MD} option acts as the combination of the \c{-M} and \c{-MF} +options (i.e. a filename has to be specified.) However, unlike the +\c{-M} or \c{-MG} options, \c{-MD} does \e{not} inhibit the normal +operation of the assembler. Use this to automatically generate +updated dependencies with every assembly session. For example: + +\c nasm -f elf -o myfile.o -MD myfile.dep myfile.asm + + +\S{opt-MT} The \i\c{-MT} Option: Dependency Target Name + +The \c{-MT} option can be used to override the default name of the +dependency target. This is normally the same as the output filename, +specified by the \c{-o} option. + + +\S{opt-MQ} The \i\c{-MQ} Option: Dependency Target Name (Quoted) + +The \c{-MQ} option acts as the \c{-MT} option, except it tries to +quote characters that have special meaning in Makefile syntax. This +is not foolproof, as not all characters with special meaning are +quotable in Make. + + +\S{opt-MP} The \i\c{-MP} Option: Emit phony targets + +When used with any of the dependency generation options, the \c{-MP} +option causes NASM to emit a phony target without dependencies for +each header file. This prevents Make from complaining if a header +file has been removed. + + +\S{opt-F} The \i\c{-F} Option: Selecting a \i{Debug Information Format} + +This option is used to select the format of the debug information +emitted into the output file, to be used by a debugger (or \e{will} +be). Prior to version 2.03.01, the use of this switch did \e{not} enable +output of the selected debug info format. Use \c{-g}, see \k{opt-g}, +to enable output. Versions 2.03.01 and later automatically enable \c{-g} +if \c{-F} is specified. + +A complete list of the available debug file formats for an output +format can be seen by issuing the command \c{nasm -f -y}. Not +all output formats currently support debugging output. See \k{opt-y}. + +This should not be confused with the \c{-f dbg} output format option which +is not built into NASM by default. For information on how +to enable it when building from the sources, see \k{dbgfmt}. + + +\S{opt-g} The \i\c{-g} Option: Enabling \i{Debug Information}. + +This option can be used to generate debugging information in the specified +format. See \k{opt-F}. Using \c{-g} without \c{-F} results in emitting +debug info in the default format, if any, for the selected output format. +If no debug information is currently implemented in the selected output +format, \c{-g} is \e{silently ignored}. + + +\S{opt-X} The \i\c{-X} Option: Selecting an \i{Error Reporting Format} + +This option can be used to select an error reporting format for any +error messages that might be produced by NASM. + +Currently, two error reporting formats may be selected. They are +the \c{-Xvc} option and the \c{-Xgnu} option. The GNU format is +the default and looks like this: + +\c filename.asm:65: error: specific error message + +where \c{filename.asm} is the name of the source file in which the +error was detected, \c{65} is the source file line number on which +the error was detected, \c{error} is the severity of the error (this +could be \c{warning}), and \c{specific error message} is a more +detailed text message which should help pinpoint the exact problem. + +The other format, specified by \c{-Xvc} is the style used by Microsoft +Visual C++ and some other programs. It looks like this: + +\c filename.asm(65) : error: specific error message + +where the only difference is that the line number is in parentheses +instead of being delimited by colons. + +See also the \c{Visual C++} output format, \k{win32fmt}. + +\S{opt-Z} The \i\c{-Z} Option: Send Errors to a File + +Under \I{DOS}\c{MS-DOS} it can be difficult (though there are ways) to +redirect the standard-error output of a program to a file. Since +NASM usually produces its warning and \i{error messages} on +\i\c{stderr}, this can make it hard to capture the errors if (for +example) you want to load them into an editor. + +NASM therefore provides the \c{-Z} option, taking a filename argument +which causes errors to be sent to the specified files rather than +standard error. Therefore you can \I{redirecting errors}redirect +the errors into a file by typing + +\c nasm -Z myfile.err -f obj myfile.asm + +In earlier versions of NASM, this option was called \c{-E}, but it was +changed since \c{-E} is an option conventionally used for +preprocessing only, with disastrous results. See \k{opt-E}. + +\S{opt-s} The \i\c{-s} Option: Send Errors to \i\c{stdout} + +The \c{-s} option redirects \i{error messages} to \c{stdout} rather +than \c{stderr}, so it can be redirected under \I{DOS}\c{MS-DOS}. To +assemble the file \c{myfile.asm} and pipe its output to the \c{more} +program, you can type: + +\c nasm -s -f obj myfile.asm | more + +See also the \c{-Z} option, \k{opt-Z}. + + +\S{opt-i} The \i\c{-i}\I\c{-I} Option: Include File Search Directories + +When NASM sees the \i\c{%include} or \i\c{%pathsearch} directive in a +source file (see \k{include}, \k{pathsearch} or \k{incbin}), it will +search for the given file not only in the current directory, but also +in any directories specified on the command line by the use of the +\c{-i} option. Therefore you can include files from a \i{macro +library}, for example, by typing + +\c nasm -ic:\macrolib\ -f obj myfile.asm + +(As usual, a space between \c{-i} and the path name is allowed, and +optional). + +NASM, in the interests of complete source-code portability, does not +understand the file naming conventions of the OS it is running on; +the string you provide as an argument to the \c{-i} option will be +prepended exactly as written to the name of the include file. +Therefore the trailing backslash in the above example is necessary. +Under Unix, a trailing forward slash is similarly necessary. + +(You can use this to your advantage, if you're really \i{perverse}, +by noting that the option \c{-ifoo} will cause \c{%include "bar.i"} +to search for the file \c{foobar.i}...) + +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{NASMENV} environment variable (see +\k{nasmenv}). + +For Makefile compatibility with many C compilers, this option can also +be specified as \c{-I}. + + +\S{opt-p} The \i\c{-p}\I\c{-P} Option: \I{pre-including files}Pre-Include a File + +\I\c{%include}NASM allows you to specify files to be +\e{pre-included} into your source file, by the use of the \c{-p} +option. So running + +\c nasm myfile.asm -p myinc.inc + +is equivalent to running \c{nasm myfile.asm} and placing the +directive \c{%include "myinc.inc"} at the start of the file. + +For consistency with the \c{-I}, \c{-D} and \c{-U} options, this +option can also be specified as \c{-P}. + + +\S{opt-d} The \i\c{-d}\I\c{-D} Option: \I{pre-defining macros}Pre-Define a Macro + +\I\c{%define}Just as the \c{-p} option gives an alternative to placing +\c{%include} directives at the start of a source file, the \c{-d} +option gives an alternative to placing a \c{%define} directive. You +could code + +\c nasm myfile.asm -dFOO=100 + +as an alternative to placing the directive + +\c %define FOO 100 + +at the start of the file. You can miss off the macro value, as well: +the option \c{-dFOO} is equivalent to coding \c{%define FOO}. This +form of the directive may be useful for selecting \i{assembly-time +options} which are then tested using \c{%ifdef}, for example +\c{-dDEBUG}. + +For Makefile compatibility with many C compilers, this option can also +be specified as \c{-D}. + + +\S{opt-u} The \i\c{-u}\I\c{-U} Option: \I{Undefining macros}Undefine a Macro + +\I\c{%undef}The \c{-u} option undefines a macro that would otherwise +have been pre-defined, either automatically or by a \c{-p} or \c{-d} +option specified earlier on the command lines. + +For example, the following command line: + +\c nasm myfile.asm -dFOO=100 -uFOO + +would result in \c{FOO} \e{not} being a predefined macro in the +program. This is useful to override options specified at a different +point in a Makefile. + +For Makefile compatibility with many C compilers, this option can also +be specified as \c{-U}. + + +\S{opt-E} The \i\c{-E}\I{-e} Option: Preprocess Only + +NASM allows the \i{preprocessor} to be run on its own, up to a +point. Using the \c{-E} option (which requires no arguments) will +cause NASM to preprocess its input file, expand all the macro +references, remove all the comments and preprocessor directives, and +print the resulting file on standard output (or save it to a file, +if the \c{-o} option is also used). + +This option cannot be applied to programs which require the +preprocessor to evaluate \I{preprocessor expressions}\i{expressions} +which depend on the values of symbols: so code such as + +\c %assign tablesize ($-tablestart) + +will cause an error in \i{preprocess-only mode}. + +For compatiblity with older version of NASM, this option can also be +written \c{-e}. \c{-E} in older versions of NASM was the equivalent +of the current \c{-Z} option, \k{opt-Z}. + +\S{opt-a} The \i\c{-a} Option: Don't Preprocess At All + +If NASM is being used as the back end to a compiler, it might be +desirable to \I{suppressing preprocessing}suppress preprocessing +completely and assume the compiler has already done it, to save time +and increase compilation speeds. The \c{-a} option, requiring no +argument, instructs NASM to replace its powerful \i{preprocessor} +with a \i{stub preprocessor} which does nothing. + + +\S{opt-O} The \i\c{-O} Option: Specifying \i{Multipass Optimization} + +NASM defaults to not optimizing operands which can fit into a signed byte. +This means that if you want the shortest possible object code, +you have to enable optimization. + +Using the \c{-O} option, you can tell NASM to carry out different +levels of optimization. The syntax is: + +\b \c{-O0}: No optimization. All operands take their long forms, + if a short form is not specified, except conditional jumps. + This is intended to match NASM 0.98 behavior. + +\b \c{-O1}: Minimal optimization. As above, but immediate operands + which will fit in a signed byte are optimized, + unless the long form is specified. Conditional jumps default + to the long form unless otherwise specified. + +\b \c{-Ox} (where \c{x} is the actual letter \c{x}): Multipass optimization. + Minimize branch offsets and signed immediate bytes, + overriding size specification unless the \c{strict} keyword + has been used (see \k{strict}). For compatability with earlier + releases, the letter \c{x} may also be any number greater than + one. This number has no effect on the actual number of passes. + +The \c{-Ox} mode is recommended for most uses. + +Note that this is a capital \c{O}, and is different from a small \c{o}, which +is used to specify the output file name. See \k{opt-o}. + + +\S{opt-t} The \i\c{-t} Option: Enable TASM Compatibility Mode + +NASM includes a limited form of compatibility with Borland's \i\c{TASM}. +When NASM's \c{-t} option is used, the following changes are made: + +\b local labels may be prefixed with \c{@@} instead of \c{.} + +\b size override is supported within brackets. In TASM compatible mode, +a size override inside square brackets changes the size of the operand, +and not the address type of the operand as it does in NASM syntax. E.g. +\c{mov eax,[DWORD val]} is valid syntax in TASM compatibility mode. +Note that you lose the ability to override the default address type for +the instruction. + +\b unprefixed forms of some directives supported (\c{arg}, \c{elif}, +\c{else}, \c{endif}, \c{if}, \c{ifdef}, \c{ifdifi}, \c{ifndef}, +\c{include}, \c{local}) + +\S{opt-w} The \i\c{-w} and \i\c{-W} Options: Enable or Disable Assembly \i{Warnings} + +NASM can observe many conditions during the course of assembly which +are worth mentioning to the user, but not a sufficiently severe +error to justify NASM refusing to generate an output file. These +conditions are reported like errors, but come up with the word +`warning' before the message. Warnings do not prevent NASM from +generating an output file and returning a success status to the +operating system. + +Some conditions are even less severe than that: they are only +sometimes worth mentioning to the user. Therefore NASM supports the +\c{-w} command-line option, which enables or disables certain +classes of assembly warning. Such warning classes are described by a +name, for example \c{orphan-labels}; you can enable warnings of +this class by the command-line option \c{-w+orphan-labels} and +disable it by \c{-w-orphan-labels}. + +The \i{suppressible warning} classes are: + +\b \i\c{macro-params} covers warnings about \i{multi-line macros} +being invoked with the wrong number of parameters. This warning +class is enabled by default; see \k{mlmacover} for an example of why +you might want to disable it. + +\b \i\c{macro-selfref} warns if a macro references itself. This +warning class is disabled by default. + +\b\i\c{macro-defaults} warns when a macro has more default +parameters than optional parameters. This warning class +is enabled by default; see \k{mlmacdef} for why you might want to disable it. + +\b \i\c{orphan-labels} covers warnings about source lines which +contain no instruction but define a label without a trailing colon. +NASM warns about this somewhat obscure condition by default; +see \k{syntax} for more information. + +\b \i\c{number-overflow} covers warnings about numeric constants which +don't fit in 64 bits. This warning class is enabled by default. + +\b \i\c{gnu-elf-extensions} warns if 8-bit or 16-bit relocations +are used in \c{-f elf} format. The GNU extensions allow this. +This warning class is disabled by default. + +\b \i\c{float-overflow} warns about floating point overflow. +Enabled by default. + +\b \i\c{float-denorm} warns about floating point denormals. +Disabled by default. + +\b \i\c{float-underflow} warns about floating point underflow. +Disabled by default. + +\b \i\c{float-toolong} warns about too many digits in floating-point numbers. +Enabled by default. + +\b \i\c{user} controls \c{%warning} directives (see \k{pperror}). +Enabled by default. + +\b \i\c{error} causes warnings to be treated as errors. Disabled by +default. + +\b \i\c{all} is an alias for \e{all} suppressible warning classes (not +including \c{error}). Thus, \c{-w+all} enables all available warnings. + +In addition, you can set warning classes across sections. +Warning classes may be enabled with \i\c{[warning +warning-name]}, +disabled with \i\c{[warning -warning-name]} or reset to their +original value with \i\c{[warning *warning-name]}. No "user form" +(without the brackets) exists. + +Since version 2.00, NASM has also supported the gcc-like syntax +\c{-Wwarning} and \c{-Wno-warning} instead of \c{-w+warning} and +\c{-w-warning}, respectively. + + +\S{opt-v} The \i\c{-v} Option: Display \i{Version} Info + +Typing \c{NASM -v} will display the version of NASM which you are using, +and the date on which it was compiled. + +You will need the version number if you report a bug. + +\S{opt-y} The \i\c{-y} Option: Display Available Debug Info Formats + +Typing \c{nasm -f