These are patches for minor issues. 1. One gcc 4.1 regression and new warnings.
2. Use of lp instead of lpr. CUPS' SysV interface is a lot more powerful, and often the BSD layer is not installed in a fully IPP environment (at least Ubuntu and Debian make it optional, you need an extra package to have the lpd and lpr wrappers). This patch changes no functionality from the user's PoV, but lets at least Debian and Ubuntu drop a dependency on an extra package. 3. charsign fixes: some bunch of character sign fixes which are probably not done entirely as you guys would like, or you'd have accepted them sometime ago :-) -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh
#! /bin/sh /usr/share/dpatch/dpatch-run ## 20_fix_warnings.dpatch by <[EMAIL PROTECTED]> ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Fix b0rkage in the HPIJS code and quiet some warnings while at it @DPATCH@ diff -urNad hplip~/prnt/hpijs/context.cpp hplip/prnt/hpijs/context.cpp --- hplip~/prnt/hpijs/context.cpp 2006-06-16 10:43:53.000000000 -0300 +++ hplip/prnt/hpijs/context.cpp 2006-06-16 10:46:28.271070680 -0300 @@ -1882,6 +1882,7 @@ return SYSTEM_ERROR; } cm.ulMap2 = NULL; + cm.ulMap3 = NULL; PEN_TYPE pen = thePrinter->ActualPens(); unsigned int numinks; diff -urNad hplip~/prnt/hpijs/ljfastraster.cpp hplip/prnt/hpijs/ljfastraster.cpp --- hplip~/prnt/hpijs/ljfastraster.cpp 2006-06-16 10:43:53.000000000 -0300 +++ hplip/prnt/hpijs/ljfastraster.cpp 2006-06-16 10:46:54.287857471 -0300 @@ -1210,12 +1210,12 @@ { err = (((LJFastRaster*)thePrinter)->phLJFastRaster)->StartPage(); ((LJFastRaster*)thePrinter)->m_bStartPageNotSent = FALSE; - m_lPrinterRasterRow = 0; + m_lPrinterRasterRow = 0; } m_compressedsize = 2 * inputsize * INDY_STRIP_HEIGHT; - BOOL bRet = Compress (compressBuf, - (uint32_t *) &m_compressedsize, + BOOL bRet = Compress (compressBuf, + &m_compressedsize, pbyInputImageBuffer, inputsize, m_lCurrCDRasterRow, diff -urNad hplip~/prnt/hpijs/ljfastraster.h hplip/prnt/hpijs/ljfastraster.h --- hplip~/prnt/hpijs/ljfastraster.h 2006-06-16 10:43:53.000000000 -0300 +++ hplip/prnt/hpijs/ljfastraster.h 2006-06-16 10:46:28.271070680 -0300 @@ -136,7 +136,7 @@ long m_lCurrBlockHeight; long m_lPrinterRasterRow; // Current printer raster row. - unsigned long m_compressedsize; + uint32_t m_compressedsize; BOOL m_bCompressed; float m_fRatio; HPUInt8 *pbySeedRow; diff -urNad hplip~/prnt/hpijs/ljjetready.cpp hplip/prnt/hpijs/ljjetready.cpp --- hplip~/prnt/hpijs/ljjetready.cpp 2006-06-16 10:43:53.000000000 -0300 +++ hplip/prnt/hpijs/ljjetready.cpp 2006-06-16 10:46:28.272070556 -0300 @@ -491,6 +491,7 @@ default: //** unsupported media type; return error code assert (0); + err = SYSTEM_ERROR; break;// to be verified.. }
#! /bin/sh /usr/share/dpatch/dpatch-run ## 60_lp_instead_of_lpr.dpatch by <[EMAIL PROTECTED]> ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Use SysV lp instead of BSD lpr @DPATCH@ diff -urNad hplip~/base/device.py hplip/base/device.py --- hplip~/base/device.py 2006-06-16 09:59:42.000000000 -0300 +++ hplip/base/device.py 2006-06-16 10:03:22.033189743 -0300 @@ -1634,23 +1634,22 @@ self.writePrint(file(file_name, 'r').read()) else: - raw_str = '' - rem_str = '' - if raw: - raw_str = '-l' - - if remove: - rem_str = '-r' + lp_opt = '-oraw' + else: + lp_opt = '' if is_gzip: - c = 'gunzip -c %s | lpr %s %s -P%s' % (file_name, raw_str, rem_str, printer_name) + c = 'gunzip -c %s | lp -c -d%s %s' % (file_name, printer_name, lp_opt) else: - c = 'lpr -P%s %s %s %s' % (printer_name, raw_str, rem_str, file_name) + c = 'lp -c -d%s %s %s' % (printer_name, lp_opt, file_name) log.debug(c) os.system(c) + if remove: + os.remove(file_name) + def printTestPage(self, printer_name=None): return self.printParsedGzipPostscript(os.path.join( prop.home_dir, 'data', diff -urNad hplip~/ui/printerform.py hplip/ui/printerform.py --- hplip~/ui/printerform.py 2006-06-16 09:59:42.000000000 -0300 +++ hplip/ui/printerform.py 2006-06-16 10:00:48.538748471 -0300 @@ -384,12 +384,12 @@ alt_nup = (nup > 1 and t == 'application/postscript' and utils.which('psnup')) if alt_nup: - cmd = ' '.join(['psnup', '-%d' % nup, ''.join(['"', p, '"']), '| lpr -P', self.current_printer]) + cmd = ' '.join(['psnup', '-%d' % nup, ''.join(['"', p, '"']), '| lp -c -d', self.current_printer]) else: - cmd = ' '.join(['lpr -P', self.current_printer]) + cmd = ' '.join(['lp -c -d', self.current_printer]) if copies > 1: - cmd = ' '.join([cmd, '-#%d' % copies]) + cmd = ' '.join([cmd, '-n%d' % copies]) if not all_pages and len(page_range) > 0: cmd = ' '.join([cmd, '-o page-ranges=%s' % page_range])
#!/bin/sh /usr/share/dpatch/dpatch-run ## 14_charsign_fixes.dpatch by <[EMAIL PROTECTED]> ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Fixes all sort of unsigned char -> signed char bogonness @DPATCH@ diff -urNad hplip~/ip/xpnm.c hplip/ip/xpnm.c --- hplip~/ip/xpnm.c 2006-05-10 15:06:02.000000000 -0300 +++ hplip/ip/xpnm.c 2006-05-10 16:07:33.160410394 -0300 @@ -422,7 +422,7 @@ *pdwInputNextPos = g->dwInNextPos; *pdwOutputThisPos = g->dwOutNextPos; if (g->fIsEncode && !g->fDidHeader) { - BYTE buffer[MAX_ENCODE_HEADER_SIZE]; + char buffer[MAX_ENCODE_HEADER_SIZE]; DWORD maxval=(2<<((g->traits.iBitsPerPixel/ g->traits.iComponentsPerPixel)-1))-1; int len; diff -urNad hplip~/scan/sane/pml.c hplip/scan/sane/pml.c --- hplip~/scan/sane/pml.c 2006-05-10 15:06:02.000000000 -0300 +++ hplip/scan/sane/pml.c 2006-05-10 16:07:33.160410394 -0300 @@ -327,7 +327,7 @@ int maxlen ) { int type, len; - unsigned char prefix[2]; + char prefix[2]; if( PmlGetPrefixValue( obj, &type, 0, 0, 0, 0 ) == ERROR ) { @@ -341,7 +341,8 @@ } if( pSymbolSet ) { - *pSymbolSet = ( ( prefix[0] << 8 ) | prefix[1] ); + *pSymbolSet = ( ( (unsigned char)prefix[0] << 8 ) | + (unsigned char)prefix[1] ); } return len; @@ -350,7 +351,7 @@ int PmlGetIntegerValue( PmlObject_t obj, int * pType, int * pValue ) { int type; - unsigned char svalue[sizeof( int )]; + char svalue[sizeof( int )]; int accum = 0, i, len; if( !pType ) @@ -366,7 +367,7 @@ for( i = 0; i < len; i++ ) { - accum = ( ( accum << 8 ) | ( svalue[i] & 0xFF ) ); + accum = ( ( accum << 8 ) | ( (unsigned char)svalue[i] ) ); } if( pValue ) { @@ -475,18 +476,18 @@ int PmlRequestGet( int deviceid, int channelid, PmlObject_t obj ) { - unsigned char data[PML_MAX_DATALEN]; + char data[PML_MAX_DATALEN]; int datalen=0, stat=ERROR, result, type, pml_result; DBG( 0, "PmlRequestGet(obj=0x%8.8X)\n", obj ); - datalen = GetPml(deviceid, channelid, obj->oid, (char *)data, sizeof(data), &result, &type, &pml_result); + datalen = GetPml(deviceid, channelid, obj->oid, data, sizeof(data), &result, &type, &pml_result); PmlSetStatus(obj, pml_result); if (result == OK) { - PmlSetValue(obj, type, (char *)data, datalen); + PmlSetValue(obj, type, data, datalen); stat = OK; } diff -urNad hplip~/scan/sane/scl.c hplip/scan/sane/scl.c --- hplip~/scan/sane/scl.c 2006-05-10 15:06:02.000000000 -0300 +++ hplip/scan/sane/scl.c 2006-05-10 16:07:33.160410394 -0300 @@ -28,10 +28,11 @@ #include "scl.h" -static int SclBufferIsPartialReply( unsigned char * data, int datalen ) +static int SclBufferIsPartialReply( void * dataptr, int datalen ) { int i = 0, value = 0; - unsigned char d; + unsigned char * const data = dataptr; + unsigned int d; if( i >= datalen ) {
_______________________________________________ HPLIP-Devel mailing list HPLIP-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hplip-devel