Here's some changes I made last night to psql's common.c (as found in
Bruce Momjian <bruce@momjian.us>
Here's some changes I made last night to psql's common.c (as found in 7.3.2). It removes some code duplication and #ifdeffing, and some unstructured ugliness such as tacky breaks and an unneeded continue. Breaks up a large function into smaller functions and reduces required nesting levels, and kills a variable or two. Jeroen T. Vermeulen
Files
| Path | Change | +/− |
|---|---|---|
| src/bin/psql/common.c | modified | +286 −181 |
| src/bin/psql/common.h | modified | +3 −1 |
| src/bin/psql/copy.c | modified | +2 −4 |
| src/bin/psql/input.c | modified | +63 −38 |
| src/bin/psql/input.h | modified | +3 −2 |
| src/bin/psql/mainloop.c | modified | +2 −3 |