IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 12902


Ignore:
Timestamp:
Apr 18, 2007, 11:12:42 AM (19 years ago)
Author:
eugene
Message:

FT_UNSIGN_MODE removed as global symbol and functionality replaced with gfits_set/get_unsign_mode

Location:
trunk/Ohana/src
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/gophot/src/gophot.c

    r7080 r12902  
    1313  fprintf (stderr, "reading from %s, writing to %s, %s param file\n", argv[1], argv[2], argv[3]);
    1414
    15   FT_UNSIGN_MODE = FALSE;
    1615  strcpy (files[4], argv[2]);
    1716
  • trunk/Ohana/src/libfits/header/F_init_H.c

    r8430 r12902  
    11# include <ohana.h>
    22# include <gfitsio.h>
    3 int FT_UNSIGN_MODE;
     3static int FT_UNSIGN_MODE = FALSE;
    44
    55/*********************** fits read header ***********************************/
     
    2121  return (TRUE);
    2222}
     23
     24int gfits_set_unsign_mode (int mode) {
     25  int oldmode;
     26 
     27  oldmode = FT_UNSIGN_MODE;
     28  FT_UNSIGN_MODE = mode;
     29  return (oldmode);
     30}
     31
     32int gfits_get_unsign_mode () {
     33  return (FT_UNSIGN_MODE);
     34}
  • trunk/Ohana/src/libfits/header/F_read_H.c

    r7054 r12902  
    11# include <ohana.h>
    22# include <gfitsio.h>
    3 int FT_UNSIGN_MODE;
    43
    54/*********************** fits read header ***********************************/
     
    5150  }
    5251
    53   header[0].unsign = FT_UNSIGN_MODE;
     52  header[0].unsign = gfits_get_unsign_mode();
    5453  header[0].bscale = 1;
    5554  header[0].bzero  = 0;
  • trunk/Ohana/src/libfits/header/F_read_XH.c

    r7054 r12902  
    11# include <ohana.h>
    22# include <gfitsio.h>
    3 int FT_UNSIGN_MODE;
    43
    54/*********************** fits read header ***********************************/
  • trunk/Ohana/src/libfits/include/gfitsio.h

    r7054 r12902  
    3232# define FT_LINE_LENGTH          80  /* FITS header line length */
    3333# define FT_RECORD_SIZE        2880  /* FITS block size */
    34 
    35 extern int FT_UNSIGN_MODE; /* is unsigned the default? */
    3634
    3735/* this structure defines the buffer which contains a header
     
    114112int   gfits_matrix_size            PROTO ((Header *));
    115113int   gfits_init_header            PROTO ((Header *));
     114int   gfits_get_unsign_mode        PROTO (());
     115int   gfits_set_unsign_mode        PROTO ((int mode));
    116116int   gfits_create_table_header    PROTO ((Header *, char *, char *));
    117117int   gfits_vtable_from_ftable     PROTO ((FTable *ftable, VTable *vtable, int *row, int Nrow));
  • trunk/Ohana/src/misc/src/cubefilter.c

    r7080 r12902  
    1313  float fmin, fmax, Nval, sum;
    1414
    15   FT_UNSIGN_MODE = FALSE;
    1615  if (N = get_argument (argc, argv, "-unsign")) {
    1716    remove_argument (N, &argc, argv);
    18     FT_UNSIGN_MODE = TRUE;
     17    gfits_set_unsign_mode (TRUE);
    1918  }
    2019
  • trunk/Ohana/src/misc/src/medianfilter.c

    r7080 r12902  
    1717  float fmin, fmax, Nval, sum;
    1818
    19   FT_UNSIGN_MODE = FALSE;
    2019  if ((N = get_argument (argc, argv, "-unsign"))) {
    2120    remove_argument (N, &argc, argv);
    22     FT_UNSIGN_MODE = TRUE;
     21    gfits_set_unsign_mode (TRUE);
    2322  }
    2423
  • trunk/Ohana/src/opihi/cmd.data/rd.c

    r7917 r12902  
    236236
    237237  /** now - convert the matrix values to floats for internal use **/
    238   gfits_convert_format (&buf[0].header, &buf[0].matrix, -32, 1.0, 0.0, FT_UNSIGN_MODE);
     238  gfits_convert_format (&buf[0].header, &buf[0].matrix, -32, 1.0, 0.0, gfits_get_unsign_mode());
    239239 
    240240  return (TRUE);
  • trunk/Ohana/src/opihi/cmd.data/rdseg.c

    r7917 r12902  
    6666
    6767  /** now - convert the matrix values to floats for internal use **/
    68   gfits_convert_format (&buf[0].header, &buf[0].matrix, -32, 1.0, 0.0, FT_UNSIGN_MODE);
     68  gfits_convert_format (&buf[0].header, &buf[0].matrix, -32, 1.0, 0.0, gfits_get_unsign_mode());
    6969 
    7070  return (TRUE);
  • trunk/Ohana/src/opihi/cmd.data/unsign.c

    r7917 r12902  
    44 
    55  if (argc == 1) {
    6     if (FT_UNSIGN_MODE)
     6    if (gfits_get_unsign_mode())
    77      gprint (GP_ERR, "mode is now UNSIGNED int \n");
    88    else
     
    1313  if (argc == 2) {
    1414    if (!strcmp (argv[1], "1")) {
    15       FT_UNSIGN_MODE = TRUE;
     15      gfits_set_unsign_mode (TRUE);
    1616      set_int_variable ("UNSIGN", 1);
    1717      return (TRUE);
    1818    }
    1919    if (!strcmp (argv[1], "0")) {
    20       FT_UNSIGN_MODE = FALSE;
     20      gfits_set_unsign_mode (FALSE);
    2121      set_int_variable ("UNSIGN", 0);
    2222      return (TRUE);
  • trunk/Ohana/src/opihi/dimm/camera.c

    r9275 r12902  
    112112    ReadOut (x, y, dx, dy, 1, buf[0].matrix.buffer);
    113113
    114     gfits_convert_format (&buf[0].header, &buf[0].matrix, -32, 1.0, 0.0, FT_UNSIGN_MODE);
     114    gfits_convert_format (&buf[0].header, &buf[0].matrix, -32, 1.0, 0.0, gfits_get_unsign_mode());
    115115
    116116    EXIT_STATUS (TRUE);
  • trunk/Ohana/src/opihi/lib.shell/startup.c

    r9473 r12902  
    4747    set_variable ("PID", getpid());
    4848
    49   /* keep these?
    50      set_int_variable ("UNSIGN", 0);
    51      FT_UNSIGN_MODE = FALSE;
    52   */
    53 
    54 
    55 
     49    set_int_variable ("UNSIGN", 0);
     50    gfits_set_unsign_mode (FALSE);
     51   
    5652  /* check history file permission */
    5753  {
  • trunk/Ohana/src/tools/src/medianfilter.c

    r12333 r12902  
    1717  float fmin, fmax, Nval, sum;
    1818
    19   FT_UNSIGN_MODE = FALSE;
    2019  if ((N = get_argument (argc, argv, "-unsign"))) {
    2120    remove_argument (N, &argc, argv);
    22     FT_UNSIGN_MODE = TRUE;
     21    gfits_set_unsign_mode (TRUE);
    2322  }
    2423
Note: See TracChangeset for help on using the changeset viewer.