tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: inetd enhancements: move definitions to header file
Date: Sun, 21 Mar 2021 19:35:54 -0700
From: James Browning <jamesbrowning137%gmail.com@localhost>
Message-ID: <20210322023554.42detea443b5dfnp@ThinkPad-T14s>
| Should we create a separate header file to move the servtab
| structure definition so we can move our new code into a separate C file,
Depends just how much new code is to be added. For more than a couple
of functions (or even that if they're very large) then yes, create a new
(local to inetd, not installed) header file, use that instead of the
struct definition (and any associated #define's) where it is now, and
add a new code file (or more than one if appropriate) for the new code.
If there's just a small(ish) addition (a few smallish functions) then just
adding them to inetd.c is fine.
But really, there are no hard and fast rules here - whatever feels like
it produces the best result. It isn't as if it cannot be altered later.
Sometimes the best is a new file for much of the new code, but some of it
that is more related to the old code in the old files.
kre
Home |
Main Index |
Thread Index |
Old Index