Update to Inform v6.41
[inform.git] / src / text.c
index 525ecec6da03a40df06bc9b28d51f9b25bc28cbc..03d11301d6668ecb284aea2990b9d1f2ea6c892c 100644 (file)
@@ -1,7 +1,7 @@
 /* ------------------------------------------------------------------------- */
 /*   "text" : Text translation, the abbreviations optimiser, the dictionary  */
 /*                                                                           */
-/*   Part of Inform 6.40                                                     */
+/*   Part of Inform 6.41                                                     */
 /*   copyright (c) Graham Nelson 1993 - 2022                                 */
 /*                                                                           */
 /* Inform is free software: you can redistribute it and/or modify            */
@@ -224,6 +224,10 @@ static int try_abbreviations_from(unsigned char *text, int i, int from)
 
 extern void make_abbreviation(char *text)
 {
+    /* If -e mode is off, we won't waste space creating an abbreviation entry. */
+    if (!economy_switch)
+        return;
+    
     ensure_memory_list_available(&abbreviations_memlist, no_abbreviations+1);
     ensure_memory_list_available(&abbreviations_at_memlist, no_abbreviations+1);
     
@@ -2094,16 +2098,9 @@ static void recursively_sort(int node)
 }
 
 extern void sort_dictionary(void)
-{   int i;
-    
+{    
     final_dict_order = my_calloc(sizeof(int), dict_entries, "final dictionary ordering table");
     
-    if (module_switch)
-    {   for (i=0; i<dict_entries; i++)
-            final_dict_order[i] = i;
-        return;
-    }
-
     if (root != VACANT)
     {   fdo_count = 0; recursively_sort(root);
     }
@@ -2330,9 +2327,8 @@ extern void dictionary_set_verb_number(char *dword, int to)
 }
 
 /* ------------------------------------------------------------------------- */
-/*   Tracing code for the dictionary: used not only by "trace" and text      */
-/*   transcription, but also (in the case of "word_to_ascii") in a vital     */
-/*   by the linker.                                                          */
+/*   Tracing code for the dictionary: used by "trace" and text               */
+/*   transcription.                                                          */
 /* ------------------------------------------------------------------------- */
 
 /* In the dictionary-showing code, if d_show_buf is NULL, the text is