IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 14, 2006, 4:55:08 PM (20 years ago)
Author:
Paul Price
Message:

Making ppStats into a library, so we can incorporate it into ppImage, etc. There's still an executable which provides a wrapper to the functionality. Nothing tested yet following the change.

Location:
trunk/ppStats
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStats

    • Property svn:ignore
      •  

        old new  
        1010install-sh
        1111missing
         12config.guess
         13config.sub
         14libtool
         15ltmain.sh
         16ppStats.pc
  • trunk/ppStats/src

    • Property svn:ignore
      •  

        old new  
        22Makefile
        33Makefile.in
         4.libs
         5*.lo
         6*.la
        47ppStats
  • trunk/ppStats/src/ppStats.c

    r7902 r8337  
    55#include "ppStats.h"
    66
    7 int main(int argc, char *argv[])
     7psMetadata *ppStats(psMetadata *out,    // Output metadata
     8                    pmFPA *fpa,         // FPA for which to get statistics
     9                    pmConfig *config    // Configuration
     10    )
    811{
     12    // Get the options, open the files
     13    ppStatsData *data = ppStatsSetupFromRecipe(NULL, config);
    914
    10     psLibInit(NULL);
    11     psTimerStart(TIMERNAME);
    12 
    13     // Parse the configuration and arguments
    14     pmConfig *config = pmConfigRead(&argc, argv);
    15 
    16     // Get the options, open the files
    17     ppStatsData *data = ppStatsSetup(config);
     15    if (data->fpa) {
     16        psFree(data->fpa);
     17    }
     18    data->fpa = psMemIncrRefCounter(fpa);
    1819
    1920    // Go through the FPA and do the hard work
    20     ppStatsLoop(data, config);
     21    out = ppStatsLoop(out, data, config);
    2122
    2223    psFree(data);
    23     psFree(config);
    24     pmConceptsDone();
    25     pmConfigDone();
    26     psLibFinalize();
    2724
    28     return EXIT_SUCCESS;
     25    return out;
    2926}
Note: See TracChangeset for help on using the changeset viewer.