interpret.c-diff

ldmud-3.2.9/src/bugs/doomdark/interpret.c-diff · 1010 B

From the archive ldmud-329.tar.gz

Download the archive   « Back to the archive contents

*** ../../../src-3.2.1@141/interpret.c	Sun Jan 18 01:13:33 1998
--- interpret.c	Tue Oct 20 11:17:12 1998
***************
*** 7038,7043 ****
--- 7038,7069 ----
  	sp = input_to(sp, num_arg);
  	break;
      }
+
+ /* Added to support StickLib: */
+     CASE(F_SUBSTITUTE_STRING);
+     {
+         struct svalue *arg;
+         char *ret;
+
+         arg = sp - 4;
+         if (arg[0].type != T_STRING)
+                 goto bad_arg_1;
+         if (arg[1].type != T_POINTER)
+                 goto bad_arg_2;
+         if (arg[2].type != T_POINTER)
+                 goto bad_arg_3;
+         ret = substitute_string(arg[0].u.string, arg[1].u.vec, arg[2].u.vec,
+                 arg[3].u.number, arg[4].u.number);
+         if (!ret) {
+                 pop_n_elems(4);
+         } else {
+                 pop_n_elems(5);
+                 push_string_malloced(ret);
+         }
+         break;
+     }
+
+ /* ... end of StickLib-extra-func */
  #ifdef F_PARSE_COMMAND
      CASE(F_PARSE_COMMAND);
      {

Site Stats

Snippets: 1791
Codebases: 571