static char rcsid[] = "$Id: displist.c,v 1.1 1992/09/14 13:02:14 mike Exp $";

/* $Log: displist.c,v $
 * Revision 1.1  1992/09/14  13:02:14  mike
 * Initial revision
 *
 */

/* displist.c : display a list of word
 * C Durland
 */

/* Copyright 1990, 1991 Craig Durland
 *   Distributed under the terms of the GNU General Public License.
 *   Distributed "as is", without warranties of any kind, but comments,
 *     suggestions and bug reports are welcome.
 */

/* Need:
 *   ----MORE----
 */


#include "led.h"

extern char *Lpline;
extern int Lncol;

#define incptr(ptr,n) (char**)((char *)ptr +n)
void Ldisp_help_list(word,list,n,el_size) char *word, **list; int n,el_size;
{
  char **ptr;
  int j,len;

  /* use Lpline for storage */
  Ldo_fcn(LF_REDRAW,LF_STOP);
  printf("\n");
  ptr = list;
  if (word) len = strlen(word);
  for (j = 0; j < n; j++)
  {
    if (!word || 0==strncmp(word,*ptr,len)) printf("%s\n",*ptr);
    ptr = incptr(ptr,el_size);
  }
}
