=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/patch/ed.c,v retrieving revision 1.1 retrieving revision 1.2 diff -c -r1.1 -r1.2 *** src/usr.bin/patch/ed.c 2015/10/16 07:33:47 1.1 --- src/usr.bin/patch/ed.c 2016/02/22 19:31:38 1.2 *************** *** 1,4 **** ! /* $OpenBSD: ed.c,v 1.1 2015/10/16 07:33:47 tobias Exp $ */ /* * Copyright (c) 2015 Tobias Stoeckmann --- 1,4 ---- ! /* $OpenBSD: ed.c,v 1.2 2016/02/22 19:31:38 tobias Exp $ */ /* * Copyright (c) 2015 Tobias Stoeckmann *************** *** 121,143 **** continue; } ! if (fsm == FSM_A) { ! nline = create_line(linepos); ! if (cline == NULL) ! LIST_INSERT_HEAD(&head, nline, entries); ! else ! LIST_INSERT_AFTER(cline, nline, entries); ! cline = nline; ! line_count++; ! } else if (fsm == FSM_I) { ! nline = create_line(linepos); ! if (cline == NULL) { ! LIST_INSERT_HEAD(&head, nline, entries); ! cline = nline; ! } else ! LIST_INSERT_BEFORE(cline, nline, entries); ! line_count++; ! } } next_intuit_at(linepos, p_input_line); --- 121,136 ---- continue; } ! nline = create_line(linepos); ! if (cline == NULL) ! LIST_INSERT_HEAD(&head, nline, entries); ! else if (fsm == FSM_A) ! LIST_INSERT_AFTER(cline, nline, entries); ! else ! LIST_INSERT_BEFORE(cline, nline, entries); ! cline = nline; ! line_count++; ! fsm = FSM_A; } next_intuit_at(linepos, p_input_line);