On Mon, Jan 29, 2007, Jason McIntyre wrote: > ah, ok. it is not 4 options (-s, -a, -f, and -e), but one (-safe, as in > "not in danger"). that's why it is described as a "...first (and not > very reliable) approximation to a ``safe'' version of awk." > > you are confusing that with the -f option, which does require an > argument: [prog | -f progfile] > > hence: > [-safe] [-V] > > and not the more usual: > [-safeV] > > hope that's clear ;)
Hi again, Jason. Indeed, both Philip and you are right. I was expecting "-safe" to be four options instead of one. Indeed, the fifth one "-V" should then be added to the other options, but it is on a different block. A very good point! I am accustomed to single character options in Unix (perhaps this four character option is the reason main.c is not using getopt(3)). As the loop that manages the options passed to awk(1) has cases for both "s" and "f" I supposed "-safe" were four options, as POSIX guidelines recommend. But the "s" case includes a string comparison of the argument vector with "-safe", it is just the first character of -safe... ...after ten years using awk(1) I never observed that "-safe" was a single option! :-) ...I have received your last email right now. Ok, manage the patch as you want. If you prefer dropping these spaces I will understand. Same about the case for the "-m" options, if you feel it is not required do not apply this patch. I really trust on the way OpenBSD developers manage the changes for this operating system, it is one of the few operating systems I like, and I have not found a single change that I dislike on it. If you want these changes not to be applied, I am sure it will be the right decision. Indeed, awk(1) is maintained by Brian Kernighan. That is the reason I asked who should manage this issue. I agree with you, it is better sending the fixes upstream and importing them with a software version upgrade. Local changes are a nightmare, as these changes need to be applied each time the software is upgraded (and sometimes reimplemented, as the source code changes!). I can send the patches to Brian Kernighan, asking him to apply these changes to the awk(1) source code. Do you agree? If you prefer sending the patches yourself, let me know. Thank you very much to you and to Philip Guenther for the feedback on my mistake about the "-safe" option. Best regards, Igor.