git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
952bd34f124e6212e02202f7ae05f67519ead086 blob 477 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
 
#!/bin/ape/sh
# Plan 9 C compiler rejects initialization a structure including bit field.
# usage: remove-bitfields.sh [dir ...]

if ! echo abc | sed 's/(ab)c/\1/' >/dev/null 2>&1
then
	alias sed='sed -E'
fi

trap 'rm -f /tmp/remove-bitfields.$pid; exit 1' 1 2 3 15 EXIT

files=$(du -a $* | awk '/\.[ch]$/ { print $2 }')
for i in $files
do
	sed '/(^[ 	]*\*|\?)/!s/([a-z]+[a-z0-9]*) *: *[0-9]+([,;])/\1\2/g' $i >/tmp/remove-bitfields.$pid
	cp /tmp/remove-bitfields.$pid $i
done
debug log:

solving 952bd34f12 ...
found 952bd34f12 in https://public-inbox.org/git/7abbd36e1ddc2037925c3ff148f62f0352a8954b.1566913575.git.gitgitgadget@gmail.com/

applying [1/1] https://public-inbox.org/git/7abbd36e1ddc2037925c3ff148f62f0352a8954b.1566913575.git.gitgitgadget@gmail.com/
diff --git a/remove-bitfields.sh b/remove-bitfields.sh
new file mode 100755
index 0000000000..952bd34f12

Checking patch remove-bitfields.sh...
Applied patch remove-bitfields.sh cleanly.

index at:
100755 952bd34f124e6212e02202f7ae05f67519ead086	remove-bitfields.sh

Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).