diff options
author | jmz <jmz@FreeBSD.org> | 2002-02-22 23:12:23 +0000 |
---|---|---|
committer | jmz <jmz@FreeBSD.org> | 2002-02-22 23:12:23 +0000 |
commit | 6bcef212cc50fe016fa7d0e4dfc7f19fcb03e4a3 (patch) | |
tree | 3c1d3c5ed678a80011c5f099516fe2571857c660 /lang/p2c | |
parent | 1d885ac043b75bb67c61780b66a41ba4385df848 (diff) | |
download | FreeBSD-ports-6bcef212cc50fe016fa7d0e4dfc7f19fcb03e4a3.zip FreeBSD-ports-6bcef212cc50fe016fa7d0e4dfc7f19fcb03e4a3.tar.gz |
Add a few functions in p2clib. This fixes bugs occuring with some pascal code.
Submitted by: joerg
Diffstat (limited to 'lang/p2c')
-rw-r--r-- | lang/p2c/Makefile | 1 | ||||
-rw-r--r-- | lang/p2c/files/patch-a | 45 |
2 files changed, 46 insertions, 0 deletions
diff --git a/lang/p2c/Makefile b/lang/p2c/Makefile index a7ca924..1ed87f9 100644 --- a/lang/p2c/Makefile +++ b/lang/p2c/Makefile @@ -7,6 +7,7 @@ PORTNAME= p2c PORTVERSION= 1.21a +PORTREVISION= 1 CATEGORIES= lang MASTER_SITES= ftp://ftp.clara.net/pub/mirrors/gnu/hurd/ \ ftp://ftp.u-aizu.ac.jp/pub/lang/netsw/Pascal/ \ diff --git a/lang/p2c/files/patch-a b/lang/p2c/files/patch-a new file mode 100644 index 0000000..70a8748 --- /dev/null +++ b/lang/p2c/files/patch-a @@ -0,0 +1,45 @@ +--- src/loc.p2clib.c.orig Fri Feb 22 13:13:49 2002 ++++ src/loc.p2clib.c Fri Feb 22 13:12:44 2002 +@@ -4,3 +4,42 @@ + * the symbol LOCAL_INIT when you compile p2clib.c. + */ + ++/* Some Turbo "unit crt" functions. */ ++ ++#include <curses.h> ++#include <term.h> ++ ++static int terminfo_initialized; ++static char *cl, *ce; ++ ++static void initcurs() ++{ ++ if (terminfo_initialized) ++ return; ++ setupterm(0, fileno(stdout), 0); ++ ce = tgetstr("ce", 0); ++ cl = tgetstr("cl", 0); ++ terminfo_initialized = 1; ++} ++ ++void clreol() ++{ ++ initcurs(); ++ if (ce) ++ tputs(ce, 1, putchar); ++} ++ ++void clrscr() ++{ ++ initcurs(); ++ if (cl) ++ tputs(cl, 1, putchar); ++} ++ ++void delay(ms) ++int ms; ++{ ++ usleep(1000 * ms); ++} ++ ++ |