Browse Source

Merge remote-tracking branch 'origin/release/1.9.x'

rdb 10 years ago
parent
commit
2f8060bf2b

+ 12 - 1
direct/src/p3d/Packager.py

@@ -372,6 +372,9 @@ class Packager:
             self.requiredFilenames = []
             self.requiredModules = []
 
+            # A list of required packages that were missing.
+            self.missingPackages = []
+
             # This records the current list of modules we have added so
             # far.
             self.freezer = FreezeTool.Freezer(platform = self.packager.platform)
@@ -495,6 +498,12 @@ class Packager:
             as a true package.  Either is implemented with a
             Multifile. """
 
+            if self.missingPackages:
+                missing = ', '.join([name for name, version in self.missingPackages])
+                self.notify.warning("Cannot build package %s due to missing dependencies: %s" % (self.packageName, missing))
+                self.cleanup()
+                return False
+
             self.multifile = Multifile()
 
             # Write the multifile to a temporary filename until we
@@ -3217,7 +3226,9 @@ class Packager:
                                        requires = self.currentPackage.requires)
             if not package:
                 message = 'Unknown package %s, version "%s"' % (packageName, version)
-                raise PackagerError, message
+                self.notify.warning(message)
+                self.currentPackage.missingPackages.append((packageName, pversion))
+                continue
 
             self.requirePackage(package)
 

+ 1 - 1
panda/src/cocoadisplay/cocoaGraphicsStateGuardian.mm

@@ -210,7 +210,7 @@ choose_pixel_format(const FrameBufferProperties &properties,
   attribs.push_back(CGDisplayIDToOpenGLDisplayMask(display));
 
   // End of the array
-  attribs.push_back((NSOpenGLPixelFormatAttribute) nil);
+  attribs.push_back((NSOpenGLPixelFormatAttribute)0);
 
   // Create the format.
   NSOpenGLPixelFormat* format = [[NSOpenGLPixelFormat alloc] initWithAttributes:&attribs[0]];

+ 10 - 10
panda/src/pnmimagetypes/colrops.c

@@ -47,7 +47,7 @@ int setcolrcor(double (*f)(double, double), double a2)
                 /* set brightness correction */
 {
         double  mult;
-        register int    i, j;
+        int    i, j;
                                         /* allocate tables */
         if (g_bval == NULL && (g_bval =
                         (BYTE (*)[256])bmalloc((MAXGSHIFT+1)*256)) == NULL)
@@ -67,7 +67,7 @@ int setcolrinv(double (*f)(double, double), double a2)
                 /* set inverse brightness correction */
 {
         double  mult;
-        register int    i, j;
+        int    i, j;
                                         /* allocate tables */
         if (g_mant == NULL && (g_mant = (BYTE *)bmalloc(256)) == NULL)
                 return(-1);
@@ -97,10 +97,10 @@ int setcolrgam(double g)                        /* set gamma conversion */
 }
 
 
-int colrs_gambs(register COLR *scan, int len)
+int colrs_gambs(COLR *scan, int len)
                 /* convert scanline of colrs to gamma bytes */
 {
-        register int    i, expo;
+        int    i, expo;
 
         if (g_bval == NULL)
                 return(-1);
@@ -145,10 +145,10 @@ int colrs_gambs(register COLR *scan, int len)
 }
 
 
-int gambs_colrs(register COLR *scan, int len)
+int gambs_colrs(COLR *scan, int len)
         /* convert gamma bytes to colr scanline */
 {
-        register int    nexpo;
+        int    nexpo;
 
         if (g_mant == NULL || g_nexp == NULL)
                 return(-1);
@@ -181,7 +181,7 @@ int gambs_colrs(register COLR *scan, int len)
 
 
 void
-shiftcolrs(register COLR *scan, register int len, register int adjust)
+shiftcolrs(COLR *scan, int len, int adjust)
         /* shift a scanline of colors by 2^adjust */
 {
         int     minexp;
@@ -201,11 +201,11 @@ shiftcolrs(register COLR *scan, register int len, register int adjust)
 
 
 void
-normcolrs(register COLR *scan, int len, int adjust)
+normcolrs(COLR *scan, int len, int adjust)
 /* normalize a scanline of colrs */
 {
-        register int  c;
-        register int  shift;
+        int  c;
+        int  shift;
 
         while (len-- > 0) {
                 shift = scan[0][EXP] + adjust - COLXS;

+ 12 - 12
panda/src/pnmimagetypes/pnmFileTypePNM.cxx

@@ -317,8 +317,8 @@ getbit (istream * const file) {
 
 static void
 pbm_readpbmrow( istream *file, bit *bitrow, int cols, int format ) {
-  register int col, bitshift;
-  register bit* bP;
+  int col, bitshift;
+  bit* bP;
 
   switch ( format )
     {
@@ -328,7 +328,7 @@ pbm_readpbmrow( istream *file, bit *bitrow, int cols, int format ) {
       break;
 
     case RPBM_FORMAT: {
-      register unsigned char item;
+      unsigned char item;
       bitshift = -1;  item = 0;  /* item's value is meaningless here */
       for ( col = 0, bP = bitrow; col < cols; ++col, ++bP )
         {
@@ -486,12 +486,12 @@ ppm_readppmrow(istream*  const fileP,
 
 static void
 pnm_readpnmrow( istream* file, xel* xelrow, int cols, xelval maxval, int format ) {
-  register int col;
-  register xel* xP;
+  int col;
+  xel* xP;
   gray* grayrow;
-  register gray* gP;
+  gray* gP;
   bit* bitrow;
-  register bit* bP;
+  bit* bP;
 
   switch ( PNM_FORMAT_TYPE(format) )
     {
@@ -815,8 +815,8 @@ pgm_writepgmrow(ostream* const fileP,
 
 static void
 ppm_writeppmrowraw(ostream *file, pixel *pixelrow, int cols, pixval maxval ) {
-  register int col;
-  register pixval val;
+  int col;
+  pixval val;
 
   for ( col = 0; col < cols; ++col )
     {
@@ -843,9 +843,9 @@ ppm_writeppmrowraw(ostream *file, pixel *pixelrow, int cols, pixval maxval ) {
 
 static void
 ppm_writeppmrowplain(ostream *file, pixel *pixelrow, int cols, pixval maxval ) {
-  register int col, charcount;
-  register pixel* pP;
-  register pixval val;
+  int col, charcount;
+  pixel* pP;
+  pixval val;
 
   charcount = 0;
   for ( col = 0, pP = pixelrow; col < cols; ++col, ++pP )

+ 7 - 7
panda/src/pnmimagetypes/pnmFileTypeTIFF.cxx

@@ -1033,7 +1033,7 @@ write_data(xel *array, xelval *alpha) {
     grn[TIFF_COLORMAP_MAXCOLORS],
     blu[TIFF_COLORMAP_MAXCOLORS];
   int row, colors, i;
-  register int col;
+  int col;
   int grayscale = false;
   struct tiff * tif;
   short photometric = 0;
@@ -1064,7 +1064,7 @@ write_data(xel *array, xelval *alpha) {
         << colors << " colors found; writing an 8-bit palette file.\n";
       grayscale = true;
       for ( i = 0; i < colors; ++i ) {
-        register xelval r, g, b;
+        xelval r, g, b;
 
         r = PPM_GETR( chv[i].color );
         g = PPM_GETG( chv[i].color );
@@ -1203,7 +1203,7 @@ write_data(xel *array, xelval *alpha) {
       } else {
         tP = buf;
         for ( col = 0; col < _x_size; ++col ) {
-          register int s;
+          int s;
 
           s = ppm_lookupcolor( cht, (pixel *)(&row_data[col]) );
           if ( s == -1 ) {
@@ -1219,10 +1219,10 @@ write_data(xel *array, xelval *alpha) {
         }
       }
     } else {
-      register xelval bigger_maxval;
-      register int bitshift;
-      register unsigned char byte;
-      register xelval s;
+      xelval bigger_maxval;
+      int bitshift;
+      unsigned char byte;
+      xelval s;
 
       bigger_maxval = pm_bitstomaxval( bitspersample );
       bitshift = 8 - bitspersample;

+ 1 - 1
panda/src/tinydisplay/zbuffer.cxx

@@ -358,7 +358,7 @@ memset_l(void *adr, int val, int count) {
 void
 memset_RGB24(void *adr,int r, int v, int b,long count) {
   long i, n;
-  register long v1,v2,v3,*pt=(long *)(adr);
+  long v1,v2,v3,*pt=(long *)(adr);
   unsigned char *p,R=(unsigned char)r,V=(unsigned char)v,B=(unsigned char)b;
 
   p=(unsigned char *)adr;

+ 3 - 3
panda/src/tinydisplay/zdither.cxx

@@ -89,7 +89,7 @@ ZDither_lookupColor(int r,int g,int b) {
 
 #define DITHER_PIXEL2(a)            \
 { \
-  register int v,t,r,g,c;           \
+  int v,t,r,g,c;           \
   v=*(unsigned int *)(pp+(a));                  \
   g=(v & 0x07DF07DF) + g_d; \
   r=(((v & 0xF800F800) >> 2) + r_d) & 0x70007000; \
@@ -110,8 +110,8 @@ ZB_ditherFrameBuffer(ZBuffer *zb,unsigned char *buf,
   unsigned short *pp1;
   int r_d,g_d,b_d;
   unsigned char *ctable=zb->dctable;
-  register unsigned char *dest;
-  register unsigned short *pp;
+  unsigned char *dest;
+  unsigned short *pp;
 
   assert( ((long)buf & 1) == 0 && (linesize & 1) == 0);
 

+ 6 - 6
panda/src/tinydisplay/zline.h

@@ -1,17 +1,17 @@
 {
     int n, dx, dy, sx, pp_inc_1, pp_inc_2;
-    register int a;
-    register PIXEL *pp;
+    int a;
+    PIXEL *pp;
 #if defined(INTERP_RGB)
-    register unsigned int r, g, b;
+    unsigned int r, g, b;
 #endif
 #ifdef INTERP_RGB
-    register unsigned int rinc, ginc, binc;
+    unsigned int rinc, ginc, binc;
 #endif
 #ifdef INTERP_Z
-    register ZPOINT *pz;
+    ZPOINT *pz;
     int zinc;
-    register int z, zz;
+    int z, zz;
 #endif
 
     if (p1->y > p2->y || (p1->y == p2->y && p1->x > p2->x)) {

+ 6 - 6
panda/src/tinydisplay/ztriangle.h

@@ -344,17 +344,17 @@
 #ifndef DRAW_LINE
       /* generic draw line */
       {
-        register PIXEL *pp;
-        register int n;
+        PIXEL *pp;
+        int n;
 #ifdef INTERP_Z
-        register ZPOINT *pz;
-        register unsigned int z,zz;
+        ZPOINT *pz;
+        unsigned int z,zz;
 #endif
 #ifdef INTERP_RGB
-        register unsigned int or1,og1,ob1,oa1;
+        unsigned int or1,og1,ob1,oa1;
 #endif
 #ifdef INTERP_ST
-        register unsigned int s,t;
+        unsigned int s,t;
 #endif
 #ifdef INTERP_STZ
         PN_stdfloat sz,tz;

+ 47 - 48
panda/src/tinydisplay/ztriangle_two.h

@@ -326,13 +326,13 @@ FNAME(white_perspective) (ZBuffer *zb,
 
 #define DRAW_LINE()                                             \
   {                                                             \
-    register ZPOINT *pz;                                        \
-    register PIXEL *pp;                                         \
-    register int s,t,z,zz;                                      \
-    register int n,dsdx,dtdx;                                   \
-    PN_stdfloat sz,tz,fz,zinv;                                        \
+    ZPOINT *pz;                                                 \
+    PIXEL *pp;                                                  \
+    int s,t,z,zz;                                               \
+    int n,dsdx,dtdx;                                            \
+    PN_stdfloat sz,tz,fz,zinv;                                  \
     n=(x2>>16)-x1;                                              \
-    fz=(PN_stdfloat)z1;                                               \
+    fz=(PN_stdfloat)z1;                                         \
     zinv=1.0f / fz;                                             \
     pp=(PIXEL *)((char *)pp1 + x1 * PSZB);                      \
     pz=pz1+x1;                                                  \
@@ -341,7 +341,7 @@ FNAME(white_perspective) (ZBuffer *zb,
     tz=tz1;                                                     \
     while (n>=(NB_INTERP-1)) {                                  \
       {                                                         \
-        PN_stdfloat ss,tt;                                            \
+        PN_stdfloat ss,tt;                                      \
         ss=(sz * zinv);                                         \
         tt=(tz * zinv);                                         \
         s=(int) ss;                                             \
@@ -452,14 +452,14 @@ FNAME(flat_perspective) (ZBuffer *zb,
 
 #define DRAW_LINE()                                             \
   {                                                             \
-    register ZPOINT *pz;                                        \
-    register PIXEL *pp;                                         \
-    register int s,t,z,zz;                                      \
-    register int n,dsdx,dtdx;                                   \
-    register int or1,og1,ob1,oa1;                               \
-    PN_stdfloat sz,tz,fz,zinv;                                        \
+    ZPOINT *pz;                                                 \
+    PIXEL *pp;                                                  \
+    int s,t,z,zz;                                               \
+    int n,dsdx,dtdx;                                            \
+    int or1,og1,ob1,oa1;                                        \
+    PN_stdfloat sz,tz,fz,zinv;                                  \
     n=(x2>>16)-x1;                                              \
-    fz=(PN_stdfloat)z1;                                               \
+    fz=(PN_stdfloat)z1;                                         \
     zinv=1.0f / fz;                                             \
     pp=(PIXEL *)((char *)pp1 + x1 * PSZB);                      \
     pz=pz1+x1;                                                  \
@@ -472,7 +472,7 @@ FNAME(flat_perspective) (ZBuffer *zb,
     oa1 = a1;                                                   \
     while (n>=(NB_INTERP-1)) {                                  \
       {                                                         \
-        PN_stdfloat ss,tt;                                            \
+        PN_stdfloat ss,tt;                                      \
         ss=(sz * zinv);                                         \
         tt=(tz * zinv);                                         \
         s=(int) ss;                                             \
@@ -592,14 +592,14 @@ FNAME(smooth_perspective) (ZBuffer *zb,
 
 #define DRAW_LINE()                                             \
   {                                                             \
-    register ZPOINT *pz;                                        \
-    register PIXEL *pp;                                         \
-    register int s,t,z,zz;                                      \
-    register int n,dsdx,dtdx;                                   \
-    register int or1,og1,ob1,oa1;                               \
-    PN_stdfloat sz,tz,fz,zinv;                                        \
+    ZPOINT *pz;                                                 \
+    PIXEL *pp;                                                  \
+    int s,t,z,zz;                                               \
+    int n,dsdx,dtdx;                                            \
+    int or1,og1,ob1,oa1;                                        \
+    PN_stdfloat sz,tz,fz,zinv;                                  \
     n=(x2>>16)-x1;                                              \
-    fz=(PN_stdfloat)z1;                                               \
+    fz=(PN_stdfloat)z1;                                         \
     zinv=1.0f / fz;                                             \
     pp=(PIXEL *)((char *)pp1 + x1 * PSZB);                      \
     pz=pz1+x1;                                                  \
@@ -612,7 +612,7 @@ FNAME(smooth_perspective) (ZBuffer *zb,
     oa1 = a1;                                                   \
     while (n>=(NB_INTERP-1)) {                                  \
       {                                                         \
-        PN_stdfloat ss,tt;                                            \
+        PN_stdfloat ss,tt;                                      \
         ss=(sz * zinv);                                         \
         tt=(tz * zinv);                                         \
         s=(int) ss;                                             \
@@ -723,14 +723,14 @@ FNAME(smooth_multitex2) (ZBuffer *zb,
 
 #define DRAW_LINE()                                                     \
   {                                                                     \
-    register ZPOINT *pz;                                                \
-    register PIXEL *pp;                                                 \
-    register int s,t,sa,ta,z,zz;                                        \
-    register int n,dsdx,dtdx,dsadx,dtadx;                               \
-    register int or1,og1,ob1,oa1;                                       \
-    PN_stdfloat sz,tz,sza,tza,fz,zinv;                                        \
+    ZPOINT *pz;                                                         \
+    PIXEL *pp;                                                          \
+    int s,t,sa,ta,z,zz;                                                 \
+    int n,dsdx,dtdx,dsadx,dtadx;                                        \
+    int or1,og1,ob1,oa1;                                                \
+    PN_stdfloat sz,tz,sza,tza,fz,zinv;                                  \
     n=(x2>>16)-x1;                                                      \
-    fz=(PN_stdfloat)z1;                                                       \
+    fz=(PN_stdfloat)z1;                                                 \
     zinv=1.0f / fz;                                                     \
     pp=(PIXEL *)((char *)pp1 + x1 * PSZB);                              \
     pz=pz1+x1;                                                          \
@@ -745,7 +745,7 @@ FNAME(smooth_multitex2) (ZBuffer *zb,
     oa1 = a1;                                                           \
     while (n>=(NB_INTERP-1)) {                                          \
       {                                                                 \
-        PN_stdfloat ss,tt;                                                    \
+        PN_stdfloat ss,tt;                                              \
         ss=(sz * zinv);                                                 \
         tt=(tz * zinv);                                                 \
         s=(int) ss;                                                     \
@@ -755,7 +755,7 @@ FNAME(smooth_multitex2) (ZBuffer *zb,
         CALC_MIPMAP_LEVEL(mipmap_level, mipmap_dx, dsdx, dtdx);         \
       }                                                                 \
       {                                                                 \
-        PN_stdfloat ssa,tta;                                                  \
+        PN_stdfloat ssa,tta;                                            \
         ssa=(sza * zinv);                                               \
         tta=(tza * zinv);                                               \
         sa=(int) ssa;                                                   \
@@ -783,7 +783,7 @@ FNAME(smooth_multitex2) (ZBuffer *zb,
       tza+=ndtzadx;                                                     \
     }                                                                   \
     {                                                                   \
-      PN_stdfloat ss,tt;                                                      \
+      PN_stdfloat ss,tt;                                                \
       ss=(sz * zinv);                                                   \
       tt=(tz * zinv);                                                   \
       s=(int) ss;                                                       \
@@ -793,7 +793,7 @@ FNAME(smooth_multitex2) (ZBuffer *zb,
       CALC_MIPMAP_LEVEL(mipmap_level, mipmap_dx, dsdx, dtdx);           \
     }                                                                   \
     {                                                                   \
-      PN_stdfloat ssa,tta;                                                    \
+      PN_stdfloat ssa,tta;                                              \
       ssa=(sza * zinv);                                                 \
       tta=(tza * zinv);                                                 \
       sa=(int) ssa;                                                     \
@@ -884,14 +884,14 @@ FNAME(smooth_multitex3) (ZBuffer *zb,
 
 #define DRAW_LINE()                                                     \
   {                                                                     \
-    register ZPOINT *pz;                                                \
-    register PIXEL *pp;                                                 \
-    register int s,t,sa,ta,sb,tb,z,zz;                                  \
-    register int n,dsdx,dtdx,dsadx,dtadx,dsbdx,dtbdx;                   \
-    register int or1,og1,ob1,oa1;                                       \
-    PN_stdfloat sz,tz,sza,tza,szb,tzb,fz,zinv;                                \
+    ZPOINT *pz;                                                         \
+    PIXEL *pp;                                                          \
+    int s,t,sa,ta,sb,tb,z,zz;                                           \
+    int n,dsdx,dtdx,dsadx,dtadx,dsbdx,dtbdx;                            \
+    int or1,og1,ob1,oa1;                                                \
+    PN_stdfloat sz,tz,sza,tza,szb,tzb,fz,zinv;                          \
     n=(x2>>16)-x1;                                                      \
-    fz=(PN_stdfloat)z1;                                                       \
+    fz=(PN_stdfloat)z1;                                                 \
     zinv=1.0f / fz;                                                     \
     pp=(PIXEL *)((char *)pp1 + x1 * PSZB);                              \
     pz=pz1+x1;                                                          \
@@ -908,7 +908,7 @@ FNAME(smooth_multitex3) (ZBuffer *zb,
     oa1 = a1;                                                           \
     while (n>=(NB_INTERP-1)) {                                          \
       {                                                                 \
-        PN_stdfloat ss,tt;                                                    \
+        PN_stdfloat ss,tt;                                              \
         ss=(sz * zinv);                                                 \
         tt=(tz * zinv);                                                 \
         s=(int) ss;                                                     \
@@ -918,7 +918,7 @@ FNAME(smooth_multitex3) (ZBuffer *zb,
         CALC_MIPMAP_LEVEL(mipmap_level, mipmap_dx, dsdx, dtdx);         \
       }                                                                 \
       {                                                                 \
-        PN_stdfloat ssa,tta;                                                  \
+        PN_stdfloat ssa,tta;                                            \
         ssa=(sza * zinv);                                               \
         tta=(tza * zinv);                                               \
         sa=(int) ssa;                                                   \
@@ -928,7 +928,7 @@ FNAME(smooth_multitex3) (ZBuffer *zb,
         CALC_MIPMAP_LEVEL(mipmap_levela, mipmap_dxa, dsadx, dtadx);     \
       }                                                                 \
       {                                                                 \
-        PN_stdfloat ssb,ttb;                                                  \
+        PN_stdfloat ssb,ttb;                                            \
         ssb=(szb * zinv);                                               \
         ttb=(tzb * zinv);                                               \
         sb=(int) ssb;                                                   \
@@ -958,7 +958,7 @@ FNAME(smooth_multitex3) (ZBuffer *zb,
       tzb+=ndtzbdx;                                                     \
     }                                                                   \
     {                                                                   \
-      PN_stdfloat ss,tt;                                                      \
+      PN_stdfloat ss,tt;                                                \
       ss=(sz * zinv);                                                   \
       tt=(tz * zinv);                                                   \
       s=(int) ss;                                                       \
@@ -968,7 +968,7 @@ FNAME(smooth_multitex3) (ZBuffer *zb,
       CALC_MIPMAP_LEVEL(mipmap_level, mipmap_dx, dsdx, dtdx);           \
     }                                                                   \
     {                                                                   \
-      PN_stdfloat ssa,tta;                                                    \
+      PN_stdfloat ssa,tta;                                              \
       ssa=(sza * zinv);                                                 \
       tta=(tza * zinv);                                                 \
       sa=(int) ssa;                                                     \
@@ -978,7 +978,7 @@ FNAME(smooth_multitex3) (ZBuffer *zb,
       CALC_MIPMAP_LEVEL(mipmap_levela, mipmap_dxa, dsadx, dtadx);       \
     }                                                                   \
     {                                                                   \
-      PN_stdfloat ssb,ttb;                                                    \
+      PN_stdfloat ssb,ttb;                                              \
       ssb=(szb * zinv);                                                 \
       ttb=(tzb * zinv);                                                 \
       sb=(int) ssb;                                                     \
@@ -1008,4 +1008,3 @@ FNAME(smooth_multitex3) (ZBuffer *zb,
 #undef INTERP_MIPMAP
 #undef CALC_MIPMAP_LEVEL
 #undef ZB_LOOKUP_TEXTURE
-