From: Pablo Neira Ayuso <pablo(a)gnumonks.org>
Hi!
This is the first patchset that fixes the namespace pollution
in libosmocore.
You can find in the patch description the sed regular expression
to automate the replacement of the function/structure names, e.g:
s/struct counter/struct osmo_counter/g
s/counter_inc/osmo_counter_inc/g
s/counter_get/osmo_counter_get/g
s/counter_reset/osmo_counter_reset/g
s/counter_alloc/osmo_counter_alloc/g
s/counter_free/osmo_counter_free
You can use the following script:
cat /tmp/replace.txt | while read REPLACE
do
echo "performing sed \"$REPLACE\"..."
find ./ -type f -exec sed -i "$REPLACE" {} \;
done
The /tmp/replace.txt file have to contain the list of sed
regular expressions, one per line. Thus, you can get in sync
your branches in a couple of minutes.
The entire list of changes in this patchset is the following:
s/struct timer_list/struct osmo_timer_list/g
s/bsc_add_timer/osmo_timer_add/g
s/bsc_schedule_timer/osmo_timer_schedule/g
s/bsc_del_timer/osmo_timer_del/g
s/bsc_timer_pending/osmo_timer_pending/g
s/bsc_nearest_timer/osmo_timers_nearest/g
s/bsc_prepare_timers/osmo_timers_prepare/g
s/bsc_update_timers/osmo_timers_update/g
s/bsc_timer_check/osmo_timers_check/g
s/struct bsc_fd/struct osmo_fd/g
s/bsc_register_fd/osmo_fd_register/g
s/bsc_unregister_fd/osmo_fd_unregister/g
s/bsc_select_main/osmo_select_main/g
s/signal_cbfn/osmo_signal_cbfn/g
s/register_signal_handler/osmo_signal_register_handler/g
s/unregister_signal_handler/osmo_signal_unregister_handler/g
s/dispatch_signal/osmo_signal_dispatch/g
s/struct write_queue/struct osmo_wqueue/g
s/write_queue_init/osmo_wqueue_init/g
s/write_queue_clear/osmo_wqueue_clear/g
s/write_queue_enqueue/osmo_wqueue_enqueue/g
s/write_queue_bfd_cb/osmo_wqueue_bfd_cb/g
s/struct counter/struct osmo_counter/g
s/counter_inc/osmo_counter_inc/g
s/counter_get/osmo_counter_get/g
s/counter_reset/osmo_counter_reset/g
s/counter_alloc/osmo_counter_alloc/g
s/counter_free/osmo_counter_free/g
You can find it in the pablo/namespace branch.
Please, merge it!
Pablo Neira Ayuso (5):
timer: use namespace prefix osmo_timer*
select: use namespace prefix osmo_fd* and osmo_select*
signal: use namespace prefix osmo_signal*
write-queue: use namespace prefix osmo_wqueue*
statistics: use namespace prefix osmo_counter*
include/osmocom/core/select.h | 10 +++++-----
include/osmocom/core/signal.h | 15 +++++++--------
include/osmocom/core/statistics.h | 16 ++++++++--------
include/osmocom/core/timer.h | 20 ++++++++++----------
include/osmocom/core/write_queue.h | 22 +++++++++++-----------
include/osmocom/vty/telnet_interface.h | 2 +-
src/gsmtap_util.c | 12 ++++++------
src/rate_ctr.c | 6 +++---
src/select.c | 30 +++++++++++++++---------------
src/signal.c | 11 +++++++----
src/statistics.c | 15 ++++++++-------
src/timer.c | 29 +++++++++++++++--------------
src/vty/telnet_interface.c | 18 +++++++++---------
src/write_queue.c | 14 +++++++-------
tests/timer/timer_test.c | 18 +++++++++---------
15 files changed, 121 insertions(+), 117 deletions(-)
--
1.7.2.3