mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-03 01:23:49 +00:00
Add a few functions in p2clib. This fixes bugs occuring with some pascal code.
Submitted by: joerg
This commit is contained in:
parent
792fa51980
commit
a84f8427e0
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=55110
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
PORTNAME= p2c
|
PORTNAME= p2c
|
||||||
PORTVERSION= 1.21a
|
PORTVERSION= 1.21a
|
||||||
|
PORTREVISION= 1
|
||||||
CATEGORIES= lang
|
CATEGORIES= lang
|
||||||
MASTER_SITES= ftp://ftp.clara.net/pub/mirrors/gnu/hurd/ \
|
MASTER_SITES= ftp://ftp.clara.net/pub/mirrors/gnu/hurd/ \
|
||||||
ftp://ftp.u-aizu.ac.jp/pub/lang/netsw/Pascal/ \
|
ftp://ftp.u-aizu.ac.jp/pub/lang/netsw/Pascal/ \
|
||||||
|
45
lang/p2c/files/patch-a
Normal file
45
lang/p2c/files/patch-a
Normal file
@ -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);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
Loading…
Reference in New Issue
Block a user