From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dZZD7-0003Py-Kp for barebox@lists.infradead.org; Mon, 24 Jul 2017 08:59:31 +0000 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Mon, 24 Jul 2017 10:59:04 +0200 Message-Id: <20170724085904.1349-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH v2] scripts: Provide script that helps using cpp defines in dcd tables To: barebox@lists.infradead.org VGhpcyBzY3JpcHQgd2FzIHVzZWQgdG8gaGVscCBjcmVhdGUgY29tbWl0IDhmNDI2OTkyYzU2MiAo IkFSTTogaW14OiB1c2UKcmVnaXN0ZXIgZGVmaW5lcyBpbiBpbXhjZmcgZmlsZXMgaW5zdGVhZCBv ZiBwbGFpbiBudW1iZXJzIikuCgpTaWduZWQtb2ZmLWJ5OiBVd2UgS2xlaW5lLUvDtm5pZyA8dS5r bGVpbmUta29lbmlnQHBlbmd1dHJvbml4LmRlPgotLS0KQ2hhbmdlcyBzaW5jZSB2MToKCiAtIGV4 cGxhaW4gcGVybCBQb2QgaW4gdGhlIGZpbGUgaW5zdGVhZCBvZiB0aGUgY29tbWl0IGxvZwogLSBt aW5vciB3aGl0ZXNwYWNlIGNsZWFudXAKCiBzY3JpcHRzL3JlZ3N1YnN0LnBsIHwgMTI5ICsrKysr KysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysKIDEgZmlsZSBj aGFuZ2VkLCAxMjkgaW5zZXJ0aW9ucygrKQogY3JlYXRlIG1vZGUgMTAwNzU1IHNjc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WZpbmVccysoW0EtWl8wLTldKilccysoMHhbMC05YS1m XSspLykgeworCQkJCQkJbXkgJHJlZ25hbWUgPSAkMTsKKwkJCQkJCW15ICRyZWdhZGRycmUgPSAk MiA9fiBzL14weDAqLzB4MFwqL3I7CisJCQkJCQkkcmVnbmFtZW1hcHskcmVnYWRkcnJlfSA9ICRy ZWduYW1lOworCQkJCQl9OworCQkJCX07CisKKwkJCQljbG9zZSgkZmQpOworCisJCQkJbGFzdDsK KwkJCX0KKwkJfQorCX0KK30KKword2hpbGUgKDw+KSB7CisJbXkgJGxpbmUgPSAkXzsKKworCWlm ICgvI2luY2x1ZGUgWyI8XSguKilbIj5dLykgeworCQlzY2FuICQxOworCX0KKworCWZvcmVhY2gg bXkgJHJlZ2FkZHIgKGtleXMgJXJlZ25hbWVtYXApIHsKKwkJJGxpbmUgPX4gcy8kcmVnYWRkci8k cmVnbmFtZW1hcHskcmVnYWRkcn0vZWk7CisJfQorCXByaW50ICRsaW5lOworfTsKLS0gCjIuMTEu MAoKCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCmJhcmVi b3ggbWFpbGluZyBsaXN0CmJhcmVib3hAbGlzdHMuaW5mcmFkZWFkLm9yZwpodHRwOi8vbGlzdHMu aW5mcmFkZWFkLm9yZy9tYWlsbWFuL2xpc3RpbmZvL2JhcmVib3gK