2024-07-25 10:27:17 +02:00

106 lines
2.6 KiB
C
Executable File

#include <stdio.h>
/* Routines for 12-byte integral files ********************************/
void intwrite_(double core[1], long int *nint, FILE * *teintfile)
{
fwrite (core , 12 , *nint , *teintfile );
}
void intread_(double core[1], long int *nint, long int *ipos, FILE * *teintfile)
{
fseek ( *teintfile , *ipos*12 , SEEK_SET );
fread (core , 12 , *nint , *teintfile );
}
void intreadsq_(double core[1], long int *nint, FILE * *teintfile)
{
fread (core , 12 , *nint , *teintfile );
}
void intopenw_(FILE * *teintfile)
{
*teintfile = fopen ( "TEINT" , "wb" );
/* setbuf ( *teintfile , NULL ); */
}
void intopenr_(FILE * *teintfile)
{
*teintfile = fopen ( "TEINT" , "rb" );
setbuf ( *teintfile , NULL );
}
void intopenrsq_(FILE * *teintfile)
{
*teintfile = fopen ( "TEINT" , "rb" );
}
void intclose_(FILE * *teintfile)
{
fclose (*teintfile);
}
/* General routines for 8-byte files **********************************/
void intopenw8_(FILE * *teintfile, const char * filename)
{
*teintfile = fopen ( filename , "wb" );
/* setbuf ( *teintfile , NULL ); */
}
void intopenr8_(FILE * *teintfile, const char * filename)
{
*teintfile = fopen ( filename , "rb" );
setbuf ( *teintfile , NULL );
}
void intopenrsq8_(FILE * *teintfile, const char * filename)
{
*teintfile = fopen ( filename , "rb" );
}
void intwrite8_(double core[1], long int *nint, FILE * *teintfile)
{
fwrite (core , 8 , *nint , *teintfile );
}
void intread8_(double core[1], long int *nint, long int *ipos, FILE * *teintfile)
{
fseek ( *teintfile , *ipos*8 , SEEK_SET );
fread (core , 8 , *nint , *teintfile );
}
void intreadsq8_(double core[1], long int *nint, FILE * *teintfile)
{
fread (core , 8 , *nint , *teintfile );
}
void intfdel_(const char * filename)
{
remove ( filename );
}
void intopenrai_(FILE * *teintfile)
{
*teintfile = fopen ( "DFINT_AI" , "rb" );
setbuf ( *teintfile , NULL );
}
void intopenrmi_(FILE * *teintfile)
{
*teintfile = fopen ( "DFINT_MI" , "rb" );
setbuf ( *teintfile , NULL );
}
void intopenros_(FILE * *teintfile)
{
*teintfile = fopen ( "OSVFILE" , "rb" );
setbuf ( *teintfile , NULL );
}
void intopenwai_(FILE * *teintfile)
{
*teintfile = fopen ( "DFINT_AI" , "wb" );
}
void intopenwmi_(FILE * *teintfile)
{
*teintfile = fopen ( "DFINT_MI" , "wb" );
}
void intopenwos_(FILE * *teintfile)
{
*teintfile = fopen ( "OSVFILE" , "wb" );
}
void intopenrsqmi_(FILE * *teintfile)
{
*teintfile = fopen ( "DFINT_MI" , "rb" );
}
void intopenrsqtc_(FILE * *teintfile)
{
*teintfile = fopen ( "TCINT" , "rb" );
}
void intopenwtc_(FILE * *teintfile)
{
*teintfile = fopen ( "TCINT" , "wb" );
}