IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 9, 2005, 9:20:18 PM (21 years ago)
Author:
eugene
Message:

working to mosaic astrom

Location:
trunk/Ohana/src/libfits
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libfits/header/F_modify.c

    r3369 r3400  
    102102char *fits_keyword_start (char *line) {
    103103
    104   int done;
    105104  char *c;
    106105
  • trunk/Ohana/src/libfits/include/fits.h

    r3391 r3400  
    3232  X = (T *) malloc ((unsigned)(MAX(((S)*((int)sizeof(T))),1))); \
    3333  if (X == NULL) { \
    34     fprintf(stderr,"failed malloc at %s in %s\n", __LINE__, __FILE__);\
     34    fprintf(stderr,"failed malloc at %d in %s\n", __LINE__, __FILE__);\
    3535    exit (10); }
    3636# define REALLOCATE(X,T,S) \
    3737  X = (T *) realloc(X,(unsigned)(MAX(((S)*((int)sizeof(T))),1))); \
    3838  if (X == NULL) { \
    39     fprintf(stderr,"failed realloc at %s in %s\n", __LINE__, __FILE__);\
     39    fprintf(stderr,"failed realloc at %d in %s\n", __LINE__, __FILE__);\
    4040    exit (10); }
    4141# define CHECK_REALLOCATE(X,T,S,N,D) \
     
    4444    X = (T *) realloc(X,(unsigned)(MAX(((S)*((int)sizeof(T))),1))); \
    4545    if (X == NULL) { \
    46       fprintf(stderr,"failed realloc increment at %s in %s\n", __LINE__, __FILE__);\
     46      fprintf(stderr,"failed realloc increment at %d in %s\n", __LINE__, __FILE__);\
    4747      exit (10); } }
    4848# endif /* ALLOCATE */
  • trunk/Ohana/src/libfits/table/F_get_column.c

    r2415 r3400  
    197197  if (label == (char *) NULL) return (FALSE);
    198198  if (label[0] == 0) return (FALSE);
     199  array = NULL;
    199200
    200201  /* find label in header */
  • trunk/Ohana/src/libfits/table/F_table_format.c

    r2415 r3400  
    5454int fits_table_format (char *format, char *type, int *Nval, int *Nbytes) {
    5555
    56   char Fchar, foo[80], bar;
     56  char Fchar, Size[80], Type;
    5757  int Nv;
    5858
     
    6464  if (Nv == 0) {
    6565    Nv = 1;
    66     strcpy (foo, "1");
     66    strcpy (Size, "1");
    6767  } else {
    68     strcpy (foo, &format[1]);
     68    strcpy (Size, &format[1]);
    6969  }
    70 
    71   if (Fchar == 'F') { *Nbytes = 1;  strcpy (type, "float");  bar = 'f'; *Nval = Nv; }
    72   if (Fchar == 'I') { *Nbytes = 1;  strcpy (type, "int");    bar = 'd'; *Nval = Nv; }
    73   if (Fchar == 'A') { *Nbytes = 1;  strcpy (type, "char");   bar = 's'; *Nval = Nv; }
     70 
     71  Type = 'x';
     72  if (Fchar == 'F') { *Nbytes = 1;  strcpy (type, "float");  Type = 'f'; *Nval = Nv; }
     73  if (Fchar == 'I') { *Nbytes = 1;  strcpy (type, "int");    Type = 'd'; *Nval = Nv; }
     74  if (Fchar == 'A') { *Nbytes = 1;  strcpy (type, "char");   Type = 's'; *Nval = Nv; }
    7475  if (!*Nbytes) { return (FALSE); }
    7576 
    76   sprintf (format, "%%-%s%c", foo, bar);
     77  sprintf (format, "%%-%s%c", Size, Type);
    7778
    7879  return (TRUE);
Note: See TracChangeset for help on using the changeset viewer.