~ubuntu-branches/debian/jessie/eso-midas/jessie

« back to all changes in this revision

Viewing changes to gui/XFilter/src/load_curve.c

  • Committer: Package Import Robot
  • Author(s): Ole Streicher
  • Date: 2014-04-22 14:44:58 UTC
  • Revision ID: package-import@ubuntu.com-20140422144458-okiwi1assxkkiz39
Tags: upstream-13.09pl1.2+dfsg
ImportĀ upstreamĀ versionĀ 13.09pl1.2+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*===========================================================================
 
2
  Copyright (C) 1995-2009 European Southern Observatory (ESO)
 
3
 
 
4
  This program is free software; you can redistribute it and/or 
 
5
  modify it under the terms of the GNU General Public License as 
 
6
  published by the Free Software Foundation; either version 2 of 
 
7
  the License, or (at your option) any later version.
 
8
 
 
9
  This program is distributed in the hope that it will be useful,
 
10
  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
  GNU General Public License for more details.
 
13
 
 
14
  You should have received a copy of the GNU General Public 
 
15
  License along with this program; if not, write to the Free 
 
16
  Software Foundation, Inc., 675 Massachusetts Ave, Cambridge, 
 
17
  MA 02139, USA.
 
18
 
 
19
  Correspondence concerning ESO-MIDAS should be addressed as follows:
 
20
        Internet e-mail: midas@eso.org
 
21
        Postal address: European Southern Observatory
 
22
                        Data Management Division 
 
23
                        Karl-Schwarzschild-Strasse 2
 
24
                        D 85748 Garching bei Muenchen 
 
25
                        GERMANY
 
26
 
 
27
.VERSION
 
28
 090826         last modif
 
29
===========================================================================*/
 
30
 
 
31
#include <stdlib.h>
 
32
#include <stdio.h>
 
33
#include <string.h>
 
34
 
 
35
#include <globaldef.h>
 
36
#include <model.h>
 
37
 
 
38
 
 
39
extern void endname(), end_graphic1(), plot_xy(), c_minmax(); 
 
40
 
 
41
extern int read_curve ();
 
42
 
 
43
 
 
44
 
 
45
 
 
46
 
 
47
 
 
48
 
 
49
 
 
50
void    load_curve(name)
 
51
char    name[];
 
52
 
 
53
{
 
54
extern  float   Oxmi,Oxma,Oymi,Oyma;
 
55
 
 
56
float   x[6000],y[6000];
 
57
int     n;
 
58
float   xmin,xmax;
 
59
float   ymin,ymax;
 
60
char    term[10],str[200];
 
61
 
 
62
endname(name,term);
 
63
 
 
64
if (strcmp(term,"dat"))
 
65
        strcat(name,".dat");
 
66
 
 
67
read_curve(name,x,y,&n,str);
 
68
c_minmax(x,y,n,&xmin,&xmax,&ymin,&ymax);
 
69
plot_xy(str,0,x,y,n,xmin,xmax,ymin,ymax);
 
70
end_graphic1();
 
71
 
 
72
   Oxmi=xmin;
 
73
   Oxma=xmax;
 
74
   Oymi=ymin;
 
75
   Oyma=ymax;
 
76
}