Unit Instance
Units API.
See the Weblate's Web API documentation for detailed description of the API.
GET /api/units/92225/?format=api
https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_developers-handbook/en/?format=api", "source": [ ";;;;;;; webvars.asm ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n;\n; Copyright (c) 2000 G. Adam Stanislav\n; All rights reserved.\n;\n; Redistribution and use in source and binary forms, with or without\n; modification, are permitted provided that the following conditions\n; are met:\n; 1. Redistributions of source code must retain the above copyright\n; notice, this list of conditions and the following disclaimer.\n; 2. Redistributions in binary form must reproduce the above copyright\n; notice, this list of conditions and the following disclaimer in the\n; documentation and/or other materials provided with the distribution.\n;\n; THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND\n; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n; ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n; OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n; HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n; OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n; SUCH DAMAGE.\n;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n;\n; Version 1.0\n;\n; Started:\t 8-Dec-2000\n; Updated:\t 8-Dec-2000\n;\n;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n%include\t'system.inc'\n\nsection\t.data\nhttp\tdb\t'Content-type: text/html', 0Ah, 0Ah\n\tdb\t'<?xml version=\"1.0\" encoding=\"utf-8\"?>', 0Ah\n\tdb\t'<!DOCTYPE html PUBLIC \"-//W3C/DTD XHTML Strict//EN\" '\n\tdb\t'\"DTD/xhtml1-strict.dtd\">', 0Ah\n\tdb\t'<html xmlns=\"http://www.w3.org/1999/xhtml\" '\n\tdb\t'xml.lang=\"en\" lang=\"en\">', 0Ah\n\tdb\t'<head>', 0Ah\n\tdb\t'<title>Web Environment</title>', 0Ah\n\tdb\t'<meta name=\"author\" content=\"G. Adam Stanislav\" />', 0Ah\n\tdb\t'</head>', 0Ah, 0Ah\n\tdb\t'<body bgcolor=\"#ffffff\" text=\"#000000\" link=\"#0000ff\" '\n\tdb\t'vlink=\"#840084\" alink=\"#0000ff\">', 0Ah\n\tdb\t'<div class=\"webvars\">', 0Ah\n\tdb\t'<h1>Web Environment</h1>', 0Ah\n\tdb\t'<p>The following <b>environment variables</b> are defined '\n\tdb\t'on this web server:</p>', 0Ah, 0Ah\n\tdb\t'<table align=\"center\" width=\"80\" border=\"0\" cellpadding=\"10\" '\n\tdb\t'cellspacing=\"0\" class=\"webvars\">', 0Ah\nhttplen\tequ\t$-http\nleft\tdb\t'<tr>', 0Ah\n\tdb\t'<td class=\"name\"><tt>'\nleftlen\tequ\t$-left\nmiddle\tdb\t'</tt></td>', 0Ah\n\tdb\t'<td class=\"value\"><tt><b>'\nmidlen\tequ\t$-middle\nundef\tdb\t'<i>(undefined)</i>'\nundeflen\tequ\t$-undef\nright\tdb\t'</b></tt></td>', 0Ah\n\tdb\t'</tr>', 0Ah\nrightlen\tequ\t$-right\nwrap\tdb\t'</table>', 0Ah\n\tdb\t'</div>', 0Ah\n\tdb\t'</body>', 0Ah\n\tdb\t'</html>', 0Ah, 0Ah\nwraplen\tequ\t$-wrap\n\nsection\t.text\nglobal\t_start\n_start:\n\t; First, send out all the http and xhtml stuff that is\n\t; needed before we start showing the environment\n\tpush\tdword httplen\n\tpush\tdword http\n\tpush\tdword stdout\n\tsys.write\n\n\t; Now find how far on the stack the environment pointers\n\t; are. We have 12 bytes we have pushed before \"argc\"\n\tmov\teax, [esp+12]\n\n\t; We need to remove the following from the stack:\n\t;\n\t;\tThe 12 bytes we pushed for sys.write\n\t;\tThe 4 bytes of argc\n\t;\tThe EAX*4 bytes of argv\n\t;\tThe 4 bytes of the NULL after argv\n\t;\n\t; Total:\n\t;\t20 + eax * 4\n\t;\n\t; Because stack grows down, we need to ADD that many bytes\n\t; to ESP.\n\tlea\tesp, [esp+20+eax*4]\n\tcld\t\t; This should already be the case, but let's be sure.\n\n\t; Loop through the environment, printing it out\n.loop:\n\tpop\tedi\n\tor\tedi, edi\t; Done yet?\n\tje\tnear .wrap\n\n\t; Print the left part of HTML\n\tpush\tdword leftlen\n\tpush\tdword left\n\tpush\tdword stdout\n\tsys.write\n\n\t; It may be tempting to search for the '=' in the env string next.\n\t; But it is possible there is no '=', so we search for the\n\t; terminating NUL first.\n\tmov\tesi, edi\t; Save start of string\n\tsub\tecx, ecx\n\tnot\tecx\t\t; ECX = FFFFFFFF\n\tsub\teax, eax\nrepne\tscasb\n\tnot\tecx\t\t; ECX = string length + 1\n\tmov\tebx, ecx\t; Save it in EBX\n\n\t; Now is the time to find '='\n\tmov\tedi, esi\t; Start of string\n\tmov\tal, '='\nrepne\tscasb\n\tnot\tecx\n\tadd\tecx, ebx\t; Length of name\n\n\tpush\tecx\n\tpush\tesi\n\tpush\tdword stdout\n\tsys.write\n\n\t; Print the middle part of HTML table code\n\tpush\tdword midlen\n\tpush\tdword middle\n\tpush\tdword stdout\n\tsys.write\n\n\t; Find the length of the value\n\tnot\tecx\n\tlea\tebx, [ebx+ecx-1]\n\n\t; Print \"undefined\" if 0\n\tor\tebx, ebx\n\tjne\t.value\n\n\tmov\tebx, undeflen\n\tmov\tedi, undef\n\n.value:\n\tpush\tebx\n\tpush\tedi\n\tpush\tdword stdout\n\tsys.write\n\n\t; Print the right part of the table row\n\tpush\tdword rightlen\n\tpush\tdword right\n\tpush\tdword stdout\n\tsys.write\n\n\t; Get rid of the 60 bytes we have pushed\n\tadd\tesp, byte 60\n\n\t; Get the next variable\n\tjmp\t.loop\n\n.wrap:\n\t; Print the rest of HTML\n\tpush\tdword wraplen\n\tpush\tdword wrap\n\tpush\tdword stdout\n\tsys.write\n\n\t; Return success\n\tpush\tdword 0\n\tsys.exit" ], "previous_source": "", "target": [ ";;;;;;; webvars.asm ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n;\n; Copyright (c) 2000 G. Adam Stanislav\n; All rights reserved.\n;\n; Redistribution and use in source and binary forms, with or without\n; modification, are permitted provided that the following conditions\n; are met:\n; 1. Redistributions of source code must retain the above copyright\n; notice, this list of conditions and the following disclaimer.\n; 2. Redistributions in binary form must reproduce the above copyright\n; notice, this list of conditions and the following disclaimer in the\n; documentation and/or other materials provided with the distribution.\n;\n; THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND\n; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n; ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n; OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n; HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n; OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n; SUCH DAMAGE.\n;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n;\n; Version 1.0\n;\n; Started:\t 8-Dec-2000\n; Updated:\t 8-Dec-2000\n;\n;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n%include\t'system.inc'\n\nsection\t.data\nhttp\tdb\t'Content-type: text/html', 0Ah, 0Ah\n\tdb\t'<?xml version=\"1.0\" encoding=\"utf-8\"?>', 0Ah\n\tdb\t'<!DOCTYPE html PUBLIC \"-//W3C/DTD XHTML Strict//EN\" '\n\tdb\t'\"DTD/xhtml1-strict.dtd\">', 0Ah\n\tdb\t'<html xmlns=\"http://www.w3.org/1999/xhtml\" '\n\tdb\t'xml.lang=\"en\" lang=\"en\">', 0Ah\n\tdb\t'<head>', 0Ah\n\tdb\t'<title>Web Environment</title>', 0Ah\n\tdb\t'<meta name=\"author\" content=\"G. Adam Stanislav\" />', 0Ah\n\tdb\t'</head>', 0Ah, 0Ah\n\tdb\t'<body bgcolor=\"#ffffff\" text=\"#000000\" link=\"#0000ff\" '\n\tdb\t'vlink=\"#840084\" alink=\"#0000ff\">', 0Ah\n\tdb\t'<div class=\"webvars\">', 0Ah\n\tdb\t'<h1>Web Environment</h1>', 0Ah\n\tdb\t'<p>The following <b>environment variables</b> are defined '\n\tdb\t'on this web server:</p>', 0Ah, 0Ah\n\tdb\t'<table align=\"center\" width=\"80\" border=\"0\" cellpadding=\"10\" '\n\tdb\t'cellspacing=\"0\" class=\"webvars\">', 0Ah\nhttplen\tequ\t$-http\nleft\tdb\t'<tr>', 0Ah\n\tdb\t'<td class=\"name\"><tt>'\nleftlen\tequ\t$-left\nmiddle\tdb\t'</tt></td>', 0Ah\n\tdb\t'<td class=\"value\"><tt><b>'\nmidlen\tequ\t$-middle\nundef\tdb\t'<i>(undefined)</i>'\nundeflen\tequ\t$-undef\nright\tdb\t'</b></tt></td>', 0Ah\n\tdb\t'</tr>', 0Ah\nrightlen\tequ\t$-right\nwrap\tdb\t'</table>', 0Ah\n\tdb\t'</div>', 0Ah\n\tdb\t'</body>', 0Ah\n\tdb\t'</html>', 0Ah, 0Ah\nwraplen\tequ\t$-wrap\n\nsection\t.text\nglobal\t_start\n_start:\n\t; First, send out all the http and xhtml stuff that is\n\t; needed before we start showing the environment\n\tpush\tdword httplen\n\tpush\tdword http\n\tpush\tdword stdout\n\tsys.write\n\n\t; Now find how far on the stack the environment pointers\n\t; are. We have 12 bytes we have pushed before \"argc\"\n\tmov\teax, [esp+12]\n\n\t; We need to remove the following from the stack:\n\t;\n\t;\tThe 12 bytes we pushed for sys.write\n\t;\tThe 4 bytes of argc\n\t;\tThe EAX*4 bytes of argv\n\t;\tThe 4 bytes of the NULL after argv\n\t;\n\t; Total:\n\t;\t20 + eax * 4\n\t;\n\t; Because stack grows down, we need to ADD that many bytes\n\t; to ESP.\n\tlea\tesp, [esp+20+eax*4]\n\tcld\t\t; This should already be the case, but let's be sure.\n\n\t; Loop through the environment, printing it out\n.loop:\n\tpop\tedi\n\tor\tedi, edi\t; Done yet?\n\tje\tnear .wrap\n\n\t; Print the left part of HTML\n\tpush\tdword leftlen\n\tpush\tdword left\n\tpush\tdword stdout\n\tsys.write\n\n\t; It may be tempting to search for the '=' in the env string next.\n\t; But it is possible there is no '=', so we search for the\n\t; terminating NUL first.\n\tmov\tesi, edi\t; Save start of string\n\tsub\tecx, ecx\n\tnot\tecx\t\t; ECX = FFFFFFFF\n\tsub\teax, eax\nrepne\tscasb\n\tnot\tecx\t\t; ECX = string length + 1\n\tmov\tebx, ecx\t; Save it in EBX\n\n\t; Now is the time to find '='\n\tmov\tedi, esi\t; Start of string\n\tmov\tal, '='\nrepne\tscasb\n\tnot\tecx\n\tadd\tecx, ebx\t; Length of name\n\n\tpush\tecx\n\tpush\tesi\n\tpush\tdword stdout\n\tsys.write\n\n\t; Print the middle part of HTML table code\n\tpush\tdword midlen\n\tpush\tdword middle\n\tpush\tdword stdout\n\tsys.write\n\n\t; Find the length of the value\n\tnot\tecx\n\tlea\tebx, [ebx+ecx-1]\n\n\t; Print \"undefined\" if 0\n\tor\tebx, ebx\n\tjne\t.value\n\n\tmov\tebx, undeflen\n\tmov\tedi, undef\n\n.value:\n\tpush\tebx\n\tpush\tedi\n\tpush\tdword stdout\n\tsys.write\n\n\t; Print the right part of the table row\n\tpush\tdword rightlen\n\tpush\tdword right\n\tpush\tdword stdout\n\tsys.write\n\n\t; Get rid of the 60 bytes we have pushed\n\tadd\tesp, byte 60\n\n\t; Get the next variable\n\tjmp\t.loop\n\n.wrap:\n\t; Print the rest of HTML\n\tpush\tdword wraplen\n\tpush\tdword wrap\n\tpush\tdword stdout\n\tsys.write\n\n\t; Return success\n\tpush\tdword 0\n\tsys.exit" ], "id_hash": 2170118971763590391, "content_hash": 2170118971763590391, "location": "book.translate.xml:11139", "context": "", "note": "(itstool) path: sect3/programlisting", "flags": "no-wrap", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 1807, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 792, "source_unit": "https://translate-dev.freebsd.org/api/units/92225/?format=api", "priority": 100, "id": 92225, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_developers-handbook/en/?checksum=9e1dcfb5004e04f7", "url": "https://translate-dev.freebsd.org/api/units/92225/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-11-02T20:37:24.163772Z" }{ "translation": "