awips2/ncep/gov.noaa.nws.ncep.viz.rsc.ncgrid/dgdriv_c/tgcdual.c
Steve Harris 40aa780b3d 12.4.1-10 baseline
Former-commit-id: 7fa9dbd5fb [formerly 4bfbdad17d] [formerly 9f8cb727a5] [formerly 8485b90ff8 [formerly 9f8cb727a5 [formerly bf53d06834caa780226121334ac1bcf0534c3f16]]]
Former-commit-id: 8485b90ff8
Former-commit-id: 73930fb29d0c1e91204e76e6ebfdbe757414f319 [formerly a28d70b5c5]
Former-commit-id: 33a67cdd82
2012-05-01 18:06:13 -05:00

49 lines
1.4 KiB
C

#include <stdio.h>
#include <string.h>
/*
* C prototype (see fortran_wrapper.h)
*/
void tgc_dual (const char *time1, const char *time2, char *time, int *iret);
/*
* underscore issue (uscore.h)
*/
#define tg_dual tg_dual_
void tgc_dual (const char *time1, const char *time2, char *time, int *iret)
/************************************************************************
* tgc_dual *
* *
* This subroutine is a wrapper function for in_scal. It is used by *
* the Java JNA to resolve string size issues. *
* *
* inc_scal ( scale, iscals, iscalv, iret ) *
* *
* Input parameters: *
* *scale const char Scaling factor *
* *
* Output parameters: *
* *iscals int Scalar scaling factor *
* *iscalv int Vector scaling factor *
* *iret int Return code *
* 0 = normal return *
** *
* Log: *
* T. Lee/NCEP 3/10 C wrapper for IN_SCAL *
************************************************************************/
{
char t[2][20];
*iret = 0;
strcpy (t[0], time1);
strcpy (t[1], time2);
/*
* Call Fortran funtion IN_SCAL.
*/
if ( strlen(t[1]) != 0 ) {
strcpy(time, strcat(t[0],t[1]));
}
else {
strcpy ( time, t[0] );
}
return;
}