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/(?fd_array[i] = set->fd_array[set->fd_count]; - ent2 = evmap_io_get_fdinfo(&base->io, s2); + ent2 = evmap_io_get_fdinfo_(&base->io, s2); if (!ent2) /* This indicates a bug. */ return (0); @@ -199,7 +199,7 @@ win32_init(struct event_base *_base) winop->readset_out->fd_count = winop->writeset_out->fd_count = winop->exset_out->fd_count = 0; - if (evsig_init(_base) < 0) + if (evsig_init_(_base) < 0) winop->signals_are_broken = 1; return (winop); @@ -301,7 +301,7 @@ win32_dispatch(struct event_base *base, struct timeval *tv) win32op->readset_out->fd_count : win32op->writeset_out->fd_count; if (!fd_count) { - long msec = evutil_tv_to_msec(tv); + long msec = evutil_tv_to_msec_(tv); /* Sleep's DWORD argument is unsigned long */ if (msec < 0) msec = LONG_MAX; @@ -331,7 +331,7 @@ win32_dispatch(struct event_base *base, struct timeval *tv) if (++i >= win32op->readset_out->fd_count) i = 0; s = win32op->readset_out->fd_array[i]; - evmap_io_active(base, s, EV_READ); + evmap_io_active_(base, s, EV_READ); } } if (win32op->exset_out->fd_count) { @@ -340,7 +340,7 @@ win32_dispatch(struct event_base *base, struct timeval *tv) if (++i >= win32op->exset_out->fd_count) i = 0; s = win32op->exset_out->fd_array[i]; - evmap_io_active(base, s, EV_WRITE); + evmap_io_active_(base, s, EV_WRITE); } } if (win32op->writeset_out->fd_count) { @@ -350,7 +350,7 @@ win32_dispatch(struct event_base *base, struct timeval *tv) if (++i >= win32op->writeset_out->fd_count) i = 0; s = win32op->writeset_out->fd_array[i]; - evmap_io_active(base, s, EV_WRITE); + evmap_io_active_(base, s, EV_WRITE); } } return (0); @@ -361,7 +361,7 @@ win32_dealloc(struct event_base *_base) { struct win32op *win32op = _base->evbase; - evsig_dealloc(_base); + evsig_dealloc_(_base); if (win32op->readset_in) mm_free(win32op->readset_in); if (win32op->writeset_in) -- cgit v1.2.1