URI: 
       tDo not revert to CMAP for second file.  (Rob Pike). - plan9port - [fork] Plan 9 from user space
  HTML git clone git://src.adamsgaard.dk/plan9port
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
   DIR commit d1e25ee94ec984b7557a4d4a178faee0b03f18ee
   DIR parent 68e139f29357d530eb0b0eaf18a437f2dd77e5c9
  HTML Author: rsc <devnull@localhost>
       Date:   Thu, 15 Sep 2005 17:09:40 +0000
       
       Do not revert to CMAP for second file.  (Rob Pike).
       
       Diffstat:
         M src/cmd/jpg/jpg.c                   |      16 +++++++++-------
       
       1 file changed, 9 insertions(+), 7 deletions(-)
       ---
   DIR diff --git a/src/cmd/jpg/jpg.c b/src/cmd/jpg/jpg.c
       t@@ -268,16 +268,18 @@ rpt:        array = Breadjpg(&b, colorspace);
                c = nil;
                if(jflag)
                        goto Return;
       -        if(!dflag && !inited){
       -                if(initdraw(0, 0, 0) < 0){
       -                        fprint(2, "jpg: initdraw failed: %r\n");
       -                        return "initdraw";
       +        if(!dflag){
       +                if(!inited){
       +                        if(initdraw(0, 0, 0) < 0){
       +                                fprint(2, "jpg: initdraw failed: %r\n");
       +                                return "initdraw";
       +                        }
       +                        if(Fflag == 0)
       +                                einit(Ekeyboard|Emouse);
       +                inited++;
                        }
       -                if(Fflag == 0)
       -                        einit(Ekeyboard|Emouse);
                        if(defaultcolor && screen->depth>8 && outchan==CMAP8)
                                outchan = RGB24;
       -                inited++;
                }
                if(outchan == CMAP8)
                        c = torgbv(r, !eflag);