ftp.nice.ch/pub/next/text/services/nextispell.0.8.s.tar.gz#/nextispell-0.8/common.c

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

/* 
 *
 * copyright by Moritz Willers
 *
 * Mon Jul 25 15:57:04 MET DST 1994
 *
 */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>

char *findispell(char *path)
{
	FILE	*shelloutput;
	
	if ( (shelloutput = popen("csh -c \"which ispell\"", "r")) )
		if (fgets(path, MAXPATHLEN, shelloutput))
			if ( !(*path == '/') )
				*path = '\0';
			else
				*strrchr(path, '\n') = '\0';
		
	return path;
}

char *newstringfrom(char **new, const char *old)
{
	*new = (char *)malloc((strlen((old) ? old : "")+1)*sizeof(*new));
	strcpy(*new, (old) ? old : "");
	return *new;
}

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