[darcs-devel] [darcs #250] Bug when doing a pull using darcs 1.0.2...

Sebastian Rasmussen via RT bugs at darcs.net
Tue Mar 8 12:29:18 PST 2005


Tue Mar 08 15:29:15 2005: New ticket: 250.
Transaction: Ticket created by sebras at hotmail.com
       Queue: Darcs
     Subject: Bug when doing a pull using darcs 1.0.2...
       Owner: Nobody
  Requestors: sebras at hotmail.com
      Status: new
 Ticket <URL: http://bugs.darcs.net/.//Ticket/Display.html?id=250 >

Hi!

I was doing a pull from a friends repo yesterday when I got the following 
error message (by the way I'm using Debian/testing, oh, and will I be able 
to track this bug through the bug tracking system? If so, how?):

hostname% darcs pull
Pulling from "http://www.hostname.com/~tor/repos/fitz"...

Thu Mar  3 03:30:04 CET 2005  tor at hostname.com
  * check for existence of Dests nametree before loading
Shall I pull this patch? (1/7) [ynWvxqadjk], or ? for help: y

Thu Mar  3 03:28:17 CET 2005  tor at hostname.com
  * check owner password
Shall I pull this patch? (2/7) [ynWvxqadjk], or ? for help: y

Thu Mar  3 03:28:33 CET 2005  tor at hostname.com
  * check $WINDIR/Fonts for system fonts
Shall I pull this patch? (3/7) [ynWvxqadjk], or ? for help: y

Mon Mar  7 14:01:09 CET 2005  tor at hostname.com
  * remove fileno() from pdfrip
Shall I pull this patch? (4/7) [ynWvxqadjk], or ? for help: y

Thu Mar  3 07:18:43 CET 2005  tor at hostname.com
  * fixed pdf_toutf8
Shall I pull this patch? (5/7) [ynWvxqadjk], or ? for help: y

Mon Mar  7 14:02:25 CET 2005  tor at hostname.com
  * freshened up jamfile & config
Shall I pull this patch? (6/7) [ynWvxqadjk], or ? for help: y

Mon Mar  7 16:11:43 CET 2005  tor at hostname.com
  * added pdf_initxref
Shall I pull this patch? (7/7) [ynWvxqadjk], or ? for help: y
We have conflicts in the following files:
./Jamfile ./mupdf/nametree.c

Fail: bug in darcs!
There was an attempt to write an invalid pending!
If possible, please send the contents of _darcs/pending_buggy along
with a bug report.
Please report this to bugs at darcs.net
If possible include the output of 'darcs --exact-version'.

Below is the info as required:

hostname% darcs --exact-version
darcs compiled on Feb 12 2005, at 13:59:36
# configured Sat Feb 12 13:53:58 PST 2005
sh ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib 
--mandir=/u

Context:

[ removed obsolete NEWS files
Isaac Jones <ijones at syntaxpolice.org>**20050212211000]

[syncinc with my debian repo after 1.0.0 bug
Isaac Jones <ijones at syntaxpolice.org>**20050212205746]

[TAG 1.0.2
David Roundy <droundy at abridgegame.org>**20050204123805]


And _darcs/patches/pending_buggy:

hostname% cat _darcs/patches/pending_buggy

{
{
[added pdf_initxref
tor at hostname.com*-20050307151143] {
hunk ./mupdf/xref.c 77
-fz_error *
-pdf_initxref(pdf_xref *xref)
-{
-       xref->table = fz_malloc(sizeof(pdf_xrefentry) * 128);
-       if (!xref->table)
-               return fz_outofmem;
-
-       xref->cap = 128;
-       xref->len = 1;
-
-       xref->table[0].type = 'f';
-       xref->table[0].mark = 0;
-       xref->table[0].ofs = 0;
-       xref->table[0].gen = 65535;
-       xref->table[0].stmbuf = nil;
-       xref->table[0].stmofs = 0;
-       xref->table[0].obj = nil;
-
-       return nil;
-}
-
hunk ./mupdf/xref.c 5
- * create xref structure.
- * needs to be initialized by initxref, openxref or repairxref.
+ * initialize new empty xref
hunk ./include/mupdf/xref.h 44
-fz_error *pdf_initxref(pdf_xref *);
}
[freshened up jamfile & config
tor at hostname.com*-20050307130225] {
hunk ./Jamfile 237
-       CCFLAGS on apps/gtkpdf$(SUFOBJ) =
+       CCFLAGS on apps/gtkpdf.c =
hunk ./Jamfile 10
+# HAVE_JBIG2DEC = yes ;
+# HAVE_JASPER = yes ;
+# HAVE_X11 = yes ;
+# HAVE_GTK = yes ;
+
+# CCFLAGS += -DARCH_$(OSPLAT) ;
+
+switch $(BUILD)
+{
+       case RELEASE :
+               Echo Release build for $(OS) $(OSPLAT) ;
+               OPTIM = -O3 ;
+       case PROFILE :
+               Echo Profiling build for $(OS) $(OSPLAT) ;
+               OPTIM = -g -pg ;
+       case * :
+               Echo Debug build for $(OS) $(OSPLAT) ;
+               OPTIM = -g ;
+}
+
+switch $(OS)
+{
+       case LINUX :
+               CCFLAGS += -std=c89 -Wall ;
+               CCFLAGS += -DNEED_GETOPT ;
+               CCFLAGS += -DNEED_STRLCPY ;
+               CCFLAGS += -DNEED_STRLCAT ;
+       case MACOSX :
+               CCFLAGS += -std=gnu99 -DHAVE_C99 -Wall -faltivec ;
+       case NT :
+               NOARSCAN = true ;
+               CCFLAGS += -std=gnu99 -DHAVE_C99 -Wall -DWIN32 ;
+               CCFLAGS += -DNEED_GETOPT ;
+               CCFLAGS += -DNEED_STRSEP ;
+               CCFLAGS += -DNEED_STRLCPY ;
+               CCFLAGS += -DNEED_STRLCAT ;
+       case SOLARIS :
+               CCFLAGS += -std=c89 -Wall ;
+}
+
hunk ./Jamfile 5
-include Jamconfig ;
-include $(HOME)/.jamconfig ;
+include $(HOME)/.jamrules ;
hunk ./Jamconfig 1
-# Customize to your liking
-# Shortcut for developers: you can override the settings here with 
~/.jamconfig
-
-# Comment out to disable
-# HAVE_JBIG2DEC = yes ;
-# HAVE_JASPER = yes ;
-# HAVE_X11 = yes ;
-# HAVE_GTK = yes ;
-
-# Add any non-standard header/library (-I/-L) search paths here
-# In particular add paths needed by above mentioned libraries here
-EXTRA_INCLUDES = ;
-EXTRA_LIBRARIES = ;
-
-# Basic system should be mostly SUSv3 compliant
-CCFLAGS += -D_XOPEN_SOURCE=600 ;
-
-# Default optimize/profile/debug compiler/linker switches
-OPTIM = -O3 ;
-PROF = -g -pg ;
-DEBUG = -g ;
-
-switch $(OS)
-{
-       case LINUX :
-               LINKFLAGS += -L/usr/X11R6/lib ;
-               CCFLAGS += -DNEED_STRLCPY -DNEED_STRLCAT ;
-
-               switch $(CC)-$(OSPLAT)
-               {
-               case icc-X86 :
-                       CCFLAGS += -DARCH_X86 ;
-                       OPTIM = -O3 -ip -tpp6 -xM ;
-                       PROF = -g -qp ;
-               case gcc-X86 :
-                       CCFLAGS += -DARCH_X86 ;
-                       # add -msse -msse2 when such functions exist...
-                       OPTIM = -O3 -march=pentium -mmmx ;
-               }
-
-       case MACOSX :
-               CCFLAGS += -std=gnu99 -DHAVE_C99 -Wall -faltivec -DARCH_PPC 
;
-               OPTIM = -fast ;
-
-       case NT :
-               NOARSCAN = true ; # compatibility for old jamrules
-               CCFLAGS += -std=gnu99 -DHAVE_C99 -Wall -DWIN32 ;
-               CCFLAGS += -DNEED_GETOPT -DNEED_STRSEP -DNEED_STRLCPY 
-DNEED_STR
-
-       case SOLARIS :
-               CCFLAGS += -std=c89 -Wall -DNEED_STRSEP ;
-
-       # Additional platforms go here
-
-       # Bail on unknown platforms
-       case * :
-               Exit "OS '$(OS)' not known by build system" ;
-}
-
rmfile ./Jamconfig
}
[fixed pdf_toutf8
tor at hostname.com*-20050303061843] {
hunk ./mupdf/parse.c 70
-                       ucs = pdf_docencoding[srcptr[i]];
+                       ucs = srcptr[i];
hunk ./mupdf/parse.c 62
-                       dstlen += runelen(pdf_docencoding[srcptr[i]]);
+                       dstlen += runelen(srcptr[i]);
hunk ./mupdf/parse.c 45
-                       dstlen += runelen(ucs);
+                       dstlen += runelen(srcptr[i]);
}
[remove fileno() from pdfrip
tor at hostname.com*-20050307130109] {
hunk ./apps/pdfrip.c 112
-       close(fd);
+       fclose(f);
+
hunk ./apps/pdfrip.c 104
-                       write(fd, dst, pix->w * 3);
+                       write(fileno(f), dst, pix->w * 3);
hunk ./apps/pdfrip.c 72
-       fd = open(namebuf, O_BINARY|O_WRONLY|O_CREAT|O_TRUNC);
-       if (fd < 0)
-               fz_abort(fz_throw("open %s failed: %s", namebuf, 
strerror(errno)
-       sprintf(buf, "P6\n%d %d\n255\n", w, bh * nbands);
-       write(fd, buf, strlen(buf));
+       f = fopen(namebuf, "wb");
+       fprintf(f, "P6\n%d %d\n255\n", w, bh * nbands);
+       fflush(f);
hunk ./apps/pdfrip.c 29
-       int fd;
+       FILE *f;
hunk ./apps/pdfrip.c 25
-       char buf[128];
}
[check $WINDIR/Fonts for system fonts
tor at hostname.com*-20050303022833] {
hunk ./mupdf/fontfile.c 177
-               strlcat(path, filename, pathlen);
-               if (access(path, R_OK) == 0)
-                       return 1;
-       }
-
-       dir = getenv("WINDIR");
-       if (dir)
-       {
-               strlcpy(path, dir, pathlen);
-               strlcat(path, "/Fonts/", pathlen);
hunk ./mupdf/fontfile.c 165
+               "c:/windows/fonts",
}
[check owner password
tor at hostname.com*-20050303022817] {
hunk ./mupdf/crypt.c 350
-}
-
-fz_error *
-pdf_setownerpassword(pdf_crypt *crypt, char *ownerpw, int pwlen)
-{
-       unsigned char buf[32];
-       unsigned char key[16];
-       fz_arc4 arc4;
-       fz_md5 md5;
-
-       /* Step 1 + 2 */
-       padpassword(buf, ownerpw, pwlen);
-       fz_md5init(&md5);
-       fz_md5update(&md5, buf, 32);
-       fz_md5final(&md5, key);
-
-       /* Step 3 (rev 3 only) */
-       if (crypt->r == 3)
-               voodoo50(key, crypt->n);
-
-       /* Step 4 */
-       fz_arc4init(&arc4, key, crypt->n);
-
-       if (crypt->r == 2) {
-               fz_arc4encrypt(&arc4, buf, crypt->o, 32);
-       }
-
-       if (crypt->r == 3) {
-               unsigned char keyxor[16];
-               int i;
-               int k;
-
-               memcpy(buf, crypt->o, 32);
-
-               for(i = 19; i >= 0; --i) {
-                       for(k = 0; k < crypt->keylen; ++k)
-                               keyxor[k] = key[k] ^ i;
-                       fz_arc4init(&arc4, keyxor, crypt->keylen);
-                       fz_arc4encrypt(&arc4, buf, buf, 32);
-               }
-       }
-
-       return pdf_setuserpassword(crypt, buf, 32);
hunk ./mupdf/crypt.c 342
-       createuser(crypt, userpw, pwlen);
+       createuser(crypt, userpw);
hunk ./mupdf/crypt.c 336
-pdf_setuserpassword(pdf_crypt *crypt, char *userpw, int pwlen)
+pdf_setpassword(pdf_crypt *crypt, char *userpw)
hunk ./mupdf/crypt.c 322
-
-fz_error *
-pdf_setpassword(pdf_crypt *crypt, char *pw)
-{
-       fz_error *error = pdf_setuserpassword(crypt, pw, strlen(pw));
-       if (error)
-       {
-               fz_droperror(error);
-               error = pdf_setownerpassword(crypt, pw, strlen(pw));
-       }
-       return error;
-}
-
hunk ./mupdf/crypt.c 295
-       createuser(crypt, userpw, strlen(userpw));
+       createuser(crypt, userpw);
hunk ./mupdf/crypt.c 250
-               createkey(crypt, userpw, pwlen);
+               createkey(crypt, userpw);
hunk ./mupdf/crypt.c 243
-               createkey(crypt, userpw, pwlen);
+               createkey(crypt, userpw);
hunk ./mupdf/crypt.c 236
-createuser(pdf_crypt *crypt, char *userpw, int pwlen)
+createuser(pdf_crypt *crypt, char *userpw)
hunk ./mupdf/crypt.c 218
-       padpassword(buf, userpw, strlen(ownerpw));
+       padpassword(buf, userpw);
hunk ./mupdf/crypt.c 205
-       padpassword(buf, ownerpw, strlen(ownerpw));
+       padpassword(buf, ownerpw);
hunk ./mupdf/crypt.c 167
-       padpassword(buf, userpw, pwlen);
+       padpassword(buf, userpw);
hunk ./mupdf/crypt.c 160
-createkey(pdf_crypt *crypt, char *userpw, int pwlen)
+createkey(pdf_crypt *crypt, char *userpw)
hunk ./mupdf/crypt.c 143
-
+
hunk ./mupdf/crypt.c 64
-       crypt = fz_malloc(sizeof(pdf_crypt));
+       crypt = fz_malloc(sizeof(pdf_crypt));
hunk ./mupdf/crypt.c 40
-       if (pwlen > 32)
-               pwlen = 32;
-       memcpy(buf, pw, pwlen);
-       memcpy(buf + pwlen, padding, 32 - pwlen);
+       int len = strlen(pw);
+       if (len > 32)
+               len = 32;
+       memcpy(buf, pw, len);
+       memcpy(buf + len, padding, 32 - len);
hunk ./mupdf/crypt.c 38
-static void padpassword(unsigned char *buf, char *pw, int pwlen)
+static void padpassword(unsigned char *buf, char *pw)
hunk ./include/mupdf/syntax.h 57
-fz_error *pdf_setuserpassword(pdf_crypt *crypt, char *pw, int pwlen);
-fz_error *pdf_setownerpassword(pdf_crypt *crypt, char *pw, int pwlen);
}
[check for existence of Dests nametree before loading
tor at hostname.com*-20050303023004] {
hunk ./mupdf/nametree.c 130
+               if (error)
+                       return error;
hunk ./mupdf/nametree.c 120
-               if (dests)
-               {
-                       error = pdf_loadnametree(&xref->dests, xref, dests);
-                       if (error)
-                       {
-                               fz_dropobj(names);
-                               return error;
-                       }
-               }
+               error = pdf_loadnametree(&xref->dests, xref, dests);
hunk ./mupdf/debug.c 71
-
-       fflush(stdout);
}
}
{
hunk ./Jamfile 32
-               CCFLAGS += -std=c89 -Wall ;
+               CCFLAGS += -std=c99 -DHAVE_C99 -Wall ;
hunk ./apps/x11pdf.c 446
+        case 'p':
+        case 'P':
+                {
+                   char s[256];
+                    XFlush(xdpy);
+                    sprintf(s, "Page %d/%d", pageno, 
pdf_getpagecount(pages));
+                    XSetForeground(xdpy, xgc, BlackPixel(xdpy, xscr));
+                    XDrawString(xdpy, xwin, xgc, 10, 20, s, strlen(s));
+                    XFlush(xdpy);
+                    sleep(1);
+                    xblit();
+                }
+                break;
hunk ./base/cpudep.c 208
+#if defined(ARCH_X86) || defined(ARCH_X86_64)
+        __asm__ __volatile__ ("emms\n\t");
+#endif
+
hunk ./mupdf/nametree.c 120
+v v v v v v v
hunk ./mupdf/nametree.c 131
+*************
+                if (dests)
+                    error = pdf_loadnametree(&xref->dests, xref, dests);
+                fz_dropobj(names);
+                if (error)
+                        return error;
+^ ^ ^ ^ ^ ^ ^
hunk ./mupdf/shade.c 135
-       };
+                break;
+       }
hunk ./tree/optimize.c 214
+
+                if (current == nil)
+                    break;
}
{
{
[check for existence of Dests nametree before loading
tor at hostname.com**20050303023004] {
hunk ./mupdf/debug.c 71
+
+       fflush(stdout);
merger 0.0 (
hunk ./mupdf/nametree.c 120
-               error = pdf_loadnametree(&xref->dests, xref, dests);
-               fz_dropobj(names);
-               if (error)
-                       return error;
+                if (dests)
+                    error = pdf_loadnametree(&xref->dests, xref, dests);
+                fz_dropobj(names);
+                if (error)
+                        return error;
hunk ./mupdf/nametree.c 120
-               error = pdf_loadnametree(&xref->dests, xref, dests);
+               if (dests)
+               {
+                       error = pdf_loadnametree(&xref->dests, xref, dests);
+                       if (error)
+                       {
+                               fz_dropobj(names);
+                               return error;
+                       }
+               }
)
merger 0.0 (
merger 0.0 (
hunk ./mupdf/nametree.c 120
-               error = pdf_loadnametree(&xref->dests, xref, dests);
+               if (dests)
+               {
+                       error = pdf_loadnametree(&xref->dests, xref, dests);
+                       if (error)
+                       {
+                               fz_dropobj(names);
+                               return error;
+                       }
+               }
hunk ./mupdf/nametree.c 120
-               error = pdf_loadnametree(&xref->dests, xref, dests);
-               fz_dropobj(names);
-               if (error)
-                       return error;
+                if (dests)
+                    error = pdf_loadnametree(&xref->dests, xref, dests);
+                fz_dropobj(names);
+                if (error)
+                        return error;
)
hunk ./mupdf/nametree.c 130
-               if (error)
-                       return error;
)
}
[check owner password
tor at hostname.com**20050303022817] {
hunk ./include/mupdf/syntax.h 57
+fz_error *pdf_setuserpassword(pdf_crypt *crypt, char *pw, int pwlen);
+fz_error *pdf_setownerpassword(pdf_crypt *crypt, char *pw, int pwlen);
hunk ./mupdf/crypt.c 38
-static void padpassword(unsigned char *buf, char *pw)
+static void padpassword(unsigned char *buf, char *pw, int pwlen)
hunk ./mupdf/crypt.c 40
-       int len = strlen(pw);
-       if (len > 32)
-               len = 32;
-       memcpy(buf, pw, len);
-       memcpy(buf + len, padding, 32 - len);
+       if (pwlen > 32)
+               pwlen = 32;
+       memcpy(buf, pw, pwlen);
+       memcpy(buf + pwlen, padding, 32 - pwlen);
hunk ./mupdf/crypt.c 64
-       crypt = fz_malloc(sizeof(pdf_crypt));
+       crypt = fz_malloc(sizeof(pdf_crypt));
hunk ./mupdf/crypt.c 143
-
+
hunk ./mupdf/crypt.c 160
-createkey(pdf_crypt *crypt, char *userpw)
+createkey(pdf_crypt *crypt, char *userpw, int pwlen)
hunk ./mupdf/crypt.c 167
-       padpassword(buf, userpw);
+       padpassword(buf, userpw, pwlen);
hunk ./mupdf/crypt.c 205
-       padpassword(buf, ownerpw);
+       padpassword(buf, ownerpw, strlen(ownerpw));
hunk ./mupdf/crypt.c 218
-       padpassword(buf, userpw);
+       padpassword(buf, userpw, strlen(ownerpw));
hunk ./mupdf/crypt.c 236
-createuser(pdf_crypt *crypt, char *userpw)
+createuser(pdf_crypt *crypt, char *userpw, int pwlen)
hunk ./mupdf/crypt.c 243
-               createkey(crypt, userpw);
+               createkey(crypt, userpw, pwlen);
hunk ./mupdf/crypt.c 250
-               createkey(crypt, userpw);
+               createkey(crypt, userpw, pwlen);
hunk ./mupdf/crypt.c 295
-       createuser(crypt, userpw);
+       createuser(crypt, userpw, strlen(userpw));
hunk ./mupdf/crypt.c 322
+
+fz_error *
+pdf_setpassword(pdf_crypt *crypt, char *pw)
+{
+       fz_error *error = pdf_setuserpassword(crypt, pw, strlen(pw));
+       if (error)
+       {
+               fz_droperror(error);
+               error = pdf_setownerpassword(crypt, pw, strlen(pw));
+       }
+       return error;
+}
+
hunk ./mupdf/crypt.c 336
-pdf_setpassword(pdf_crypt *crypt, char *userpw)
+pdf_setuserpassword(pdf_crypt *crypt, char *userpw, int pwlen)
hunk ./mupdf/crypt.c 342
-       createuser(crypt, userpw);
+       createuser(crypt, userpw, pwlen);
hunk ./mupdf/crypt.c 350
+}
+
+fz_error *
+pdf_setownerpassword(pdf_crypt *crypt, char *ownerpw, int pwlen)
+{
+       unsigned char buf[32];
+       unsigned char key[16];
+       fz_arc4 arc4;
+       fz_md5 md5;
+
+       /* Step 1 + 2 */
+       padpassword(buf, ownerpw, pwlen);
+       fz_md5init(&md5);
+       fz_md5update(&md5, buf, 32);
+       fz_md5final(&md5, key);
+
+       /* Step 3 (rev 3 only) */
+       if (crypt->r == 3)
+               voodoo50(key, crypt->n);
+
+       /* Step 4 */
+       fz_arc4init(&arc4, key, crypt->n);
+
+       if (crypt->r == 2) {
+               fz_arc4encrypt(&arc4, buf, crypt->o, 32);
+       }
+
+       if (crypt->r == 3) {
+               unsigned char keyxor[16];
+               int i;
+               int k;
+
+               memcpy(buf, crypt->o, 32);
+
+               for(i = 19; i >= 0; --i) {
+                       for(k = 0; k < crypt->keylen; ++k)
+                               keyxor[k] = key[k] ^ i;
+                       fz_arc4init(&arc4, keyxor, crypt->keylen);
+                       fz_arc4encrypt(&arc4, buf, buf, 32);
+               }
+       }
+
+       return pdf_setuserpassword(crypt, buf, 32);
}
[check $WINDIR/Fonts for system fonts
tor at hostname.com**20050303022833] {
hunk ./mupdf/fontfile.c 165
-               "c:/windows/fonts",
hunk ./mupdf/fontfile.c 177
+               strlcat(path, filename, pathlen);
+               if (access(path, R_OK) == 0)
+                       return 1;
+       }
+
+       dir = getenv("WINDIR");
+       if (dir)
+       {
+               strlcpy(path, dir, pathlen);
+               strlcat(path, "/Fonts/", pathlen);
}
[remove fileno() from pdfrip
tor at hostname.com**20050307130109] {
hunk ./apps/pdfrip.c 25
+       char buf[128];
hunk ./apps/pdfrip.c 29
-       FILE *f;
+       int fd;
hunk ./apps/pdfrip.c 72
-       f = fopen(namebuf, "wb");
-       fprintf(f, "P6\n%d %d\n255\n", w, bh * nbands);
-       fflush(f);
+       fd = open(namebuf, O_BINARY|O_WRONLY|O_CREAT|O_TRUNC);
+       if (fd < 0)
+               fz_abort(fz_throw("open %s failed: %s", namebuf, 
strerror(errno)
+       sprintf(buf, "P6\n%d %d\n255\n", w, bh * nbands);
+       write(fd, buf, strlen(buf));
hunk ./apps/pdfrip.c 104
-                       write(fileno(f), dst, pix->w * 3);
+                       write(fd, dst, pix->w * 3);
hunk ./apps/pdfrip.c 112
-       fclose(f);
-
+       close(fd);
}
[fixed pdf_toutf8
tor at hostname.com**20050303061843] {
hunk ./mupdf/parse.c 45
-                       dstlen += runelen(srcptr[i]);
+                       dstlen += runelen(ucs);
hunk ./mupdf/parse.c 62
-                       dstlen += runelen(srcptr[i]);
+                       dstlen += runelen(pdf_docencoding[srcptr[i]]);
hunk ./mupdf/parse.c 70
-                       ucs = srcptr[i];
+                       ucs = pdf_docencoding[srcptr[i]];
}
[freshened up jamfile & config
tor at hostname.com**20050307130225] {
addfile ./Jamconfig
hunk ./Jamconfig 1
+# Customize to your liking
+# Shortcut for developers: you can override the settings here with 
~/.jamconfig
+
+# Comment out to disable
+# HAVE_JBIG2DEC = yes ;
+# HAVE_JASPER = yes ;
+# HAVE_X11 = yes ;
+# HAVE_GTK = yes ;
+
+# Add any non-standard header/library (-I/-L) search paths here
+# In particular add paths needed by above mentioned libraries here
+EXTRA_INCLUDES = ;
+EXTRA_LIBRARIES = ;
+
+# Basic system should be mostly SUSv3 compliant
+CCFLAGS += -D_XOPEN_SOURCE=600 ;
+
+# Default optimize/profile/debug compiler/linker switches
+OPTIM = -O3 ;
+PROF = -g -pg ;
+DEBUG = -g ;
+
+switch $(OS)
+{
+       case LINUX :
+               LINKFLAGS += -L/usr/X11R6/lib ;
+               CCFLAGS += -DNEED_STRLCPY -DNEED_STRLCAT ;
+
+               switch $(CC)-$(OSPLAT)
+               {
+               case icc-X86 :
+                       CCFLAGS += -DARCH_X86 ;
+                       OPTIM = -O3 -ip -tpp6 -xM ;
+                       PROF = -g -qp ;
+               case gcc-X86 :
+                       CCFLAGS += -DARCH_X86 ;
+                       # add -msse -msse2 when such functions exist...
+                       OPTIM = -O3 -march=pentium -mmmx ;
+               }
+
+       case MACOSX :
+               CCFLAGS += -std=gnu99 -DHAVE_C99 -Wall -faltivec -DARCH_PPC 
;
+               OPTIM = -fast ;
+
+       case NT :
+               NOARSCAN = true ; # compatibility for old jamrules
+               CCFLAGS += -std=gnu99 -DHAVE_C99 -Wall -DWIN32 ;
+               CCFLAGS += -DNEED_GETOPT -DNEED_STRSEP -DNEED_STRLCPY 
-DNEED_STR
+
+       case SOLARIS :
+               CCFLAGS += -std=c89 -Wall -DNEED_STRSEP ;
+
+       # Additional platforms go here
+
+       # Bail on unknown platforms
+       case * :
+               Exit "OS '$(OS)' not known by build system" ;
+}
+
hunk ./Jamfile 5
-include $(HOME)/.jamrules ;
+include Jamconfig ;
+include $(HOME)/.jamconfig ;
merger 0.0 (
hunk ./Jamfile 33
-               CCFLAGS += -std=c89 -Wall ;
+               CCFLAGS += -std=c99 -DHAVE_C99 -Wall ;
hunk ./Jamfile 10
-# HAVE_JBIG2DEC = yes ;
-# HAVE_JASPER = yes ;
-# HAVE_X11 = yes ;
-# HAVE_GTK = yes ;
-
-# CCFLAGS += -DARCH_$(OSPLAT) ;
-
-switch $(BUILD)
-{
-       case RELEASE :
-               Echo Release build for $(OS) $(OSPLAT) ;
-               OPTIM = -O3 ;
-       case PROFILE :
-               Echo Profiling build for $(OS) $(OSPLAT) ;
-               OPTIM = -g -pg ;
-       case * :
-               Echo Debug build for $(OS) $(OSPLAT) ;
-               OPTIM = -g ;
-}
-
-switch $(OS)
-{
-       case LINUX :
-               CCFLAGS += -std=c89 -Wall ;
-               CCFLAGS += -DNEED_GETOPT ;
-               CCFLAGS += -DNEED_STRLCPY ;
-               CCFLAGS += -DNEED_STRLCAT ;
-       case MACOSX :
-               CCFLAGS += -std=gnu99 -DHAVE_C99 -Wall -faltivec ;
-       case NT :
-               NOARSCAN = true ;
-               CCFLAGS += -std=gnu99 -DHAVE_C99 -Wall -DWIN32 ;
-               CCFLAGS += -DNEED_GETOPT ;
-               CCFLAGS += -DNEED_STRSEP ;
-               CCFLAGS += -DNEED_STRLCPY ;
-               CCFLAGS += -DNEED_STRLCAT ;
-       case SOLARIS :
-               CCFLAGS += -std=c89 -Wall ;
-}
-
)
hunk ./Jamfile 277
-       CCFLAGS on apps/gtkpdf.c =
+       CCFLAGS on apps/gtkpdf$(SUFOBJ) =
}
[added pdf_initxref
tor at hostname.com**20050307151143] {
hunk ./include/mupdf/xref.h 44
+fz_error *pdf_initxref(pdf_xref *);
hunk ./mupdf/xref.c 5
- * initialize new empty xref
+ * create xref structure.
+ * needs to be initialized by initxref, openxref or repairxref.
hunk ./mupdf/xref.c 77
+fz_error *
+pdf_initxref(pdf_xref *xref)
+{
+       xref->table = fz_malloc(sizeof(pdf_xrefentry) * 128);
+       if (!xref->table)
+               return fz_outofmem;
+
+       xref->cap = 128;
+       xref->len = 1;
+
+       xref->table[0].type = 'f';
+       xref->table[0].mark = 0;
+       xref->table[0].ofs = 0;
+       xref->table[0].gen = 65535;
+       xref->table[0].stmbuf = nil;
+       xref->table[0].stmofs = 0;
+       xref->table[0].obj = nil;
+
+       return nil;
+}
+
}
}
{
hunk ./mupdf/nametree.c 120
-               error = pdf_loadnametree(&xref->dests, xref, dests);
-               fz_dropobj(names);
-               if (error)
-                       return error;
+v v v v v v v
+               if (dests)
+               {
+                       error = pdf_loadnametree(&xref->dests, xref, dests);
+                       if (error)
+                       {
+                               fz_dropobj(names);
+                               return error;
+                       }
+               }
+               fz_dropobj(names);
+*************
+                if (dests)
+                    error = pdf_loadnametree(&xref->dests, xref, dests);
+                fz_dropobj(names);
+                if (error)
+                        return error;
+^ ^ ^ ^ ^ ^ ^
hunk ./Jamfile 10
-# HAVE_JBIG2DEC = yes ;
-# HAVE_JASPER = yes ;
-# HAVE_X11 = yes ;
-# HAVE_GTK = yes ;
-
-# CCFLAGS += -DARCH_$(OSPLAT) ;
-
-switch $(BUILD)
-{
-       case RELEASE :
-               Echo Release build for $(OS) $(OSPLAT) ;
-               OPTIM = -O3 ;
-       case PROFILE :
-               Echo Profiling build for $(OS) $(OSPLAT) ;
-               OPTIM = -g -pg ;
-       case * :
-               Echo Debug build for $(OS) $(OSPLAT) ;
-               OPTIM = -g ;
-}
-
-switch $(OS)
-{
-       case LINUX :
-               CCFLAGS += -std=c89 -Wall ;
-               CCFLAGS += -DNEED_GETOPT ;
-               CCFLAGS += -DNEED_STRLCPY ;
-               CCFLAGS += -DNEED_STRLCAT ;
-       case MACOSX :
-               CCFLAGS += -std=gnu99 -DHAVE_C99 -Wall -faltivec ;
-       case NT :
-               NOARSCAN = true ;
-               CCFLAGS += -std=gnu99 -DHAVE_C99 -Wall -DWIN32 ;
-               CCFLAGS += -DNEED_GETOPT ;
-               CCFLAGS += -DNEED_STRSEP ;
-               CCFLAGS += -DNEED_STRLCPY ;
-               CCFLAGS += -DNEED_STRLCAT ;
-       case SOLARIS :
-               CCFLAGS += -std=c89 -Wall ;
-}
-
+v v v v v v v
+*************
+# HAVE_JBIG2DEC = yes ;
+# HAVE_JASPER = yes ;
+# HAVE_X11 = yes ;
+# HAVE_GTK = yes ;
+
+# CCFLAGS += -DARCH_$(OSPLAT) ;
+
+switch $(BUILD)
+{
+       case RELEASE :
+               Echo Release build for $(OS) $(OSPLAT) ;
+               OPTIM = -O3 ;
+       case PROFILE :
+               Echo Profiling build for $(OS) $(OSPLAT) ;
+               OPTIM = -g -pg ;
+       case * :
+               Echo Debug build for $(OS) $(OSPLAT) ;
+               OPTIM = -g ;
+}
+
+switch $(OS)
+{
+       case LINUX :
+               CCFLAGS += -std=c99 -DHAVE_C99 -Wall ;
+               CCFLAGS += -DNEED_GETOPT ;
+               CCFLAGS += -DNEED_STRLCPY ;
+               CCFLAGS += -DNEED_STRLCAT ;
+       case MACOSX :
+               CCFLAGS += -std=gnu99 -DHAVE_C99 -Wall -faltivec ;
+       case NT :
+               NOARSCAN = true ;
+               CCFLAGS += -std=gnu99 -DHAVE_C99 -Wall -DWIN32 ;
+               CCFLAGS += -DNEED_GETOPT ;
+               CCFLAGS += -DNEED_STRSEP ;
+               CCFLAGS += -DNEED_STRLCPY ;
+               CCFLAGS += -DNEED_STRLCAT ;
+       case SOLARIS :
+               CCFLAGS += -std=c89 -Wall ;
+}
+
+^ ^ ^ ^ ^ ^ ^
}
}
}

/ Sebastian Rasmussen

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/






More information about the darcs-devel mailing list