- return;
-} /* s_end() */
-
-int ignore_input() {
- char *ptr = obstack_next_free (&cond_obstack);
-
- /* We cannot ignore certain pseudo ops. */
- if (input_line_pointer[-1] == '.'
- && ((input_line_pointer[0] == 'i'
- && (!strncmp (input_line_pointer, "if", 2)
- || !strncmp (input_line_pointer, "ifdef", 5)
- || !strncmp (input_line_pointer, "ifndef", 6)))
- || (input_line_pointer[0] == 'e'
- && (!strncmp (input_line_pointer, "else", 4)
- || !strncmp (input_line_pointer, "endif", 5))))) {
- return 0;
+ struct conditional_frame *hold;
+
+ if (current_cframe == NULL)
+ {
+ as_bad (_("\".endif\" without \".if\""));
+ }
+ else
+ {
+ if (LISTING_SKIP_COND ()
+ && current_cframe->ignoring
+ && (current_cframe->previous_cframe == NULL
+ || ! current_cframe->previous_cframe->ignoring))
+ listing_list (1);
+
+ hold = current_cframe;
+ current_cframe = current_cframe->previous_cframe;
+ obstack_free (&cond_obstack, hold);
+ } /* if one pop too many */
+
+ if (flag_mri)
+ {
+ while (! is_end_of_line[(unsigned char) *input_line_pointer])
+ ++input_line_pointer;
+ }
+
+ demand_empty_rest_of_line ();
+}
+
+void
+s_else (int arg ATTRIBUTE_UNUSED)
+{
+ if (current_cframe == NULL)
+ {
+ as_bad (_("\".else\" without matching \".if\""));
+ }
+ else if (current_cframe->else_seen)
+ {
+ as_bad (_("duplicate \".else\""));
+ as_bad_where (current_cframe->else_file_line.file,
+ current_cframe->else_file_line.line,
+ _("here is the previous \".else\""));
+ as_bad_where (current_cframe->if_file_line.file,
+ current_cframe->if_file_line.line,
+ _("here is the previous \".if\""));
+ }
+ else
+ {
+ current_cframe->else_file_line.file
+ = as_where (¤t_cframe->else_file_line.line);
+
+ current_cframe->ignoring =
+ current_cframe->dead_tree | !current_cframe->ignoring;
+
+ if (LISTING_SKIP_COND ()
+ && (current_cframe->previous_cframe == NULL
+ || ! current_cframe->previous_cframe->ignoring))
+ {
+ if (! current_cframe->ignoring)
+ listing_list (1);
+ else
+ listing_list (2);