Changeset 653

Show
Ignore:
Timestamp:
09/30/08 09:08:32 (2 months ago)
Author:
mdroe
Message:

Formatting changes.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/pywcs/src/pywcs.c

    r652 r653  
    100100                        &py_distortion_lookup[0], 
    101101                        &py_distortion_lookup[1], 
    102                         &py_wcsprm)) 
     102                        &py_wcsprm)) { 
    103103    return -1; 
     104  } 
    104105 
    105106  /* Check and set SIP */ 
     
    240241  } 
    241242 
    242   if (do_shift) 
     243  if (do_shift) { 
    243244    offset_array(pixcrd, 1.0); 
     245  } 
    244246 
    245247  status = p4_pix2foc(2, (void *)self->x.cpdis, PyArray_DIM(pixcrd, 0), 
     
    251253  } 
    252254 
    253   if (do_shift) 
     255  if (do_shift) { 
    254256    offset_array(pixcrd, -1.0); 
     257  } 
    255258 
    256259 _exit: 
     
    303306  } 
    304307 
    305   if (do_shift) 
     308  if (do_shift) { 
    306309    offset_array(pixcrd, 1.0); 
     310  } 
    307311 
    308312  status = pipeline_pix2foc(&self->x, 
     
    317321  } 
    318322 
    319   if (do_shift) 
     323  if (do_shift) { 
    320324    offset_array(pixcrd, -1.0); 
     325  } 
    321326 
    322327 _exit: 
  • trunk/pywcs/src/util.c

    r564 r653  
    3939 
    4040PyObject* 
    41 PyArrayProxy_New(PyObject* self, int nd, const npy_intp* dims, 
    42                  int typenum, const void* data) { 
     41PyArrayProxy_New( 
     42    PyObject* self, int nd, const npy_intp* dims, 
     43    int typenum, const void* data) { 
    4344  PyArray_Descr* type_descr = NULL; 
    4445  PyObject*      result     = NULL; 
     
    4849    return NULL; 
    4950 
    50   result = (PyObject*)PyArray_NewFromDescr(&PyArray_Type, type_descr, 
    51                                            nd, (npy_intp*)dims, NULL, (void*)data, 
    52                                            NPY_CONTIGUOUS | NPY_WRITEABLE, 
    53                                            NULL); 
     51  result = (PyObject*)PyArray_NewFromDescr( 
     52      &PyArray_Type, 
     53      type_descr, 
     54      nd, (npy_intp*)dims, 
     55      NULL, 
     56      (void*)data, 
     57      NPY_CONTIGUOUS | NPY_WRITEABLE, 
     58      NULL); 
    5459 
    5560  if (result == NULL) 
     
    128133*/ 
    129134 
    130 static void 
     135static inline void 
    131136wcsprm_fix_values(struct wcsprm* x, value_fixer_t value_fixer) { 
    132137  int naxis = x->naxis; 
     
    373378  char*      str_char = NULL; 
    374379  Py_ssize_t str_len  = 0; 
    375   int i = 0; 
     380  int        i        = 0; 
    376381 
    377382  if (check_delete(propname, value)) { 
     
    426431      /* Theoretically, something has gone really wrong here, since 
    427432         we've already verified the list. */ 
    428       PyErr_Format(PyExc_RuntimeError, "Input values have changed underneath us.  Something is seriously wrong."); 
     433      PyErr_Format( 
     434          PyExc_RuntimeError, 
     435          "Input values have changed underneath us.  Something is seriously wrong."); 
    429436      return -1; 
    430437    } 
     
    434441      /* Theoretically, something has gone really wrong here, since 
    435442         we've already verified the list. */ 
    436       PyErr_Format(PyExc_RuntimeError, "Input values have changed underneath us.  Something is seriously wrong."); 
     443      PyErr_Format( 
     444          PyExc_RuntimeError, 
     445          "Input values have changed underneath us.  Something is seriously wrong."); 
    437446      Py_DECREF(str); 
    438447      return -1; 
     
    449458PyObject* 
    450459get_pscards(const char* propname, struct pscard* ps, int nps) { 
    451   PyObject* result = NULL; 
     460  PyObject* result    = NULL; 
    452461  PyObject* subresult = NULL; 
    453   int i = 0; 
     462  int       i        = 0; 
    454463 
    455464  result = PyList_New(nps); 
     
    534543PyObject* 
    535544get_pvcards(const char* propname, struct pvcard* pv, int npv) { 
    536   PyObject* result = NULL; 
     545  PyObject* result    = NULL; 
    537546  PyObject* subresult = NULL; 
    538   int i = 0; 
     547  int       i        = 0; 
    539548 
    540549  result = PyList_New(npv);