Use the raw buffer in tr command structure for editing.
[open-adventure.git] / misc.c
diff --git a/misc.c b/misc.c
index a38c54657f42dd1fadffed8a561b28dbb10c9f28..c8cf9f13521ed1cb8ebba744977d42759ed00d3f 100644 (file)
--- a/misc.c
+++ b/misc.c
@@ -127,9 +127,7 @@ void tokenize(char* raw, struct command_t *cmd)
 
     // pack the substrings
     cmd->wd1  = token_to_packed(chunk_data[0]);
-    cmd->wd1x = token_to_packed(chunk_data[1]);
     cmd->wd2  = token_to_packed(chunk_data[2]);
-    cmd->wd2x = token_to_packed(chunk_data[3]);
 }
 
 /* Hide the fact that wods are corrently packed longs */
@@ -149,7 +147,7 @@ void wordclear(token_t *v)
     *v = 0;
 }
 
-/*  I/O routines (speak, pspeak, rspeak, get_input, yes) */
+/*  I/O routines (speak, pspeak, rspeak, sspeak, get_input, yes) */
 
 void vspeak(const char* msg, bool blank, va_list ap)
 {
@@ -253,6 +251,16 @@ void speak(const char* msg, ...)
     va_end(ap);
 }
 
+void sspeak(const long msg, ...)
+{
+    va_list ap;
+    va_start(ap, msg);
+    fputc('\n', stdout);
+    vprintf(arbitrary_messages[msg], ap);
+    fputc('\n', stdout);
+    va_end(ap);
+}
+
 void pspeak(vocab_t msg, enum speaktype mode, int skip, bool blank, ...)
 /* Find the skip+1st message from msg and print it.  Modes are:
  * feel = for inventory, what you can touch