Commit Graph

45 Commits

Author SHA1 Message Date
d5795402d5 Close files and initialize variable as per cppcheck errors (#28) 2017-01-08 13:12:26 +01:00
4576f966af fixes a bug with strtol on mac 2017-01-06 14:22:58 +01:00
af85c0c255 Evaluate new 'designer' keyword and show it in box design information output #22 2016-01-05 22:39:11 +01:00
90f967adb3 Remove obsolete revision histories from source file headers 2015-01-11 23:15:48 +01:00
0a58a24763 Apply patch by Jakub Hrozek to eliminate a compilation warning on Fedora 2015-01-10 22:35:08 +01:00
2dccdbcc0d Moved boxes sources from RCS to git 2014-08-27 22:41:48 +02:00
92a5770124 Added support for --help and -? options, which do the same as -h
(This feature was requested by Raphael Wimmer).
2006-08-28 15:53:46 +00:00
c37a33617f Applied patch by Christoph Dreyer to support unexpansion of leading tabs
Added ability to retain leading tabs in their original positions
Mending a box with -m now implies -k false
2006-07-22 19:40:40 +00:00
f8df42aa6a Updated email and web addresses in comment header etc.
Applied patch by Elmar Loos that adds -m option for mending a box
Changed a few more things to make the box mending patch work in
connection with all the other boxes options
2006-07-12 05:49:50 +00:00
07d7260497 Added -c option (simple comment definition) 2000-04-01 18:27:17 +00:00
06eac718d2 Minor change to make boxes compile on DEC/OSF, too (S_ISDIR) 2000-03-21 14:26:31 +00:00
4d48f2c8ef Port to Win32 platform based on patches by Ron Aaron
Changes only affect Win32 version. Win32 behavior differs from the UNIX
platforms in the way the config file is searched and the config file
name (boxes.cfg).
2000-03-17 23:44:26 +00:00
532bd941b3 Eliminated use of PATH_MAX in order to ease porting
Restructured infile/outfile code to eliminate need for access() function
and improve readability
Added file type check before reading config file. boxes used to generate
a weird error message if the config file is a directory
1999-09-10 19:21:05 +00:00
70ba492f26 Bugfix: no-input-check must take place before indentation computation 1999-08-22 11:34:46 +00:00
97c7109f5d Added usage of system-wide config file (GLOBALCONF from boxes.h)
Moved config file selection code into it own function (get_config_file())
1999-08-21 23:33:03 +00:00
0f2a1703ce Updated usage information
Updated quickinfo (-l -d) with killblank default value
Made indentation computation into a function of its own (get_indent())
Bugfix: REVERSION code may change indentation -> recompute if necessary
1999-08-21 15:55:42 +00:00
2fa54261ea Added output of total number of designs for -l 1999-08-16 18:29:39 +00:00
affdb49a66 Added quickinfo mode to list_styles(). Called with -l and -d together. 1999-07-23 16:15:48 +00:00
657bcd2d5f Bugfix: Empty box sides were still counted when -s was specified (so
-s x5 would get you only three lines).
1999-07-21 16:53:17 +00:00
0d0c2325b7 Added GNU GPL disclaimer
Added -k option (kill leading/trailing blank lines on removal yes/no)
Bugfix: REPLACE and indentation conflict. Now applying regexp substitutions
only after indentation was already handled.
1999-07-20 18:45:29 +00:00
c761f463e0 Added include "config.h" to top of file 1999-07-12 18:16:36 +00:00
529c3f1f65 Added [lcr] "shorthand" to -a option 1999-06-30 12:37:25 +00:00
bce140bf46 Removed entire select_design stuff, because the parser now return much
smaller data structures. The first design pointed to by designs is always
the one we need (except for ops on *all* designs).
The first design in config file is now default design (no DEF_DESIGN anymore).
1999-06-30 12:16:38 +00:00
5717471559 Moved parser init and cleanup from main() to parser.y
Some further cleanup in main()
1999-06-28 12:19:29 +00:00
e9f3b88ef9 Bugfix: Mixed up SW and NE in padding calculation (tricky, that one)
Added indent mode command line option for grammar overrides
Moved empty_side() to shape.c after small change in signature
Added text-in-block justification (j) to alignment option (-a)
1999-06-25 18:46:39 +00:00
e88470677d Removed snprintf() and vsnprintf() prototypes (why were they in anyway?)
along with stdarg.h include
Exported input global data and empty_side() function
Declared non-exported functions static
Moved horiz_precalc(), vert_precalc(), horiz_assemble(), vert_assemble(),
horiz_generate(), vert_generate(), generate_box() and output_box() to a
new file generate.c
Moved best_match(), hmm(), detect_horiz(), detect_design(), remove_box()
and output_input() to a new file remove.c
1999-06-23 19:17:27 +00:00
5ffccab2b7 Improvements on design detection (could still be better though)
Moved iscorner(), on_side(), isempty(), shapecmp(), both_on_side(),
shape_distance(), empty_side(), highest(), and widest() as well as
some data structures and macros related to shapes to new file shape.c
1999-06-23 12:31:26 +00:00
46844f8983 DEBUGging is now activated in boxes.h
Moved MAX_TABSTOP, LINE_MAX macros to boxes.h
Moved BMAX, strrstr, btrim(), yyerror(), expand_tabs_into(), regerror(),
empty_line() to a new file tools.c, added #include tools.h
Some cleanup in main()
Declared style_sort() helper function static
Renamed strrstr() to my_strnrstr() (now defined in tools.c)
Default design is now defined by DEF_DESIGN macro
Moved struct opt_t to boxes.h
Bugfix: segfaulted if shape was bigger than input when detecting design
Bugfix: Padding was not removed when box was removed
Bugfix: Forgot null byte when removing west box side
Changed select_design(), because default design value now set in process_commandline()
1999-06-22 12:03:33 +00:00
e0b1b6f9bb Added code for padding handling (-p)
Added BMAX macro (returns maximum of two values)
1999-06-20 14:20:29 +00:00
c4cfb92c8a Moved line_t to boxes.h
empty_line() now also considers \r and \n whitespace
Added empty_side() function
Added handling of empty box sides in output_box()
1999-06-17 19:07:06 +00:00
f3bdc853b3 Removed a stray debug message
Move apply_substitutions() regexp handling function up in file
Use apply_substitutions() in read_input() routine also
Moved "extern int yyparse()" prototype to start of file
1999-06-15 12:07:39 +00:00
c033fef722 Bugfix: best_match() box side detection used numw instead of nume
Added apply_substitutions() routine for central regexp handling
Added regexp reversion code for box removal
Unified use of current_re[pv]rule
Added a few comments and debugging code
1999-06-14 12:08:49 +00:00
9ebc20ebc0 Some error message clean-up
Regular expression substituions on input text only if *drawing* a box,
not if the box is to be removed (requires other substitutions, TODO).
Added code for box design auto-detection when removing a box.
1999-06-13 15:28:31 +00:00
02b697659e Don't adjust indentation after removing a box unless something was
removed on the west side
East Padding made dynamic, i.e. dependant on the east side size
1999-06-04 18:13:26 +00:00
c0b7322493 a few fixes related to box removal (as expected) 1999-06-03 19:24:14 +00:00
5971b0994b lots of fixes
Added remove box functionality, which remains to be tested
1999-06-03 18:54:05 +00:00
34d7cf0022 Removed code related to OFFSET blocks (obsolete) 1999-04-09 13:32:55 +00:00
bbf133112c Added code for specification of indentation handling of input
Added regular expression substitutions
Some minor fixes
1999-04-04 16:09:01 +00:00
3271315a45 ... still programming ...
Added infile/outfile parameter code (pasted from tal, more or less)
Added code to remove trailing spaces from output lines
1999-04-02 18:42:44 +00:00
32e1584b43 ... still programming ...
Some bug fixes
Added size option (-s)
Added Alignment Option (-a)
It seems actually usable for drawing boxes :-)
1999-04-01 17:26:18 +00:00
3ac253d3b8 ... still programming ...
(some bug fixes and restructuring)
1999-03-31 17:34:21 +00:00
504284f942 Added minimum width/height for a design. Fixed screwed tiny boxes.
Did not handle zero input.
1999-03-30 13:30:19 +00:00
c267c43c63 ... still programming ...
(removed setlocale() call and locale.h include)
1999-03-30 09:36:23 +00:00
cc3348c999 ... still programming ... 1999-03-19 17:44:47 +00:00
8d7db8a263 Initial revision 1999-03-18 15:08:57 +00:00