Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99070306
lire.c
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Jan 19, 11:23
Size
922 B
Mime Type
text/x-c
Expires
Tue, Jan 21, 11:23 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
23699811
Attached To
R1448 Lenstool-HPC
lire.c
View Options
#include<stdio.h>
#include<math.h>
#include<fonction.h>
#include<constant.h>
#include<dimension.h>
#include<structure.h>
/****************************************************************/
/* nom: lire */
/* auteur: Jean-Paul Kneib */
/* date: 10/02/92 */
/* place: Toulouse */
/****************************************************************/
int lire( struct galaxie *liste,
char *name )
{
FILE *IN;
int i = 0;
printf("lecture de %s\n", name);
IN = fopen(name, "r");
if ( IN != NULL )
while ((fscanf(IN, "%s%lf%lf%lf%lf%lf%lf\n",
liste[i].n, &liste[i].C.x, &liste[i].C.y,
&liste[i].E.a, &liste[i].E.b,
&liste[i].E.theta, &liste[i].z)) != -1)
liste[i++].E.theta *= DTR;
fclose(IN);
return(i);
}
Event Timeline
Log In to Comment