102 short int *irev, *status;
107 static short int iadj, idote, idur, iend_, intval,
108 iunit, ival, k1, k2, k3, k4, k5, k6, lwal,
109 n1, n2, n3, n4, n5, n6, ndig, nflag, null_,
113 static double factor;
126 if ( DEBUG1 )
printf(
"\nshdece:******************************begin");
158 if ( DEBUG1 )
printf(
"\nshdece:at L_10");
185 if ( DEBUG1 )
printf(
"\nshdece:getting positional data");
192 else if( *status == 2 )
208 if ( DEBUG1 )
printf(
"\nshdece:at L_24");
215 else if( *status == 2 )
221 if ( DEBUG1 )
printf(
"\nshdece:at L_25");
237 if ( DEBUG1 )
printf(
"\nshdece:return status from shdtype = %d",*status);
244 else if( *status == 2 )
249 else if( *status == 3 )
263 if ( DEBUG1 )
printf(
"\nshdece:calling shpcode");
268 if ( DEBUG1 )
printf(
"\nshdece:status from shdtype = %d",*status);
274 else if( *status == 2 )
279 else if( *status == 3 )
297 if ( DEBUG1 )
printf(
"\nshdece:calling shreal iend_ = %d",iend_);
305 else if( *status == 2 )
313 if ( DEBUG1 )
printf(
"\nshdece:at L_47");
317 printf(
"\nshdece:at L_48 data_.kflag = %d ndig = %d iend_ = %d",
data_.
kflag,ndig,iend_);
322 if( (ndig == 0) && (iend_ == 0) )
324 if( (ndig == 0) && (iend_ == 1) )
333 if ( DEBUG1 )
printf(
"\nshdece:at 49");
366 if ( DEBUG1 )
printf(
"\nshdece:at 491");
378 if ( DEBUG1 )
printf(
"\nshdece:at 495");
401 if ( DEBUG1 )
printf(
"\nshdece:at 60 iend_ = %d",iend_);
422 if ( DEBUG1 )
printf(
"\nshdece:at 65");
428 if ( DEBUG1 )
printf(
"\nshdece:at 70");
436 if ( DEBUG1 )
printf(
"\nshdece:at 100 ");
440 intval =
data_.
itz - (iunit - 1)*1000;
441 if ( DEBUG1 )
printf(
"\nshdece: data_.kflag = %d iunit = %d intval = %d",
data_.
kflag,iunit,intval);
470 if ( DEBUG1 )
printf(
"\nshdece:at 105");
487 shtadj( &k1, &k2, &k3, &k4, &k5, &k6, &iadj, &flag, status );
548 if( (iunit >= 3 && iunit != 7) || (
data_.
nadjtz >= 0) )
573 if ( DEBUG1 )
printf(
"\nshdece:at 120");
622 if( (iunit < 3 || iunit == 7) && (
data_.
nadjtz <= 0) )
646 if ( DEBUG1 )
printf(
"\nshdece:at 125");
647 if( (iunit >= 3 && iunit != 7) || (
data_.
nadjtz >= 0) )
670 if ( DEBUG1 )
printf(
"\nshdece:at 130 increment data_.kflag = %d",
data_.
kflag);
675 if ( DEBUG1 )
printf(
"\nshdece:before %d %d %d %d %d %d intval=%d iunit=%d",
682 if ( DEBUG1 )
printf(
"\nshdece:before %d %d %d %d %d %d intval=%d iunit=%d",
695 if ( DEBUG1 )
printf(
"\nshdece:at 135 null_ = %d",null_);
708 if( (iunit < 3 || iunit == 7) && (
data_.
nadjtz <= 0) )
719 shtadj( &n1, &n2, &n3, &n4, &n5, &n6, &iadj, &flag, status );
729 shtdat( &n1, &n2, &n3, status );
745 itest = n2 - Idate[1];
746 if ( itest > 6 ) n1--;
747 if ( itest < -6 ) n1++;
748 if ( (itest == -6 ) & ( n3 < Idate[2] ) )
750 if ( (itest == 6 ) && ( n3 > Idate[2] ) )
756 if ( DEBUG1 )
printf(
"\nshdece:wrting shefout");
760 check_24( &n1, &n2, &n3, &n4, &n5, &n6 );
768 "%c%c%c%c%c%c%c%c %4d %2d %2d %2d %2d %2d %4d %2d %2d %2d %2d %2d ",
771 n1, n2, n3, n4, n5, n6, k1, k2, k3, k4, k5, k6);
773 "%c%c%c%c%c%c%c %4d %20.6f %20.6f %c %d %c%c%c%c%c%c%c%c %d %s\n",
783 "%c%c%c%c%c%c%c%c %4d %2d %2d %2d %2d %2d %4d %2d %2d %2d %2d %2d ",
786 n1, n2, n3, n4, n5, n6, k1, k2, k3, k4, k5, k6);
788 "%c%c%c%c%c%c%c %4d %20.6f %20.6f %c %d %c%c%c%c%c%c%c%c %d %s\n",
860 if ( DEBUG1 )
printf(
"\nshdece:at 150");
867 else if( *status == 2 )
873 if ( DEBUG1 )
printf(
"\nshdece:at 160");
889 else if( *status == 2 )
902 if ( DEBUG1 )
printf(
"\nshdece:at 170");
908 if ( DEBUG1 )
printf(
"\nshdece:at 9000");
915 if ( DEBUG1 )
printf(
"\nshdece:at 9010");
long check_24(short int *year, short int *month, short int *day, short int *hour, short int *minute, short int *second)
void irang(short int *i, short int *min_, short int *max_, short int *status)
printf("fbuf is %s\n", fbuf)
fprintf(fp,"%d %d %d %d 1\n", iminx, iminy, maxi, maxj)
void nextch(short int *ichar, short int *status)
void shdece(short int *irev, short int *status)
void shdtype(short int *iflag, short int *status)
struct t_comment comment_
struct t_sendflg_ sendflg_
struct t_durprob_ durprob_
void sherr(short int *ier)
void shlocl(short int *nyear, short int *nmon, short int *nday, short int *nhour, short int *nmin, short int *nsec, short int *nadjtz, short int *iadj, short int *status)
void shpcode(short int *kodp, short int *kode, short int *icodd, short int *kodt, short int *kods, short int *kodex, float *codp, double *factor, short int *status)
void shpos(short int *status)
void shreal(double *value, short int *iflag, short int *ndig, short int *status)
void shtadj(short int *lyear, short int *lmon, short int *lday, short int *lhour, short int *lmin, short int *lsec, short int *kadj, short int *iadj, short int *status)
void shtdat(short int *lyear, short int *lmon, short int *lday, short int *status)
short int ibuf[MAX_SHEF_INPUT]