~ubuntu-branches/ubuntu/vivid/esorex/vivid-proposed

« back to all changes in this revision

Viewing changes to src/er_main.c

  • Committer: Package Import Robot
  • Author(s): Ole Streicher
  • Date: 2012-05-11 12:00:00 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120511120000-4uz6r3lrod1dkly5
Tags: 3.9.6-1
* New upstream version
* Add Multi-Arch default plugin directory
* Set DM-Upload-Allowed

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: er_main.c,v 1.80 2010/11/22 14:05:59 kbanse Exp $
 
1
/* $Id: er_main.c,v 1.87 2012/03/09 17:29:54 kbanse Exp $
2
2
 *
3
3
 *   This file is part of the ESO Common Pipeline Library
4
4
 *   Copyright (C) 2001-2009 European Southern Observatory
20
20
 
21
21
/*
22
22
 * $Author: kbanse $
23
 
 * $Date: 2010/11/22 14:05:59 $
24
 
 * $Revision: 1.80 $
25
 
 * $Name: esorex-3_9_0 $
 
23
 * $Date: 2012/03/09 17:29:54 $
 
24
 * $Revision: 1.87 $
 
25
 * $Name: esorex-3_9_6 $
26
26
 */
27
27
 
28
28
#ifdef HAVE_CONFIG_H
92
92
{
93
93
cpl_parameter *p;
94
94
 
 
95
 
95
96
  /*
96
97
   * Processing different EsoRex options
97
98
   */
512
513
   p = cpl_parameterlist_get_next (param_list);
513
514
   }                            /* End of loop through all parameters in the list */
514
515
 
515
 
 
516
 
 
517
516
}                               /* End of er_init_parameters() */
518
517
 
519
518
# endif
534
533
 
535
534
 
536
535
printf ("\n     ***** %s, version %s  *****\n", PACKAGE_NAME, PACKAGE_VERSION);
537
 
 
538
 
/* printf ("\n           as of 091217\n"); */
539
 
 
540
536
fflush(stdout);
541
537
 
542
538
/* 
587
583
const char *cpp, *fn = "EsoRex";
588
584
 
589
585
char  plugin_name[FILEMAX+2];
 
586
char  date_str[8];
590
587
char  *conf_file_global=NULL, *conf_file_local=NULL;
 
588
 
 
589
const char *cdescr;
591
590
 
592
591
cpl_parameter *p = NULL;
593
592
cpl_parameterlist *caller_parameter_list = NULL;
614
613
   exit(EXIT_FAILURE);
615
614
   }
616
615
 
 
616
/* print version of Esorex, and set date of last modif */
 
617
 
 
618
er_print_header ();
 
619
(void) strcpy(date_str,"120311");
 
620
 
617
621
 
618
622
/* Initialization and setup */
619
623
 
622
626
cpl_msg_set_domain (PACKAGE);
623
627
cpl_msg_set_time_off ();
624
628
cpl_msg_set_domain_on ();
625
 
 
626
 
er_print_header ();
 
629
cpl_msg_set_component_off ();
627
630
 
628
631
 
629
632
 
697
700
(void) strcat(conf_file_global, "/");
698
701
(void) strcat(conf_file_global, GLOBAL_RC_NAME);
699
702
(void) strcat(conf_file_global, GLOBAL_RC_EXTENSION);
700
 
 
 
703
/* 
 
704
printf("USE_GLOBAL_ESOREX_RC - conf_file_global = %s\n\n",conf_file_global); 
 
705
*/
701
706
 
702
707
/* check if resource file exists, 
703
708
   use .rc file from --prefix dir in configuration of Esorex if necessary,
719
724
   (void) strcat(new_name, GLOBAL_RC_EXTENSION);
720
725
 
721
726
   rcfp = fopen(new_name, "r");
722
 
   if (rcfp == NULL)                            /* no .rc file in --prefix dir, */
723
 
      {                                         /* keep original name for compatibility */
 
727
   if (rcfp == NULL)            /* no .rc file in --prefix dir, */
 
728
      {                         /* keep original name for compatibility */
724
729
      (void) strcpy(conf_file_global,save_name);
725
730
      }
726
731
   else
748
753
 
749
754
if (argc == 1)          /* entering just Esorex yields the library versions */
750
755
   {
751
 
   const char *cdescr;
752
 
 
753
756
   cdescr = cpl_get_description(CPL_DESCRIPTION_DEFAULT);
754
757
   (void) printf("\nLibraries used: %s\n\n",cdescr);
755
758
   goto clean_up;
756
759
   }
757
760
 
758
 
/* if ((argc > 1) && ((int)strcmp(argv[1],"--V") == 0)) */
 
761
cdescr = cpl_get_description(CPL_DESCRIPTION_DEFAULT);
 
762
 
759
763
if ((argc == 2) && ((int)strcmp(argv[1],"--V") == 0)) 
760
764
   {
761
 
   const char *cdescr;
762
 
 
763
 
   (void) printf("           last modif - 101118 \n");
764
 
 
765
 
   cdescr = cpl_get_description(CPL_DESCRIPTION_DEFAULT);
 
765
   (void) printf("           as of %s \n",date_str);
766
766
   (void) printf("\nLibraries used: %s\n\n",cdescr);
767
 
 
768
767
   (void) printf("using %s as resource file\n",conf_file_global);
769
 
 
770
 
   /* 
771
 
   n = er_fileutils_file_is_fits(argv[2]);
772
 
   printf("er_fileutils_file_is_fits(%s) returned %d\n",argv[2],n);
773
 
   */
774
 
 
775
768
   goto end_of_it;
776
769
   }
777
770
 
778
 
(void) printf("\n");
779
771
 
780
772
/* Process caller configuration information */
781
773
 
795
787
   {
796
788
   e_code = plugin_process_plugin (caller_parameter_list,
797
789
                                   plugin_name, set_of_frames_filenames,
798
 
                                   argc, argv);
 
790
                                   date_str,argc, argv);
799
791
 
800
792
   (void) sprintf(trace_msg,"plugin_process_plugin returned %d",e_code); 
801
793
   ER_TRACEX(trace_msg)