home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / bin / foo2xqx-wrapper < prev    next >
Encoding:
Text File  |  2007-03-27  |  14.0 KB  |  576 lines

  1. #!/bin/sh
  2.  
  3. #* Copyright (C) 2003-2006  Rick Richardson
  4. #*
  5. #* This program is free software; you can redistribute it and/or modify
  6. #* it under the terms of the GNU General Public License as published by
  7. #* the Free Software Foundation; either version 2 of the License, or
  8. #* (at your option) any later version.
  9. #*
  10. #* This program is distributed in the hope that it will be useful,
  11. #* but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. #* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. #* GNU General Public License for more details.
  14. #*
  15. #* You should have received a copy of the GNU General Public License
  16. #* along with this program; if not, write to the Free Software
  17. #* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. #*
  19. #* Authors: Rick Richardson <rick.richardson@comcast.net>
  20.  
  21. VERSION='$Id: foo2xqx-wrapper.in,v 1.11 2006/12/17 16:00:06 rick Exp $'
  22.  
  23. #
  24. # Printer Notes:
  25. #
  26. # HP LaserJet M1005    - Same as 2200 DL, plus needs -P
  27. #
  28.  
  29. PROGNAME="$0"
  30. BASENAME=`basename $PROGNAME`
  31. PREFIX=/usr
  32. SHARE=$PREFIX/share/foo2zjs
  33.  
  34. #
  35. #    Log the command line, for debugging and problem reports
  36. #
  37. if [ -x /usr/bin/logger ]; then
  38.     logger -t "$BASENAME" -p lpr.info -- "foo2xqx-wrapper $@" </dev/null
  39. fi
  40.  
  41. usage() {
  42.     cat <<EOF
  43. Usage:
  44.     $BASENAME [options] [ps-file]
  45.  
  46.     Foomatic printer wrapper for the foo2xqx printer driver.
  47.     This script reads a Postscript ps-file or standard input
  48.     and converts it to Zenographics ZjStream printer format.
  49.  
  50. Normal Options:
  51. -c                Print in color (else monochrome)
  52. -d duplex         Duplex code to send to printer [$DUPLEX]
  53.                     1=off, 2=longedge, 3=shortedge
  54. -m media          Media code to send to printer [$MEDIA]
  55.                     1=standard, 2=transparency, 3=glossy, 257=envelope,
  56.                     259=letterhead, 261=thickstock, 262=postcard, 263=labels
  57. -p paper          Paper code [$PAPER]
  58.                     1=letter, 5=legal, 7=executive, 9=A4, 11=A5, 13=B5
  59.                     20=env#10, 27=envDL 28=envC5 34=envB5 37=envMonarch
  60. -n copies         Number of copies [$COPIES]
  61. -r <xres>x<yres>  Set device resolution in pixels/inch [$RES]
  62. -s source         Source code to send to printer [$SOURCE]
  63.                     1=upper, 2=lower, 4=manual, 7=auto
  64.             Code numbers may vary with printer model.
  65. -t                Draft mode.  Every other pixel is white.
  66. -2/-3/-4/-6/-8/-10/-12/-14/-15/-16/-18
  67.                   Print with N-up (requires psutils)
  68. -o orient         For N-up: -op is portrait, -ol is landscape, -os is seascape.
  69.  
  70. Printer Tweaking Options:
  71. -u <xoff>x<yoff>  Set offset of upper left printable in pixels [varies]
  72. -l <xoff>x<yoff>  Set offset of lower right printable in pixels [varies]
  73. -L mask           Send logical clipping values from -u/-l in ZjStream [3]
  74.                   0=no, 1=Y, 2=X, 3=XY
  75. -P                Do not output START_PLANE codes.  May be needed by some
  76.                   monochrome-only printers.
  77. -X padlen         Add extra zero padding to the end of BID segments [16]
  78. -z model          Model: 0=2300DL 1=hp1020 [0]
  79.  
  80. Color Tweaking Options:
  81. -g gsopts         Additional options to pass to Ghostscript, such as
  82.                   -dDITHERPPI=nnn, etc.  May appear more than once. []
  83. -G profile.icm    Convert profile.icm to a Postscript CRD using icc2ps and
  84.                   adjust colors using the setcolorrendering PS operator.
  85.                   $SHARE/icm/ will be searched for profile.icm.
  86. -I intent         Select profile intent from ICM file [$INTENT]
  87.                   0=Perceptual, 1=Colorimetric, 2=Saturation, 3=Absolute
  88. -G gamma-file.ps  Prepend gamma-file to the Postscript input to perform
  89.                   color correction using the setcolortransfer PS operator.
  90.  
  91. Debugging Options:
  92. -S plane          Output just a single color plane from a color print [all]
  93.                   1=Cyan, 2=Magenta, 3=Yellow, 4=Black
  94. -D lvl            Set Debug level [$DEBUG]
  95. -V                $VERSION
  96. EOF
  97.  
  98.     exit 1
  99. }
  100.  
  101. #
  102. #       Report an error and exit
  103. #
  104. error() {
  105.     echo "$BASENAME: $1" >&2
  106.     exit 1
  107. }
  108.  
  109. dbgcmd() {
  110.     if [ $DEBUG -ge 1 ]; then
  111.         echo "$@" >&2
  112.     fi
  113.     "$@"
  114. }
  115.  
  116. #
  117. #    N-up-ify the job.  Requires psnup from psutils package
  118. #
  119. nup() {
  120.     case "$NUP" in
  121.     [2368]|1[0458])
  122.     tr '\r' '\n' | psnup $NUP_ORIENT -d2 -$NUP -m.3in -p$paper -q
  123.     ;;
  124.     [49]|1[26])
  125.     tr '\r' '\n' | psnup $NUP_ORIENT -d2 -$NUP -m.5in -p$paper -q
  126.     ;;
  127.     *)
  128.     error "Illegal call to nup()."
  129.     ;;
  130.     esac
  131. }
  132.  
  133. #
  134. #       Process the options
  135. #
  136.  
  137. # Try to use a local copy of GhostScript 8.14, if available.  Otherwise,
  138. # fallback to whatever the Linux distro has installed (usually 7.05)
  139. #
  140. # N.B. := operator used here, when :- would be better, because "ash"
  141. # doesn't have :-
  142. if gs8 -v >/dev/null 2>&1; then
  143.         GSBIN=${GSBIN:-gs8}
  144. else
  145.         GSBIN=${GSBIN:-gs}
  146. fi
  147.  
  148. CMDLINE="$*"
  149. DEBUG=0
  150. DUPLEX=1
  151. COLOR=
  152. COLORMODE=0
  153. # What mode to use if the user wants us to pick the "best" mode
  154. case `$GSBIN --version` in
  155. 7*)    DEFAULTCOLORMODE=10
  156.     DEFAULTCOLORMODE=2
  157.     ;;
  158. *)    DEFAULTCOLORMODE=2
  159.     ;;
  160. esac
  161. QUALITY=1
  162. MEDIA=1
  163. COPIES=1
  164. PAPER=1
  165. RES=1200x600
  166. SOURCE=7
  167. NUP=
  168. CLIP_UL=
  169. CLIP_LR=
  170. CLIP_LOG=
  171. BC=
  172. AIB=
  173. NOPLANES=
  174. COLOR2MONO=
  175. GAMMAFILE=
  176. INTENT=0
  177. GSOPTS=
  178. EXTRAPAD=
  179. SAVETONER=
  180. NUP_ORIENT=
  181. GSDEV=-sDEVICE=pbmraw
  182. while getopts "1:23456789o:b:cC:d:g:l:u:L:m:n:p:q:r:s:tABS:D:G:I:PX:Vh?" opt
  183. do
  184.     case $opt in
  185.     b)    GSBIN="$OPTARG";;
  186.     c)    COLOR=-c;;
  187.     d)    DUPLEX="$OPTARG";;
  188.     g)    GSOPTS="$GSOPTS $OPTARG";;
  189.     m)    MEDIA="$OPTARG";;
  190.     n)    COPIES="$OPTARG";;
  191.     p)    PAPER="$OPTARG";;
  192.     q)    QUALITY="$OPTARG";;
  193.     r)    RES="$OPTARG";;
  194.     s)    SOURCE="$OPTARG";;
  195.     t)    SAVETONER="-t";;
  196.     l)    CLIP_LR="-l $OPTARG";;
  197.     u)    CLIP_UL="-u $OPTARG";;
  198.     L)    CLIP_LOG="-L $OPTARG";;
  199.     A)    AIB=-A;;
  200.     B)    BC=-B;;
  201.     C)    COLORMODE="$OPTARG";;
  202.     S)    COLOR2MONO="-S$OPTARG";;
  203.     D)    DEBUG="$OPTARG";;
  204.     G)    GAMMAFILE="$OPTARG";;
  205.     I)    INTENT="$OPTARG";;
  206.     P)    NOPLANES=-P;;
  207.     X)    EXTRAPAD="-X $OPTARG";;
  208.     [234689])    NUP="$opt";;
  209.     [57])    error "Can't find acceptable layout for $opt-up";;
  210.     1)    case "$OPTARG" in
  211.         [024568])    NUP="1$OPTARG";;
  212.         *)    error "Can't find acceptable layout for 1$OPTARG-up";;
  213.         esac
  214.         ;;
  215.     o)    case "$OPTARG" in
  216.         l*)    NUP_ORIENT=-l;;
  217.         s*)    NUP_ORIENT=-r;;
  218.         p*|*)    NUP_ORIENT=;;
  219.         esac;;
  220.     V)    echo "$VERSION"; foo2xqx -V; exit 0;;
  221.     h|\?)
  222.         if [ "$CMDLINE" != "-?" -a "$CMDLINE" != -h ]; then
  223.             echo "Illegal command:"
  224.             echo "    $0 $CMDLINE"
  225.             echo
  226.         fi
  227.         usage;;
  228.     esac
  229. done
  230. shift `expr $OPTIND - 1`
  231.  
  232. #
  233. case "$QUALITY" in
  234. 0)
  235.     GSOPTS="-dCOLORSCREEN $GSOPTS"
  236.     ;;
  237. 1)
  238.     GSOPTS="-dCOLORSCREEN $GSOPTS"
  239.     ;;
  240. 2)
  241.     GSOPTS="-dMaxBitMap=500000000 $GSOPTS"
  242.     ;;
  243. esac
  244.  
  245. #
  246. #    Validate media code
  247. #
  248. case "$MEDIA" in
  249. 1|standard)    MEDIA=1;;
  250. 2|transparency)    MEDIA=2;;
  251. 3|glossy)    MEDIA=3;;
  252. 257|envelope)    MEDIA=257;;
  253. 259|letterhead)    MEDIA=259;;
  254. 261|thickstock)    MEDIA=261;;
  255. 262|postcard)    MEDIA=262;;
  256. 263|labels)    MEDIA=263;;
  257. [0-9]*)        ;;
  258. *)        error "Unknown media code $MEDIA";;
  259. esac
  260.  
  261. #
  262. #    Validate source (InputSlot) code
  263. #
  264. case "$SOURCE" in
  265. 1|upper)    SOURCE=1;;
  266. 4|manual)    SOURCE=4;;
  267. 7|auto)        SOURCE=7;;
  268. [0-9]*)        ;;
  269. *)        error "Unknown source code $SOURCE";;
  270. esac
  271.  
  272. #
  273. #    Validate Duplex code
  274. #
  275. case "$DUPLEX" in
  276. 1|off|none)    DUPLEX=1;;
  277. 2|long*)    DUPLEX=2;;
  278. 3|short*)    DUPLEX=3;;
  279. [0-9]*)        ;;
  280. *)        error "Unknown duplex code $DUPLEX";;
  281. esac
  282.  
  283. #
  284. #    Validate Resolution
  285. #
  286. case "$RES" in
  287. 600x600)    ;;
  288. 1200x600)    ;;
  289. *)        error "Illegal resolution $RES";;
  290. esac
  291.  
  292. #
  293. #    Figure out the paper dimensions in pixels/inch, and set the
  294. #    default clipping region.  Unfortunately, this is a trouble
  295. #    area for ZjStream printers.  Various versions of ZjS print
  296. #    engines react differently when asked to print into their
  297. #    unprintable regions.
  298. #
  299. #    The Minolta 2200 DL is sensitive to its unprintable regions,
  300. #    and will pixel skew if you try to print there.
  301. #
  302. #    The HP1000 will print blank pages when asked to print into its
  303. #    unprintable region.
  304. #
  305. #    The Minolta 2300 DL doesn't care if print into the unprintable
  306. #    region.  It will do the clipping itself.  This is as it should be.
  307. #    But it won't hurt it if we do the clipping here.
  308. #
  309. set_clipping() {
  310.     ulx=$1; uly=$2
  311.     lrx=$3; lry=$4
  312.  
  313.     # Set clipping region if it isn't already set
  314.     if [ "$CLIP_UL" = "" ]; then
  315.     case "$RES" in
  316.     600x600)    ulx=`expr $ulx / 2`;;
  317.     2400x600)    ulx=`expr $ulx \* 2`;;
  318.     esac
  319.     CLIP_UL="-u ${ulx}x${uly}"
  320.     fi
  321.     if [ "$CLIP_LR" = "" ]; then
  322.     case "$RES" in
  323.     600x600)    lrx=`expr $lrx / 2`;;
  324.     2400x600)    lrx=`expr $lrx \* 2`;;
  325.     esac
  326.     CLIP_LR="-l ${lrx}x${lry}"
  327.     fi
  328. }
  329.  
  330. case "$PAPER" in
  331. 1|letter)    PAPER=1;    paper=letter;    XDIM="10200"; YDIM="6600"
  332.         set_clipping 177 84    177 84
  333.         ;;
  334. 5|legal)    PAPER=5;    paper=legal;     XDIM="10200"; YDIM="8400"
  335.         set_clipping 177 96    177 96
  336.         ;;
  337. 7|executive)    PAPER=7;    paper=executive; XDIM="8700";  YDIM="6300"
  338.         set_clipping 192 96    192 96
  339.         ;;
  340. 9|a4|A4)    PAPER=9;    paper=a4;        XDIM="9920";  YDIM="7016"
  341.         set_clipping 176 84    176 84
  342.         ;;
  343. 11|a5|A5)    PAPER=11;    paper=a5;        XDIM="6992";  YDIM="4960"
  344.         set_clipping 192 96    192 96
  345.         ;;
  346. 13|b5|B5)    PAPER=13;    paper=b5;        XDIM="8598";  YDIM="6070"
  347.         set_clipping 192 96    192 96
  348.         ;;
  349. 20|"env#10")    PAPER=20;    paper=env10;     XDIM="4950";  YDIM="5700"
  350.         set_clipping 171 78    171 78
  351.         ;;
  352. 27|envDL)    PAPER=27;    paper=envDL;     XDIM="5200";  YDIM="5200"
  353.         set_clipping 176 84    176 84
  354.         ;;
  355. 28|envC5)    PAPER=28;    paper=envC5;     XDIM="7650";  YDIM="5408"
  356.         set_clipping 170 80    169 80
  357.         ;;
  358. 34|envB5)    PAPER=34;    paper=envB5;     XDIM="8316";  YDIM="5892"
  359.         set_clipping 174 74    174 74
  360.         ;;
  361. 37|envMonarch)    PAPER=37;    paper=envMonarch;XDIM="4650";  YDIM="4500"
  362.         set_clipping 174 78    173 78
  363.         ;;
  364. *)        error "Unimplemented paper code $PAPER";;
  365. esac
  366. PAPERSIZE="-sPAPERSIZE=$paper";
  367.  
  368. case "$RES" in
  369. 600x600)    XDIM=`expr $XDIM / 2`;;
  370. 1200x600)    ;;
  371. 2400x600)    XDIM=`expr $XDIM \* 2`;;
  372. esac
  373. DIM="${XDIM}x${YDIM}"
  374.  
  375. #
  376. # If there is an argument left, take it as the file to print.
  377. # Else, the input comes from stdin.
  378. #
  379. if [ $# -ge 1 ]; then
  380.     if [ "$LPJOB" = "" ]; then
  381.     : # LPJOB="$1"
  382.     fi
  383.     exec < $1
  384. fi
  385.  
  386. #
  387. # Filter thru psnup if N-up printing has been requested
  388. #
  389. case $NUP in
  390. [234689]|1[024568])    PREFILTER="nup";;
  391. *)            PREFILTER=cat;;
  392. esac
  393.  
  394. #
  395. #    Overload -G.  If the file name ends with ".icm" or ".ICM"
  396. #    then convert the ICC color profile to a Postscript CRD,
  397. #    then prepend it to the users job.  Select the intent
  398. #    using the -I option.
  399. #
  400.  
  401. create_crd() {
  402.     #
  403.     # Create a Postscript CRD
  404.     #
  405.     ICC2PS=$PREFIX/bin/foo2zjs-icc2ps
  406.     if [ -x $ICC2PS ]; then
  407.     $ICC2PS -o $GAMMAFILE -t$INTENT > $ICCTMP.crd.ps 2>$ICCTMP.log \
  408.     || error "Problem converting .ICM file to Postscript"
  409.     cat > $ICCTMP.usecie.ps <<-EOF
  410.         %!PS-Adobe-3.0
  411.         <</UseCIEColor true>>setpagedevice
  412.     EOF
  413.     cat > $ICCTMP.selcrd.ps <<-EOF
  414.         /Current /ColorRendering findresource setcolorrendering
  415.     EOF
  416.     GAMMAFILE="$ICCTMP.usecie.ps $ICCTMP.crd.ps $ICCTMP.selcrd.ps"
  417.     else
  418.     GAMMFILE=
  419.     fi
  420. }
  421.  
  422. if [ $DEBUG -gt 0 ]; then
  423.     ICCTMP=/tmp/icc
  424. else
  425.     ICCTMP=/tmp/icc$$
  426. fi
  427.  
  428. if [ "" = "$COLOR" ]; then
  429.     COLORMODE=
  430.     GAMMAFILE=
  431. else
  432.     case "$COLORMODE" in
  433.     0)    COLORMODE=$DEFAULTCOLORMODE;;
  434.     esac
  435. fi
  436.  
  437. CRDBASE="$PREFIX/share/foo2zjs/crd"
  438. case "$RES" in
  439.     600x600)    COLORMODE=;;
  440.     1200x600)    SCREEN=screen1200.ps;;
  441.     2400x600)    SCREEN=screen2400.ps;;
  442. esac
  443.  
  444. case "$COLORMODE" in
  445. "")
  446.     # Monochrome
  447.     ;;
  448. 10|icm)
  449.     # Use old ICM method
  450.     AIB=-A
  451.     BC=-B
  452.     case "$GAMMAFILE" in
  453.     *.icm|*.ICM|*.icc|*.ICC)
  454.     #
  455.     # Its really an .ICM file, not a gamma file.
  456.     #
  457.     # The file can be a full path name, or the name of a file in $SHARE/icm/
  458.     #
  459.     if [ -r "$GAMMAFILE" ]; then
  460.         create_crd
  461.     elif [ -r "$SHARE/icm/$GAMMAFILE" ]; then
  462.         GAMMAFILE="$SHARE/icm/$GAMMAFILE"
  463.         create_crd
  464.     else
  465.         GAMMAFILE=
  466.     fi
  467.     ;;
  468.     none)
  469.     GAMMAFILE=
  470.     ;;
  471.     esac
  472.     ;;
  473. 1|photo)
  474.     # Photo
  475.     GAMMAFILE="$CRDBASE/prolog.ps"
  476.     GAMMAFILE="$GAMMAFILE $CRDBASE/2300w-1200@150-l250-kx,ucr125,75-per.crd"
  477.     GAMMAFILE="$GAMMAFILE $CRDBASE/$SCREEN"
  478.     ;;
  479. 2|graphics)
  480.     # Photo and Text
  481.     GAMMAFILE="$CRDBASE/prolog.ps"
  482.     #GAMMAFILE="$GAMMAFILE $CRDBASE/2300w-1200@150-l250-kx,ucr100,75-per.crd"
  483.     GAMMAFILE="$GAMMAFILE $CRDBASE/kh.crd"
  484.     GAMMAFILE="$GAMMAFILE $CRDBASE/$SCREEN"
  485.     ;;
  486. 3|text)
  487.     # Graphic and Text
  488.     GAMMAFILE="$CRDBASE/prolog.ps"
  489.     #GAMMAFILE="$GAMMAFILE $CRDBASE/2300w-1200@150-l250-kx,ucr100,50-per.crd"
  490.     GAMMAFILE="$GAMMAFILE $CRDBASE/kx.crd"
  491.     GAMMAFILE="$GAMMAFILE $CRDBASE/$SCREEN"
  492.     ;;
  493. 4|tonersave)
  494.     # Reduced toner
  495.     GAMMAFILE="$CRDBASE/prolog.ps"
  496.     GAMMAFILE="$GAMMAFILE $CRDBASE/2300w-1200@150-l250-kx,ucr100,0-per.crd"
  497.     GAMMAFILE="$GAMMAFILE $CRDBASE/$SCREEN"
  498.     ;;
  499. *.crd)
  500.     GAMMAFILE="$CRDBASE/prolog.ps"
  501.     if [ -f $COLORMODE ]; then
  502.     GAMMAFILE="$GAMMAFILE $COLORMODE"
  503.     elif [ -f $CRDBASE/$COLORMODE ]; then
  504.     GAMMAFILE="$GAMMAFILE $CRDBASE/$COLORMODE"
  505.     else
  506.     error "Can't find CRD '$COLORMODE' in . or in $CRDBASE"
  507.     fi
  508.     GAMMAFILE="$GAMMAFILE $CRDBASE/$SCREEN"
  509.     ;;
  510. *)
  511.     error "Unknown color method '$COLORMODE'"
  512.     ;;
  513. esac
  514.  
  515. if [ "" != "$COLOR" ]; then
  516.     if [ "" = "$AIB" -a "" = "$BC" ]; then
  517.     # Faster, but can't handle AllIsBlack or BlackClears
  518.     GSDEV=-sDEVICE=pksmraw
  519.     else
  520.     # Can't handle different size pages
  521.     GSDEV=-sDEVICE=bitcmyk
  522.     fi
  523. fi
  524.  
  525. #
  526. #    Figure out USERNAME
  527. #
  528. if [ "$LPUSER" != "" ]; then
  529.     USER="$LPUSER@$LPHOST"
  530. else
  531.     USER=""
  532. fi
  533.  
  534. #
  535. #    Main Program, just cobble together the pipeline and run it
  536. #
  537. #    The malarky with file descriptors 1 and 3 is to avoid a bug in
  538. #    (some versions?) of Ghostscript where Postscript's stdout gets
  539. #    intermingled with the printer drivers output, resulting in
  540. #    corrupted image data.
  541. #
  542. GS="$GSBIN -q -dBATCH -dSAFER -dQUIET -dNOPAUSE"
  543.  
  544. $PREFILTER \
  545. | ($GS $PAPERSIZE -g$DIM -r$RES $GSDEV $GSOPTS \
  546.     -sOutputFile="|cat 1>&3" $GAMMAFILE - >/dev/null) 3>&1 \
  547. | foo2xqx -r$RES -g$DIM -p$PAPER -m$MEDIA -n$COPIES -d$DUPLEX -s$SOURCE \
  548.         $COLOR $CLIP_UL $CLIP_LR $CLIP_LOG $SAVETONER \
  549.         -J "$LPJOB" -U "$USER" \
  550.         $BC $AIB $COLOR2MONO $NOPLANES $EXTRAPAD -D$DEBUG
  551.  
  552. #
  553. #    Log the command line, for debugging and problem reports
  554. #
  555. if [ -x /usr/bin/logger ]; then
  556.     logger -t "$BASENAME" -p lpr.info -- \
  557.     "$GSBIN $PAPERSIZE -g$DIM -r$RES $GSDEV $GSOPT $GAMAFILE"
  558.     logger -t "$BASENAME" -p lpr.info -- \
  559.     "foo2xqx -r$RES -g$DIM -p$PAPER -m$MEDIA \
  560. -n$COPIES -d$DUPLEX -s$SOURCE $COLOR $CLIP_UL $CLIP_LR $CLIP_LOG \
  561. $SAVETONER $BC $AIB $COLOR2MONO $NOPLANES $EXTRAPAD"
  562. fi
  563.  
  564. #
  565. #    Remove cruft
  566. #
  567. if [ $DEBUG -eq 0 ]; then
  568.     for i in crd.ps log usecie.ps selcrd.ps
  569.     do
  570.     file="$ICCTMP.$i"
  571.     [ -f $file ] && rm -f $file
  572.     done
  573. fi
  574.  
  575. exit 0
  576.