* This routine reads an single token from the specified * text file and interprets it as a prototype specification. * @param File open text file to read prototype style from * @return Prototype style read from text file * @note Globals: None * @note Exceptions: ILLEGALSTYLESPEC illegal prototype style specification * @note History: 6/8/89, DSJ, Created. */
| 240 | * @note History: 6/8/89, DSJ, Created. |
| 241 | */ |
| 242 | PROTOSTYLE ReadProtoStyle(FILE *File) { |
| 243 | char Token[TOKENSIZE]; |
| 244 | PROTOSTYLE Style; |
| 245 | |
| 246 | if (tfscanf(File, "%s", Token) != 1) |
| 247 | DoError (ILLEGALSTYLESPEC, "Illegal prototype style specification"); |
| 248 | switch (Token[0]) { |
| 249 | case 's': |
| 250 | Style = spherical; |
| 251 | break; |
| 252 | case 'e': |
| 253 | Style = elliptical; |
| 254 | break; |
| 255 | case 'm': |
| 256 | Style = mixed; |
| 257 | break; |
| 258 | case 'a': |
| 259 | Style = automatic; |
| 260 | break; |
| 261 | default: |
| 262 | Style = elliptical; |
| 263 | DoError (ILLEGALSTYLESPEC, "Illegal prototype style specification"); |
| 264 | } |
| 265 | return (Style); |
| 266 | } |
| 267 | |
| 268 | /** |
| 269 | * This routine reads N floats from the specified text file |
no test coverage detected