From owner-freebsd-ports Thu Jul 13 20:40:18 2000 Delivered-To: freebsd-ports@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 48D0337BD55 for ; Thu, 13 Jul 2000 20:40:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id UAA28467; Thu, 13 Jul 2000 20:40:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from byzantine.student.umd.edu (byzantine.student.umd.edu [129.2.228.41]) by hub.freebsd.org (Postfix) with ESMTP id CE28437B99B for ; Thu, 13 Jul 2000 20:39:44 -0700 (PDT) (envelope-from howardjp@byzantine.student.umd.edu) Received: (from howardjp@localhost) by byzantine.student.umd.edu (8.9.3/8.9.3) id XAA86595; Thu, 13 Jul 2000 23:39:43 -0400 (EDT) (envelope-from howardjp) Message-Id: <200007140339.XAA86595@byzantine.student.umd.edu> Date: Thu, 13 Jul 2000 23:39:43 -0400 (EDT) From: howardjp@wam.umd.edu Reply-To: howardjp@wam.umd.edu To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: ports/19906: New Port: editors/gate Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 19906 >Category: ports >Synopsis: New Port: editors/gate >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Jul 13 20:40:01 PDT 2000 >Closed-Date: >Last-Modified: >Originator: James Howard >Release: FreeBSD 5.0-CURRENT i386 >Organization: Arbornet, Inc >Environment: FreeBSD byzantine.student.umd.edu 5.0-CURRENT FreeBSD 5.0-CURRENT #15: Sun Jun 18 21:23:23 EDT 2000 howardjp@byzantine.student.umd.edu:/usr/src/sys/compile/BYZANTINE i386 >Description: Gate is a simple text editor execellent for embedding in other programs. >How-To-Repeat: N/A >Fix: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # gate # gate/pkg # gate/pkg/COMMENT # gate/pkg/DESCR # gate/pkg/PLIST # gate/patches # gate/patches/patch-aa # gate/files # gate/files/md5 # gate/Makefile # echo c - gate mkdir -p gate > /dev/null 2>&1 echo c - gate/pkg mkdir -p gate/pkg > /dev/null 2>&1 echo x - gate/pkg/COMMENT sed 's/^X//' >gate/pkg/COMMENT << 'END-of-gate/pkg/COMMENT' XA simple and unobtrusive line-oriented text editor END-of-gate/pkg/COMMENT echo x - gate/pkg/DESCR sed 's/^X//' >gate/pkg/DESCR << 'END-of-gate/pkg/DESCR' XGate is text-gatherer. A text-gatherer is like a text-editor, but much Xmore lightweight and unobtrusive. X XIf you have a program or shell script that asks people to enter a small Xchunk of text, a text-gatherer like Gate is a good way to do it. It Xdoesn't clear the screen (annoying if there were just some instructions Xprinted there). It doesn't require you to know a lot of obscure editing Xcommands. It doesn't make excessive demands on the intelligence of your Xterminal emulation software. X XIt does provide a number of features that make it easier for novice users Xto produce good text. It does word-wrap, prints a prompt on each new line, Xand allows backspacing from the currently line onto previous lines. It Xalso provides features that a more experienced user can use. You can call Xup normal editor, or use some of gate's simple-minded editing Xcommands. You can read in files, or save your text to a file. You can Xfilter your text through something like the unix "fmt" command. It Xprovides a nice spell-checking interface too. END-of-gate/pkg/DESCR echo x - gate/pkg/PLIST sed 's/^X//' >gate/pkg/PLIST << 'END-of-gate/pkg/PLIST' Xbin/gate Xlib/gate.help END-of-gate/pkg/PLIST echo c - gate/patches mkdir -p gate/patches > /dev/null 2>&1 echo x - gate/patches/patch-aa sed 's/^X//' >gate/patches/patch-aa << 'END-of-gate/patches/patch-aa' Xdiff -u Makefile.orig Makefile X--- Makefile.orig Tue Jul 23 14:23:43 1996 X+++ Makefile Sun Jun 18 01:40:43 2000 X@@ -160,7 +160,7 @@ X -DDICT_DIR='"/usr/local/lib"' \ X -DLANG_DEFAULT='"english"'\ X -DDEFAULT_EDITOR='"/usr/bin/vi"' \ X- -DHELP_FILE='"/home/janc/src/gate/gate.help"' X+ -DHELP_FILE='"/usr/local/lib/gate.help"' X LIB= -ltermcap X X OBJS=main.o line.o syst.o util.o cmd.o file.o opt.o subs.o term.o proc.o spel.o Xdiff -u file.c.orig file.c X--- file.c.orig Thu Nov 30 21:07:53 1995 X+++ file.c Tue May 16 22:49:50 2000 X@@ -59,12 +59,12 @@ X * open file descriptor. X */ X X-FILE *copy_file(char *wname) X+FILE *copy_file(char *wname, int fd) X { X FILE *wfp; X int ch; X X- if ((wfp= fopen(wname,"w+")) == NULL) X+ if ((wfp= fdopen(fd,"w+")) == NULL) X { X printf("Cannot open file %s\n",wname); X return(NULL); X@@ -84,10 +84,12 @@ X void write_file(char *wname) X { X FILE *fp; X- X+int fd; X+ X if (expand_tilde(wname)) return; X X- if ((fp= copy_file(wname)) == NULL) return; X+ fd = open(wname, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH); X+ if ((fp= copy_file(wname, fd)) == NULL) return; X fclose(fp); X printf("Saved in file %s\n",wname); X } Xdiff -u gate.h.orig gate.h X--- gate.h.orig Fri Dec 1 12:34:15 1995 X+++ gate.h Tue May 16 22:47:46 2000 X@@ -213,7 +213,7 @@ X X /* FILE.C */ X void read_file(char *rname, int strip); X-FILE *copy_file(char *wname); X+FILE *copy_file(char *wname, int fd); X void write_file(char *wname); X void typefile(char *name); X void emptyfile(void); Xdiff -u proc.c.orig proc.c X--- proc.c.orig Thu Apr 18 19:02:47 1996 X+++ proc.c Tue May 16 22:51:02 2000 X@@ -57,13 +57,14 @@ X char tmpname[20]; X FILE *cfp; X long oldt; X+int fd; X X /* We could use a call to make_copy() here, but this method survives X * interupts better X */ X strcpy(tmpname, "/tmp/gateXXXXXX"); X- mktemp(tmpname); X- if ((cfp= fopen(tmpname,"w+")) == NULL) X+ fd = mkstemp(tmpname); X+ if ((cfp= fdopen(fd,"w+")) == NULL) X { X printf("Cannot open file %s.\n",tmpname); X return(NULL); Xdiff -u spel.c.orig spel.c X--- spel.c.orig Mon Nov 3 22:33:25 1997 X+++ spel.c Sun Jun 18 01:44:22 2000 X@@ -9,7 +9,7 @@ X typedef struct dirent dirent; X #define dnamlen(d) strlen(d->d_name) X #else X-#include X+#include X typedef struct direct dirent; X #define dnamlen(d) (d->d_namlen) X #endif X@@ -298,7 +298,7 @@ X #ifdef DICT_DIR X char buf[BUFSIZE+1]; X DIR *ispd; X-dirent *de; X+struct dirent *de; X int n= 0; X int namlen; X Xdiff -u subs.c.orig subs.c X--- subs.c.orig Sun Nov 26 21:55:37 1995 X+++ subs.c Tue May 16 22:47:36 2000 X@@ -40,10 +40,11 @@ X { X char tmpname[18]; X FILE *fp; X+int fd; X X strcpy(tmpname, "/tmp/gateXXXXXX"); X- mktemp(tmpname); X- fp= copy_file(tmpname); X+ fd = mkstemp(tmpname); X+ fp= copy_file(tmpname, fd); X unlink(tmpname); X return(fp); X } END-of-gate/patches/patch-aa echo c - gate/files mkdir -p gate/files > /dev/null 2>&1 echo x - gate/files/md5 sed 's/^X//' >gate/files/md5 << 'END-of-gate/files/md5' XMD5 (gate.tar.gz) = d7c10db9858cf6ad0a48cbb6dd2949de END-of-gate/files/md5 echo x - gate/Makefile sed 's/^X//' >gate/Makefile << 'END-of-gate/Makefile' X# New ports collection makefile for: gate X# Date created: 15 June 2000 X# Whom: James Howard X# X# $FreeBSD$ X# X XPORTNAME= gate XPORTVERSION= 2.04c XCATEGORIES= editors XMASTER_SITES= http://www.wwnet.net/~janc/software/ XDISTNAME= ${PORTNAME} XWRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} X XMAINTAINER= howardjp@wam.umd.edu X XALL_TARGET= gate gate.1 X XRUN_DEPENDS+= ispell:${PORTSDIR}/textproc/ispell X Xdo-install: X ${INSTALL_PROGRAM} ${WRKSRC}/gate ${PREFIX}/bin X ${INSTALL_MAN} ${WRKSRC}/gate.1 ${PREFIX}/man/man1 X ${INSTALL_DATA} ${WRKSRC}/gate.help ${PREFIX}/lib X X.include END-of-gate/Makefile exit >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message