]> Savannah Git Hosting - gnulib.git/commit
getopt: refactor long-option handling
authorZack Weinberg <zackw@panix.com>
Thu, 6 Apr 2017 18:14:14 +0000 (11:14 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 6 Apr 2017 22:42:04 +0000 (15:42 -0700)
commit62cb366ed444b20e7411ddedf2fc6d99958ad371
tree502e3d238958b2c9d6aff2725bd334c4522c15f2
parentef3ea3cc018210b9ae5cb6ee2f1de999667ce4be
getopt: refactor long-option handling

There were two copies of the bulk of the code to handle long options.
Now there is only one.

This change temporarily removes the logic to avoid using alloca when
standalone; the next patch in the series will restore it.

* lib/getopt.c (process_long_option): New function split out
from _getopt_internal_r.
(_getopt_internal_r): Replace both copies of the long-option
processing code with calls to process_long_option.
ChangeLog
lib/getopt.c