~ubuntu-branches/ubuntu/vivid/atlas/vivid

« back to all changes in this revision

Viewing changes to CONFIG/cf2cstr.c

  • Committer: Bazaar Package Importer
  • Author(s): Sylvestre Ledru
  • Date: 2009-09-17 23:31:54 UTC
  • mto: (2.2.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 10.
  • Revision ID: james.westby@ubuntu.com-20090917233154-9esw88ub02twbuab
Tags: upstream-3.8.3
ImportĀ upstreamĀ versionĀ 3.8.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
#if defined(Add_) || defined(Add__)
3
 
   #define crout crout_
4
 
#elif defined(UpCase)
5
 
   #define crout CROUT
6
 
#endif
7
 
#ifdef SunStyle
8
 
 
9
 
void crout(char *str1, F77_INTEGER *n1, char *str2, F77_INTEGER *n2,
10
 
           F77_INTEGER three, F77_INTEGER five)
11
 
{
12
 
   if ( (*n1 != -1) || (*n2 != -2) || (three != 3) || (five != 5) ) exit(-1);
13
 
   if (str1[0] != '1' || str1[1] != '2' || str1[2] != '3') exit(-1);
14
 
   if (str2[0] != '1' || str2[1] != '2' || str2[2] != '3' ||
15
 
       str2[3] != '4' || str2[4] != '5') exit(-1);
16
 
   printf("-DSunStyle\n");
17
 
}
18
 
 
19
 
#elif defined(CrayStyle)
20
 
 
21
 
#include <fortran.h>
22
 
void crout(_fcd str1, F77_INTEGER *n1, _fcd str2, F77_INTEGER *n2)
23
 
{
24
 
   if ( (*n1 != -1) || (*n2 != -2) ) exit(-1);
25
 
   if (*(_fcdtocp(str1)) != '1' || *(_fcdtocp(str2)) != '1' ) exit(-1);
26
 
   printf("-DCrayStyle\n");
27
 
}
28
 
 
29
 
#elif defined(StructVal)
30
 
 
31
 
typedef struct {char *cp; F77_INTEGER len;} F77_CHAR;
32
 
void crout(F77_CHAR str1, F77_INTEGER *n1, F77_CHAR str2, F77_INTEGER *n2)
33
 
{
34
 
   if ( (*n1 != -1) || (*n2 != -2) || (str1.len != 3) || (str2.len != 5) )
35
 
      exit(-1);
36
 
   if (str1.cp[0] != '1' || str1.cp[1] != '2' || str1.cp[2] != '3') exit(-1);
37
 
   if (str2.cp[0] != '1' || str2.cp[1] != '2' || str2.cp[2] != '3' ||
38
 
       str2.cp[3] != '4' || str2.cp[4] != '5') exit(-1);
39
 
   printf("-DStringStructVal\n");
40
 
}
41
 
#elif defined(StructPtr)
42
 
typedef struct {char *cp; F77_INTEGER len;} *F77_CHAR;
43
 
void crout(F77_CHAR str1, F77_INTEGER *n1, F77_CHAR str2, F77_INTEGER *n2)
44
 
{
45
 
   if ( (*n1 != -1) || (*n2 != -2) || (str1->len != 3) || (str2->len != 5) )
46
 
      exit(-1);
47
 
   if (str1->cp[0] != '1' || str1->cp[1] != '2' || str1->cp[2] != '3') exit(-1);
48
 
   if (str2->cp[0] != '1' || str2->cp[1] != '2' || str2->cp[2] != '3' ||
49
 
       str2->cp[3] != '4' || str2->cp[4] != '5') exit(-1);
50
 
   printf("-DStringStructPtr\n");
51
 
}
52
 
#endif