/* * Copyright(c) 1999, Space Science and Engineering Center, UW-Madison * Refer to "McIDAS Software Acquisition and Distribution Policies" * in the file mcidas/data/license.txt */ /**** $Id: smpcorec.c,v 1.0 1999/05/12 20:22:48 krauss Rel $ ****/ /* *? SMPCOREC -- Sample of a core mcidas application (C version) *? SMPCOREC *? Parameters: *? none *? Keywords: *? none *? Remarks: *? McIDAS program sample. *? *? This sample illustrates the basic format of a McIDAS application *? written in C. It does absolutly nothing. *? ---------- */ #include #include #include "mcidas.h" /* Program execution begins here */ int main (int argc, char **argv) { int status; char *program; /* * Initialize the McIDAS environment. The function Mcinit() must be called * before any other McIDAS function can be called. Mcinit () initializes * the McIDAS environment for this application and parses the command line * arguments so the Mcarg* arg fetching functions may be used to fetch * the command line arguments. */ status = Mcinit (argc, argv); if (status < 0) { Mceprintf ("Unable to initialize McIDAS environment\n"); Mccodeset (1); return (1); } /* Get the program name */ status = Mccmdstr (" ", 0, (char *)NULL, (const char **)&program); if (status < 0 || program == (char *)NULL) { Mceprintf ("Unable to get program name\n"); Mccodeset (2); return (2); } /* * Body of your application */ Mcprintf ("%s...Done\n", program); /* return success */ Mccodeset (0); return (0); }