add some includes for c header files (#221)
* add some includes for c header files * Trim whitespace Co-authored-by: Ryan Burns <rtburns-jpl@users.noreply.github.com>LT1AB
parent
f65a51c80c
commit
aa4d6abf99
|
@ -1,11 +1,12 @@
|
||||||
/* SccsId[ ]= @(#)io.c 1.1 2/5/92 */
|
/* SccsId[ ]= @(#)io.c 1.1 2/5/92 */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
/* modified to add iolen function EJF 96/8/29 */
|
/* modified to add iolen function EJF 96/8/29 */
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#define PERMS 0666
|
#define PERMS 0666
|
||||||
/* IO library:
|
/* IO library:
|
||||||
|
@ -14,10 +15,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* To open a file and assign a channel to it. This must be
|
/* To open a file and assign a channel to it. This must be
|
||||||
done before any attempt is made to access the file. The
|
done before any attempt is made to access the file. The
|
||||||
return value (initdk) is the file descriptor. The file can
|
return value (initdk) is the file descriptor. The file can
|
||||||
be closed with the closedk subroutine.
|
be closed with the closedk subroutine.
|
||||||
|
|
||||||
Remember, always open files before you need to access to them
|
Remember, always open files before you need to access to them
|
||||||
and close them after you don't need them any more. In UNIX,
|
and close them after you don't need them any more. In UNIX,
|
||||||
there is a limit (20) of number files can be opened at once.
|
there is a limit (20) of number files can be opened at once.
|
||||||
|
@ -32,7 +33,7 @@
|
||||||
|
|
||||||
lun is the dummy variable to be compatible with VMS calls.
|
lun is the dummy variable to be compatible with VMS calls.
|
||||||
|
|
||||||
filename is the name of the file. Include directory paths
|
filename is the name of the file. Include directory paths
|
||||||
if necessary.
|
if necessary.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -57,20 +58,20 @@ int *lun; char *filename;
|
||||||
|
|
||||||
/* To write data into a previous opened file. This routine
|
/* To write data into a previous opened file. This routine
|
||||||
will wait until the write operations are completed.
|
will wait until the write operations are completed.
|
||||||
|
|
||||||
Calling sequence (from FORTRAN):
|
Calling sequence (from FORTRAN):
|
||||||
nbytes = iowrit( chan, buff, bytes)
|
nbytes = iowrit( chan, buff, bytes)
|
||||||
call iowrit(chan,buff,bytes)
|
call iowrit(chan,buff,bytes)
|
||||||
where:
|
where:
|
||||||
nbytes is the number bytes that transfered.
|
nbytes is the number bytes that transfered.
|
||||||
|
|
||||||
chan is the file descriptor.
|
chan is the file descriptor.
|
||||||
|
|
||||||
buff is the buffer or array containing the data you
|
buff is the buffer or array containing the data you
|
||||||
wish to write.
|
wish to write.
|
||||||
|
|
||||||
bytes is the number of bytes you wish to write.
|
bytes is the number of bytes you wish to write.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef UL
|
#ifndef UL
|
||||||
int iowrit(chan, buff, bytes)
|
int iowrit(chan, buff, bytes)
|
||||||
|
@ -79,7 +80,7 @@ int iowrit_(chan, buff, bytes)
|
||||||
#endif
|
#endif
|
||||||
int *chan, *bytes;
|
int *chan, *bytes;
|
||||||
char *buff;
|
char *buff;
|
||||||
{
|
{
|
||||||
int nbytes;
|
int nbytes;
|
||||||
nbytes = write(*chan, buff, *bytes);
|
nbytes = write(*chan, buff, *bytes);
|
||||||
if(nbytes != *bytes) fprintf(stderr,
|
if(nbytes != *bytes) fprintf(stderr,
|
||||||
|
@ -96,9 +97,9 @@ char *buff;
|
||||||
call ioread( chan, buff, bytes)
|
call ioread( chan, buff, bytes)
|
||||||
where:
|
where:
|
||||||
nbytes is the number bytes that transfered.
|
nbytes is the number bytes that transfered.
|
||||||
|
|
||||||
chan is the file descriptor.
|
chan is the file descriptor.
|
||||||
|
|
||||||
buff is the buffer or array containning the data you wish
|
buff is the buffer or array containning the data you wish
|
||||||
to read.
|
to read.
|
||||||
|
|
||||||
|
@ -114,7 +115,7 @@ int ioread_(chan, buff, bytes)
|
||||||
|
|
||||||
int *chan, *bytes ;
|
int *chan, *bytes ;
|
||||||
char *buff;
|
char *buff;
|
||||||
{
|
{
|
||||||
int nbytes;
|
int nbytes;
|
||||||
nbytes = read(*chan, buff, *bytes);
|
nbytes = read(*chan, buff, *bytes);
|
||||||
if(nbytes != *bytes) fprintf(stderr,
|
if(nbytes != *bytes) fprintf(stderr,
|
||||||
|
@ -124,7 +125,7 @@ char *buff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* To position the file pointer. This routine will call the lseek
|
/* To position the file pointer. This routine will call the lseek
|
||||||
to update the file pointer.
|
to update the file pointer.
|
||||||
|
|
||||||
Calling sequence (from FORTRAN):
|
Calling sequence (from FORTRAN):
|
||||||
|
@ -139,7 +140,7 @@ char *buff;
|
||||||
must be greater or equal to zero for positioning the file at
|
must be greater or equal to zero for positioning the file at
|
||||||
that location. If loc_byte is negative, the file pointer will
|
that location. If loc_byte is negative, the file pointer will
|
||||||
move abs(loc_byte) from the current location.
|
move abs(loc_byte) from the current location.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef C32_IO
|
#ifdef C32_IO
|
||||||
|
@ -150,7 +151,7 @@ int ioseek_(chan, loc_byte)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int *chan, *loc_byte;
|
int *chan, *loc_byte;
|
||||||
{
|
{
|
||||||
int ibytes,nloc;
|
int ibytes,nloc;
|
||||||
ibytes = *loc_byte ;
|
ibytes = *loc_byte ;
|
||||||
if(ibytes >= 0) nloc = lseek(*chan, ibytes, 0);
|
if(ibytes >= 0) nloc = lseek(*chan, ibytes, 0);
|
||||||
|
@ -171,7 +172,7 @@ off64_t ioseek_(chan, loc_byte)
|
||||||
|
|
||||||
int *chan;
|
int *chan;
|
||||||
off64_t *loc_byte;
|
off64_t *loc_byte;
|
||||||
{
|
{
|
||||||
off64_t ibytes,nloc;
|
off64_t ibytes,nloc;
|
||||||
ibytes = *loc_byte ;
|
ibytes = *loc_byte ;
|
||||||
if(ibytes >= 0) nloc = lseek64(*chan, ibytes, 0);
|
if(ibytes >= 0) nloc = lseek64(*chan, ibytes, 0);
|
||||||
|
@ -190,7 +191,7 @@ off64_t *loc_byte;
|
||||||
call closedk( lun, chan)
|
call closedk( lun, chan)
|
||||||
where:
|
where:
|
||||||
istatus is the return value (0 is success, -1 is error)
|
istatus is the return value (0 is success, -1 is error)
|
||||||
|
|
||||||
lun is the dummy variable to be compatible the VAX VMS call.
|
lun is the dummy variable to be compatible the VAX VMS call.
|
||||||
|
|
||||||
chan is the file descriptor that you want to close.
|
chan is the file descriptor that you want to close.
|
||||||
|
@ -209,7 +210,7 @@ int *lun, *chan;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* To determine the file length. This routine will call lseek
|
/* To determine the file length. This routine will call lseek
|
||||||
to find the end of the file, and return the length in bytes.
|
to find the end of the file, and return the length in bytes.
|
||||||
The file pointer is then set back to the beginning.
|
The file pointer is then set back to the beginning.
|
||||||
|
|
||||||
|
@ -232,7 +233,7 @@ int iolen(chan)
|
||||||
int iolen_(chan)
|
int iolen_(chan)
|
||||||
#endif
|
#endif
|
||||||
int *chan;
|
int *chan;
|
||||||
{
|
{
|
||||||
off_t nloc, junk;
|
off_t nloc, junk;
|
||||||
nloc = lseek(*chan, (off_t)0, SEEK_END); /* go to end, get length */
|
nloc = lseek(*chan, (off_t)0, SEEK_END); /* go to end, get length */
|
||||||
printf("length 32bits=%d\n",(int)nloc);
|
printf("length 32bits=%d\n",(int)nloc);
|
||||||
|
@ -248,7 +249,7 @@ int iolen(chan)
|
||||||
int iolen_(chan)
|
int iolen_(chan)
|
||||||
#endif
|
#endif
|
||||||
int *chan;
|
int *chan;
|
||||||
{
|
{
|
||||||
off64_t nloc, junk;
|
off64_t nloc, junk;
|
||||||
nloc = lseek64(*chan, (off64_t)0, SEEK_END); /* go to end, get length */
|
nloc = lseek64(*chan, (off64_t)0, SEEK_END); /* go to end, get length */
|
||||||
printf("length 64bits=%d\n",(int)nloc);
|
printf("length 64bits=%d\n",(int)nloc);
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/times.h>
|
#include <sys/times.h>
|
||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#if defined(NEEDS_F77_TRANSLATION)
|
#if defined(NEEDS_F77_TRANSLATION)
|
||||||
|
|
||||||
|
@ -58,7 +59,7 @@
|
||||||
return (0.0); \
|
return (0.0); \
|
||||||
} \
|
} \
|
||||||
return ((double) s_val.tv_sec + 0.000001*s_val.tv_usec - t0);
|
return ((double) s_val.tv_sec + 0.000001*s_val.tv_usec - t0);
|
||||||
|
|
||||||
/* Returns the current value of the wall clock timer.
|
/* Returns the current value of the wall clock timer.
|
||||||
* Fortran or C entry point.
|
* Fortran or C entry point.
|
||||||
*/
|
*/
|
||||||
|
@ -68,7 +69,7 @@ wc_second()
|
||||||
{
|
{
|
||||||
WC_GUTS;
|
WC_GUTS;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define US_GUTS \
|
#define US_GUTS \
|
||||||
\
|
\
|
||||||
static int first = 1; \
|
static int first = 1; \
|
||||||
|
@ -99,7 +100,7 @@ us_second()
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Returns the current value of the wall clock timer, or
|
/* Returns the current value of the wall clock timer, or
|
||||||
* user+system timer depending on the valueof tmode:
|
* user+system timer depending on the valueof tmode:
|
||||||
* less than zero the wall-clock timer, and greater than zero
|
* less than zero the wall-clock timer, and greater than zero
|
||||||
* user+system time.
|
* user+system time.
|
||||||
* If/when called from C, tmode must be passed by reference.
|
* If/when called from C, tmode must be passed by reference.
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
void geolocate_(double *, double *, double *, double *, int *, double *, double *, double *, double *, double *);
|
||||||
|
|
||||||
// A wrapper for the Fortran geolocation code
|
// A wrapper for the Fortran geolocation code
|
||||||
int geolocate_wrapper(double *pos, double *vel, double range, double squint, int side, double a, double e2, double *llh, double *lookAngle, double *incidenceAngle)
|
int geolocate_wrapper(double *pos, double *vel, double range, double squint, int side, double a, double e2, double *llh, double *lookAngle, double *incidenceAngle)
|
||||||
{
|
{
|
||||||
|
|
|
@ -41,6 +41,7 @@ here insofar as such code may exist in this Software.
|
||||||
#include <Xm/DrawnB.h>
|
#include <Xm/DrawnB.h>
|
||||||
#include <Xm/ScrolledW.h>
|
#include <Xm/ScrolledW.h>
|
||||||
#include <Xm/Label.h>
|
#include <Xm/Label.h>
|
||||||
|
#include <Xm/ScrollBar.h>
|
||||||
#include <X11/cursorfont.h>
|
#include <X11/cursorfont.h>
|
||||||
#include <X11/keysym.h> /* for popup window only */
|
#include <X11/keysym.h> /* for popup window only */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue