Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Counting lines of a file Date: Sun, 16 Dec 2018 15:38:11 -0800 Organization: None to speak of Lines: 20 Message-ID: References: <20181216175017.osnsg7xnwhlvjvkk@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader01.eternal-september.org; posting-host="b404aef90da6b83638d2f6ac3cfb5ea7"; logging-data="30369"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+CnaHu0twPDA9OTj0GbZzk" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:1ZTrrlMWHLwfWHsIuKDiubbBPZo= sha1:ft5blM5KRyqTwhC0xZCueA4Qvvs= Xref: csiph.com comp.lang.c:138706 Jorgen Grahn writes: > On Sun, 2018-12-16, rbowman wrote: [...] >> There are several ports on CodeProject or Github for C, C++, and C#. >> Of all the POSIX functions that's one that is really missed. We have a >> lot of legacy code and whether it's "-pfoo" or "-p foo" depends on who >> wrote it. > > I think I'm missing some context, but normally in Unix, those two are > synonyms. It depends. "-pfoo" can be equivalent either to "-p foo" or to "-p -f -o -o", depending on how the 'p' option was defined in the optstring argument passed to the getopt() function. -- Keith Thompson (The_Other_Keith) kst@mib.org Will write code for food. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"