All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx.manpages@gmail.com>
To: linux-man@vger.kernel.org, Oskari Pirhonen <xxc3ncoredxx@gmail.com>
Cc: Brian Inglis <Brian.Inglis@Shaw.ca>,
	Matt Jolly <Matt.Jolly@footclan.ninja>,
	Guillem Jover <guillem@hadrons.org>
Subject: Re: Revert "Many Pages: Remove references to C89"
Date: Wed, 15 Mar 2023 15:22:52 +0100	[thread overview]
Message-ID: <c893343f-a92f-8a00-250d-728c851b1deb@gmail.com> (raw)
In-Reply-To: <6da28b50-e086-acde-6bb0-0409ada022d6@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1286 bytes --]

On 3/15/23 13:53, Alejandro Colomar wrote:
> Hi Oskari,
> 
> On 3/15/23 13:30, Alejandro Colomar wrote:
>> stdc89()
>> {
>>     grep "[[:alpha:]] \**\b$1([[:alnum:]*,. ]*);" /path/to/c89-draft.txt \
>>     | sort \
>>     | uniq;
>> }
> 
> I found a bug.  I was missing '_' in identifier names.  So it didn't
> match memcpy(3), which uses size_t.  Also, I found some spurious match,
> so added a '$' anchor after the ';'.
> 
> 
> stdc89()
> {
>     grep "[[:alpha:]] \**\b$1([[:alnum:]*,._ ]*);" /path/to/c89-draft.txt \
>     | sort \
>     | uniq;
> }
> 
> 
> This function finds 136 declarations in C89.  I'm not sure if that's
> all of them.  Is anyone missing any?

Actually, that was missing a few (multi-line declarations, signal(3),
which is quite weird, and asm()).  The following seems to be complete
(per the count of ';'):

$ cat stdc89 
#!/bin/sh

sed -n '/A.3 LIBRARY SUMMARY/,$p' <c89-draft.txt \
| pcregrep -M "(?s)\b$1 *\([[:alnum:]*,._\s\(\)-]*\);$";

$ ./stdc89 '[[:alpha:]][[:alnum:]_]+' \
  | grep ';' \
  | wc -l
146
$ sed -n '/A.3 LIBRARY SUMMARY/,$p' <c89-draft.txt \
  | grep '         .*);' \
  | wc -l
146


-- 
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2023-03-15 14:23 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10  1:51 Revert "Many Pages: Remove references to C89" Matt Jolly
2023-03-10  1:51 ` [PATCH] Revert "Many pages: " Matt Jolly
2023-03-10  2:22 ` Revert "Many Pages: " Alejandro Colomar
2023-03-10  5:00   ` Oskari Pirhonen
2023-03-10 13:29     ` Alejandro Colomar
2023-03-10 13:32       ` Alejandro Colomar
2023-03-13  1:42       ` Oskari Pirhonen
2023-03-13 12:00         ` Alejandro Colomar
2023-03-14  5:39           ` Oskari Pirhonen
2023-03-15 12:30             ` Alejandro Colomar
2023-03-15 12:53               ` Alejandro Colomar
2023-03-15 12:54                 ` Alejandro Colomar
2023-03-15 14:22                 ` Alejandro Colomar [this message]
2023-03-15 16:51               ` Brian Inglis
2023-03-15 17:01                 ` Alejandro Colomar
2023-03-15 18:10                   ` Tom Schwindl
2023-03-16  1:43                     ` Alejandro Colomar
2023-03-18  4:58                       ` Oskari Pirhonen
2023-03-22  1:20                         ` Alejandro Colomar
2023-03-15  4:36           ` Guillem Jover
2023-03-10  6:40   ` Brian Inglis
2023-03-10 12:49     ` Alejandro Colomar
2023-03-23  5:32   ` Sam James
2023-03-23 13:13     ` Alejandro Colomar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c893343f-a92f-8a00-250d-728c851b1deb@gmail.com \
    --to=alx.manpages@gmail.com \
    --cc=Brian.Inglis@Shaw.ca \
    --cc=Matt.Jolly@footclan.ninja \
    --cc=guillem@hadrons.org \
    --cc=linux-man@vger.kernel.org \
    --cc=xxc3ncoredxx@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.