Date: Tue, 10 Jun 2008 17:56:24 GMT From: Marko Zec <zec@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 143245 for review Message-ID: <200806101756.m5AHuO6U016804@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=143245 Change 143245 by zec@zec_tpx32 on 2008/06/10 17:55:27 Introduce a script for automated renaming of global variables. The script searches for references of variable names in .c and .h files in the srcdir hierarchy, and prepends them with a "V_" prefix. The script also creates or updates a "vimage.h" file in the current directory containing macros which resolve V_ instances back to their original counterparts (e.g. V_rt_tables -> rt_tables). Best effort is made not to change any variable declarations nor field names in structure declarations and / or C-style comments. The script attempts to avoid changing structure names if they happen to have the same name as any of the requested variables (e.g. ifnet). So far the only manual intervention that has to be done on resulting sources is placement of #include <sys/vimage.h> lines in .c files for which the script couldn't figure out automatically that they require this #include. The resulting diff is ~550K in size, roughly half of the current delta between HEAD and projects/vimage in p4. The kernel and modules compile cleanly, as does the buildworld. Note that the script is _slow_ when operating over the entire sys tree. Affected files ... .. //depot/projects/vimage/var_rename.tcl#1 add Differences ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200806101756.m5AHuO6U016804>