ftp.nice.ch/pub/next/unix/admin/msend.1.0.N.bs.tar.gz#/msend/gnugets.c

This is gnugets.c in view mode; [Download] [Up]

/* This file builds a simple case interface for the GNU 
 * readline & history stuff.
 * Spike (Spike@world.std.com) 10.11.90
 */

#include "Copyright"
#include "config.h"
#include "msend.h"

#ifdef GNUREADLINE
#include <stdio.h>

char *GNUGets (prompt)
     char *prompt;
{
  char *readline_buf, *readline();

  /* Get a line from the user. */
  readline_buf = readline (prompt ? prompt : "");

  /* If the line has any text in it, save it on the history. */
  if (readline_buf && *readline_buf)
    add_history (readline_buf);

  return (readline_buf);
}

#else
static int boguscompilertrick;
#endif

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.