From 27e7bb5228f295786607a5e3ec42c418e400872c Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 10 Sep 2005 05:32:25 +0000 Subject: [PATCH] Cleanup the code a bit #105432. Package-Manager: portage-2.0.51.22-r2 --- app-cdr/pxlinux/ChangeLog | 6 +- app-cdr/pxlinux/Manifest | 15 +- .../files/pxlinux-0.0.4-cleanups.patch | 267 ++++++++++++++++++ app-cdr/pxlinux/pxlinux-0.0.4.ebuild | 5 +- 4 files changed, 289 insertions(+), 4 deletions(-) create mode 100644 app-cdr/pxlinux/files/pxlinux-0.0.4-cleanups.patch diff --git a/app-cdr/pxlinux/ChangeLog b/app-cdr/pxlinux/ChangeLog index ac061228014f..b0233aa1892b 100644 --- a/app-cdr/pxlinux/ChangeLog +++ b/app-cdr/pxlinux/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for app-cdr/pxlinux # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-cdr/pxlinux/ChangeLog,v 1.2 2005/06/07 09:33:10 dholm Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-cdr/pxlinux/ChangeLog,v 1.3 2005/09/10 05:32:25 vapier Exp $ + + 10 Sep 2005; Mike Frysinger + +files/pxlinux-0.0.4-cleanups.patch, pxlinux-0.0.4.ebuild: + Cleanup the code a bit #105432. 07 Jun 2005; David Holm pxlinux-0.0.4.ebuild: Added to ~ppc. diff --git a/app-cdr/pxlinux/Manifest b/app-cdr/pxlinux/Manifest index 586514a33775..cc90418aca3e 100644 --- a/app-cdr/pxlinux/Manifest +++ b/app-cdr/pxlinux/Manifest @@ -1,4 +1,15 @@ -MD5 ce3200d16a24c8933d73afca93245260 ChangeLog 412 +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +MD5 d3079f0cd1577cc68eb23822216f8375 pxlinux-0.0.4.ebuild 879 MD5 475813df93edaa0f60952f5859709eea metadata.xml 227 -MD5 c94807e4c3d6182d014e9980f5f2cd1a pxlinux-0.0.4.ebuild 820 +MD5 3e9193aad13ddf69a584c7d663259444 ChangeLog 559 +MD5 562b03849efd6282947c8bcbc84462b4 files/pxlinux-0.0.4-cleanups.patch 6865 MD5 0fbc53819973f8448e03eac0668707df files/digest-pxlinux-0.0.4 65 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.2 (GNU/Linux) + +iD8DBQFDInADgIKl8Uu19MoRAlTrAKCD8YUc+LOqL6CpzpQHh0/+FSxDlQCaAwj5 +4nK8GxPbgt2YSYKYeGSgj5U= +=BPrQ +-----END PGP SIGNATURE----- diff --git a/app-cdr/pxlinux/files/pxlinux-0.0.4-cleanups.patch b/app-cdr/pxlinux/files/pxlinux-0.0.4-cleanups.patch new file mode 100644 index 000000000000..7d372e719016 --- /dev/null +++ b/app-cdr/pxlinux/files/pxlinux-0.0.4-cleanups.patch @@ -0,0 +1,267 @@ +Remove unused variables/functions and fix misc warnings + +--- pxlinux/jitterbeta.cpp ++++ pxlinux/jitterbeta.cpp +@@ -364,15 +364,13 @@ + + Scsi_Command cmd; + +- int err; +- + if (!cmd.associate(drive)) + fprintf (stderr,"%s: unable to open: ",drive), + perror (NULL), + exit (1); + + for (int i=0;i<16;i++) { +- int j = read_one_ecc_block(drive, pBuffer, lba); ++ read_one_ecc_block(drive, pBuffer, lba); + //if (j == COMMAND_FAILED) i=16; + lba += 16; + } +@@ -394,7 +394,7 @@ + { + int capacity; + char *drive; +- int** result_map; ++ int* result_map; + int *speed; + int interval; + +@@ -427,7 +426,7 @@ + int jitter, k; + unsigned int value; + int produce_map = 0; +- void* pBuffer = malloc(32768); ++ char* pBuffer[32768]; + + + if (!capacity) read_capacity(drive, &capacity); +@@ -445,17 +445,15 @@ + // ReleaseSemaphore(hSemaphore, 1, NULL); + //} + +- if (result_map) { +- *result_map = (int*)calloc(sizeof(int), capacity+1); +- (*result_map)[0] = capacity; ++ result_map = (int*)calloc(sizeof(int), capacity+1); ++ result_map[0] = capacity; + produce_map = 1; +- } + + for (k = 0;k> 4); + capacity >>= 7; + +- if (result_map) { +- *result_map = (int*)calloc(sizeof(int), capacity+1); +- (*result_map)[0] = capacity; ++ result_map = (int*)calloc(sizeof(int), capacity+1); ++ result_map[0] = capacity; + produce_map = 1; +- } + + //if (virtual_file) { + // *virtual_file++ = capacity; +@@ -442,7 +440,7 @@ + for (k = 0;k 4) broken_count++; + +@@ -472,7 +470,7 @@ + //} + + total_error_count = 0; +- for (k=0;k> 4); + capacity >>= 7; + +- if (result_map) { +- *result_map = (int*)calloc(sizeof(int), capacity+1); +- (*result_map)[0] = capacity; ++ result_map = (int*)calloc(sizeof(int), capacity+1); ++ result_map[0] = capacity; + produce_map = 1; +- } + + //if (virtual_file) { + // *virtual_file++ = capacity; +@@ -444,7 +442,7 @@ + for (k = 0;k 280) broken_count++; + +@@ -474,7 +472,7 @@ + //} + + total_error_count = 0; +- for (k=0;k 20 && src[k][i] > local_max) { + peaks[k][j1] = i; + local_max = src[k][i]; +@@ -144,13 +143,9 @@ + { + + Scsi_Command cmd; +- unsigned char header[40],inq[128],*page2A=NULL; +- char cmdname[64]; + // int i,j,ntracks,err,dvd_dash=0,dvd_plus=0, + // plus_mediaid_printed=0,page2A_printed=0,dvd_ram_spare=0; +- unsigned short profile,dvd_0E=0,dvd_10=0,dvd_11=0,dvd_0A=0,dvd_C0=0; + //char data [65536]; //= {0x00,0x00,0,0,0,0,0,0}; +- char *pDest; + int layers; + + +--- pxlinux/transport.hxx ++++ pxlinux/transport.hxx +@@ -1271,6 +1271,8 @@ + #error "Unsupported OS" + #endif + ++#if 0 ++ + #define DUMP_EVENTS 0 + static int handle_events (Scsi_Command &cmd) + { unsigned char event[8]; +@@ -1599,6 +1601,8 @@ + } + #undef FEATURE21_BROKEN + ++#endif ++ + #undef ERRCODE + #undef CREAM_ON_ERRNO + #undef CREAM_ON_ERRNO_NAKED diff --git a/app-cdr/pxlinux/pxlinux-0.0.4.ebuild b/app-cdr/pxlinux/pxlinux-0.0.4.ebuild index 75375494768d..8c3a0e2b33aa 100644 --- a/app-cdr/pxlinux/pxlinux-0.0.4.ebuild +++ b/app-cdr/pxlinux/pxlinux-0.0.4.ebuild @@ -1,6 +1,8 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-cdr/pxlinux/pxlinux-0.0.4.ebuild,v 1.2 2005/06/07 09:33:10 dholm Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-cdr/pxlinux/pxlinux-0.0.4.ebuild,v 1.3 2005/09/10 05:32:25 vapier Exp $ + +inherit eutils DESCRIPTION="PlexTools-like app for Plextor drives in linux" HOMEPAGE="http://www-user.tu-chemnitz.de/~noe/Plextor/" @@ -18,6 +20,7 @@ S=${WORKDIR}/${PN} src_unpack() { unpack ${A} cd "${S}" + epatch "${FILESDIR}"/${P}-cleanups.patch rm -f Makefile } -- 2.26.2