Ignore:
Timestamp:
Apr 6, 2009, 10:19:50 AM (15 years ago)
Author:
gah
Message:
 
Location:
trunk/packages/vizservers/nanovis
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/nanovis/Switch.h

    r1365 r1384  
    3535#endif /* HAVE_STDDEF_H */
    3636
    37 #ifndef Offset
    3837#ifdef offsetof
    39 #define Offset(type, field) ((int) offsetof(type, field))
     38#define SwitchOffset(type, field) ((int) offsetof(type, field))
    4039#else
    41 #define Offset(type, field) ((int) ((char *) &((type *) 0)->field))
     40#define SwitchOffset(type, field) ((int) ((char *) &((type *) 0)->field))
    4241#endif
    43 #endif /* Offset */
    4442
    4543namespace Rappture {
  • trunk/packages/vizservers/nanovis/dxReader.cpp

    r1382 r1384  
    9292        }
    9393        if (sscanf(line, "object %*d class gridpositions counts %d %d %d",
    94                    &nx, &ny, &nz) == 4) {
     94                   &nx, &ny, &nz) == 3) {
    9595            printf("w:%d h:%d d:%d\n", nx, ny, nz);
    9696            // found grid size
     
    107107            }
    108108        } else if (sscanf(line, "object %*d class array type %*s shape 3"
    109                 " rank 1 items %d data follows", &npts) == 3) {
     109                " rank 1 items %d data follows", &npts) == 1) {
    110110            printf("point %d\n", npts);
    111111            if (npts != nx*ny*nz) {
     
    116116            break;
    117117        } else if (sscanf(line, "object %*d class array type %*s rank 0"
    118                 " times %d data follows", &npts) == 3) {
     118                " times %d data follows", &npts) == 1) {
    119119            if (npts != nx*ny*nz) {
    120120                result.addError("inconsistent data: expected %d points"
Note: See TracChangeset for help on using the changeset viewer.