get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/956567/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 956567,
    "url": "http://patchwork.ozlabs.org/api/patches/956567/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20180811152820.26817-13-xypron.glpk@gmx.de/",
    "project": {
        "id": 18,
        "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api",
        "name": "U-Boot",
        "link_name": "uboot",
        "list_id": "u-boot.lists.denx.de",
        "list_email": "u-boot@lists.denx.de",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20180811152820.26817-13-xypron.glpk@gmx.de>",
    "list_archive_url": null,
    "date": "2018-08-11T15:28:17",
    "name": "[U-Boot,12/15] lib: charset: upper/lower case conversion",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "1fd0d3c4d1e435337db468558c671fc397e5bcc9",
    "submitter": {
        "id": 61270,
        "url": "http://patchwork.ozlabs.org/api/people/61270/?format=api",
        "name": "Heinrich Schuchardt",
        "email": "xypron.glpk@gmx.de"
    },
    "delegate": {
        "id": 3400,
        "url": "http://patchwork.ozlabs.org/api/users/3400/?format=api",
        "username": "agraf",
        "first_name": "Alexander",
        "last_name": "Graf",
        "email": "agraf@suse.de"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20180811152820.26817-13-xypron.glpk@gmx.de/mbox/",
    "series": [
        {
            "id": 60397,
            "url": "http://patchwork.ozlabs.org/api/series/60397/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=60397",
            "date": "2018-08-11T15:28:06",
            "name": "efi_loader: EFI_UNICODE_COLLATION_PROTOCOL",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/60397/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/956567/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/956567/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<u-boot-bounces@lists.denx.de>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org;\n\tdmarc=none (p=none dis=none) header.from=gmx.de"
        ],
        "Received": [
            "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 41nmMn26ZWz9s89\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSun, 12 Aug 2018 01:37:41 +1000 (AEST)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid C23CAC21D4A; Sat, 11 Aug 2018 15:33:16 +0000 (UTC)",
            "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id AD7EEC21E3A;\n\tSat, 11 Aug 2018 15:28:58 +0000 (UTC)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid 2C7A2C21DF3; Sat, 11 Aug 2018 15:28:52 +0000 (UTC)",
            "from mout.gmx.net (mout.gmx.net [212.227.17.22])\n\tby lists.denx.de (Postfix) with ESMTPS id 554ACC21D74\n\tfor <u-boot@lists.denx.de>; Sat, 11 Aug 2018 15:28:47 +0000 (UTC)",
            "from LT02.fritz.box ([88.152.14.153]) by mail.gmx.com (mrgmx102\n\t[212.227.17.174]) with ESMTPSA (Nemesis) id 0MbaS9-1fVc3U2u1t-00J2IE;\n\tSat, 11 Aug 2018 17:28:45 +0200"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=0.0 required=5.0 tests=FREEMAIL_FROM\n\tautolearn=unavailable autolearn_force=no version=3.4.0",
        "From": "Heinrich Schuchardt <xypron.glpk@gmx.de>",
        "To": "Alexander Graf <agraf@suse.de>",
        "Date": "Sat, 11 Aug 2018 17:28:17 +0200",
        "Message-Id": "<20180811152820.26817-13-xypron.glpk@gmx.de>",
        "X-Mailer": "git-send-email 2.18.0",
        "In-Reply-To": "<20180811152820.26817-1-xypron.glpk@gmx.de>",
        "References": "<20180811152820.26817-1-xypron.glpk@gmx.de>",
        "X-Provags-ID": "V03:K1:4yFyxoBMcq2hLfdI21I/RfapxOKbWRB40lTaobliqBvx0e9Bx8F\n\tVc4u6ww3eNqOsRb92XDkw02jxkn8klLQ6TjN3ZfZ1ebdK6CWcZ+5w8lPfpDVCZttAaGpylU\n\ttMgf7r6BznixbR9+mvncjzarz48DZd9cL7HMPTfaGnyyLg623lGgMUq4hHgX8a2eIvu6wiH\n\tlCdqTcZCoq9KYwo+2mzwA==",
        "X-UI-Out-Filterresults": "notjunk:1; V01:K0:waRaFVlz+Rk=:R8UcK9FyzOyEx1w7FA1HBA\n\tUXDC/kyPIVolimi9R38cwWvMIhKlFrVQi4x5w2RYSzxQ1w4cUCVte4igwRGU6VRjVpgJcxoxw\n\t3h2XaMAB4nPutkCD9Kcap0gOSZRG1xSAfilUF54ncR5Fj0gLoBEelnYDX/9J9LiPBHfa1bvbf\n\tpeWIbi7UYoF93cGRSlfCc5NgQ1NiLvrCI7qnyRkyJ+feAPTx4XVCP7laRk3tIt4nSEsy0V6De\n\tWSdWHfpjDyi2ix2c/9ZYL2kHwH4iAV/zPsWsU5ZMZ7stZAy1Ir/QOrkivEZjFTgVfyIbW03DS\n\tQxy0QThQp2Olw0ut5HCOjRXIUqg3Ftlig6LUJZWbCTzG3knaLc2CaOnErSpXvDENJRhSnjdZN\n\tUoSvm0UFuzskS/hAU4VnozvgeLaPEhBG78T35GpMZFngaffeHy5hc8NmqvUJh0AuselIxSUuB\n\til/TAm2Hfo8J1n5Ski2ZcaDZUBFxBkzhf9DClDhK1PQO09u24P1jZyG+H/dPoF3JKTI0RIZXv\n\tWvXvCVaNE/B1A3/OMVUSXoqydqhJN2bStXWGwyEPgsU8Wq2EZ3pZ9cFWbQhEwD0F27cnqgYSv\n\tcWQ6u2Qr42FD1EKEW/ZmvC4tb0Vee2xPElPyXubhPRxdQVQkVvk7I+Y5n7w6ec+fh2mkMHnf6\n\tKszzYNQz1j1sE1JOBFz2hX1ZS5knGHZo7l9rDCaeBloEWkdW5rp28WmyfZeNekwecQD6x+75L\n\tjYeZYT1pTqEyyMVJEd2PDwVxIqWIQTQWRxt6YOsmnJv4nRcYKl4jS63lMJA=",
        "Cc": "Heinrich Schuchardt <xypron.glpk@gmx.de>, u-boot@lists.denx.de",
        "Subject": "[U-Boot] [PATCH 12/15] lib: charset: upper/lower case conversion",
        "X-BeenThere": "u-boot@lists.denx.de",
        "X-Mailman-Version": "2.1.18",
        "Precedence": "list",
        "List-Id": "U-Boot discussion <u-boot.lists.denx.de>",
        "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>",
        "List-Archive": "<http://lists.denx.de/pipermail/u-boot/>",
        "List-Post": "<mailto:u-boot@lists.denx.de>",
        "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>",
        "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "base64",
        "Errors-To": "u-boot-bounces@lists.denx.de",
        "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>"
    },
    "content": "Provide functions for upper and lower case conversion.\n\nSigned-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>\n---\n include/charset.h | 16 ++++++++++++++++\n lib/charset.c     | 41 +++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 57 insertions(+)",
    "diff": "diff --git a/include/charset.h b/include/charset.h\nindex 1c0976dde6..6fdfaa9579 100644\n--- a/include/charset.h\n+++ b/include/charset.h\n@@ -142,6 +142,22 @@ int utf16_utf8_strncpy(char **dst, const u16 *src, size_t count);\n  */\n #define utf16_utf8_strcpy(d, s) utf16_utf8_strncpy((d), (s), SIZE_MAX)\n \n+/**\n+ * utf_to_lower() - convert a Unicode letter to lower case\n+ *\n+ * @code:\t\tletter to convert\n+ * Return:\t\tlower case letter or unchanged letter\n+ */\n+s32 utf_to_lower(const s32 code);\n+\n+/**\n+ * utf_to_upper() - convert a Unicode letter to upper case\n+ *\n+ * @code:\t\tletter to convert\n+ * Return:\t\tupper case letter or unchanged letter\n+ */\n+s32 utf_to_upper(const s32 code);\n+\n /**\n  * u16_strlen - count non-zero words\n  *\ndiff --git a/lib/charset.c b/lib/charset.c\nindex d2c723be3c..6531b56e85 100644\n--- a/lib/charset.c\n+++ b/lib/charset.c\n@@ -6,8 +6,12 @@\n  */\n \n #include <charset.h>\n+#include <capitalization.h>\n #include <malloc.h>\n \n+static struct capitalization_table capitalization_table[] =\n+\tUNICODE_CAPITALIZATION_TABLE;\n+\n s32 utf8_get(const char **src)\n {\n \ts32 code = 0;\n@@ -248,6 +252,43 @@ int utf16_utf8_strncpy(char **dst, const u16 *src, size_t count)\n \treturn 0;\n }\n \n+s32 utf_to_lower(const s32 code)\n+{\n+\tstruct capitalization_table *pos = capitalization_table;\n+\ts32 ret = code;\n+\n+\tif (code <= 0x7f) {\n+\t\tif (code >= 'A' && code <= 'Z')\n+\t\t\tret += 0x20;\n+\t\treturn ret;\n+\t}\n+\tfor (; pos->upper; ++pos) {\n+\t\tif (pos->upper == code) {\n+\t\t\tret = pos->lower;\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\treturn ret;\n+}\n+\n+s32 utf_to_upper(const s32 code)\n+{\n+\tstruct capitalization_table *pos = capitalization_table;\n+\ts32 ret = code;\n+\n+\tif (code <= 0x7f) {\n+\t\tif (code >= 'a' && code <= 'z')\n+\t\t\tret -= 0x20;\n+\t\treturn ret;\n+\t}\n+\tfor (; pos->lower; ++pos) {\n+\t\tif (pos->lower == code) {\n+\t\t\tret = pos->upper;\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\treturn ret;\n+}\n \n size_t u16_strlen(const u16 *in)\n {\n",
    "prefixes": [
        "U-Boot",
        "12/15"
    ]
}