From 8ac3c4c25bea4b9948ab91cd00605bf34fc0bd72 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 29 Feb 2012 15:07:33 -0500 Subject: Have all visible internal function names end with an underscore. We haven't had a convention for naming internal functions in -internal.h versus naming visible functions in include/**.h. This patch changes every function declared in a -internal.h file to be named ending with an underscore. Static function names are unaffected, since there's no risk of calling them from outside Libevent. This is an automatic conversion. The script that produced was made by running the following script over the output of ctags --c-kinds=pf -o - *-internal.h | cut -f 1 | sort| uniq (GNU ctags was required.) ===== #!/usr/bin/perl -w -n use strict; BEGIN { print "#!/usr/bin/perl -w -i -p\n\n"; } chomp; my $ident = $_; next if ($ident =~ /_$/); next if ($ident =~ /^TAILQ/); my $better = "${ident}_"; print "s/(?ed_npending = 0; - evsig_init(base); + evsig_init_(base); return (evpd); } @@ -291,7 +291,7 @@ evport_dispatch(struct event_base *base, struct timeval *tv) if (fd != -1) { /* We might have cleared out this event; we need * to be sure that it's still set. */ - fdi = evmap_io_get_fdinfo(&base->io, fd); + fdi = evmap_io_get_fdinfo_(&base->io, fd); } if (fdi != NULL && FDI_HAS_EVENTS(fdi)) { @@ -326,7 +326,7 @@ evport_dispatch(struct event_base *base, struct timeval *tv) port_event_t *pevt = &pevtlist[i]; int fd = (int) pevt->portev_object; struct fd_info *fdi = pevt->portev_user; - /*EVUTIL_ASSERT(evmap_io_get_fdinfo(&base->io, fd) == fdi);*/ + /*EVUTIL_ASSERT(evmap_io_get_fdinfo_(&base->io, fd) == fdi);*/ check_evportop(epdp); check_event(pevt); @@ -353,7 +353,7 @@ evport_dispatch(struct event_base *base, struct timeval *tv) if (pevt->portev_events & (POLLERR|POLLHUP|POLLNVAL)) res |= EV_READ|EV_WRITE; - evmap_io_active(base, fd, res); + evmap_io_active_(base, fd, res); } /* end of all events gotten */ epdp->ed_npending = nevents; @@ -436,7 +436,7 @@ evport_dealloc(struct event_base *base) { struct evport_data *evpd = base->evbase; - evsig_dealloc(base); + evsig_dealloc_(base); close(evpd->ed_port); -- cgit v1.2.1