File: nexsup.m

package info (click to toggle)
pgplot5 5.2.2-19.3
  • links: PTS
  • area: non-free
  • in suites: buster, stretch
  • size: 7,136 kB
  • ctags: 6,763
  • sloc: fortran: 39,792; ansic: 22,549; objc: 1,534; sh: 1,298; makefile: 385; perl: 234; pascal: 233; tcl: 190; awk: 51; csh: 25
file content (64 lines) | stat: -rw-r--r-- 1,538 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// This is a 'support routine' used by the nedriv.f code.  In brief, this
// is the main interface between the Fortran and C languages.  It is
// called from Fortran and uses an Objective C speaker object to send
// messages to the PGPLOT viewer.
//
#import "pgvSpeaker.h"
#import <stdio.h>

void mkspeak( id * ispeak);
id   mySpeak=NULL;

#ifdef ABSOFT
void NEXSUP ( int *ifunc,   char *cbuf,   float rtmp[],
           int len_ifunc, int len_cbuf, int len_rtmp)
#else
void nexsup_( int *ifunc, char *cbuf, float rtmp[], int len_cbuf)
#endif
{
      int n1, n2, itmp;
      double d1, d2;

      if(mySpeak==NULL) {
         mkspeak(&mySpeak);
      }
         
      switch (*ifunc) {
      case 1:
         [mySpeak getwind: &n1 by: &n2 scale:&d1 color: &itmp];
         rtmp[0]= (float) n1;
         rtmp[1]= (float) n2;
         rtmp[2]= (float) d1;
         rtmp[3]= (float) itmp;
         break;
      case 2:
         [mySpeak beginp];
         break;
      case 3:
         [mySpeak pscode:cbuf];
         break;
      case 4:
         [mySpeak cursorat: &d1 and: &d2 char: &itmp];
         rtmp[0]= (float) d1;
         rtmp[1]= (float) d2;
         rtmp[2]= (float) itmp;
         break;
      case 5:
         [mySpeak flush];
         break;
      case 6:
         [mySpeak endp];
         break;
      case 7:
         [mySpeak free];
         mySpeak=NULL;
         break;
      default :
         printf("nexsup--Unknown function code= %d\n",*ifunc);
         break;
      }
}

#import "mkspeak.m"

#import "pgvSpeaker.m"