]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/comp_scan.c
ncurses 5.7 - patch 20090808
[ncurses.git] / ncurses / tinfo / comp_scan.c
index 140960a8c239b5f6fcbf799fa79a4fb991e74a73..e747effcae6df501bf46ea7517642fb847abb819 100644 (file)
@@ -51,7 +51,7 @@
 #include <term_entry.h>
 #include <tic.h>
 
-MODULE_ID("$Id: comp_scan.c,v 1.82 2008/08/04 20:25:03 tom Exp $")
+MODULE_ID("$Id: comp_scan.c,v 1.84 2009/05/09 16:37:42 tom Exp $")
 
 /*
  * Maximum length of string capability we'll accept before raising an error.
@@ -61,19 +61,13 @@ MODULE_ID("$Id: comp_scan.c,v 1.82 2008/08/04 20:25:03 tom Exp $")
 
 #define iswhite(ch)    (ch == ' '  ||  ch == '\t')
 
-NCURSES_EXPORT_VAR(int)
-_nc_syntax = 0;                        /* termcap or terminfo? */
-NCURSES_EXPORT_VAR(long)
-_nc_curr_file_pos = 0;         /* file offset of current line */
-NCURSES_EXPORT_VAR(long)
-_nc_comment_start = 0;         /* start of comment range before name */
-NCURSES_EXPORT_VAR(long)
-_nc_comment_end = 0;           /* end of comment range before name */
-NCURSES_EXPORT_VAR(long)
-_nc_start_line = 0;            /* start line of current entry */
-
-NCURSES_EXPORT_VAR(struct token)
-_nc_curr_token =
+NCURSES_EXPORT_VAR (int) _nc_syntax = 0;         /* termcap or terminfo? */
+NCURSES_EXPORT_VAR (long) _nc_curr_file_pos = 0; /* file offset of current line */
+NCURSES_EXPORT_VAR (long) _nc_comment_start = 0; /* start of comment range before name */
+NCURSES_EXPORT_VAR (long) _nc_comment_end = 0;   /* end of comment range before name */
+NCURSES_EXPORT_VAR (long) _nc_start_line = 0;    /* start line of current entry */
+
+NCURSES_EXPORT_VAR (struct token) _nc_curr_token =
 {
     0, 0, 0
 };
@@ -91,8 +85,7 @@ static int pushtype;          /* type of pushback token */
 static char *pushname;
 
 #if NCURSES_EXT_FUNCS
-NCURSES_EXPORT_VAR(bool)
-_nc_disable_period = FALSE;    /* used by tic -a option */
+NCURSES_EXPORT_VAR (bool) _nc_disable_period = FALSE; /* used by tic -a option */
 #endif
 
 /*****************************************************************************
@@ -300,7 +293,7 @@ eat_escaped_newline(int ch)
        ((tok_ptr - tok_buf) < (TOK_BUF_SIZE - 2))
 
 #define AddCh(ch) \
-       *tok_ptr++ = ch; \
+       *tok_ptr++ = (char) ch; \
        *tok_ptr = '\0'
 
 /*
@@ -519,7 +512,7 @@ _nc_get_token(bool silent)
                ch = *after_name;
                *after_name = '\0';
                _nc_set_type(tok_buf);
-               *after_name = ch;
+               *after_name = (char) ch;
            }
 
            /*
@@ -604,7 +597,7 @@ _nc_get_token(bool silent)
            case '#':
                found = 0;
                while (isalnum(ch = next_char())) {
-                   numbuf[found++] = ch;
+                   numbuf[found++] = (char) ch;
                    if (found >= sizeof(numbuf) - 1)
                        break;
                }
@@ -637,7 +630,8 @@ _nc_get_token(bool silent)
                /* just to get rid of the compiler warning */
                type = UNDEF;
                if (!silent)
-                   _nc_warning("Illegal character - '%s'", unctrl((chtype) ch));
+                   _nc_warning("Illegal character - '%s'",
+                               unctrl((chtype) ch));
            }
        }                       /* end else (first_column == FALSE) */
     }                          /* end else (ch != EOF) */
@@ -868,7 +862,7 @@ _nc_trans_string(char *ptr, char *last)
 
        if (!ignored) {
            if (_nc_curr_col <= 1) {
-               push_back(ch);
+               push_back((char) ch);
                ch = '\n';
                break;
            }