/****************************************************************************
- * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
#include <ctype.h>
#include <tic.h>
-#include <term_entry.h>
-MODULE_ID("$Id: parse_entry.c,v 1.70 2009/04/18 21:01:38 tom Exp $")
+MODULE_ID("$Id: parse_entry.c,v 1.75 2010/05/01 19:35:09 tom Exp $")
#ifdef LINT
static short const parametrized[] =
&& !strcmp("ma", _nc_curr_token.tk_name)) {
/* tell max_attributes from arrow_key_map */
entry_ptr = _nc_find_type_entry("ma", NUMBER,
- _nc_get_table(_nc_syntax
- != 0));
+ _nc_syntax != 0);
assert(entry_ptr != 0);
} else if (token_type == STRING
&& !strcmp("MT", _nc_curr_token.tk_name)) {
/* map terminfo's string MT to MT */
entry_ptr = _nc_find_type_entry("MT", STRING,
- _nc_get_table(_nc_syntax
- != 0));
+ _nc_syntax != 0);
assert(entry_ptr != 0);
} else if (token_type == BOOLEAN
_nc_capcmp(const char *s, const char *t)
/* compare two string capabilities, stripping out padding */
{
- if (!s && !t)
+ if (!VALID_STRING(s) && !VALID_STRING(t))
return (0);
- else if (!s || !t)
+ else if (!VALID_STRING(s) || !VALID_STRING(t))
return (1);
for (;;) {
else if (PRESENT(backspace_if_not_bs))
cursor_left = backspace_if_not_bs;
}
- /* vi doesn't use "do", but it does seems to use nl (or '\n') instead */
+ /* vi doesn't use "do", but it does seem to use nl (or '\n') instead */
if (WANTED(cursor_down)) {
if (PRESENT(linefeed_if_not_lf))
cursor_down = linefeed_if_not_lf;
* isn't from mytinfo...
*/
if (PRESENT(other_non_function_keys)) {
- char *base = other_non_function_keys;
+ char *base;
char *bp, *cp, *dp;
struct name_table_entry const *from_ptr;
struct name_table_entry const *to_ptr;
} else
*dp++ = *bp;
}
- *dp++ = '\0';
+ *dp = '\0';
tp->Strings[to_ptr->nte_index] = _nc_save_str(buf2);
}