 8-Dec-88 23:05:03-GMT,1413;000000000011
Return-Path: <howie@cunixc.cc.columbia.edu>
Received: from columbia.edu by sumex-aim.stanford.edu (4.0/inc-1.0)
	id AA22412; Thu, 8 Dec 88 15:05:00 PST
Received: from cunixc.cc.columbia.edu by columbia.edu (5.54/1.14) 
	id AA04951; Thu, 8 Dec 88 18:03:43 EST
Received: by cunixc.cc.columbia.edu (5.54/5.10) id AA08190; Thu, 8 Dec 88 18:02:23 EST
Date: Thu, 8 Dec 1988 18:02:19 EST
From: Howie Kaye <howie@cunixc.cc.columbia.edu>
To: Bill Yeager <yeager@sumex-aim.stanford.edu>
Subject: Re: parse() question 
In-Reply-To: Your message of Thu, 8 Dec 1988 14:48:30 PST 
Message-Id: <CMM.0.88.597625339.howie@cunixc.cc.columbia.edu>

yes to both questions.  The fileparse takes a FILBLK structure.  It has
fields for exceptions (".*"), and also for default extensions (".txt").

below is a sample which should do what you want.

fil(helpflg)
int helpflg;
{
  static filblk fblk;
  static fdb filfdb = { _CMFIL ,FIL_NODIR, NULL, (pdat)&fblk, NULL, 
			    NULL, NULL };
  FILE *fp;
  char c;
  char **filelist;
  int i;
  static char *ex[] = { ".txt", NULL };

  if (helpflg) {
    cmxprintf("parses a possibly wild filename.\n");
  }
  else {
    fblk.pathv = NULL;
    fblk.exceptionspec = ".*";
    fblk.def_extension = ex;
    noise("to see");
    parse(&filfdb, &parseval, &used);
    filelist = parseval._pvfil;
    confirm();
    for(i = 0; filelist[i] != NULL; i++)
      cmxprintf("%s\n",filelist[i]);
  }
}

