fgr = fgets(tempLine,256,stream);
fgr = fgets(tempLine,255,stream);
static int fgetpwnam(FILE *stream, const char *name, char *password) {   char tempLine[256], *tpointer, *curname, *curpass, *fgr;   int loopdone, pwdfound;      /* go to beginning of file */   rewind(stream);   /* some control variables */   loopdone = pwdfound = 0;   /* iterate through lines in file, until end of file */   do {      /* get the current line */      fgr = fgets(tempLine,256,stream);      /* if it's valid, go on */      if ( fgr != NULL) {	 /* first get the username out */	 tpointer = tempLine;	 curname = strsep(&tpointer,":");	 /* check to see if it's the right one */	 if (strcmp(curname,name)==0) {	    /* at least we know our loop is done */	    loopdone = 1;	    /* get the password and put it in its place */	    curpass = strsep(&tpointer,":");	    if (curpass != NULL) {	       /* we use md5 pwd len, as this is just a safe maximum */	       strncpy(password,curpass,CRYPTED_MD5PWD_LEN+1);	       pwdfound = 1;	    } /* if (curpass... */	 } /* if (strcmp(curname... */      } /* if (tempLine... */   } while (fgr != NULL);   return pwdfound;}