Rev 204 | Rev 206 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 204 | Rev 205 | ||
---|---|---|---|
Line 139... | Line 139... | ||
139 | 139 | ||
140 | iev=0; |
140 | iev=0; |
141 | time_t t0,told; |
141 | time_t t0,told; |
142 | time(&t0); |
142 | time(&t0); |
143 | told=t0-1; |
143 | told=t0-1; |
144 | int posrec[ |
144 | int posrec[9]; |
145 | while(!feof(fin)) { |
145 | while(!feof(fin)) { |
146 | if (iev>=nev) break; |
146 | if (iev>=nev) break; |
147 | stat=fread(recid,1,4,fin); |
147 | stat=fread(recid,1,4,fin); |
148 | if (debug) { |
148 | if (debug) { |
149 | if (recid[1]=='#') printf("%c%c%u\n",recid[0],recid[1],srecid[1]); |
149 | if (recid[1]=='#') printf("%c%c%u\n",recid[0],recid[1],srecid[1]); |
150 | else printf("%s\n",recid ); |
150 | else printf("%s\n",recid ); |
151 | } |
151 | } |
152 | switch (recid[0]) { |
152 | switch (recid[0]) { |
153 | 153 | ||
154 | case |
154 | case 'P':{ // position record |
- | 155 | int len; |
|
- | 156 | stat=fread(&len,1,4,fin); |
|
- | 157 | if (len>0 && len<10) |
|
155 | stat=fread(posrec,1, |
158 | stat=fread(posrec,1,len,fin); |
156 | 159 | else |
|
- | 160 | printff("Wrong buffer length %d\n". len); |
|
157 | break; |
161 | break; |
158 | 162 | } |
|
159 | case 'D': // DRS |
163 | case 'D': // DRS |
160 | version = atoi(&recid[3]); |
164 | version = atoi(&recid[3]); |
161 | break; |
165 | break; |
162 | case 'T': // TIME |
166 | case 'T': // TIME |
163 | switch (recid[1]) { |
167 | switch (recid[1]) { |