by compressedgas · 4y ago · 0 comments
--- stoical-0.1.8-old/src/debug.c 2002-05-05 06:41:19.000000000 -0400
+++ stoical-0.1.8-new/src/debug.c 2020-10-01 14:32:34.000000000 -0400
@@ -139,7 +139,8 @@
else if ( strcmp( (*p)->name, "l()" ) == 0 )
{
p++;
- st_pcell( ((cell*)p)++ );
+ st_pcell( ((cell*)p) );
+ p = (cell*)p + 1;
p--;
}
else if ( strcmp( (*p)->name, "r()" ) == 0 ||
diff -ru stoical-0.1.8-old/src/help.h stoical-0.1.8-new/src/help.h
--- stoical-0.1.8-old/src/help.h 2002-04-25 16:06:20.000000000 -0400
+++ stoical-0.1.8-new/src/help.h 2020-10-01 09:26:45.000000000 -0400
@@ -1,18 +1,18 @@
-const char help[] = "S t o i c a l %s
-Copyright (c) 2002 Jonathan Moore Liles.
-Released under the GNU General Public License (see COPYING)
-
-usage:
-stoical [ option ] ... [ file ] [ arg ] ...
-
-The available options include:
-
--h - Print this help and exit.
--v - Print version information and exit.
--e code - Exectue the instructions 'code'.
--l path - Change STOICAL root library path.
--f file - Run 'file' (useful when file begins with a '-').
-
-";
+const char help[] = "S t o i c a l %s "
+"Copyright (c) 2002 Jonathan Moore Liles."
+"Released under the GNU General Public License (see COPYING)"
+""
+"usage:"
+"stoical [ option ] ... [ file ] [ arg ] ... "
+""
+"The available options include:"
+""
+"-h - Print this help and exit."
+"-v - Print version information and exit."
+"-e code - Exectue the instructions 'code'."
+"-l path - Change STOICAL root library path."
+"-f file - Run 'file' (useful when file begins with a '-')."
+""
+"";
diff -ru stoical-0.1.8-old/src/words.c stoical-0.1.8-new/src/words.c
--- stoical-0.1.8-old/src/words.c 2002-05-07 06:54:02.000000000 -0400
+++ stoical-0.1.8-new/src/words.c 2020-10-01 14:33:49.000000000 -0400
@@ -2009,8 +2009,8 @@
begin(hash_put)
/* Place character represented by the value at TOS into
* the buffer. Decrement the pointer, and increment the count. */
- *(--(char*)hash_ptr.parm.v.p) = fpop(sst);
-
+ *((char*)hash_ptr.parm.v.p) = fpop(sst);
+ hash_ptr.parm.v.p = (char*)hash_ptr.parm.v.p - 1;
hash_cnt.parm.v.f++;
end()
begin(hash_a)
@@ -2789,7 +2789,8 @@
ip++;
a = (cell*)ip;
- ((cell*)ip)++;
+ ip = (cell*)ip + 1;
ip--;
push(sst,*a); /* Place character represented by the value at TOS into
* the buffer. Decrement the pointer, and increment the count. */
- *(--(char*)hash_ptr.parm.v.p) = fpop(sst);
-
+ *((char*)hash_ptr.parm.v.p) = fpop(sst);
+ hash_ptr.parm.v.p = (char*)hash_ptr.parm.v.p - 1;
Are you sure that making assignment before the predecrement is how this fragment should be functioning?