head 1.3; access; symbols pkgsrc-2023Q2:1.2.0.88 pkgsrc-2023Q2-base:1.2 pkgsrc-2023Q1:1.2.0.86 pkgsrc-2023Q1-base:1.2 pkgsrc-2022Q4:1.2.0.84 pkgsrc-2022Q4-base:1.2 pkgsrc-2022Q3:1.2.0.82 pkgsrc-2022Q3-base:1.2 pkgsrc-2022Q2:1.2.0.80 pkgsrc-2022Q2-base:1.2 pkgsrc-2022Q1:1.2.0.78 pkgsrc-2022Q1-base:1.2 pkgsrc-2021Q4:1.2.0.76 pkgsrc-2021Q4-base:1.2 pkgsrc-2021Q3:1.2.0.74 pkgsrc-2021Q3-base:1.2 pkgsrc-2021Q2:1.2.0.72 pkgsrc-2021Q2-base:1.2 pkgsrc-2021Q1:1.2.0.70 pkgsrc-2021Q1-base:1.2 pkgsrc-2020Q4:1.2.0.68 pkgsrc-2020Q4-base:1.2 pkgsrc-2020Q3:1.2.0.66 pkgsrc-2020Q3-base:1.2 pkgsrc-2020Q2:1.2.0.62 pkgsrc-2020Q2-base:1.2 pkgsrc-2020Q1:1.2.0.42 pkgsrc-2020Q1-base:1.2 pkgsrc-2019Q4:1.2.0.64 pkgsrc-2019Q4-base:1.2 pkgsrc-2019Q3:1.2.0.60 pkgsrc-2019Q3-base:1.2 pkgsrc-2019Q2:1.2.0.58 pkgsrc-2019Q2-base:1.2 pkgsrc-2019Q1:1.2.0.56 pkgsrc-2019Q1-base:1.2 pkgsrc-2018Q4:1.2.0.54 pkgsrc-2018Q4-base:1.2 pkgsrc-2018Q3:1.2.0.52 pkgsrc-2018Q3-base:1.2 pkgsrc-2018Q2:1.2.0.50 pkgsrc-2018Q2-base:1.2 pkgsrc-2018Q1:1.2.0.48 pkgsrc-2018Q1-base:1.2 pkgsrc-2017Q4:1.2.0.46 pkgsrc-2017Q4-base:1.2 pkgsrc-2017Q3:1.2.0.44 pkgsrc-2017Q3-base:1.2 pkgsrc-2017Q2:1.2.0.40 pkgsrc-2017Q2-base:1.2 pkgsrc-2017Q1:1.2.0.38 pkgsrc-2017Q1-base:1.2 pkgsrc-2016Q4:1.2.0.36 pkgsrc-2016Q4-base:1.2 pkgsrc-2016Q3:1.2.0.34 pkgsrc-2016Q3-base:1.2 pkgsrc-2016Q2:1.2.0.32 pkgsrc-2016Q2-base:1.2 pkgsrc-2016Q1:1.2.0.30 pkgsrc-2016Q1-base:1.2 pkgsrc-2015Q4:1.2.0.28 pkgsrc-2015Q4-base:1.2 pkgsrc-2015Q3:1.2.0.26 pkgsrc-2015Q3-base:1.2 pkgsrc-2015Q2:1.2.0.24 pkgsrc-2015Q2-base:1.2 pkgsrc-2015Q1:1.2.0.22 pkgsrc-2015Q1-base:1.2 pkgsrc-2014Q4:1.2.0.20 pkgsrc-2014Q4-base:1.2 pkgsrc-2014Q3:1.2.0.18 pkgsrc-2014Q3-base:1.2 pkgsrc-2014Q2:1.2.0.16 pkgsrc-2014Q2-base:1.2 pkgsrc-2014Q1:1.2.0.14 pkgsrc-2014Q1-base:1.2 pkgsrc-2013Q4:1.2.0.12 pkgsrc-2013Q4-base:1.2 pkgsrc-2013Q3:1.2.0.10 pkgsrc-2013Q3-base:1.2 pkgsrc-2013Q2:1.2.0.8 pkgsrc-2013Q2-base:1.2 pkgsrc-2013Q1:1.2.0.6 pkgsrc-2013Q1-base:1.2 pkgsrc-2012Q4:1.2.0.4 pkgsrc-2012Q4-base:1.2 pkgsrc-2012Q3:1.2.0.2 pkgsrc-2012Q3-base:1.2 pkgsrc-2012Q2:1.1.1.1.0.82 pkgsrc-2012Q2-base:1.1.1.1 pkgsrc-2012Q1:1.1.1.1.0.80 pkgsrc-2012Q1-base:1.1.1.1 pkgsrc-2011Q4:1.1.1.1.0.78 pkgsrc-2011Q4-base:1.1.1.1 pkgsrc-2011Q3:1.1.1.1.0.76 pkgsrc-2011Q3-base:1.1.1.1 pkgsrc-2011Q2:1.1.1.1.0.74 pkgsrc-2011Q2-base:1.1.1.1 pkgsrc-2011Q1:1.1.1.1.0.72 pkgsrc-2011Q1-base:1.1.1.1 pkgsrc-2010Q4:1.1.1.1.0.70 pkgsrc-2010Q4-base:1.1.1.1 pkgsrc-2010Q3:1.1.1.1.0.68 pkgsrc-2010Q3-base:1.1.1.1 pkgsrc-2010Q2:1.1.1.1.0.66 pkgsrc-2010Q2-base:1.1.1.1 pkgsrc-2010Q1:1.1.1.1.0.64 pkgsrc-2010Q1-base:1.1.1.1 pkgsrc-2009Q4:1.1.1.1.0.62 pkgsrc-2009Q4-base:1.1.1.1 pkgsrc-2009Q3:1.1.1.1.0.60 pkgsrc-2009Q3-base:1.1.1.1 pkgsrc-2009Q2:1.1.1.1.0.58 pkgsrc-2009Q2-base:1.1.1.1 pkgsrc-2009Q1:1.1.1.1.0.56 pkgsrc-2009Q1-base:1.1.1.1 pkgsrc-2008Q4:1.1.1.1.0.54 pkgsrc-2008Q4-base:1.1.1.1 pkgsrc-2008Q3:1.1.1.1.0.52 pkgsrc-2008Q3-base:1.1.1.1 cube-native-xorg:1.1.1.1.0.50 cube-native-xorg-base:1.1.1.1 pkgsrc-2008Q2:1.1.1.1.0.48 pkgsrc-2008Q2-base:1.1.1.1 cwrapper:1.1.1.1.0.46 pkgsrc-2008Q1:1.1.1.1.0.44 pkgsrc-2008Q1-base:1.1.1.1 pkgsrc-2007Q4:1.1.1.1.0.42 pkgsrc-2007Q4-base:1.1.1.1 pkgsrc-2007Q3:1.1.1.1.0.40 pkgsrc-2007Q3-base:1.1.1.1 pkgsrc-2007Q2:1.1.1.1.0.38 pkgsrc-2007Q2-base:1.1.1.1 pkgsrc-2007Q1:1.1.1.1.0.36 pkgsrc-2007Q1-base:1.1.1.1 pkgsrc-2006Q4:1.1.1.1.0.34 pkgsrc-2006Q4-base:1.1.1.1 pkgsrc-2006Q3:1.1.1.1.0.32 pkgsrc-2006Q3-base:1.1.1.1 pkgsrc-2006Q2:1.1.1.1.0.30 pkgsrc-2006Q2-base:1.1.1.1 pkgsrc-2006Q1:1.1.1.1.0.28 pkgsrc-2006Q1-base:1.1.1.1 pkgsrc-2005Q4:1.1.1.1.0.26 pkgsrc-2005Q4-base:1.1.1.1 pkgsrc-2005Q3:1.1.1.1.0.24 pkgsrc-2005Q3-base:1.1.1.1 pkgsrc-2005Q2:1.1.1.1.0.22 pkgsrc-2005Q2-base:1.1.1.1 pkgsrc-2005Q1:1.1.1.1.0.20 pkgsrc-2005Q1-base:1.1.1.1 pkgsrc-2004Q4:1.1.1.1.0.18 pkgsrc-2004Q4-base:1.1.1.1 pkgsrc-2004Q3:1.1.1.1.0.16 pkgsrc-2004Q3-base:1.1.1.1 pkgsrc-2004Q2:1.1.1.1.0.14 pkgsrc-2004Q2-base:1.1.1.1 pkgsrc-2004Q1:1.1.1.1.0.12 pkgsrc-2004Q1-base:1.1.1.1 pkgsrc-2003Q4:1.1.1.1.0.10 pkgsrc-2003Q4-base:1.1.1.1 netbsd-1-6-1:1.1.1.1.0.6 netbsd-1-6-1-base:1.1.1.1 netbsd-1-6:1.1.1.1.0.8 netbsd-1-6-RELEASE-base:1.1.1.1 pkgviews:1.1.1.1.0.4 pkgviews-base:1.1.1.1 buildlink2:1.1.1.1.0.2 buildlink2-base:1.1.1.1 netbsd-1-5-PATCH003:1.1.1.1 netbsd-1-5-PATCH001:1.1.1.1 netbsd-1-5-RELEASE:1.1.1.1 netbsd-1-4-PATCH003:1.1.1.1 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.3 date 2023.08.10.15.39.36; author nia; state dead; branches; next 1.2; commitid gAjUj43l47uXQfAE; 1.2 date 2012.07.03.18.13.26; author joerg; state Exp; branches; next 1.1; 1.1 date 2000.07.08.13.30.04; author bjh21; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2000.07.08.13.30.04; author bjh21; state Exp; branches; next ; desc @@ 1.3 log @as31: Update to 2.3.1 This gets us around 15 years of changes and allows deleting some of our hacks and patches. Thanks to the SlackBuilds maintainer for the hint Version 2.3.1 * September 05, 2005 Alexander 'E-Razor' Krause alexander.krause@@erazor-zone.de * fixed addressing errors with 64bit platforms Thanks to Eric Jonas for the report! * ebuild added sys-devel/as31-2.3.1.ebuild Version 2.3.0 * March 31, 2005 Alexander 'E-Razor' Krause alexander.krause@@erazor-zone.de * ebuild added sys-devel/as31-2.3.0.ebuild * March 09, 2005 Martin Langer * automake instead of static makefile (adds .configure script) * new command line options * version output * output to a file * help * code cleanups * some other changes ;-) Version 2.2.1 * March 31, 2005 Alexander 'E-Razor' Krause alexander.krause@@erazor-zone.de * ebuild added sys-devel/as31-2.2.1-r1.ebuild * May 18, 2004 Martin Langer * fixing some visible bugs - this adds the missing -s option * May 06, 2004 Alexander 'E-Razor' Krause alexander.krause@@erazor-zone.de * compiler error on gcc < 3 solved * March 2004 Alexander 'E-Razor' Krause alexander.krause@@erazor-zone.de * removed bug when using more than 1 .inc * tmp filename is now as-uid-random * remove tmp_file when ready * July 2003 added include directive (Bernd Porr) * March 2001 fix crash with srecord format * command line version returns non-zero on error * April 2000 fix filename handling * convert everything to ANSI C and bison * properly handle 0b0h as hex 0xB0, not binary 0 * Make most errors into warning, and modify parser * to recover and continue to the end of the file * so that all warning are shown. * Sept 1995 bug fixes, add obsure option for cgi * Late 1994 Paul Stoffregen updates the code @ text @$NetBSD: patch-aa,v 1.2 2012/07/03 18:13:26 joerg Exp $ --- emitter.c.orig 2012-07-03 10:49:15.000000000 +0000 +++ emitter.c @@@@ -19,6 +19,8 @@@@ */ #include +#include +#include /* ---------------------------------------------------------------------- * DECLARE your own open(), close(), addr(), and byte() routines here. @@@@ -30,6 +32,8 @@@@ static int open2(), close2(), addr2(), b static int open3(), close3(), addr3(), byte3(); static int open4(), close4(), addr4(), byte4(); +void dumpline(unsigned long, unsigned char *, int); + /* ---------------------------------------------------------------------- * ADD an entry to this table to register your * output format routines. Give your object format @@@@ -67,8 +71,8 @@@@ emitusage() fprintf(stderr, ".\n"); } -emitopen(file,ftype,arg) -char *file,*ftype,*arg; +void +emitopen(char *file, char *ftype, char *arg) { int i; if( ftype ) { @@@@ -94,14 +98,12 @@@@ emitclose() (*formtab[format].e_close)(); } -emitaddr(a) -unsigned long int a; +void emitaddr(unsigned long a) { (*formtab[format].e_addr)(a); } -emitbyte(b) -int b; +void emitbyte(int b) { (*formtab[format].e_byte)(b); } @@@@ -180,9 +182,9 @@@@ unsigned char b; if( pos != -666 ) fprintf(fout,"\n"); newaddr = 0; pos = 15; - fprintf(fout,"%06x: ",addr+offset); + fprintf(fout,"%06lx: ",addr+offset); } else if( pos == 15 ) { - fprintf(fout,"%06x: ",addr+offset); + fprintf(fout,"%06lx: ",addr+offset); } fprintf(fout,"%02x ", b&0xff ); @@@@ -225,7 +227,7 @@@@ unsigned long int a; static byte2(b) unsigned char b; { - fprintf(fout,"%04x: %02x\n", addr, b&0xff ); + fprintf(fout,"%04lx: %02x\n", addr, b&0xff ); addr += 1; } @@@@ -283,6 +285,7 @@@@ unsigned char b; addr += 1; } +void dumpline(a,b,len) unsigned long a; unsigned char *b; @@@@ -292,7 +295,7 @@@@ int len; if(len <= 0 ) return; - fprintf(fout,"%04x: ",a); + fprintf(fout,"%04lx: ",a); for(i=0; i<8; i++ ) { if( i <= len ) @@@@ -394,32 +397,47 @@@@ static byte4(b) } } +srec_wrbyte(byte) +{ + check4 += byte; + fprintf(fout, "%02X", byte & 0xff); +} + finishline() { int i; - check4 = index4 + (address4 & 0xff) + ((address4>>8) & 0xff) + 4; + check4 = 0; switch(format4) { case '2': - fprintf(fout, "S1%02X%04X", index4 + 4, address4 & 0xffff); + fprintf(fout, "S1"); + srec_wrbyte(index4 + 2 + 1); + srec_wrbyte(address4 >> 8); + srec_wrbyte(address4); break; case '3': - fprintf(fout, "S2%02X%06X", index4 + 6, address4 & 0xffffff); - check4 += ((address4>>16) & 0xff) + 2; + fprintf(fout, "S2"); + srec_wrbyte(index4 + 3 + 1); + srec_wrbyte(address4 >> 16); + srec_wrbyte(address4 >> 8); + srec_wrbyte(address4); break; case '4': - fprintf(fout, "S3%02X%08X", index4 + 8, address4); - check4 += ((address4>>16) & 0xff) +((address4>>24) & 0xff) + 4; + fprintf(fout, "S3"); + srec_wrbyte(index4 + 4 + 1); + srec_wrbyte(address4 >> 24); + srec_wrbyte(address4 >> 16); + srec_wrbyte(address4 >> 8); + srec_wrbyte(address4); break; } - for(i=0; i