// Unmodified string specifier.
if (msg[i] == 's') {
char *arg = va_arg(ap, char *);
- strncat(renderp, arg, size);
+ strncat(renderp, arg, size-1);
size_t len = strlen(renderp);
renderp += len;
size -= len;
/* Data structure routines */
-int get_motion_vocab_id(const char* word)
+static int get_motion_vocab_id(const char* word)
// Return the first motion number that has 'word' as one of its words.
{
for (int i = 0; i < NMOTIONS; ++i) {
return (WORD_NOT_FOUND);
}
-int get_object_vocab_id(const char* word)
+static int get_object_vocab_id(const char* word)
// Return the first object number that has 'word' as one of its words.
{
for (int i = 0; i < NOBJECTS + 1; ++i) { // FIXME: the + 1 should go when 1-indexing for objects is removed
return (WORD_NOT_FOUND);
}
-int get_action_vocab_id(const char* word)
+static int get_action_vocab_id(const char* word)
// Return the first motion number that has 'word' as one of its words.
{
for (int i = 0; i < NACTIONS; ++i) {
return (WORD_NOT_FOUND);
}
-int get_special_vocab_id(const char* word)
+static int get_special_vocab_id(const char* word)
// Return the first special number that has 'word' as one of its words.
{
for (int i = 0; i < NSPECIALS; ++i) {