mirror of
https://github.com/ascii-boxes/boxes.git
synced 2025-08-16 09:48:08 +02:00
Bugfix: no-input-check must take place before indentation computation
This commit is contained in:
25
src/boxes.c
25
src/boxes.c
@ -3,7 +3,7 @@
|
|||||||
* Date created: March 18, 1999 (Thursday, 15:09h)
|
* Date created: March 18, 1999 (Thursday, 15:09h)
|
||||||
* Author: Copyright (C) 1999 Thomas Jensen
|
* Author: Copyright (C) 1999 Thomas Jensen
|
||||||
* tsjensen@stud.informatik.uni-erlangen.de
|
* tsjensen@stud.informatik.uni-erlangen.de
|
||||||
* Version: $Id: boxes.c,v 1.30 1999/08/21 15:55:42 tsjensen Exp tsjensen $
|
* Version: $Id: boxes.c,v 1.31 1999/08/21 23:33:03 tsjensen Exp tsjensen $
|
||||||
* Language: ANSI C
|
* Language: ANSI C
|
||||||
* Platforms: sunos5/sparc, for now
|
* Platforms: sunos5/sparc, for now
|
||||||
* World Wide Web: http://home.pages.de/~jensen/boxes/
|
* World Wide Web: http://home.pages.de/~jensen/boxes/
|
||||||
@ -48,6 +48,10 @@
|
|||||||
* Revision History:
|
* Revision History:
|
||||||
*
|
*
|
||||||
* $Log: boxes.c,v $
|
* $Log: boxes.c,v $
|
||||||
|
* Revision 1.31 1999/08/21 23:33:03 tsjensen
|
||||||
|
* Added usage of system-wide config file (GLOBALCONF from boxes.h)
|
||||||
|
* Moved config file selection code into it own function (get_config_file())
|
||||||
|
*
|
||||||
* Revision 1.30 1999/08/21 15:55:42 tsjensen
|
* Revision 1.30 1999/08/21 15:55:42 tsjensen
|
||||||
* Updated usage information
|
* Updated usage information
|
||||||
* Updated quickinfo (-l -d) with killblank default value
|
* Updated quickinfo (-l -d) with killblank default value
|
||||||
@ -186,10 +190,6 @@
|
|||||||
* Added minimum width/height for a design. Fixed screwed tiny boxes.
|
* Added minimum width/height for a design. Fixed screwed tiny boxes.
|
||||||
* Bugfix: Did not handle zero input.
|
* Bugfix: Did not handle zero input.
|
||||||
*
|
*
|
||||||
* Revision 1.3 1999/03/30 09:36:23 tsjensen
|
|
||||||
* ... still programming ...
|
|
||||||
* (removed setlocale() call and locale.h include)
|
|
||||||
*
|
|
||||||
* Revision 1.1 1999/03/18 15:09:17 tsjensen
|
* Revision 1.1 1999/03/18 15:09:17 tsjensen
|
||||||
* Initial revision
|
* Initial revision
|
||||||
*
|
*
|
||||||
@ -215,7 +215,7 @@ extern int optind, opterr, optopt; /* for getopt() */
|
|||||||
|
|
||||||
|
|
||||||
static const char rcsid_boxes_c[] =
|
static const char rcsid_boxes_c[] =
|
||||||
"$Id: boxes.c,v 1.30 1999/08/21 15:55:42 tsjensen Exp tsjensen $";
|
"$Id: boxes.c,v 1.31 1999/08/21 23:33:03 tsjensen Exp tsjensen $";
|
||||||
|
|
||||||
|
|
||||||
/* _\|/_
|
/* _\|/_
|
||||||
@ -1242,6 +1242,12 @@ static int read_all_input()
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Exit if there was no input at all
|
||||||
|
*/
|
||||||
|
if (input.lines == NULL || input.lines[0].text == NULL)
|
||||||
|
return 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Compute indentation
|
* Compute indentation
|
||||||
*/
|
*/
|
||||||
@ -1251,13 +1257,6 @@ static int read_all_input()
|
|||||||
else
|
else
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
/*
|
|
||||||
* Exit if there was no input at all
|
|
||||||
*/
|
|
||||||
if (input.lines == NULL || input.lines[0].text == NULL) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Remove indentation, unless we want to preserve it (when removing
|
* Remove indentation, unless we want to preserve it (when removing
|
||||||
* a box or if the user wants to retain it inside the box)
|
* a box or if the user wants to retain it inside the box)
|
||||||
|
Reference in New Issue
Block a user