utility
|
cmd_head.c,
count_tokens.c,
cp_file.c,
errmsg.c,
file_opened.c,
find_line.c,
find_string.c,
fn_base.c,
fn_dir.c,
fn_ext.c,
fn_root.c,
gchoice.c,
gdata_line.c,
gdouble.c,
gfield.c,
gint.c,
gntoken.c,
graphics_ok.c,
gstring.c,
lock.c,
lower.c,
mat_multiply.c,
mat_transform.c,
mat_transpose.c,
mv_file.c,
new_extension.c,
nolead.c,
notrail.c,
ordinal.c,
pfield.c,
squish_blanks.c,
test.c,
unlock.c,
upper.c,
utility.h,
utility.make,
valchars.c,
vec_angle.c,
vec_crossprod.c,
vec_diff.c,
vec_dotprod.c,
vec_length.c,
vec_norm.c,
|
|
|
#include "utility.h"
int gdata_line(file,line,max_line_length)
/*============================================================================*/
/* PURPOSE: GET A "DATA" LINE FROM THE SPECIFIED FILE. THE FILE MUST BE AN
/* ASCII FILE. A DATA LINE IS ANY LINE THAT IS NONBLANK AND DOES NOT
/* START WITH AN OCTOTHORPE (#). INTERVENING LINES ARE SKIPPED.
/* WRITTEN: M.V.GRIESHABER
/* LAST MODIFICATION: 2 JUNE 1993 MVG (CHANGED NAME FROM GET_DATA_LINE)
*/
FILE* file; /* OPENED DATA FILE. */
char line[]; /* RETRIEVED DATA LINE. */
int max_line_length; /* MAXIMUM LENGTH OF LINE. */
{
do
{
if (fgets(line,max_line_length,file)==NULL) return(FALSE);
} while(strlen(line)<=1 || line[0]=='#');
return(TRUE);
}
|