/* ******************************************************************************* * Copyright (c) 1996 Martin Poole * ******************************************************************************* ** ** WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! ** ** Any changes to be made to this file should first be checked with ** mplib1 source control for library integrity. ** ** mplib1 source control can be reached at mplib1@quatermass.co.uk ** * * $Source$ * $Author$ * $Date$ * $Revision$ * ******************************************************************************* * * Change History * * $Log$ * ******************************************************************************* */ #ident "$Header$" /* ------------------------------------------------------------------ Include files ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ defines ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ Code starts here ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ Include files ------------------------------------------------------------------ */ #include #include #include /* ------------------------------------------------------------------ Defines ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ Structure definitions ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ Global variables ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ Function prototypes ------------------------------------------------------------------ */ int fgetline2( FILE *fh, char *line_buf, int line_len ) { int rv,do_again; char *cp; do { rv = fgetline( fh, line_buf, line_len ); do_again=0; if (rv==0) { cp = line_buf; /* skip past spaces */ while ( *cp=='\t' || *cp==' ' ) cp++; if (*cp=='\0' || *cp=='#') do_again=1; } }while (do_again); return(rv); } /* -- End of File -- */