1
/*===========================================================================
2
Copyright (C) 1995-2009 European Southern Observatory (ESO)
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.
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.
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,
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
30
===========================================================================*/
32
#include <midas_def.h>
37
void descw(tid,j,values,klen,khisto)
46
char cbuf[81],parm[2];
51
sprintf(parm,"P%d",j);
52
SCKGETC(parm,1,ll,&iav,cbuf);
62
SCDWRC(tid,"HISTORY",1,khisto,-1,80,&kuni);
65
SCDWRC(tid,"HISTORY",1,cbuf,-1,80,&kuni);
71
descw(tid,j,values,klen,khisto);
79
khisto[ioff+jj] = cbuf[jj];
82
khisto[ioff+jj] = ' ';
94
int ec,el,ed,knul,flag,iav,values[9];
96
int kuni,i,j,status,noelem,bytelm,*klen; /* `kuni' is of type int !! */
102
SCECNT("GET",&ec,&el,&ed);
103
SCECNT("PUT",&one,&zero,&zero);
104
status = SCDRDI(tid,"HISTORY_UPDA",1,1,&iav,&flag,&kuni,&knul);
105
SCECNT("PUT",&ec,&el,&ed);
106
if ((status==0)&&(flag==0)) return(0);
107
SCDFND(tid,"HISTORY",&type,&noelem,&bytelm);
109
SCFNAME(tid,name,60);
113
fin = osmmget(8*noelem);
114
oscfill(fin,noelem*8,' ');
115
SCDWRC(tid,"HISTORY",1,fin,-1,8*noelem,&kuni);
118
SCKGETC("HISTORY",1,80,&iav,khisto);
125
SCDWRC(tid,"HISTORY",1,khisto,-1,80,&kuni);
131
SCKRDI("PCOUNT",1,9,&iav,values,&kuni,&knul);
134
for (j=1;j<=values[0];j++) descw(tid,j,values,klen,khisto);
136
khisto[*klen] = '\0';
138
SCDWRC(tid,"HISTORY",1,khisto,-1,80,&kuni);