Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

lib/lib/misc.c

Go to the documentation of this file.
00001 /* === Doxygen Comment ======================================= */
00013 /* =========================================================== */
00014 
00015 #include <IFU_io.h>
00016 #include <IFU_math.h>
00017 #include <stdlib.h>                          /* atexit() */
00018 
00019 /* === Doxygen Comment ======================================= */
00023 /* =========================================================== */
00024 
00025 void banner_snifs(void)
00026 {
00027   /* Goodbye msg */
00028   if (VERBOSE) {
00029     print_msg("+------- SNifs Ultimate Reduction Package -------+");
00030     print_msg("| Webpage: http://snfactory.in2p3.fr/soft/snifs/ |");
00031     print_msg("| Contact: y.copin@ipnl.in2p3.fr                 |");
00032     print_msg("+------------------------------------------------+");
00033   }
00034 }
00035 
00036 /* === Doxygen Comment ======================================= */
00046 /* =========================================================== */
00047 
00048 void init_snifs(char *cvsname) 
00049 {
00050   char *tmpname, *name, *end;
00051 
00052   /* Parse the CVS-name "$Name:  $" to extract the real name */
00053   tmpname = strdup(cvsname);
00054   name = strchr(tmpname,' ');                /* Look for 1st blank */
00055   if (name == NULL) name = tmpname;
00056   else              name+= 1;
00057   end = strrchr(tmpname,' ');                /* Look for last blank */
00058   if (end != NULL) *end = '\0';              /* Terminate name there */
00059 
00060   /* Set version */
00061   if (strlen(name)) set_version(name);
00062   else              set_version("developer");
00063 
00064   free(tmpname);                             /* Allocated by strdup */
00065 
00066   atexit(banner_snifs);                      /* Display banner at very end of pgm */
00067 }

Generated on Tue Nov 23 18:04:20 2004 for Snifs by doxygen 1.3.3