static zchar prev_c = 0;
+/*
+ * init_buffer
+ *
+ * Initialize buffer variables.
+ *
+ */
+
+void init_buffer(void)
+{
+ memset(buffer, 0, sizeof (zchar) * TEXT_BUFFER_SIZE);
+ bufpos = 0;
+ prev_c = 0;
+}
+
/*
* flush_buffer
*
buffer[bufpos] = 0;
-
- locked = TRUE;
-
- stream_word (buffer);
-
- locked = FALSE;
+ locked = TRUE; stream_word (buffer); locked = FALSE;
/* Reset the buffer */
}/* new_line */
-/*
- * init_buffer
- *
- * Initialize buffer variables.
- *
- */
-void init_buffer(void)
-{
- memset(buffer, 0, sizeof (zchar) * TEXT_BUFFER_SIZE);
- bufpos = 0;
- prev_c = 0;
-}
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "frotz.h"
* Encode the Unicode text in the global "decoded" string then write
* the result to the global "encoded" array. (This is used to look up
* words in the dictionary.) Up to V3 the vocabulary resolution is
- * two, since V4 it is three words. Because each word contains three
- * Z-characters, that makes six or nine Z-characters respectively.
- * Longer words are chopped to the proper size, shorter words are are
- * padded out with 5's. For word completion we pad with 0s and 31s,
- * the minimum and maximum Z-characters.
+ * two, since V4 it is three words.
+ * Because each word contains three Z-characters, that makes six or
+ * nine Z-characters respectively. Longer words are chopped to the
+ * proper size, shorter words are are padded out with 5's. For word
+ * completion we pad with 0s and 31s, the minimum and maximum
+ * Z-characters.
*
*/
+
static void encode_text (int padding)
{
static zchar again[] = { 'a', 'g', 'a', 'i', 'n', 0 };
}/* encode_text */
-
/*
- * z_check_unicode, test if a unicode character can be read and printed.
+ * z_check_unicode, test if a unicode character can be printed (bit 0) and read (bit 1).
*
* zargs[0] = Unicode
*
byte_addr = (long) addr << 2;
else if (h_version <= V7)
byte_addr = ((long) addr << 2) + ((long) h_strings_offset << 3);
- else /* h_version == V8 */
+ else /* (h_version == V8) */
byte_addr = (long) addr << 3;
if (byte_addr >= story_size)
*ptr = 0;
}/* decode_text */
-#undef outchar
+#undef outchar
/*
* z_new_line, print a new line.