**
** You should have received a copy of the GNU General Public License
** along with TACK; see the file COPYING. If not, write to
-** the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-** Boston, MA 02111-1307, USA.
+** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+** Boston, MA 02110-1301, USA
*/
#include <tack.h>
#include <time.h>
#include <tic.h>
-MODULE_ID("$Id: edit.c,v 1.3 1999/06/16 00:43:43 tom Exp $")
+MODULE_ID("$Id: edit.c,v 1.10 2005/09/17 19:49:16 tom Exp $")
/*
* Terminfo edit features
};
static char change_pad_text[MAX_CHANGES][80];
-struct test_list change_pad_list[MAX_CHANGES] = {
+static struct test_list change_pad_list[MAX_CHANGES] = {
{MENU_LAST, 0, 0, 0, 0, 0, 0}
};
build_change_menu, change_pad_list, 0, 0, 0
};
-extern struct test_results *pads[STRCOUNT]; /* save pad results here */
-
static TERMTYPE original_term; /* terminal type description */
static char flag_boolean[BOOLCOUNT]; /* flags for booleans */
static char flag_numerics[NUMCOUNT]; /* flags for numerics */
static char flag_strings[STRCOUNT]; /* flags for strings */
static int xon_index; /* Subscript for (xon) */
-int xon_shadow;
+static int xon_shadow;
static int start_display; /* the display has just started */
static int display_lines; /* number of lines displayed */
/*
** send_info_string(str)
**
-** Return the terminfo string prefixed by the correct seperator
+** Return the terminfo string prefixed by the correct separator
*/
static void
send_info_string(
/*
** save_info_string(str, fp)
**
-** Write the terminfo string prefixed by the correct seperator
+** Write the terminfo string prefixed by the correct separator
*/
static void
save_info_string(
switch (nt->nte_type) {
case STRING:
_nc_reset_input((FILE *) 0, buf);
- _nc_trans_string(tmp);
+ _nc_trans_string(tmp, tmp + sizeof(tmp));
s = (char *)malloc(strlen(tmp) + 1);
strcpy(s, tmp);
CUR Strings[nt->nte_index] = s;
**
** Scan the name list and get the names.
** Enter each name into the can-test data base.
-** <space> ( and ) may be used as seperators.
+** <space> ( and ) may be used as separators.
*/
void
can_test(
const char *s,
int flags)
{
- int ch, i, j;
+ int ch, j;
char name[32];
if (s) {
- for (i = j = 0; (name[j] = ch = *s); s++) {
+ for (j = 0; (name[j] = ch = *s); s++) {
if (ch == ' ' || ch == ')' || ch == '(') {
if (j) {
name[j] = '\0';
** cap_index(name-list, index-list)
**
** Scan the name list and return a list of indexes.
-** <space> ( and ) may be used as seperators.
+** <space> ( and ) may be used as separators.
** This list is terminated with -1.
*/
void
int *inx)
{
struct name_table_entry const *nt;
- int ch, i, j;
+ int ch, j;
char name[32];
if (s) {
- for (i = j = 0; ; s++) {
+ for (j = 0; ; s++) {
name[j] = ch = *s;
if (ch == ' ' || ch == ')' || ch == '(' || ch == 0) {
if (j) {
**
** Scan the name list and see if the cap is in the list.
** Return TRUE if we find an exact match.
-** <space> ( and ) may be used as seperators.
+** <space> ( and ) may be used as separators.
*/
int
cap_match(
ptextln("That string is not currently defined. Please enter a new value, including the padding delay:");
read_string(buf, sizeof(buf));
_nc_reset_input((FILE *) 0, buf);
- _nc_trans_string(pad);
+ _nc_trans_string(pad, pad + sizeof(pad));
t = (char *)malloc(strlen(pad) + 1);
strcpy(t, pad);
CUR Strings[x] = t;
putln(buf);
ptextln("Enter new pad. 0 for no pad. CR for no change.");
read_string(buf, 32);
- if (buf[0] == '\0' || (buf[1] == '\0' && isalpha(buf[0]))) {
+ if (buf[0] == '\0' || (buf[1] == '\0' && isalpha(UChar(buf[0])))) {
*chp = buf[0];
return;
}