Skip to content
Permalink
Browse files

Replace egg_str[n]casecmp with str[c]cmp

* deletes strcasecmp() and strncasecmp() because they're posix 2001
* replaced all egg_str(n)casecmp() with str(c)cmp()

This patch gets rid of src/compat/strcasecmp.c and src/compat/strcasecmp.h. egg_str(n)casecmp() are left as is, but redefined to directly use str(n)casecmp() with a one-liner define in eggdrop.h. we only keep them for backward compatibility to (older) modules, and could remove it from later eggdrop versions when api breakage becomes possible.
  • Loading branch information...
michaelortmann authored and vanosg committed Jul 3, 2019
1 parent 98799b3 commit 71c032bf31a5e5757f3a864d03daad9e00ea1641
Showing with 573 additions and 691 deletions.
  1. +1 −1 configure.ac
  2. +68 −70 src/Makefile.in
  3. +19 −19 src/botcmd.c
  4. +4 −4 src/botmsg.c
  5. +24 −24 src/botnet.c
  6. +3 −3 src/chanprog.c
  7. +41 −42 src/cmds.c
  8. +14 −25 src/compat/Makefile.in
  9. +0 −1 src/compat/compat.h
  10. +0 −47 src/compat/strcasecmp.c
  11. +0 −44 src/compat/strcasecmp.h
  12. +14 −15 src/dcc.c
  13. +3 −3 src/dns.c
  14. +6 −2 src/eggdrop.h
  15. +3 −3 src/md5/Makefile.in
  16. +2 −2 src/mem.c
  17. +4 −5 src/misc.c
  18. +4 −4 src/mod/assoc.mod/Makefile
  19. +4 −4 src/mod/assoc.mod/assoc.c
  20. +5 −5 src/mod/blowfish.mod/Makefile
  21. +6 −6 src/mod/blowfish.mod/blowfish.c
  22. +6 −7 src/mod/channels.mod/Makefile
  23. +10 −10 src/mod/channels.mod/cmdschan.c
  24. +34 −34 src/mod/channels.mod/tclchan.c
  25. +5 −5 src/mod/channels.mod/udefchan.c
  26. +1 −1 src/mod/channels.mod/userchan.c
  27. +5 −6 src/mod/compress.mod/Makefile.in
  28. +4 −5 src/mod/console.mod/Makefile
  29. +4 −4 src/mod/ctcp.mod/Makefile
  30. +19 −19 src/mod/ctcp.mod/ctcp.c
  31. +4 −5 src/mod/dns.mod/Makefile.in
  32. +8 −8 src/mod/dns.mod/coredns.c
  33. +10 −10 src/mod/filesys.mod/Makefile
  34. +3 −3 src/mod/filesys.mod/files.c
  35. +5 −5 src/mod/filesys.mod/filesys.c
  36. +4 −4 src/mod/irc.mod/Makefile
  37. +3 −3 src/mod/irc.mod/chan.c
  38. +3 −3 src/mod/irc.mod/cmdsirc.c
  39. +2 −2 src/mod/irc.mod/msgcmds.c
  40. +2 −8 src/mod/module.h
  41. +4 −5 src/mod/notes.mod/Makefile
  42. +6 −6 src/mod/notes.mod/cmdsnote.c
  43. +22 −22 src/mod/notes.mod/notes.c
  44. +5 −5 src/mod/seen.mod/Makefile
  45. +18 −18 src/mod/seen.mod/seen.c
  46. +4 −5 src/mod/server.mod/Makefile
  47. +4 −4 src/mod/server.mod/cmdsserv.c
  48. +33 −33 src/mod/server.mod/server.c
  49. +8 −8 src/mod/server.mod/servmsg.c
  50. +12 −12 src/mod/server.mod/tclserv.c
  51. +5 −5 src/mod/share.mod/Makefile
  52. +10 −10 src/mod/share.mod/share.c
  53. +6 −6 src/mod/transfer.mod/Makefile
  54. +1 −1 src/mod/transfer.mod/tcltransfer.c
  55. +9 −9 src/mod/transfer.mod/transfer.c
  56. +10 −10 src/mod/transfer.mod/transferqueue.c
  57. +4 −4 src/mod/uptime.mod/Makefile
  58. +3 −4 src/mod/woobie.mod/Makefile
  59. +8 −9 src/modules.c
  60. +1 −1 src/net.c
  61. +1 −1 src/tcl.c
  62. +8 −8 src/tcldcc.c
  63. +11 −11 src/tclhash.c
  64. +3 −3 src/tcluser.c
  65. +6 −6 src/userent.c
  66. +8 −8 src/userrec.c
  67. +6 −6 src/users.c
@@ -111,7 +111,7 @@ AX_TYPE_SOCKLEN_T
AX_CREATE_STDINT_H([eggint.h])

# Checks for functions and their arguments.
AC_CHECK_FUNCS([clock dprintf getrandom getrusage inet_aton inet_ntop isascii random rand lrand48 setpgid snprintf strcasecmp strlcpy strncasecmp vsnprintf])
AC_CHECK_FUNCS([clock dprintf getrandom getrusage inet_aton inet_ntop isascii random rand lrand48 setpgid snprintf strlcpy vsnprintf])
AC_FUNC_SELECT_ARGTYPES
EGG_FUNC_VPRINTF
AC_FUNC_MMAP
@@ -85,154 +85,152 @@ eggdrop.h:
bg.o: bg.c main.h ../config.h ../eggint.h ../lush.h lang.h eggdrop.h \
compat/in6.h flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h \
chan.h users.h compat/compat.h compat/inet_aton.h ../src/main.h \
compat/snprintf.h compat/strcasecmp.h compat/inet_ntop.h \
compat/inet_pton.h compat/gethostbyname2.h compat/strlcpy.h bg.h
compat/snprintf.h compat/inet_ntop.h compat/inet_pton.h \
compat/gethostbyname2.h compat/strlcpy.h bg.h
botcmd.o: botcmd.c main.h ../config.h ../eggint.h ../lush.h lang.h \
eggdrop.h compat/in6.h flags.h proto.h misc_file.h cmdt.h tclegg.h \
tclhash.h chan.h users.h compat/compat.h compat/inet_aton.h \
../src/main.h compat/snprintf.h compat/strcasecmp.h compat/inet_ntop.h \
compat/inet_pton.h compat/gethostbyname2.h compat/strlcpy.h tandem.h \
modules.h mod/modvals.h
../src/main.h compat/snprintf.h compat/inet_ntop.h compat/inet_pton.h \
compat/gethostbyname2.h compat/strlcpy.h tandem.h modules.h \
mod/modvals.h
botmsg.o: botmsg.c main.h ../config.h ../eggint.h ../lush.h lang.h \
eggdrop.h compat/in6.h flags.h proto.h misc_file.h cmdt.h tclegg.h \
tclhash.h chan.h users.h compat/compat.h compat/inet_aton.h \
../src/main.h compat/snprintf.h compat/strcasecmp.h compat/inet_ntop.h \
compat/inet_pton.h compat/gethostbyname2.h compat/strlcpy.h tandem.h
../src/main.h compat/snprintf.h compat/inet_ntop.h compat/inet_pton.h \
compat/gethostbyname2.h compat/strlcpy.h tandem.h
botnet.o: botnet.c main.h ../config.h ../eggint.h ../lush.h lang.h \
eggdrop.h compat/in6.h flags.h proto.h misc_file.h cmdt.h tclegg.h \
tclhash.h chan.h users.h compat/compat.h compat/inet_aton.h \
../src/main.h compat/snprintf.h compat/strcasecmp.h compat/inet_ntop.h \
compat/inet_pton.h compat/gethostbyname2.h compat/strlcpy.h tandem.h
../src/main.h compat/snprintf.h compat/inet_ntop.h compat/inet_pton.h \
compat/gethostbyname2.h compat/strlcpy.h tandem.h
chanprog.o: chanprog.c main.h ../config.h ../eggint.h ../lush.h lang.h \
eggdrop.h compat/in6.h flags.h proto.h misc_file.h cmdt.h tclegg.h \
tclhash.h chan.h users.h compat/compat.h compat/inet_aton.h \
../src/main.h compat/snprintf.h compat/strcasecmp.h compat/inet_ntop.h \
compat/inet_pton.h compat/gethostbyname2.h compat/strlcpy.h modules.h \
mod/modvals.h
../src/main.h compat/snprintf.h compat/inet_ntop.h compat/inet_pton.h \
compat/gethostbyname2.h compat/strlcpy.h modules.h mod/modvals.h
cmds.o: cmds.c main.h ../config.h ../eggint.h ../lush.h lang.h eggdrop.h \
compat/in6.h flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h \
chan.h users.h compat/compat.h compat/inet_aton.h ../src/main.h \
compat/snprintf.h compat/strcasecmp.h compat/inet_ntop.h \
compat/inet_pton.h compat/gethostbyname2.h compat/strlcpy.h tandem.h \
modules.h mod/modvals.h
compat/snprintf.h compat/inet_ntop.h compat/inet_pton.h \
compat/gethostbyname2.h compat/strlcpy.h tandem.h modules.h \
mod/modvals.h
dcc.o: dcc.c main.h ../config.h ../eggint.h ../lush.h lang.h eggdrop.h \
compat/in6.h flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h \
chan.h users.h compat/compat.h compat/inet_aton.h ../src/main.h \
compat/snprintf.h compat/strcasecmp.h compat/inet_ntop.h \
compat/inet_pton.h compat/gethostbyname2.h compat/strlcpy.h modules.h \
mod/modvals.h tandem.h md5/md5.h
compat/snprintf.h compat/inet_ntop.h compat/inet_pton.h \
compat/gethostbyname2.h compat/strlcpy.h modules.h mod/modvals.h \
tandem.h md5/md5.h
dccutil.o: dccutil.c main.h ../config.h ../eggint.h ../lush.h lang.h \
eggdrop.h compat/in6.h flags.h proto.h misc_file.h cmdt.h tclegg.h \
tclhash.h chan.h users.h compat/compat.h compat/inet_aton.h \
../src/main.h compat/snprintf.h compat/strcasecmp.h compat/inet_ntop.h \
compat/inet_pton.h compat/gethostbyname2.h compat/strlcpy.h modules.h \
mod/modvals.h tandem.h
../src/main.h compat/snprintf.h compat/inet_ntop.h compat/inet_pton.h \
compat/gethostbyname2.h compat/strlcpy.h modules.h mod/modvals.h \
tandem.h
dns.o: dns.c main.h ../config.h ../eggint.h ../lush.h lang.h eggdrop.h \
compat/in6.h flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h \
chan.h users.h compat/compat.h compat/inet_aton.h ../src/main.h \
compat/snprintf.h compat/strcasecmp.h compat/inet_ntop.h \
compat/inet_pton.h compat/gethostbyname2.h compat/strlcpy.h dns.h
compat/snprintf.h compat/inet_ntop.h compat/inet_pton.h \
compat/gethostbyname2.h compat/strlcpy.h dns.h
flags.o: flags.c main.h ../config.h ../eggint.h ../lush.h lang.h \
eggdrop.h compat/in6.h flags.h proto.h misc_file.h cmdt.h tclegg.h \
tclhash.h chan.h users.h compat/compat.h compat/inet_aton.h \
../src/main.h compat/snprintf.h compat/strcasecmp.h compat/inet_ntop.h \
compat/inet_pton.h compat/gethostbyname2.h compat/strlcpy.h
../src/main.h compat/snprintf.h compat/inet_ntop.h compat/inet_pton.h \
compat/gethostbyname2.h compat/strlcpy.h
language.o: language.c main.h ../config.h ../eggint.h ../lush.h lang.h \
eggdrop.h compat/in6.h flags.h proto.h misc_file.h cmdt.h tclegg.h \
tclhash.h chan.h users.h compat/compat.h compat/inet_aton.h \
../src/main.h compat/snprintf.h compat/strcasecmp.h compat/inet_ntop.h \
compat/inet_pton.h compat/gethostbyname2.h compat/strlcpy.h
../src/main.h compat/snprintf.h compat/inet_ntop.h compat/inet_pton.h \
compat/gethostbyname2.h compat/strlcpy.h
main.o: main.c ../config.h main.h ../eggint.h ../lush.h lang.h eggdrop.h \
compat/in6.h flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h \
chan.h users.h compat/compat.h compat/inet_aton.h ../src/main.h \
compat/snprintf.h compat/strcasecmp.h compat/inet_ntop.h \
compat/inet_pton.h compat/gethostbyname2.h compat/strlcpy.h version.h \
modules.h mod/modvals.h tandem.h bg.h
compat/snprintf.h compat/inet_ntop.h compat/inet_pton.h \
compat/gethostbyname2.h compat/strlcpy.h version.h modules.h \
mod/modvals.h tandem.h bg.h
match.o: match.c main.h ../config.h ../eggint.h ../lush.h lang.h \
eggdrop.h compat/in6.h flags.h proto.h misc_file.h cmdt.h tclegg.h \
tclhash.h chan.h users.h compat/compat.h compat/inet_aton.h \
../src/main.h compat/snprintf.h compat/strcasecmp.h compat/inet_ntop.h \
compat/inet_pton.h compat/gethostbyname2.h compat/strlcpy.h
../src/main.h compat/snprintf.h compat/inet_ntop.h compat/inet_pton.h \
compat/gethostbyname2.h compat/strlcpy.h
mem.o: mem.c main.h ../config.h ../eggint.h ../lush.h lang.h eggdrop.h \
compat/in6.h flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h \
chan.h users.h compat/compat.h compat/inet_aton.h ../src/main.h \
compat/snprintf.h compat/strcasecmp.h compat/inet_ntop.h \
compat/inet_pton.h compat/gethostbyname2.h compat/strlcpy.h \
mod/modvals.h
compat/snprintf.h compat/inet_ntop.h compat/inet_pton.h \
compat/gethostbyname2.h compat/strlcpy.h mod/modvals.h
misc.o: misc.c main.h ../config.h ../eggint.h ../lush.h lang.h eggdrop.h \
compat/in6.h flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h \
chan.h users.h compat/compat.h compat/inet_aton.h ../src/main.h \
compat/snprintf.h compat/strcasecmp.h compat/inet_ntop.h \
compat/inet_pton.h compat/gethostbyname2.h compat/strlcpy.h tandem.h \
modules.h mod/modvals.h stat.h
compat/snprintf.h compat/inet_ntop.h compat/inet_pton.h \
compat/gethostbyname2.h compat/strlcpy.h tandem.h modules.h \
mod/modvals.h stat.h
misc_file.o: misc_file.c main.h ../config.h ../eggint.h ../lush.h lang.h \
eggdrop.h compat/in6.h flags.h proto.h misc_file.h cmdt.h tclegg.h \
tclhash.h chan.h users.h compat/compat.h compat/inet_aton.h \
../src/main.h compat/snprintf.h compat/strcasecmp.h compat/inet_ntop.h \
compat/inet_pton.h compat/gethostbyname2.h compat/strlcpy.h stat.h
../src/main.h compat/snprintf.h compat/inet_ntop.h compat/inet_pton.h \
compat/gethostbyname2.h compat/strlcpy.h stat.h
modules.o: modules.c main.h ../config.h ../eggint.h ../lush.h lang.h \
eggdrop.h compat/in6.h flags.h proto.h misc_file.h cmdt.h tclegg.h \
tclhash.h chan.h users.h compat/compat.h compat/inet_aton.h \
../src/main.h compat/snprintf.h compat/strcasecmp.h compat/inet_ntop.h \
compat/inet_pton.h compat/gethostbyname2.h compat/strlcpy.h modules.h \
mod/modvals.h tandem.h md5/md5.h
../src/main.h compat/snprintf.h compat/inet_ntop.h compat/inet_pton.h \
compat/gethostbyname2.h compat/strlcpy.h modules.h mod/modvals.h \
tandem.h md5/md5.h
net.o: net.c main.h ../config.h ../eggint.h ../lush.h lang.h eggdrop.h \
compat/in6.h flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h \
chan.h users.h compat/compat.h compat/inet_aton.h ../src/main.h \
compat/snprintf.h compat/strcasecmp.h compat/inet_ntop.h \
compat/inet_pton.h compat/gethostbyname2.h compat/strlcpy.h
compat/snprintf.h compat/inet_ntop.h compat/inet_pton.h \
compat/gethostbyname2.h compat/strlcpy.h
rfc1459.o: rfc1459.c main.h ../config.h ../eggint.h ../lush.h lang.h \
eggdrop.h compat/in6.h flags.h proto.h misc_file.h cmdt.h tclegg.h \
tclhash.h chan.h users.h compat/compat.h compat/inet_aton.h \
../src/main.h compat/snprintf.h compat/strcasecmp.h compat/inet_ntop.h \
compat/inet_pton.h compat/gethostbyname2.h compat/strlcpy.h
../src/main.h compat/snprintf.h compat/inet_ntop.h compat/inet_pton.h \
compat/gethostbyname2.h compat/strlcpy.h
tcl.o: tcl.c main.h ../config.h ../eggint.h ../lush.h lang.h eggdrop.h \
compat/in6.h flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h \
chan.h users.h compat/compat.h compat/inet_aton.h ../src/main.h \
compat/snprintf.h compat/strcasecmp.h compat/inet_ntop.h \
compat/inet_pton.h compat/gethostbyname2.h compat/strlcpy.h
compat/snprintf.h compat/inet_ntop.h compat/inet_pton.h \
compat/gethostbyname2.h compat/strlcpy.h
tcldcc.o: tcldcc.c main.h ../config.h ../eggint.h ../lush.h lang.h \
eggdrop.h compat/in6.h flags.h proto.h misc_file.h cmdt.h tclegg.h \
tclhash.h chan.h users.h compat/compat.h compat/inet_aton.h \
../src/main.h compat/snprintf.h compat/strcasecmp.h compat/inet_ntop.h \
compat/inet_pton.h compat/gethostbyname2.h compat/strlcpy.h tandem.h \
modules.h mod/modvals.h
../src/main.h compat/snprintf.h compat/inet_ntop.h compat/inet_pton.h \
compat/gethostbyname2.h compat/strlcpy.h tandem.h modules.h \
mod/modvals.h
tclhash.o: tclhash.c main.h ../config.h ../eggint.h ../lush.h lang.h \
eggdrop.h compat/in6.h flags.h proto.h misc_file.h cmdt.h tclegg.h \
tclhash.h chan.h users.h compat/compat.h compat/inet_aton.h \
../src/main.h compat/snprintf.h compat/strcasecmp.h compat/inet_ntop.h \
compat/inet_pton.h compat/gethostbyname2.h compat/strlcpy.h
../src/main.h compat/snprintf.h compat/inet_ntop.h compat/inet_pton.h \
compat/gethostbyname2.h compat/strlcpy.h
tclmisc.o: tclmisc.c main.h ../config.h ../eggint.h ../lush.h lang.h \
eggdrop.h compat/in6.h flags.h proto.h misc_file.h cmdt.h tclegg.h \
tclhash.h chan.h users.h compat/compat.h compat/inet_aton.h \
../src/main.h compat/snprintf.h compat/strcasecmp.h compat/inet_ntop.h \
compat/inet_pton.h compat/gethostbyname2.h compat/strlcpy.h modules.h \
mod/modvals.h tandem.h md5/md5.h
../src/main.h compat/snprintf.h compat/inet_ntop.h compat/inet_pton.h \
compat/gethostbyname2.h compat/strlcpy.h modules.h mod/modvals.h \
tandem.h md5/md5.h
tcluser.o: tcluser.c main.h ../config.h ../eggint.h ../lush.h lang.h \
eggdrop.h compat/in6.h flags.h proto.h misc_file.h cmdt.h tclegg.h \
tclhash.h chan.h users.h compat/compat.h compat/inet_aton.h \
../src/main.h compat/snprintf.h compat/strcasecmp.h compat/inet_ntop.h \
compat/inet_pton.h compat/gethostbyname2.h compat/strlcpy.h tandem.h \
modules.h mod/modvals.h
../src/main.h compat/snprintf.h compat/inet_ntop.h compat/inet_pton.h \
compat/gethostbyname2.h compat/strlcpy.h tandem.h modules.h \
mod/modvals.h
tls.o: tls.c main.h ../config.h ../eggint.h ../lush.h lang.h eggdrop.h \
compat/in6.h flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h \
chan.h users.h compat/compat.h compat/inet_aton.h ../src/main.h \
compat/snprintf.h compat/strcasecmp.h compat/inet_ntop.h \
compat/inet_pton.h compat/gethostbyname2.h compat/strlcpy.h
compat/snprintf.h compat/inet_ntop.h compat/inet_pton.h \
compat/gethostbyname2.h compat/strlcpy.h
userent.o: userent.c main.h ../config.h ../eggint.h ../lush.h lang.h \
eggdrop.h compat/in6.h flags.h proto.h misc_file.h cmdt.h tclegg.h \
tclhash.h chan.h users.h compat/compat.h compat/inet_aton.h \
../src/main.h compat/snprintf.h compat/strcasecmp.h compat/inet_ntop.h \
compat/inet_pton.h compat/gethostbyname2.h compat/strlcpy.h
../src/main.h compat/snprintf.h compat/inet_ntop.h compat/inet_pton.h \
compat/gethostbyname2.h compat/strlcpy.h
userrec.o: userrec.c main.h ../config.h ../eggint.h ../lush.h lang.h \
eggdrop.h compat/in6.h flags.h proto.h misc_file.h cmdt.h tclegg.h \
tclhash.h chan.h users.h compat/compat.h compat/inet_aton.h \
../src/main.h compat/snprintf.h compat/strcasecmp.h compat/inet_ntop.h \
compat/inet_pton.h compat/gethostbyname2.h compat/strlcpy.h modules.h \
mod/modvals.h tandem.h
../src/main.h compat/snprintf.h compat/inet_ntop.h compat/inet_pton.h \
compat/gethostbyname2.h compat/strlcpy.h modules.h mod/modvals.h \
tandem.h
users.o: users.c main.h ../config.h ../eggint.h ../lush.h lang.h \
eggdrop.h compat/in6.h flags.h proto.h misc_file.h cmdt.h tclegg.h \
tclhash.h chan.h users.h compat/compat.h compat/inet_aton.h \
../src/main.h compat/snprintf.h compat/strcasecmp.h compat/inet_ntop.h \
compat/inet_pton.h compat/gethostbyname2.h compat/strlcpy.h modules.h \
mod/modvals.h tandem.h
../src/main.h compat/snprintf.h compat/inet_ntop.h compat/inet_pton.h \
compat/gethostbyname2.h compat/strlcpy.h modules.h mod/modvals.h \
tandem.h

0 comments on commit 71c032b

Please sign in to comment.
You can’t perform that action at this time.