mirror of
https://github.com/ascii-boxes/boxes.git
synced 2025-02-24 21:41:05 +01:00
Added GNU GPL disclaimer
Does not kill leading/trailing blank lines anymore when !opt.killblank Added include config.h
This commit is contained in:
parent
80846a69d1
commit
171a21b198
27
src/remove.c
27
src/remove.c
@ -2,23 +2,40 @@
|
||||
* File: remove.c
|
||||
* Project Main: boxes.c
|
||||
* Date created: June 23, 1999 (Wednesday, 20:59h)
|
||||
* Author: Thomas Jensen
|
||||
* Author: Copyright (C) 1999 Thomas Jensen
|
||||
* tsjensen@stud.informatik.uni-erlangen.de
|
||||
* Version: $Id: remove.c,v 1.1 1999/06/23 19:14:53 tsjensen Exp tsjensen $
|
||||
* Version: $Id: remove.c,v 1.2 1999/06/25 18:45:33 tsjensen Exp tsjensen $
|
||||
* Language: ANSI C
|
||||
* World Wide Web: http://home.pages.de/~jensen/boxes/
|
||||
* Purpose: Box removal, i.e. the deletion of boxes
|
||||
* Remarks: ---
|
||||
*
|
||||
* Remarks: o This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* o This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* o You should have received a copy of the GNU General Public
|
||||
* License along with this program; if not, write to the Free
|
||||
* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*
|
||||
* Revision History:
|
||||
*
|
||||
* $Log: remove.c,v $
|
||||
* Revision 1.2 1999/06/25 18:45:33 tsjensen
|
||||
* Added initialization of mmok to please compiler
|
||||
* Changed parameters of empty_side() calls to comply with new signature
|
||||
*
|
||||
* Revision 1.1 1999/06/23 19:14:53 tsjensen
|
||||
* Initial revision
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@ -28,7 +45,7 @@
|
||||
#include "remove.h"
|
||||
|
||||
static const char rcsid_remove_c[] =
|
||||
"$Id: remove.c,v 1.1 1999/06/23 19:14:53 tsjensen Exp tsjensen $";
|
||||
"$Id: remove.c,v 1.2 1999/06/25 18:45:33 tsjensen Exp tsjensen $";
|
||||
|
||||
|
||||
|
||||
@ -891,6 +908,7 @@ int remove_box()
|
||||
/*
|
||||
* Phase 4: Remove box top and body lines from input
|
||||
*/
|
||||
if (opt.killblank) {
|
||||
while (empty_line (input.lines+textstart) && textstart < textend) {
|
||||
#ifdef DEBUG
|
||||
fprintf (stderr, "Killing leading blank line in box body.\n");
|
||||
@ -903,6 +921,7 @@ int remove_box()
|
||||
#endif
|
||||
--textend;
|
||||
}
|
||||
}
|
||||
|
||||
if (textstart > boxstart) {
|
||||
for (j=boxstart; j<textstart; ++j)
|
||||
|
Loading…
Reference in New Issue
Block a user