]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/comp_scan.c
ncurses 5.7 - patch 20101204
[ncurses.git] / ncurses / tinfo / comp_scan.c
index bfbb0e25e9f50c6040be9a622ad7c43d08772007..48d3300287cfce8a9be1c17ae4be9c46966dc161 100644 (file)
@@ -50,7 +50,7 @@
 #include <ctype.h>
 #include <tic.h>
 
-MODULE_ID("$Id: comp_scan.c,v 1.87 2010/05/01 19:56:35 tom Exp $")
+MODULE_ID("$Id: comp_scan.c,v 1.88 2010/08/28 19:26:09 tom Exp $")
 
 /*
  * Maximum length of string capability we'll accept before raising an error.
@@ -203,6 +203,10 @@ next_char(void)
                if (fgets(result + used, (int) (allocated - used), yyin) != 0) {
                    bufstart = result;
                    if (used == 0) {
+                       if (_nc_curr_line == 0
+                           && IS_TIC_MAGIC(result)) {
+                           _nc_err_abort("This is a compiled terminal description, not a source");
+                       }
                        _nc_curr_line++;
                        _nc_curr_col = 0;
                    }