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

« back to all changes in this revision

Viewing changes to prim/display/libsrc/f2cdsp-2.fc

  • 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
 
 
28
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
29
.LANGUAGE  C
 
30
.AUTHOR    Richard van Hees                        ESO - Garching
 
31
.IDENTIFICATION  Module f2cdsp.fc
 
32
.PURPUSE   fortran to C interfaces for low level display routines
 
33
.VERSION   [1.00]  940327
 
34
 
 
35
 090702         last modif
 
36
---------------------------------------------------------*/
 
37
 
 
38
#include <midas_def.h>
 
39
#include <idinumd.h>
 
40
#include <proto_II.h>
 
41
#include <stdlib.h>
 
42
 
 
43
int  mm;
 
44
 
 
45
char *ptr1, *ptr2;
 
46
char *loc_pntr();
 
47
char *strp_pntr();
 
48
 
 
49
#define LUTSIZE 256
 
50
#define MAXDIM  3
 
51
 
 
52
/*
 
53
 
 
54
*/
 
55
 
 
56
int tstcolor();
 
57
int GetScrPix();
 
58
void Plox();
 
59
 
 
60
 
 
61
/***  colo = tstcolor(cbuf) ***/
 
62
 
 
63
ROUTINE DAZ1(colo)
 
64
int  *colo;
 
65
 
 
66
{
 
67
ptr1 = strp_pntr(1);         /* get stripped string of "cbuf" */
 
68
 
 
69
*colo = tstcolor(ptr1);
 
70
return 0;
 
71
}
 
72
 
 
73
/***  Alptxec(cbuf,xp,yp,colo) ***/
 
74
 
 
75
ROUTINE DAZ2(xp,yp,colo)
 
76
int  *xp;
 
77
int  *yp;
 
78
int  *colo;
 
79
 
 
80
{
 
81
ptr1 = strp_pntr(1);         /* get stripped string of "cbuf" */
 
82
 
 
83
Alptxec(ptr1,*xp,*yp,*colo);
 
84
return 0;
 
85
}
 
86
 
 
87
 
 
88
/***  Alptext(cbuf,na,nb,colo) ***/
 
89
 
 
90
ROUTINE DAZ3(na,nb,colo)
 
91
int  *na;
 
92
int  *nb;
 
93
int  *colo;
 
94
 
 
95
{
 
96
ptr1 = strp_pntr(1);         /* get stripped string of "cbuf" */
 
97
 
 
98
Alptext(99,ptr1,*na,*nb,*colo);
 
99
return 0;
 
100
}
 
101
 
 
102
ROUTINE AUXHLP(flag)
 
103
int  *flag;
 
104
 
 
105
{
 
106
auxhelp(*flag);
 
107
return 0;
 
108
}
 
109
 
 
110
ROUTINE AUXWND(flag,info,xya,xyb,stat)
 
111
int  *flag;
 
112
int  *info;
 
113
int  *xya;
 
114
int  *xyb;
 
115
int  *stat;
 
116
 
 
117
{
 
118
*stat = Cauxwnd(*flag,info,xya,xyb);
 
119
return 0;
 
120
}
 
121
 
 
122
ROUTINE SCRPIX(imno,kwc,rval,kxy,scrpix,stat) 
 
123
int  *imno;
 
124
int  *kwc;
 
125
float   *rval;
 
126
int  *kxy;
 
127
float   *scrpix;
 
128
int  *stat;
 
129
 
 
130
/* 
 
131
imno = image id (IN), kwc = 0/1 for rval = f.p./w.c. value
 
132
kxy = 1/2/3 for using x/y/(x+y)/2 screen distance
 
133
scrpix = screen pixel value corresponding to  rval 
 
134
*/
 
135
 
 
136
{
 
137
*stat = GetScrPix(*imno,*kwc,*rval,*kxy,scrpix);
 
138
return 0;
 
139
}
 
140
 
 
141
/*** buildgra(shape,coords,arcs,xfig,yfig,figmax,nop) ***/
 
142
 
 
143
ROUTINE DAZ4(coords,arcs,xfig,yfig,figmax,nop)
 
144
int  *coords;
 
145
float   *arcs;
 
146
int  *xfig;
 
147
int  *yfig;
 
148
int  *figmax;
 
149
int  *nop;
 
150
 
 
151
{
 
152
ptr1 = strp_pntr(1);         /* get stripped string of "shape" */
 
153
 
 
154
buildgra(ptr1,coords,arcs,xfig,yfig,*figmax,nop);
 
155
return 0;
 
156
}
 
157
 
 
158
ROUTINE CONCHA(dsplay,chan,grflag,value)
 
159
int *dsplay;
 
160
int *chan;
 
161
int *grflag;
 
162
int *value;
 
163
 
 
164
{
 
165
CONCHA_C(*dsplay,*chan,*grflag,*value);
 
166
return 0;
 
167
}
 
168
 
 
169
 
 
170
/***Ccursin(dsplay,iact,nocurs,xya,mca,isca,xyb,mcb,iscb) ***/
 
171
 
 
172
ROUTINE CURSIN(dsplay,iact,nocurs,xya,mca,isca,xyb,mcb,iscb)
 
173
int *dsplay;
 
174
int *iact;
 
175
int *nocurs;
 
176
int  *xya;
 
177
int  *mca;
 
178
int  *isca;
 
179
int  *xyb;
 
180
int  *mcb;
 
181
int  *iscb;
 
182
 
 
183
{
 
184
int  unit, ik[4], kxya[5], kxyb[5];
 
185
register int  nr;
 
186
 
 
187
for (nr=0; nr<5; nr++)
 
188
   {
 
189
   kxya[nr] = 0;
 
190
   kxyb[nr] = 0;
 
191
   }
 
192
 
 
193
Ccursin( *dsplay, *iact, *nocurs, kxya, isca, kxyb, iscb );
 
194
 
 
195
xya[0] = kxya[0];
 
196
xya[1] = kxya[1];
 
197
*mca = kxya[2];
 
198
 
 
199
xyb[0] = kxyb[0];
 
200
xyb[1] = kxyb[1];
 
201
*mcb = kxyb[2];
 
202
 
 
203
if ((*isca != 0) || (*iscb != 0))
 
204
   {
 
205
   ik[0] = kxya[3];
 
206
   ik[1] = kxya[4];
 
207
   ik[2] = kxyb[3];
 
208
   ik[3] = kxyb[4];
 
209
 
 
210
   (void) SCKWRI("CURSOR",ik,1,4,&unit);        /* save screen coords. */
 
211
   }
 
212
 
 
213
return 0;
 
214
}
 
215
 
 
216
ROUTINE DAZVIS( dsplay, chanl, flag, vis )
 
217
int  *dsplay;
 
218
int  *chanl;
 
219
int  *flag;
 
220
int  *vis;
 
221
 
 
222
{
 
223
(void) Cdazvis( *dsplay,* chanl, *flag, *vis );
 
224
return 0;
 
225
}
 
226
 
 
227
ROUTINE DAZSCR( dsplay, chanl, scrx, scry, stat )
 
228
int  *dsplay;
 
229
int  *chanl;
 
230
int  *scrx;
 
231
int  *scry;
 
232
int  *stat;
 
233
 
 
234
{
 
235
*stat = Cdazscr(*dsplay,*chanl,scrx,scry);
 
236
return 0;
 
237
}
 
238
 
 
239
ROUTINE DAZZSC( dsplay, chanl, zoom, scrx, scry, stat )
 
240
int  *dsplay;
 
241
int  *chanl;
 
242
int  *zoom;
 
243
int  *scrx;
 
244
int  *scry;
 
245
int  *stat;
 
246
 
 
247
{
 
248
*stat = Cdazzsc( *dsplay, *chanl, *zoom, scrx, scry );
 
249
return 0;
 
250
}
 
251
 
 
252
 
 
253
/*** GETCUR(action,frame,icur1,fp1,wc1,val1,stat1,icur2,fp2,wc2,val2,stat2) ***/
 
254
 
 
255
ROUTINE DAZ5(icur1,fp1,wc1,val1,stat1,icur2,fp2,wc2,val2,stat2)
 
256
 
 
257
/* action = char string with action code (input) 
 
258
   frame = char string to hold displayed image name (in/output)
 
259
   for details see description in getcur.c */
 
260
 
 
261
int  *icur1;  /* screen cursor coords (OUT)*/
 
262
float  *fp1; /* = f.p. at cursor pos. (OUT) */
 
263
float  *wc1; /* = w.c. at cursor pos. (OUT)*/
 
264
float  *val1; /* = value a.c.p. (OUT) */
 
265
int    *stat1; /* = status of cursor (which keys pressed)*/
 
266
int  *icur2;
 
267
float  *fp2;
 
268
float  *wc2; 
 
269
float  *val2;
 
270
int    *stat2;
 
271
   
 
272
{
 
273
int  n, kk;
 
274
float xya[7], xyb[7];
 
275
char  *work, myframe[80];
 
276
 
 
277
 
 
278
ptr1 = strp_pntr(1);         /* get stripped string of "action" */
 
279
ptr2 = loc_pntr(1,&mm);      /* get location of "frame" and its length */
 
280
if (mm > 80) 
 
281
   kk = 80;          /* for GetCursor max 80 char. string */
 
282
else
 
283
   kk = mm;
 
284
 
 
285
if (*ptr2 == ' ')
 
286
   {
 
287
   myframe[0] = ' ';
 
288
   myframe[1] = '\0';
 
289
   }
 
290
else
 
291
   {                    /* we expect a char string with ' ' in the end */
 
292
   work = ptr2;
 
293
   for (n=0; n<(kk-1); n++)     /* at most 79 chars */
 
294
      {
 
295
      if (*work == ' ')
 
296
         {
 
297
         myframe[n] = '\0';
 
298
         goto next_step;
 
299
         }
 
300
      myframe[n] = *work++;
 
301
      }
 
302
 
 
303
   myframe[79] = '\0';          /* last element of myframe */
 
304
   }
 
305
 
 
306
next_step:
 
307
GetCursor(ptr1,myframe,xya,stat1,xyb,stat2);
 
308
 
 
309
if (*stat1 != 0) 
 
310
   {
 
311
   icur1[0] = (int) (xya[0]+0.5); icur1[1] = (int) (xya[1]+0.5);
 
312
   fp1[0] = xya[2]; fp1[1] = xya[3];
 
313
   wc1[0] = xya[4]; wc1[1] = xya[5];
 
314
   *val1 = xya[6];
 
315
   icur2[0] = (int) (xyb[0]+0.5); icur2[1] = (int) (xyb[1]+0.5);
 
316
   fp2[0] = xyb[2]; fp2[1] = xyb[3];
 
317
   wc2[0] = xyb[4]; wc2[1] = xyb[5];
 
318
   *val2 = xyb[6];
 
319
   }
 
320
 
 
321
n = (int) strlen(myframe);
 
322
if (n > 0) 
 
323
   {
 
324
   if (n < mm)                          /* string + ' ' as endmarker fit */
 
325
      {
 
326
      (void) strcpy(ptr2,myframe);
 
327
      *(ptr2+n) = ' ';
 
328
      }
 
329
   else
 
330
      {                                 /* no space for end marker... */
 
331
      (void) strncpy(ptr2,myframe,(size_t)mm);
 
332
      }
 
333
   }
 
334
else
 
335
   *ptr2 = ' ';
 
336
 
 
337
return 0;
 
338
}
 
339
 
 
340
/***  GETSTR( outstr, dim )  ***/
 
341
 
 
342
ROUTINE DAZ6(dim)
 
343
int  *dim;
 
344
 
 
345
{
 
346
int   n;
 
347
 
 
348
 
 
349
ptr1 = loc_pntr(1,&mm);      /* get location of "outstr" */
 
350
 
 
351
Cgetstr(ptr1,dim);
 
352
 
 
353
n = (int) strlen(ptr1);
 
354
if ((n > 0) && (n < mm)) *(ptr1+n) = ' ';
 
355
 
 
356
return 0;
 
357
}
 
358
 
 
359
ROUTINE HSIRGB( flag, hsi, rgb )
 
360
int  *flag;
 
361
float   *hsi;
 
362
float   *rgb;
 
363
 
 
364
{
 
365
HSIRGB_C(*flag,hsi,rgb);
 
366
return 0;
 
367
}
 
368
 
 
369
ROUTINE JOYSTK( dsplay, iact, nocurs, jxdis, jydis, stat )
 
370
int *dsplay;
 
371
int *iact;
 
372
int *nocurs;
 
373
int *jxdis;
 
374
int *jydis;
 
375
int *stat;
 
376
 
 
377
{
 
378
*stat = JOYSTK_C( *dsplay, *iact, *nocurs, jxdis, jydis );
 
379
return 0;
 
380
}
 
381
 
 
382
ROUTINE LOADWN( flags, imno, npix, stapix, kpix, wsta, cuts )
 
383
int  *flags;
 
384
int  *imno;
 
385
int  *npix;
 
386
int  *stapix;
 
387
int  *kpix;
 
388
int  *wsta;
 
389
float   *cuts;
 
390
 
 
391
{
 
392
LOADWN_C( flags, *imno, npix, stapix, kpix, wsta, cuts );
 
393
return 0;
 
394
}
 
395
 
 
396
ROUTINE MAKITT(icount,ritt,ocount,oitt)
 
397
int *icount;
 
398
float  *ritt;
 
399
int *ocount;
 
400
float  *oitt;
 
401
 
 
402
{
 
403
MakeITT(*icount,ritt,*ocount,oitt);
 
404
return 0;
 
405
}
 
406
 
 
407
static void mak1(ic,mlut,qlut)
 
408
int   ic;
 
409
float *mlut, *qlut;
 
410
 
 
411
{
 
412
register int  jin, jout, jouta, joutb;
 
413
 
 
414
jout = 0;
 
415
jouta = ic;
 
416
joutb = jouta + jouta;
 
417
 
 
418
for (jin=0; jout<ic; jin+=3)
 
419
   {
 
420
   mlut[jout++] = qlut[jin];
 
421
   mlut[jouta++] = qlut[jin+1];
 
422
   mlut[joutb++] = qlut[jin+2];
 
423
   }
 
424
}
 
425
 
 
426
static void mak2(oc,mlut,qlut)
 
427
int   oc;
 
428
float *mlut, *qlut;
 
429
 
 
430
{
 
431
register int  jin, jout, jouta, joutb;
 
432
 
 
433
jout = 0;
 
434
jouta = oc;
 
435
joutb = jouta + jouta;
 
436
for (jin=0; jout<oc; jin+=3)
 
437
   {
 
438
   qlut[jin] = mlut[jout++];
 
439
   qlut[jin+1] = mlut[jouta++];
 
440
   qlut[jin+2] = mlut[joutb++];
 
441
   }
 
442
}
 
443
 
 
444
ROUTINE MAKLUT( flag, icount, rlut, ocount, olut )
 
445
int *flag;                   /* IN: 1= send to device, 2= get from device */
 
446
int *icount;
 
447
float  *rlut;
 
448
int *ocount;
 
449
float  *olut;
 
450
 
 
451
{
 
452
float  mylut[3*LUTSIZE];
 
453
 
 
454
 
 
455
/* 
 
456
  r1 g1 b1 r2 g2 b2 ... rN gN bN   =>   r1 ... rN g1 ... gN b1 ... bN  
 
457
*/
 
458
 
 
459
if ( *flag == 1 )
 
460
   {
 
461
   mak1(*icount,mylut,rlut);
 
462
   MakeLUT(*icount,mylut,*ocount,olut);
 
463
   }
 
464
 
 
465
/*
 
466
  r1 ... rN g1 ... gN b1 ... bN   =>   r1 g1 b1 r2 g2 b2 ... rN gN bN
 
467
*/
 
468
 
 
469
else
 
470
   {
 
471
   MakeLUT(*icount,rlut,*ocount,mylut);
 
472
   mak2(*ocount,mylut,olut);
 
473
   }
 
474
return 0;
 
475
}
 
476
 
 
477
ROUTINE PLOHI(ino)
 
478
int *ino;
 
479
 
 
480
{
 
481
Plox(*ino);
 
482
return 0;
 
483
}
 
484
 
 
485
ROUTINE DAZ8(dsplay,chan,nitt,ista,count,ritt,idst)
 
486
int *dsplay;
 
487
int *chan;
 
488
int *nitt;
 
489
int *ista;
 
490
int *count;
 
491
float  *ritt;
 
492
int *idst;
 
493
 
 
494
{
 
495
int mysta = *ista - 1;              /*  1,... -> 0,... */
 
496
 
 
497
*idst = IILRIT_C(*dsplay,*chan,*nitt,mysta,*count,ritt);
 
498
 
 
499
return 0;
 
500
}
 
501
 
 
502
ROUTINE RDLUT(dsplay,nlut,ista,count,rlut,idst)
 
503
int *dsplay;
 
504
int *nlut;
 
505
int *ista;
 
506
int *count;
 
507
int *idst;
 
508
float    *rlut;
 
509
 
 
510
{
 
511
int mysta = *ista - 1;              /*  1,... -> 0,... */
 
512
 
 
513
*idst = IILRLT_C(*dsplay,*nlut,mysta,*count,rlut);
 
514
return 0;
 
515
}
 
516
 
 
517
ROUTINE REFOVR(stat)
 
518
int  *stat;
 
519
 
 
520
{
 
521
*stat = 0;
 
522
Crefrovr();
 
523
return 0;
 
524
}
 
525
 
 
526
ROUTINE SPLCNT( splcx, splcy )
 
527
int (*splcx)[5];
 
528
int (*splcy)[5];
 
529
 
 
530
{
 
531
SPLCNT_C( splcx, splcy );
 
532
return 0;
 
533
}
 
534
 
 
535
ROUTINE SETCUR( dsplay, cursno, forma, colo, coords, stat )
 
536
int *dsplay;
 
537
int *cursno;
 
538
int *forma;
 
539
int *colo;
 
540
int *coords;
 
541
int *stat;
 
542
 
 
543
{
 
544
*stat = 0;
 
545
SETCUR_C( *dsplay, *cursno, *forma, *colo, coords );
 
546
return 0;
 
547
}
 
548
 
 
549
static int pxx(flag,cb,rbuff,dbuf,tbuf)
 
550
int  flag;
 
551
char *cb;
 
552
float *rbuff;
 
553
double *dbuf, *tbuf;
 
554
 
 
555
{
 
556
 
 
557
if (flag == 1)
 
558
   {
 
559
   if ((cb[0] == 'I') && (cb[1] == 'N'))                /* action = INIT */
 
560
      return (1);
 
561
 
 
562
   else
 
563
      {
 
564
      dbuf[0] = rbuff[0];
 
565
      dbuf[1] = rbuff[1];
 
566
      tbuf[0] = rbuff[2];               /* for security - maybe not needed... */
 
567
      tbuf[1] = rbuff[3];
 
568
      }
 
569
   }
 
570
 
 
571
else
 
572
   {
 
573
   rbuff[2] = dbuf[0];
 
574
   rbuff[3] = dbuf[1];
 
575
   rbuff[4] = tbuf[0];
 
576
   rbuff[5] = tbuf[1];
 
577
   }
 
578
 
 
579
return (0);
 
580
}
 
581
 
 
582
/*  OJO: this routine works only for 1dim or 2dim frames */
 
583
/*** PIXXCV (cflag,imno,rbuff,stat) ***/
 
584
 
 
585
ROUTINE DAZ9(imno,rbuff,stat)
 
586
int    *imno;
 
587
float     *rbuff;
 
588
int    *stat;
 
589
 
 
590
/* cflag = "WRS", ... like explained in pixcnv.c (IN), imno = image id (IN)
 
591
   rbuff = 6 elem buffer, rbuff[0,1] "are" dd1 in Pixconv() (IN)
 
592
   rbuff[2,3] are dd2 (OUT) , rbuff[4,5] are dd3 (OUT) */
 
593
 
 
594
{
 
595
int  ipxx;
 
596
double dbuf1[MAXDIM], dbuf2[MAXDIM], dbuf3[MAXDIM];
 
597
 
 
598
ptr1 = strp_pntr(1);      /* get stripped string of "cflag" */
 
599
 
 
600
ipxx = pxx(1,ptr1,rbuff,dbuf1,dbuf2);
 
601
if (ipxx == 1)
 
602
   {
 
603
   *stat = Pixconv("INIT",*imno,dbuf1,dbuf2,dbuf3);
 
604
   if (*stat == -1) *stat = 0;                          /* FORTRAN wants 0 */
 
605
   }
 
606
else
 
607
   {
 
608
   *stat = Pixconv(ptr1,0,dbuf1,dbuf2,dbuf3);
 
609
   if (*stat == 0) 
 
610
      (void) pxx(2,"RES",rbuff,dbuf2,dbuf3);            /* store results */
 
611
   }
 
612
return 0;
 
613
}
 
614
 
 
615
ROUTINE WALPHB(chan,flag)
 
616
int  *chan;
 
617
int  *flag;
 
618
 
 
619
{
 
620
*flag = 0;
 
621
Alphamem( *chan );
 
622
return 0;
 
623
}
 
624
 
 
625
 
 
626
ROUTINE DAZ7(dsplay,chan,nitt,ista,count,ritt,idst)
 
627
int  *dsplay;
 
628
int  *chan;
 
629
int  *nitt;
 
630
int  *ista;
 
631
int *count;
 
632
int *idst;
 
633
float  *ritt;
 
634
 
 
635
{
 
636
int mysta = *ista - 1;              /*  1,... -> 0,... */
 
637
 
 
638
*idst = IILWIT_C(*dsplay,*chan,*nitt,mysta,*count,ritt);
 
639
return 0;
 
640
}
 
641
 
 
642
ROUTINE WRLUT(dsplay,nlut,ista,count,rlut,idst)
 
643
int *dsplay;
 
644
int *nlut;
 
645
int *ista;
 
646
int *count;
 
647
int *idst;
 
648
float    *rlut;
 
649
 
 
650
{
 
651
int mysta = *ista - 1;              /*  1,... -> 0,... */
 
652
 
 
653
*idst = IILWLT_C(*dsplay,*nlut,mysta,*count,rlut);
 
654
return 0;
 
655
}
 
656
 
 
657
ROUTINE K1PACK(rbuf,ibuf,aux,faux,ldata,outaux)
 
658
float *rbuf;            /* IN: float image data  */
 
659
int *ibuf;           /* IN: int image data  */
 
660
int *aux;            /* IN: auxiliary info array:    
 
661
                               data type flag (1-R4,2-I4)
 
662
                               offset in input data    
 
663
                               size of above          
 
664
                               scaling factor        
 
665
                               scaling_flag, = 0 (no), = 1 (yes scale)  */
 
666
float *faux;            /* IN: auxiliary real info array:    
 
667
                               factor to map into [0,outmax]
 
668
                               artificial minimum and maximum of image data  */
 
669
unsigned char *ldata;   /* OUT: scaled line with pixel in byte  */
 
670
int *outaux;         /* IN: max. output value (<= 255)  
 
671
                               offset in pixel array      */
 
672
 
 
673
{
 
674
char  *cpntr;
 
675
 
 
676
 
 
677
if (aux[0] == 2)
 
678
   cpntr = (char *) ibuf;
 
679
else
 
680
   cpntr = (char *) rbuf;
 
681
 
 
682
K1PACK_C(cpntr,aux,faux,ldata,outaux);
 
683
return 0;
 
684
 
 
685
}