CVSROOT: /cvs Module name: src Changes by: chel...@cvs.openbsd.org 2022/02/11 09:09:21
Modified files: usr.bin/tr : tr.c Log message: tr(1): rename lookup tables The lookup tables in tr(1) are called "string1" and "string2". This is misleading: - They aren't C strings, they are lookup tables. - The names "string1" and "string2" don't hint at what their contents actually mean. The meaning of a given table changes with tr(1)'s operating mode. There are five different modes. It would be considerably easier to see what is happening at a glance if the tables were named for their corresponding byte transformation. So instead of two tables named "string1" and "string2" we'll have three tables named "delete", "squeeze", and "translate". In addition, the "string" passed to the setup() function will be called a "table". With this patch the code in main() is way easier to understand. Hopefully this makes subsequent patches easier to review. Thread: https://marc.info/?l=openbsd-tech&m=164355980600901&w=2 No complaints on tech@ after over a week.