[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] [PATCH] Rename and document functions that read from s
From: |
Eric Gillespie |
Subject: |
Re: [Nmh-workers] [PATCH] Rename and document functions that read from stdin. |
Date: |
Sun, 03 Apr 2016 19:43:33 +0000 |
Eric Gillespie <address@hidden> writes:
> - gans becomes read_switch
> - getans becomes read_switch_multiword
> - getans_via_readline becomes read_switch_multiword_via_readline
> - getanswer becomes read_yes_or_no_if_tty
> - install-mh.c geta becomes read_line
I noticed a comment I left on the xoauth branch about duplicating
geta out of install-mh.c and thought I'd break it out to sbr.
Instead, I found a whole pile of "getanswer" type functions, and
it took a while to suss out the differences.
I think we have some redundancies here. But I hope it's not
controversial to at least give them better names and comments.
But maybe people don't like my names; naming is hard :)
I think we could replace read_line with the core reading a line
parts of read_switch_multiword and reimplement read_switch to
call read_switch_multiword. I see no reason not to return both
the array and smatch result from read_switch_multiword .
Any objections?
Thanks.