Commit graph

2 commits

Author SHA1 Message Date
George Koehler be1662dd15 Change the optional parameter of n_coerc() to a pointer
Fixes https://github.com/davidgiven/ack/issues/188

One call to n_coerc() omits the 6th and last argument.  This worked in
traditional K&R C, but stops working if we declare n_coerc() with a
prototype of all 6 parameters.

Change the last parameter to a pointer.  Declare n_coerc() with
prototype, so it now requires all 6 arguments.  Pass NULL when have no
iocc_t.  This NULL exists only to satisfy the prototype; n_coerc()
will not use this NULL.

A different fix would declare n_coerc() with 5 parameters and `...`,
then use <stdarg.h> to read the 6th argument when it exists.
2019-10-30 18:36:56 -04:00
carl 472654c366 ANSI C conversion and add procedure declarations. 2019-05-11 01:17:24 +08:00