X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=tack%2Fedit.c;h=2d1a780d36a8e747e644682516b29770306f117c;hp=5685d9253fe6a58d0d54eecc7732e10d2c590b13;hb=46722468f47c2b77b3987729b4bcf2321cccfd01;hpb=0eb88fc5281804773e2a0c7a488a4452463535ce diff --git a/tack/edit.c b/tack/edit.c index 5685d925..2d1a780d 100644 --- a/tack/edit.c +++ b/tack/edit.c @@ -23,7 +23,7 @@ #include #include -MODULE_ID("$Id: edit.c,v 1.3 1999/06/16 00:43:43 tom Exp $") +MODULE_ID("$Id: edit.c,v 1.8 2001/06/18 18:44:32 tom Exp $") /* * Terminfo edit features @@ -81,7 +81,7 @@ 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( @@ -170,7 +170,7 @@ show_info( /* ** 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( @@ -341,7 +341,7 @@ show_value( 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; @@ -556,18 +556,18 @@ mark_cap( ** ** Scan the name list and get the names. ** Enter each name into the can-test data base. -** ( and ) may be used as seperators. +** ( 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'; @@ -588,7 +588,7 @@ can_test( ** cap_index(name-list, index-list) ** ** Scan the name list and return a list of indexes. -** ( and ) may be used as seperators. +** ( and ) may be used as separators. ** This list is terminated with -1. */ void @@ -597,11 +597,11 @@ cap_index( 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) { @@ -629,7 +629,7 @@ cap_index( ** ** Scan the name list and see if the cap is in the list. ** Return TRUE if we find an exact match. -** ( and ) may be used as seperators. +** ( and ) may be used as separators. */ int cap_match( @@ -863,7 +863,7 @@ change_one_entry( 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; @@ -876,7 +876,7 @@ change_one_entry( 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; }