View | Details | Raw Unified | Return to bug 207041 | Differences between
and this patch

Collapse All | Expand All

(-)ports/lang/ficl/files/patch-dictionary.c (-7 / +7 lines)
Lines 1-6 Link Here
1
--- dictionary.c.orig	2010-09-12 19:14:52.000000000 +0400
1
--- dictionary.c.orig	2010-09-12 15:14:52 UTC
2
+++ dictionary.c	2012-03-20 19:19:53.000000000 +0400
2
+++ dictionary.c
3
@@ -662,7 +662,7 @@
3
@@ -662,7 +662,7 @@ void ficlDictionarySee(ficlDictionary *d
4
             *trace++ = '>';
4
             *trace++ = '>';
5
         else
5
         else
6
             *trace++ = ' ';
6
             *trace++ = ' ';
Lines 9-15 Link Here
9
         
9
         
10
         if (ficlDictionaryIsAWord(dictionary, word))
10
         if (ficlDictionaryIsAWord(dictionary, word))
11
         {
11
         {
12
@@ -676,7 +676,7 @@
12
@@ -676,7 +676,7 @@ void ficlDictionarySee(ficlDictionary *d
13
                 break;
13
                 break;
14
             case FICL_WORDKIND_INSTRUCTION_WITH_ARGUMENT:
14
             case FICL_WORDKIND_INSTRUCTION_WITH_ARGUMENT:
15
                 c = *++cell;
15
                 c = *++cell;
Lines 18-24 Link Here
18
                 break;
18
                 break;
19
             case FICL_WORDKIND_INSTRUCTION_WORD:
19
             case FICL_WORDKIND_INSTRUCTION_WORD:
20
                 sprintf(trace, "%s :: executes %s (instruction word %ld)", word->name, ficlDictionaryInstructionNames[(long)word->code], (long)word->code);
20
                 sprintf(trace, "%s :: executes %s (instruction word %ld)", word->name, ficlDictionaryInstructionNames[(long)word->code], (long)word->code);
21
@@ -687,20 +687,20 @@
21
@@ -687,20 +687,20 @@ void ficlDictionarySee(ficlDictionary *d
22
                 {
22
                 {
23
                     ficlWord *word = (ficlWord *)c.p;
23
                     ficlWord *word = (ficlWord *)c.p;
24
                     sprintf(trace, "%.*s ( %#lx literal )", 
24
                     sprintf(trace, "%.*s ( %#lx literal )", 
Lines 43-49 Link Here
43
                 break;
43
                 break;
44
 #endif /* FICL_WANT_FLOAT */
44
 #endif /* FICL_WANT_FLOAT */
45
             case FICL_WORDKIND_STRING_LITERAL:
45
             case FICL_WORDKIND_STRING_LITERAL:
46
@@ -719,32 +719,32 @@
46
@@ -719,32 +719,32 @@ void ficlDictionarySee(ficlDictionary *d
47
                 break;
47
                 break;
48
             case FICL_WORDKIND_BRANCH0:
48
             case FICL_WORDKIND_BRANCH0:
49
                 c = *++cell;
49
                 c = *++cell;
Lines 83-89 Link Here
83
                 break;
83
                 break;
84
             default:
84
             default:
85
                 sprintf(trace, "%.*s", word->length, word->name);
85
                 sprintf(trace, "%.*s", word->length, word->name);
86
@@ -754,7 +754,7 @@
86
@@ -754,7 +754,7 @@ void ficlDictionarySee(ficlDictionary *d
87
         }
87
         }
88
         else /* probably not a word - punt and print value */
88
         else /* probably not a word - punt and print value */
89
         {
89
         {
(-)ports/lang/ficl/files/patch-double.c (+29 lines)
Line 0 Link Here
1
--- double.c.orig	2010-09-12 15:18:07 UTC
2
+++ double.c
3
@@ -157,7 +157,7 @@ ficl2Integer ficl2IntegerMultiply(ficlIn
4
 
5
 ficl2Integer ficl2IntegerDecrement(ficl2Integer x)
6
 {
7
-	if (x.low == INT_MIN)
8
+	if (x.low == INTMAX_MIN)
9
 		x.high--;
10
 	x.low--;
11
 
12
@@ -168,16 +168,11 @@ ficl2Integer ficl2IntegerDecrement(ficl2
13
 ficl2Unsigned ficl2UnsignedAdd(ficl2Unsigned x, ficl2Unsigned y)
14
 {
15
     ficl2Unsigned result;
16
-    int carry;
17
     
18
     result.high = x.high + y.high;
19
     result.low = x.low + y.low;
20
 
21
-
22
-    carry  = ((x.low | y.low) & FICL_CELL_HIGH_BIT) && !(result.low & FICL_CELL_HIGH_BIT);
23
-    carry |= ((x.low & y.low) & FICL_CELL_HIGH_BIT);
24
-
25
-    if (carry)
26
+    if (result.low < y.low)
27
     {
28
         result.high++;
29
     }
(-)ports/lang/ficl/files/patch-ficl.h (-11 lines)
Lines 1-11 Link Here
1
--- ficl.h.orig	Mon Dec  8 18:33:42 2003
2
+++ ficl.h	Mon Dec  8 18:33:58 2003
3
@@ -163,6 +163,8 @@
4
 	#include "ficlplatform/ansi.h"
5
 #elif defined(_WIN32)
6
 	#include "ficlplatform/win32.h"
7
+#elif defined (FREEBSD)
8
+	#include "ficlplatform/unix.h"
9
 #elif defined (FREEBSD_ALPHA)
10
 	#include "ficlplatform/alpha.h"
11
 #elif defined(linux)
(-)ports/lang/ficl/files/patch-float.c (-3 / +3 lines)
Lines 1-6 Link Here
1
--- float.c.orig	2010-09-13 22:43:04.000000000 +0400
1
--- float.c.orig	2010-09-13 18:43:04 UTC
2
+++ float.c	2012-03-20 19:09:18.000000000 +0400
2
+++ float.c
3
@@ -159,7 +159,7 @@
3
@@ -159,7 +159,7 @@ static ficlInteger ficlFloatStackDisplay
4
 {
4
 {
5
     struct stackContext *context = (struct stackContext *)c;
5
     struct stackContext *context = (struct stackContext *)c;
6
     char buffer[64];
6
     char buffer[64];
(-)ports/lang/ficl/files/patch-primitives.c (-4 / +4 lines)
Lines 1-6 Link Here
1
--- primitives.c.orig	2014-01-05 15:25:11.000000000 +0400
1
--- primitives.c.orig	2010-09-13 18:43:04 UTC
2
+++ primitives.c	2014-01-05 16:00:30.000000000 +0400
2
+++ primitives.c
3
@@ -487,7 +487,7 @@
3
@@ -487,7 +487,7 @@ static void ficlPrimitiveSprintf(ficlVm 
4
 
4
 
5
 	ficlStackPushPointer(vm->dataStack, bufferStart);
5
 	ficlStackPushPointer(vm->dataStack, bufferStart);
6
 	ficlStackPushInteger(vm->dataStack, buffer - bufferStart);
6
 	ficlStackPushInteger(vm->dataStack, buffer - bufferStart);
Lines 9-15 Link Here
9
 }
9
 }
10
 
10
 
11
 
11
 
12
@@ -1350,7 +1350,7 @@
12
@@ -1350,7 +1350,7 @@ static void ficlPrimitiveSetObjectFlag(f
13
 
13
 
14
 static void ficlPrimitiveIsObject(ficlVm *vm)
14
 static void ficlPrimitiveIsObject(ficlVm *vm)
15
 {
15
 {
(-)ports/lang/ficl/files/patch-tools.c (-8 / +8 lines)
Lines 1-6 Link Here
1
--- tools.c.orig	2010-08-12 17:57:22.000000000 +0400
1
--- tools.c.orig	2010-08-12 13:57:22 UTC
2
+++ tools.c	2012-03-20 19:08:11.000000000 +0400
2
+++ tools.c
3
@@ -236,24 +236,24 @@
3
@@ -236,24 +236,24 @@ static void ficlPrimitiveSeeXT(ficlVm *v
4
         break;
4
         break;
5
 
5
 
6
     case FICL_WORDKIND_VARIABLE:
6
     case FICL_WORDKIND_VARIABLE:
Lines 29-35 Link Here
29
         ficlVmTextOut(vm, vm->pad);
29
         ficlVmTextOut(vm, vm->pad);
30
 		break;
30
 		break;
31
 
31
 
32
@@ -567,7 +567,7 @@
32
@@ -567,7 +567,7 @@ static ficlInteger ficlStackDisplayCallb
33
 {
33
 {
34
     struct stackContext *context = (struct stackContext *)c;
34
     struct stackContext *context = (struct stackContext *)c;
35
     char buffer[64];
35
     char buffer[64];
Lines 38-44 Link Here
38
 	ficlVmTextOut(context->vm, buffer);
38
 	ficlVmTextOut(context->vm, buffer);
39
 	return FICL_TRUE;
39
 	return FICL_TRUE;
40
 }
40
 }
41
@@ -580,7 +580,7 @@
41
@@ -580,7 +580,7 @@ void ficlStackDisplay(ficlStack *stack, 
42
 
42
 
43
     FICL_STACK_CHECK(stack, 0, 0);
43
     FICL_STACK_CHECK(stack, 0, 0);
44
 
44
 
Lines 47-53 Link Here
47
 	ficlVmTextOut(vm, buffer);
47
 	ficlVmTextOut(vm, buffer);
48
 
48
 
49
     if (callback == NULL)
49
     if (callback == NULL)
50
@@ -592,7 +592,7 @@
50
@@ -592,7 +592,7 @@ void ficlStackDisplay(ficlStack *stack, 
51
     }
51
     }
52
 	ficlStackWalk(stack, callback, context, FICL_FALSE);
52
 	ficlStackWalk(stack, callback, context, FICL_FALSE);
53
 
53
 
Lines 56-62 Link Here
56
 	ficlVmTextOut(vm, buffer);
56
 	ficlVmTextOut(vm, buffer);
57
 
57
 
58
     return;
58
     return;
59
@@ -612,7 +612,7 @@
59
@@ -612,7 +612,7 @@ static ficlInteger ficlStackDisplaySimpl
60
 {
60
 {
61
     struct stackContext *context = (struct stackContext *)c;
61
     struct stackContext *context = (struct stackContext *)c;
62
     char buffer[32];
62
     char buffer[32];
Lines 65-71 Link Here
65
     context->count++;
65
     context->count++;
66
     ficlVmTextOut(context->vm, buffer);
66
     ficlVmTextOut(context->vm, buffer);
67
 	return FICL_TRUE;
67
 	return FICL_TRUE;
68
@@ -644,7 +644,7 @@
68
@@ -644,7 +644,7 @@ static ficlInteger ficlReturnStackDispla
69
     struct stackContext *context = (struct stackContext *)c;
69
     struct stackContext *context = (struct stackContext *)c;
70
     char buffer[128];
70
     char buffer[128];
71
 
71
 
(-)ports/lang/ficl/files/patch-vm.c (+46 lines)
Line 0 Link Here
1
--- vm.c.orig	2010-09-13 18:43:04 UTC
2
+++ vm.c
3
@@ -280,12 +280,12 @@ void ficlVmInnerLoop(ficlVm *vm, ficlWor
4
 	if (once)
5
 		count = 1;
6
 
7
-	LOCAL_VARIABLE_REFILL;
8
-
9
     oldExceptionHandler = vm->exceptionHandler;
10
     vm->exceptionHandler = &exceptionHandler; /* This has to come before the setjmp! */
11
     except = setjmp(exceptionHandler);
12
 
13
+	LOCAL_VARIABLE_REFILL;
14
+
15
 	if (except)
16
 		{
17
 		LOCAL_VARIABLE_SPILL;
18
@@ -717,8 +717,8 @@ AGAIN:
19
 				i = dataTop->i;
20
 				if (i < 0)
21
 					continue;
22
-				CHECK_STACK(i + 1, i + 2);
23
-				*dataTop = dataTop[-i];
24
+				CHECK_STACK(i + 2, i + 3);
25
+				*dataTop = dataTop[-i - 1];
26
 				continue;
27
 			}
28
 
29
@@ -1228,7 +1228,7 @@ COMPARE:
30
 			**************************************************************************/
31
 			case ficlInstructionRandom:
32
 			{
33
-				(++dataTop)->i = rand();
34
+				(++dataTop)->u = random();
35
 				continue;
36
 			}
37
 
38
@@ -1239,7 +1239,7 @@ COMPARE:
39
 			**************************************************************************/
40
 			case ficlInstructionSeedRandom:
41
 			{
42
-				srand((dataTop--)->i);
43
+				srandom((dataTop--)->u);
44
 				continue;
45
 			}
46
 
(-)ports/lang/ficl/Makefile (-4 / +1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	ficl
4
PORTNAME=	ficl
5
PORTVERSION=	4.1.0
5
PORTVERSION=	4.1.0
6
PORTREVISION=	2
6
PORTREVISION=	3
7
CATEGORIES=	lang
7
CATEGORIES=	lang
8
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}-all/${PORTNAME}${PORTVERSION:C/([[:digit:]]+\.[[:digit:]]+)\.0/\1/}
8
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}-all/${PORTNAME}${PORTVERSION:C/([[:digit:]]+\.[[:digit:]]+)\.0/\1/}
9
9
Lines 15-23 Link Here
15
LICENSE_TEXT=	Description of the license can be obtained from the following URL: http://ficl.sourceforge.net/license.html
15
LICENSE_TEXT=	Description of the license can be obtained from the following URL: http://ficl.sourceforge.net/license.html
16
LICENSE_PERMS=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
16
LICENSE_PERMS=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
17
17
18
OPTIONS_DEFINE=	DATA DOCS
19
OPTIONS_DEFAULT=	DATA
20
21
MAKE_JOBS_UNSAFE=	YES
18
MAKE_JOBS_UNSAFE=	YES
22
19
23
ONLY_FOR_ARCHS=	i386 amd64
20
ONLY_FOR_ARCHS=	i386 amd64
(-)ports/lang/ficl/patch-ficl.h (+11 lines)
Line 0 Link Here
1
--- ficl.h.orig	Mon Dec  8 18:33:42 2003
2
+++ ficl.h	Mon Dec  8 18:33:58 2003
3
@@ -163,6 +163,8 @@
4
 	#include "ficlplatform/ansi.h"
5
 #elif defined(_WIN32)
6
 	#include "ficlplatform/win32.h"
7
+#elif defined (FREEBSD)
8
+	#include "ficlplatform/unix.h"
9
 #elif defined (FREEBSD_ALPHA)
10
 	#include "ficlplatform/alpha.h"
11
 #elif defined(linux)
(-)ports/lang/ficl/pkg-descr (-1 lines)
Lines 5-8 Link Here
5
bindings needed by the OS loader.
5
bindings needed by the OS loader.
6
6
7
WWW: http://ficl.sourceforge.net/
7
WWW: http://ficl.sourceforge.net/
8

Return to bug 207041