Remove the olsr-specific duplicated types
authorBernd Petrovitsch <bernd@firmix.at>
Thu, 27 Nov 2008 19:45:46 +0000 (20:45 +0100)
committerBernd Petrovitsch <bernd@firmix.at>
Thu, 27 Nov 2008 19:45:46 +0000 (20:45 +0100)
commitdb5e12d96993ff3d159a11c74a9d43e42355bb57
treece29267c91ca2e4474ade1d5968a83fadb4c5980
parent5b9593e1f3c63a3b8cd23808a0608b4ded24e4e3
Remove the olsr-specific duplicated types

Namely this are olsr_bool and the integer types with defined widhts.
For the first, we use <stdbool.h> as defined in C99 or emulate it. For
the latter, we use <stdint.h> or emulate it.

Apart from editing src/olsr_cfg.h by hand, the rest iwas done with
----  snip  ----
find src lib \( -name '*.[chy]' -o -name 'oscan.lex' \) -print | \
    xargs perl -w -i -p -e '\
        s/olsr_(u?)(8|16|32)_t/$1int$2_t/g;\
        s/olsr_bool/bool/g;\
        s/OLSR_TRUE/true/g;\
        s/OLSR_FALSE/false/g;'
----  snip  ----
Beware: The line breaks are there for readability. Just put the whole
on one line in your $SHELL.

If you have larger changes, the easiest forward proitng is probably:
- make a patch with your changes against the previous version (and
  save it away;-)
- `hg revert -a`
- `hg fetch`
- `perl -w -p -e '\
        s/olsr_(u?)(8|16|32)_t/$1int$2_t/g;\
        s/olsr_bool/bool/g;\
        s/OLSR_TRUE/true/g;\
        s/OLSR_FALSE/false/g;' < $YOUR_PATCH > $YOUR_PATCH-new`
- and apply your patch again.
For hg/mq people:
- `hg qpo -a`
- `hg fetch`
- `perl -w -i -p -e '\
        s/olsr_(u?)(8|16|32)_t/$1int$2_t/g;\
        s/olsr_bool/bool/g;\
        s/OLSR_TRUE/true/g;\
        s/OLSR_FALSE/false/g;' .hg/patches/*`
   Take care that you do not change the names in .hg/patches/series.
99 files changed:
lib/bmf/src/NetworkInterfaces.c
lib/bmf/src/olsrd_plugin.c
lib/dot_draw/src/olsrd_dot_draw.c
lib/dyn_gw/src/olsrd_dyn_gw.c
lib/dyn_gw_plain/src/olsrd_dyn_gw_plain.c
lib/httpinfo/src/admin_interface.c
lib/httpinfo/src/admin_interface.h
lib/httpinfo/src/olsrd_httpinfo.c
lib/httpinfo/src/olsrd_httpinfo.h
lib/nameservice/src/mapwrite.c
lib/nameservice/src/nameservice.c
lib/nameservice/src/nameservice.h
lib/nameservice/src/nameservice_msg.h
lib/pgraph/src/olsrd_pgraph.c
lib/secure/src/olsrd_secure.c
lib/secure/src/secure_messages.h
lib/tas/src/plugin.c
lib/txtinfo/src/olsrd_txtinfo.c
src/build_msg.c
src/build_msg.h
src/cfgparser/cfgfile_gen.c
src/cfgparser/olsrd_conf.c
src/cfgparser/olsrd_conf.h
src/cfgparser/oparse.y
src/cfgparser/oscan.lex
src/common/avl.h
src/common/list.h
src/duplicate_set.c
src/duplicate_set.h
src/generate_msg.c
src/hashing.c
src/hashing.h
src/hna_set.c
src/hna_set.h
src/hysteresis.c
src/hysteresis.h
src/interfaces.c
src/interfaces.h
src/ipc_frontend.c
src/ipcalc.c
src/ipcalc.h
src/link_set.c
src/link_set.h
src/linux/kernel_routes.c
src/linux/net.c
src/lq_mpr.c
src/lq_packet.c
src/lq_packet.h
src/lq_plugin.c
src/lq_plugin.h
src/lq_plugin_default_ff.c
src/lq_plugin_default_ff.h
src/lq_plugin_default_float.c
src/lq_plugin_default_float.h
src/lq_plugin_default_fpm.c
src/lq_plugin_default_fpm.h
src/main.c
src/mantissa.c
src/mantissa.h
src/mid_set.c
src/mid_set.h
src/mpr.c
src/mpr_selector_set.c
src/mpr_selector_set.h
src/neighbor_table.c
src/neighbor_table.h
src/net_olsr.c
src/net_olsr.h
src/net_os.h
src/olsr.c
src/olsr.h
src/olsr_cfg.h
src/olsr_cookie.c
src/olsr_cookie.h
src/olsr_protocol.h
src/olsr_spf.c
src/olsr_switch/main.c
src/olsr_switch/ohs_cmd.c
src/olsr_switch/olsr_host_switch.h
src/olsr_types.h
src/packet.h
src/parser.c
src/parser.h
src/print_packet.c
src/print_packet.h
src/process_package.c
src/process_package.h
src/process_routes.c
src/process_routes.h
src/routing_table.c
src/routing_table.h
src/scheduler.c
src/scheduler.h
src/tc_set.c
src/tc_set.h
src/two_hop_neighbor_table.c
src/two_hop_neighbor_table.h
src/unix/ifnet.c
src/win32/ifnet.c