summaryrefslogtreecommitdiff
path: root/lang/ucblogo/patches
diff options
context:
space:
mode:
Diffstat (limited to 'lang/ucblogo/patches')
-rw-r--r--lang/ucblogo/patches/patch-graphics.c18
-rw-r--r--lang/ucblogo/patches/patch-intern.c18
-rw-r--r--lang/ucblogo/patches/patch-print.c15
-rw-r--r--lang/ucblogo/patches/patch-wrksp.c35
-rw-r--r--lang/ucblogo/patches/patch-xgraphics.c17
5 files changed, 84 insertions, 19 deletions
diff --git a/lang/ucblogo/patches/patch-graphics.c b/lang/ucblogo/patches/patch-graphics.c
index 98f4dc38598..2b24b3f6023 100644
--- a/lang/ucblogo/patches/patch-graphics.c
+++ b/lang/ucblogo/patches/patch-graphics.c
@@ -1,4 +1,4 @@
-$NetBSD: patch-graphics.c,v 1.2 2015/10/11 07:02:39 ryoon Exp $
+$NetBSD: patch-graphics.c,v 1.3 2015/11/06 20:33:21 joerg Exp $
--- graphics.c.orig 2008-09-03 17:58:13.000000000 +0000
+++ graphics.c
@@ -7,7 +7,7 @@ $NetBSD: patch-graphics.c,v 1.2 2015/10/11 07:02:39 ryoon Exp $
#endif
- prepare_to_draw;
-+ prepare_to_draw2(UNBOUND);
++ prepare_to_draw(UNBOUND);
prepare_to_draw_turtle;
save_pen(&saved_pen);
plain_xor_pen();
@@ -16,7 +16,7 @@ $NetBSD: patch-graphics.c,v 1.2 2015/10/11 07:02:39 ryoon Exp $
void right(FLONUM a) {
- prepare_to_draw;
-+ prepare_to_draw2(UNBOUND);
++ prepare_to_draw(UNBOUND);
draw_turtle();
turtle_heading += a;
turtle_heading = pfmod(turtle_heading,360.0);
@@ -25,7 +25,7 @@ $NetBSD: patch-graphics.c,v 1.2 2015/10/11 07:02:39 ryoon Exp $
internal_hideturtle();
// #endif
- prepare_to_draw;
-+ prepare_to_draw2(UNBOUND);
++ prepare_to_draw(UNBOUND);
draw_turtle();
forward_helper(d);
draw_turtle();
@@ -43,7 +43,7 @@ $NetBSD: patch-graphics.c,v 1.2 2015/10/11 07:02:39 ryoon Exp $
void internal_hideturtle() {
if(!graphics_setup) graphics_setup++;
- prepare_to_draw;
-+ prepare_to_draw2(UNBOUND);
++ prepare_to_draw(UNBOUND);
if (turtle_shown) {
draw_turtle();
turtle_shown = FALSE;
@@ -70,7 +70,7 @@ $NetBSD: patch-graphics.c,v 1.2 2015/10/11 07:02:39 ryoon Exp $
clearing_screen++;
#endif
- prepare_to_draw;
-+ prepare_to_draw2(UNBOUND);
++ prepare_to_draw(UNBOUND);
clear_screen;
#if defined(x_window) && !HAVE_WX
clearing_screen==0;
@@ -79,7 +79,7 @@ $NetBSD: patch-graphics.c,v 1.2 2015/10/11 07:02:39 ryoon Exp $
void setpos_bynumber(FLONUM target_x, FLONUM target_y) {
if (NOT_THROWING) {
- prepare_to_draw;
-+ prepare_to_draw2(UNBOUND);
++ prepare_to_draw(UNBOUND);
draw_turtle();
move_to(g_round(screen_x_coord), g_round(screen_y_coord));
setpos_commonpart(target_x, target_y);
@@ -88,7 +88,7 @@ $NetBSD: patch-graphics.c,v 1.2 2015/10/11 07:02:39 ryoon Exp $
if (NOT_THROWING) {
internal_hideturtle();
- prepare_to_draw;
-+ prepare_to_draw2(UNBOUND);
++ prepare_to_draw(UNBOUND);
draw_turtle();
move_to(g_round(screen_x_coord), g_round(screen_y_coord));
target_x = ((xnode == NIL) ?
@@ -205,7 +205,7 @@ $NetBSD: patch-graphics.c,v 1.2 2015/10/11 07:02:39 ryoon Exp $
}
- prepare_to_draw;
-+ prepare_to_draw2(UNBOUND);
++ prepare_to_draw(UNBOUND);
if(!graphics_setup){
done_drawing;
return;
diff --git a/lang/ucblogo/patches/patch-intern.c b/lang/ucblogo/patches/patch-intern.c
new file mode 100644
index 00000000000..999600c44ec
--- /dev/null
+++ b/lang/ucblogo/patches/patch-intern.c
@@ -0,0 +1,18 @@
+$NetBSD: patch-intern.c,v 1.1 2015/11/06 20:33:21 joerg Exp $
+
+--- intern.c.orig 2015-11-06 16:15:17.000000000 +0000
++++ intern.c
+@@ -39,11 +39,11 @@ FIXNUM hash(char *s, int len) {
+ /* and Ullman's book, Compilers: Principles, Techniques, and */
+ /* Tools; figure 7.35. */
+
+- unsigned FIXNUM h = 0, g;
++ unsigned long FIXNUM h = 0, g;
+
+ while (--len >= 0) {
+ h = (h << 4) + (FIXNUM)(*s++);
+- g = h & (0xf << (WORDSIZE-4));
++ g = h & (0xfUL << (WORDSIZE-4));
+ if (g != 0) {
+ h ^= g ^ (g >> (WORDSIZE-8));
+ }
diff --git a/lang/ucblogo/patches/patch-print.c b/lang/ucblogo/patches/patch-print.c
index 4d3cf4ff865..b599aa1d0b2 100644
--- a/lang/ucblogo/patches/patch-print.c
+++ b/lang/ucblogo/patches/patch-print.c
@@ -1,8 +1,17 @@
-$NetBSD: patch-print.c,v 1.1 2013/07/18 12:05:09 joerg Exp $
+$NetBSD: patch-print.c,v 1.2 2015/11/06 20:33:21 joerg Exp $
---- print.c.orig 2013-07-17 14:26:15.000000000 +0000
+--- print.c.orig 2008-03-01 01:04:41.000000000 +0000
+++ print.c
-@@ -229,7 +229,7 @@ void real_print_node(FILE *strm, NODE *n
+@@ -254,7 +254,7 @@ void real_print_node(FILE *strm, NODE *n
+ } else if ((unsigned int)nd < 200) { /* for debugging */
+ char num[] = "{small} ";
+
+- sprintf(&num[7],"%d",nd);
++ snprintf(&num[7], sizeof(num) - 7,"%u",(unsigned int)nd);
+ ndprintf(strm,num);
+ } else if ((ndty = nodetype(nd)) & NT_PRIM) {
+ ndprintf(strm, "PRIM");
+@@ -281,7 +281,7 @@ void real_print_node(FILE *strm, NODE *n
if (print_backslashes && (getarrorg(nd) != 1)) {
char org[] = "@ ";
diff --git a/lang/ucblogo/patches/patch-wrksp.c b/lang/ucblogo/patches/patch-wrksp.c
index fe412128826..9eafaceffff 100644
--- a/lang/ucblogo/patches/patch-wrksp.c
+++ b/lang/ucblogo/patches/patch-wrksp.c
@@ -1,8 +1,8 @@
-$NetBSD: patch-wrksp.c,v 1.1 2013/07/18 12:05:09 joerg Exp $
+$NetBSD: patch-wrksp.c,v 1.2 2015/11/06 20:33:21 joerg Exp $
---- wrksp.c.orig 2013-07-17 14:30:28.000000000 +0000
+--- wrksp.c.orig 2008-08-23 19:51:14.000000000 +0000
+++ wrksp.c
-@@ -30,6 +30,7 @@
+@@ -38,6 +38,7 @@ int wxEditFile(char *);
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
@@ -10,3 +10,32 @@ $NetBSD: patch-wrksp.c,v 1.1 2013/07/18 12:05:09 joerg Exp $
#ifdef ibm
#include "process.h"
+@@ -55,6 +56,8 @@ int wxEditFile(char *);
+ #endif
+ #endif
+
++#include <ctype.h>
++
+ char *editor, *editorname, *tempdir;
+ int to_pending = 0;
+
+@@ -293,7 +296,7 @@ char *strncasestr(char *big, char *littl
+ FIXNUM i;
+
+ while (*big != '\0') {
+- while ((pc = *big++) != '\0' && tolower(pc) != tolower(*little)) ;
++ while ((pc = *big++) != '\0' && tolower((unsigned char)pc) != tolower((unsigned char)*little)) ;
+ if (pc == '\0') return NULL;
+ p = big; q = little+1; i = len;
+ while (--i > 0 && (qc = *q++) != '\0') {
+@@ -1713,8 +1716,8 @@ NODE *cpdf_newname(NODE *name, NODE*titl
+ p1 = titlestr+strcspn(titlestr, " \t");
+ p1 = p1+strspn(p1, " \t");
+ p2 = p1+strcspn(p1, " \t");
+- sprintf(buf, "%.*s%.*s%s",
+- p1-titlestr, titlestr, getstrlen(nname), namestr, p2);
++ snprintf(buf, sizeof(buf), "%.*s%.*s%s",
++ (int)(p1-titlestr), titlestr, (int)getstrlen(nname), namestr, p2);
+ return make_strnode(buf, NULL, strlen(buf), STRING, strcpy);
+ }
+
diff --git a/lang/ucblogo/patches/patch-xgraphics.c b/lang/ucblogo/patches/patch-xgraphics.c
index 2a4da3f76aa..41673c09ca0 100644
--- a/lang/ucblogo/patches/patch-xgraphics.c
+++ b/lang/ucblogo/patches/patch-xgraphics.c
@@ -1,8 +1,17 @@
-$NetBSD: patch-xgraphics.c,v 1.1 2012/11/01 19:55:37 joerg Exp $
+$NetBSD: patch-xgraphics.c,v 1.2 2015/11/06 20:33:21 joerg Exp $
---- xgraphics.c.orig 2012-10-30 22:05:56.000000000 +0000
+--- xgraphics.c.orig 2007-12-05 21:00:23.000000000 +0000
+++ xgraphics.c
-@@ -289,7 +289,7 @@ void placate_x()
+@@ -314,7 +314,7 @@ void check_X11_stop() {
+
+ int get_button()
+ {
+- checkX;
++ checkX2(-1);
+
+ placate_x();
+
+@@ -323,7 +323,7 @@ int get_button()
int get_mouse_x()
{
@@ -11,7 +20,7 @@ $NetBSD: patch-xgraphics.c,v 1.1 2012/11/01 19:55:37 joerg Exp $
placate_x();
-@@ -299,7 +299,7 @@ int get_mouse_x()
+@@ -333,7 +333,7 @@ int get_mouse_x()
int get_mouse_y()
{