IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 5954


Ignore:
Timestamp:
Jan 9, 2006, 2:24:43 PM (21 years ago)
Author:
jhoblitt
Message:

forward port to pslib 0.9.0's psFits* semantics

Location:
trunk/glueforge/templates/psdb
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/glueforge/templates/psdb/insertfits_c.tt

    r5950 r5954  
    22#include <[% pkg_name %].h>
    33#include <stdlib.h>
     4#include <stdio.h>
     5#include <unistd.h>
     6
     7#define TMP_FILENAME "./blargh"
    48
    59int main ()
     
    1620
    1721        // open a temp
    18         fits = psFitsOpen("./blargh", "rw");
     22        fits = psFitsOpen(TMP_FILENAME, "r");
    1923        if (!fits) {
    2024            exit(EXIT_FAILURE);
     
    2529        }
    2630
    27         psFree(fits);
     31        if (!psFitsClose(fits)) {
     32            exit(EXIT_FAILURE);
     33        }
     34
    2835        psDBCleanup(dbh);
    2936    }
  • trunk/glueforge/templates/psdb/popfits_c.tt

    r5950 r5954  
    22#include <[% pkg_name %].h>
    33#include <stdlib.h>
     4#include <stdio.h>
     5#include <unistd.h>
     6
     7#define TMP_FILENAME "./blargh"
    48
    59int main ()
     
    1620
    1721        // allocate a temp
    18         fits = psFitsOpen("./blargh", "rw");
     22        fits = psFitsOpen(TMP_FILENAME, "w");
    1923        if (!fits) {
    2024            exit(EXIT_FAILURE);
     
    2529        }
    2630
    27         psFree(fits);
     31        if (!psFitsClose(fits)) {
     32            exit(EXIT_FAILURE);
     33        }
     34
    2835        psDBCleanup(dbh);
    2936    }
  • trunk/glueforge/templates/psdb/selectrowsfits_c.tt

    r5950 r5954  
    22#include <[% pkg_name %].h>
    33#include <stdlib.h>
     4
     5#define TMP_FILENAME "./blargh"
    46
    57int main ()
     
    1517        }
    1618
    17         // FIXME: open a temp file and pass it as a FD
    18         fits = psFitsOpen("./blargh", "rw");
     19        fits = psFitsOpen(TMP_FILENAME, "w");
    1920        if (!fits) {
    2021            exit(EXIT_FAILURE);
Note: See TracChangeset for help on using the changeset viewer.