$OpenBSD: patch-texk_web2c_luatexdir_tex_inputstack_w,v 1.1 2011/11/23 12:00:45 edd Exp $

line number fix on 2011 stable branch: http://tug.org/pipermail/tldistro/2011q4/000148.html

--- texk/web2c/luatexdir/tex/inputstack.w.origy	Tue Apr 12 15:17:47 2011
+++ texk/web2c/luatexdir/tex/inputstack.w	Sat Oct  1 13:48:55 2011
@@ -307,12 +307,13 @@ void show_context(void)
                                 print_int(iname - 1);
                             print_char('>');
                         };
-                    } else if (iindex != in_open) {     /* input from a pseudo file */
-                        tprint_nl("l.");
-                        print_int(line_stack[iindex + 1]);
                     } else {
                         tprint_nl("l.");
-                        print_int(line);
+                        if (iindex == in_open) {
+                            print_int(line);
+                        } else {     /* input from a pseudo file */
+                            print_int(line_stack[iindex + 1]);
+                        }
                     }
                     print_char(' ');
                     PSEUDO_PRINT_THE_LINE();
