Upgrade to 1.1.

PR:		ports/141902
Submitted by:	maintainer
This commit is contained in:
Vanilla I. Shu 2009-12-23 02:54:50 +00:00
parent 7a209b9c6d
commit bc0d61a270
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=246476
8 changed files with 5 additions and 237 deletions

View file

@ -6,10 +6,9 @@
#
PORTNAME= ve
PORTVERSION= 1.0
PORTREVISION= 3
PORTVERSION= 1.1
CATEGORIES= chinese
MASTER_SITES= LOCAL/chinsan
MASTER_SITES= LOCAL/vanilla
EXTRACT_SUFX= .tgz
MAINTAINER= gaod@hychen.org

View file

@ -1,3 +1,3 @@
MD5 (ve-1.0.tgz) = 8ac6f78f46dd95f2e8ad08e3d8052751
SHA256 (ve-1.0.tgz) = 3e68bd062ea62722b8f0d5c558a45d9cf006a67a838b59b41b3e90487c79e32b
SIZE (ve-1.0.tgz) = 31527
MD5 (ve-1.1.tgz) = 8614598698ce0811c880714530f5892d
SHA256 (ve-1.1.tgz) = cbb6d0d2c4dd8ba68d96954c7519c94daefebcedfc285c0406e8a2029c317116
SIZE (ve-1.1.tgz) = 28527

View file

@ -1,34 +0,0 @@
--- Makefile.orig Wed Aug 25 14:27:23 1999
+++ Makefile Thu Dec 18 01:29:56 2003
@@ -1,10 +1,11 @@
-CC = gcc
+CC ?= cc
OBJ = edit.o term.o screen.o stuff.o io.o editor.o
#----------------------------------------------------------
# FreeBSD
#----------------------------------------------------------
-CFLAGS = -DVEDITOR
+CFLAGS ?= -O -pipe
+CFLAGS += -DVEDITOR
LIBS = -ltermcap -lcompat
#----------------------------------------------------------
@@ -26,12 +27,12 @@
rm -f *.o ve entab
install: all
- mkdir -p /usr/local/share/ve
- cp ve /usr/local/bin
- cp 00readme.txt ve.hlp /usr/local/share/ve
+ mkdir -p $(PREFIX)/share/ve
+ $(BSD_INSTALL_PROGRAM) ve $(PREFIX)/bin
+ $(BSD_INSTALL_DATA) 00readme.txt ve.hlp $(PREFIX)/share/ve
ve: $(OBJ)
- gcc $(CFLAGS) -o ve $(OBJ) $(LIBS)
+ $(CC) $(CFLAGS) -o ve $(OBJ) $(LIBS)
entab: entab.o
- gcc -o entab entab.o
+ $(CC) -o entab entab.o

View file

@ -1,26 +0,0 @@
--- bbs.h.orig 2009-10-06 23:10:03.000000000 +0800
+++ bbs.h 2009-10-06 23:14:01.000000000 +0800
@@ -12,6 +12,7 @@
#define BIT8
#include <stdio.h>
+#include <stdlib.h>
#include <setjmp.h>
#include <signal.h>
#include <unistd.h>
@@ -24,14 +25,7 @@
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/file.h>
-
-
-#ifdef LINUX
-#include <bsd/sgtty.h>
-#else
-#include <sgtty.h>
-#endif
-
+#include <termios.h>
#ifdef SYSV

View file

@ -1,10 +0,0 @@
--- edit.c.orig 2009-10-06 23:06:44.000000000 +0800
+++ edit.c 2009-10-06 23:06:57.000000000 +0800
@@ -6,7 +6,6 @@
/* update : 95/12/15 */
/*-------------------------------------------------------*/
-#include <stdlib.h>
#include <sys/param.h>
#include "bbs.h"

View file

@ -1,39 +0,0 @@
--- screen.c.orig 2009-10-06 23:07:16.000000000 +0800
+++ screen.c 2009-10-06 23:15:01.000000000 +0800
@@ -6,7 +6,7 @@
/* update : 95/12/15 */
/*-------------------------------------------------------*/
-#include <varargs.h>
+#include <stdarg.h>
#include "bbs.h"
extern char clearbuf[];
@@ -46,8 +46,6 @@
{
if (!dumb_term && !big_picture)
{
- extern char *calloc();
-
scr_lns = t_lines;
scr_cols = t_columns = ANSILINELEN;
/* scr_cols = MIN(t_columns, ANSILINELEN); */
@@ -601,14 +599,13 @@
void
-prints(va_alist)
-va_dcl
+prints(char *fmt, ...)
{
va_list args;
- char buff[512], *fmt;
+ char buff[512];
+
+ va_start(args, fmt);
- va_start(args);
- fmt = va_arg(args, char *);
vsprintf(buff, fmt, args);
va_end(args);
outs(buff);

View file

@ -1,121 +0,0 @@
--- term.c.orig 2009-10-06 23:10:29.000000000 +0800
+++ term.c 2009-10-06 23:20:40.000000000 +0800
@@ -10,16 +10,7 @@
#include "bbs.h"
#include <sys/ioctl.h>
-#ifdef HP_UX
-#define O_HUPCL 01
-#define O_XTABS 02
-#endif
-
-#ifdef LINUX
-#include <linux/termios.h>
-#define stty(fd, data) tcsetattr( fd, TCSETS, data )
-#define gtty(fd, data) tcgetattr( fd, data )
-#endif
+#define stty(fd, data) tcsetattr( fd, TCSANOW, data )
#ifndef TANDEM
#define TANDEM 0x00000001
@@ -29,11 +20,7 @@
#define CBREAK 0x00000002
#endif
-#ifdef LINUX
struct termios tty_state, tty_new;
-#else
-struct sgttyb tty_state, tty_new;
-#endif
/* ----------------------------------------------------- */
@@ -44,7 +31,7 @@
void
get_tty()
{
- if (gtty (1, &tty_state) < 0)
+ if (tcgetattr(1, &tty_state) < 0)
{
fprintf (stderr, "gtty failed\n");
exit (-1);
@@ -53,46 +40,23 @@
void
-init_tty()
+init_tty(void)
{
- if (gtty(1, &tty_state) < 0)
- {
- fprintf(stderr, "gtty failed\n");
- exit(-1);
- }
- memcpy(&tty_new, &tty_state, sizeof(tty_new));
-
-#ifdef LINUX
-
- tty_new.c_lflag &= ~(ICANON | ECHO | RAW | ISIG);
- tcsetattr(1, TCSANOW, &tty_new);
- restore_tty();
-
-#else
-
- tty_new.sg_flags |= RAW;
-
-#ifdef HP_UX
- tty_new.sg_flags &= ~(O_HUPCL | O_XTABS | LCASE | ECHO | CRMOD);
-#else
- tty_new.sg_flags &= ~(TANDEM | CBREAK | LCASE | ECHO | CRMOD);
-#endif
+ struct termios tty_state, tty_new;
- stty(1, &tty_new);
-#endif
+ if (tcgetattr(1, &tty_state) < 0) {
+ fprintf(stderr, "tcgetattr(): %m");
+ return;
+ }
+ memcpy(&tty_new, &tty_state, sizeof(tty_new));
+ tty_new.c_lflag &= ~(ICANON | ECHO | ISIG);
+ /*
+ * tty_new.c_cc[VTIME] = 0; tty_new.c_cc[VMIN] = 1;
+ */
+ tcsetattr(1, TCSANOW, &tty_new);
+ system("stty raw -echo");
}
-
-#ifdef LINUX
-reset_tty()
-{
- system("stty -raw echo");
-}
-restore_tty()
-{
- system("stty raw -echo");
-}
-#else
void
reset_tty()
{
@@ -104,7 +68,6 @@
stty(1, &tty_new);
}
-#endif
@@ -171,11 +134,7 @@
char *sbp, *s;
char *tgetstr();
-#ifdef LINUX
ospeed = cfgetospeed(&tty_state);
-#else
- ospeed = tty_state.sg_ospeed;
-#endif
if (tgetent(buf, term) != 1)
return NA;

View file

@ -1,4 +1,3 @@
bin/ve
share/ve/00readme.txt
share/ve/ve.hlp
@dirrm share/ve