[OPEN-ILS-DEV] PATCH: log.[ch] (localizing various things)

Scott McKellar mck9 at swbell.net
Sun Jun 17 22:02:01 EDT 2007


This patch tidies up log.h and log.c a bit, mostly by moving various
things from the former to the latter.  In all cases I verified that
no other source code referenced the things changed, apart from a
few spurious matches in some python modules.

1. Whenever a declared identifier had two leading underscores, I
removed the first one, except for a few cases where I removed the
second one and kept the first one.

2. I moved the following macros to log.c:

 OSRF_LOG_ERROR
 OSRF_LOG_WARNING
 OSRF_LOG_INFO 
 OSRF_LOG_DEBUG
 OSRF_LOG_INTERNAL
 OSRF_LOG_ACTIVITY
 OSRF_LOG_GO

3. I moved the prototypes for the following functions to log.c, and
declared them static:

 osrfLogSetType
 osrfLogSetLevel
 _osrfLogDetail
 _osrfLogToFile
 _osrfLogSetXid

4. I almost moved the prototype for osrfLogSetActivityEnabled(), but
then I noticed that nothing called it even in log.c.  So I left it
where it was, on the theory that it was intended for external
linkage even if nobody was using it yet.

5. I declared the following variables static:

 _osrfLogType
 _osrfLogFacility
 _osrfLogActFacility
 _osrfLogFile
 _osrfLogAppname
 _osrfLogLevel
 _osrfLogActivityEnabled
 _osrfLogIsClient
 _osrfLogXid
 _osrfLogXidPfx

6. I declared _osrfLogXidInc static, and also moved it into the 
osrfLogMkXid function, which is the only function that uses it.

Scott McKellar
http://home.swbell.net/mck9/aargh/

Developer's Certificate of Origin 1.1 By making a contribution to
this project, I certify that:

(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license indicated
in the file; or

(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source license
and I have the right under that license to submit that work with
modifications, whether created in whole or in part by me, under the
same open source license (unless I am permitted to submit under a
different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person
who certified (a), (b) or (c) and I have not modified it; and

(d) In the case of each of (a), (b), or (c), I understand and agree
that this project and the contribution are public and that a record
of the contribution (including all personal information I submit
with it, including my sign-off) is maintained indefinitely and may
be redistributed consistent with this project or the open source
license indicated in the file.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: log_c_2.patch
Type: text/x-patch
Size: 10662 bytes
Desc: 1802374936-log_c_2.patch
Url : http://list.georgialibraries.org/pipermail/open-ils-dev/attachments/20070617/aa0229e7/log_c_2.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: log_h_1.patch
Type: text/x-patch
Size: 1989 bytes
Desc: 45179679-log_h_1.patch
Url : http://list.georgialibraries.org/pipermail/open-ils-dev/attachments/20070617/aa0229e7/log_h_1.bin


More information about the Open-ils-dev mailing list