home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume25 / input-edit / part01 / testgl.c < prev   
Encoding:
C/C++ Source or Header  |  1991-11-12  |  293 b   |  19 lines

  1. #include <stdio.h>
  2.  
  3. char *getline(char *);
  4. void gl_init(int), gl_cleanup(void);
  5.  
  6. main()
  7. /* 
  8.  * just echo user input lines, letting user edit them and move through
  9.  * history list
  10.  */
  11. {
  12.     char *p;
  13.  
  14.     gl_init(80);
  15.     while ((p = getline("> ")) && *p)
  16.     fputs(p, stdout);
  17.     gl_cleanup();
  18. }
  19.