<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.16">
  <compounddef id="kprintf_8c" kind="file" language="C++">
    <compoundname>kprintf.c</compoundname>
    <includes refid="kprintf_8h" local="no">lib/kprintf.h</includes>
    <includes refid="string_8h" local="no">string.h</includes>
    <includes refid="video_8h" local="no">sys/video.h</includes>
    <includes refid="kpanic_8h" local="no">ubixos/kpanic.h</includes>
    <incdepgraph>
      <node id="13">
        <label>sys/video.h</label>
        <link refid="video_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="10">
        <label>stdarg.h</label>
        <link refid="stdarg_8h"/>
      </node>
      <node id="14">
        <label>ubixos/kpanic.h</label>
        <link refid="kpanic_8h"/>
      </node>
      <node id="1">
        <label>C:/Dev/git/UbixOS/sys/lib/kprintf.c</label>
        <link refid="kprintf_8c"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="11" relation="include">
        </childnode>
        <childnode refid="13" relation="include">
        </childnode>
        <childnode refid="14" relation="include">
        </childnode>
      </node>
      <node id="12">
        <label>strings.h</label>
        <link refid="strings_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="5">
        <label>sys/select.h</label>
        <link refid="select_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="4" relation="include">
        </childnode>
        <childnode refid="7" relation="include">
        </childnode>
        <childnode refid="8" relation="include">
        </childnode>
        <childnode refid="9" relation="include">
        </childnode>
      </node>
      <node id="9">
        <label>sys/_sigset.h</label>
        <link refid="__sigset_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="11">
        <label>string.h</label>
        <link refid="string_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
      </node>
      <node id="3">
        <label>sys/types.h</label>
        <link refid="include_2sys_2types_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
        <childnode refid="5" relation="include">
        </childnode>
      </node>
      <node id="2">
        <label>lib/kprintf.h</label>
        <link refid="kprintf_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="10" relation="include">
        </childnode>
      </node>
      <node id="6">
        <label>sys/cdefs.h</label>
        <link refid="cdefs_8h"/>
      </node>
      <node id="4">
        <label>sys/_types.h</label>
        <link refid="__types_8h"/>
      </node>
      <node id="7">
        <label>sys/_timespec.h</label>
        <link refid="__timespec_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="8">
        <label>sys/_timeval.h</label>
        <link refid="__timeval_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
    </incdepgraph>
    <innerclass refid="unionuu" prot="public">uu</innerclass>
      <sectiondef kind="define">
      <memberdef kind="define" id="kprintf_8c_1a24f21637100d1f6ab4f21daccf7840fb" prot="public" static="no">
        <name>PCHAR</name>
        <param><defname>c</defname></param>
        <initializer>{int cc=(c); if (func) (*func)(cc,arg); else *d++ = cc; retval++; }</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/lib/kprintf.c" line="316" column="9"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="var">
      <memberdef kind="variable" id="kprintf_8c_1a20b3409b318c04fbc25a13dc10d1c34f" prot="public" static="no" mutable="no">
        <type>int</type>
        <definition>int ogprintOff</definition>
        <argsstring></argsstring>
        <name>ogprintOff</name>
        <initializer>= 0x1</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/lib/kprintf.c" line="257" column="5" bodyfile="C:/Dev/git/UbixOS/sys/lib/kprintf.c" bodystart="257" bodyend="-1"/>
        <referencedby refid="kprintf_8c_1ab2761bdf0cca73ad0fb5880895210cd8" compoundref="kprintf_8c" startline="259" endline="276">kprintf</referencedby>
        <referencedby refid="main_8cc_1aa6c38d07b193857fbaebc1656b89136e" compoundref="main_8cc" startline="51" endline="143">sdeThread</referencedby>
        <referencedby refid="i386_2systemtask_8c_1ac7cc6a806237f8657fcdce169319fd7f" compoundref="i386_2systemtask_8c" startline="46" endline="131">systemTask</referencedby>
      </memberdef>
      <memberdef kind="variable" id="kprintf_8c_1a813254cfe6d658ea82f1dcdf2d927fb8" prot="public" static="no" mutable="no">
        <type>int</type>
        <definition>int printOff</definition>
        <argsstring></argsstring>
        <name>printOff</name>
        <initializer>= 0x0</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/lib/kprintf.c" line="256" column="5" bodyfile="C:/Dev/git/UbixOS/sys/lib/kprintf.c" bodystart="256" bodyend="-1"/>
        <referencedby refid="kprintf_8c_1ab2761bdf0cca73ad0fb5880895210cd8" compoundref="kprintf_8c" startline="259" endline="276">kprintf</referencedby>
        <referencedby refid="main_8cc_1aa6c38d07b193857fbaebc1656b89136e" compoundref="main_8cc" startline="51" endline="143">sdeThread</referencedby>
        <referencedby refid="classogDisplay__UbixOS_1a63ff8d6ee36f49385885fd0cf64fba3f" compoundref="ogDisplay__UbixOS_8cc" startline="99" endline="203">ogDisplay_UbixOS::SetMode</referencedby>
        <referencedby refid="systemtask_8h_1ac7cc6a806237f8657fcdce169319fd7f" compoundref="armv6_2systemtask_8c" startline="47" endline="117">systemTask</referencedby>
      </memberdef>
      </sectiondef>
      <sectiondef kind="func">
      <memberdef kind="function" id="kprintf_8c_1a19096e3df18062999062c914a569c7d6" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="include_2sys_2types_8h_1a289ae7cf9c95157e99202b0057d4935c" kindref="member">u_quad_t</ref></type>
        <definition>u_quad_t __qdivrem</definition>
        <argsstring>(u_quad_t uq, u_quad_t vq, u_quad_t *arq)</argsstring>
        <name>__qdivrem</name>
        <param>
          <type><ref refid="include_2sys_2types_8h_1a289ae7cf9c95157e99202b0057d4935c" kindref="member">u_quad_t</ref></type>
          <declname>uq</declname>
        </param>
        <param>
          <type><ref refid="include_2sys_2types_8h_1a289ae7cf9c95157e99202b0057d4935c" kindref="member">u_quad_t</ref></type>
          <declname>vq</declname>
        </param>
        <param>
          <type><ref refid="include_2sys_2types_8h_1a289ae7cf9c95157e99202b0057d4935c" kindref="member">u_quad_t</ref> *</type>
          <declname>arq</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/lib/kprintf.c" line="56" column="10" bodyfile="C:/Dev/git/UbixOS/sys/lib/kprintf.c" bodystart="56" bodyend="246"/>
        <references refid="include_2sys_2types_8h_1a111da81ae5883147168bbb8366377b10" compoundref="include_2sys_2types_8h" startline="169">B</references>
        <references refid="include_2sys_2types_8h_1a152dd91c3a7a672cde53646a9cb62594" compoundref="include_2sys_2types_8h" startline="172">COMBINE</references>
        <references refid="include_2sys_2types_8h_1abec92cc72a096640b821b8cd56a02495" compoundref="include_2sys_2types_8h" startline="154">H</references>
        <references refid="include_2sys_2types_8h_1a92c7de42051862b2d44e2f0ccd9ca475" compoundref="include_2sys_2types_8h" startline="163">HHALF</references>
        <references refid="include_2sys_2types_8h_1aa73214aa5f2f94f63d90bb4e3d99fe53" compoundref="include_2sys_2types_8h" startline="155">L</references>
        <references refid="include_2sys_2types_8h_1adf04943239a977f38017d6bbf53a4b36" compoundref="include_2sys_2types_8h" startline="164">LHALF</references>
        <references refid="unionuu_1a3ce40dca10fdac763f032c2062fcb310" compoundref="kprintf_8c" startline="41">uu::q</references>
        <references refid="unionuu_1a8f74169d11a6ab4a569ec546a1704313" compoundref="kprintf_8c" startline="44">uu::ul</references>
        <references refid="unionuu_1a1acb113b0a5af8871b5634516981d300" compoundref="kprintf_8c" startline="42">uu::uq</references>
        <referencedby refid="kprintf_8c_1ac554d985a0e870553a095f47dfe65239" compoundref="kprintf_8c" startline="248" endline="254">__umoddi3</referencedby>
      </memberdef>
      <memberdef kind="function" id="kprintf_8c_1ab7978dc0d260912d53148af90d1c431c" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void __shl</definition>
        <argsstring>(register digit *p, register int len, register int sh)</argsstring>
        <name>__shl</name>
        <param>
          <type>register <ref refid="include_2sys_2types_8h_1adac711321b4eea0f286581348e66108c" kindref="member">digit</ref> *</type>
          <declname>p</declname>
        </param>
        <param>
          <type>register int</type>
          <declname>len</declname>
        </param>
        <param>
          <type>register int</type>
          <declname>sh</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/lib/kprintf.c" line="47" column="13" bodyfile="C:/Dev/git/UbixOS/sys/lib/kprintf.c" bodystart="47" bodyend="54"/>
      </memberdef>
      <memberdef kind="function" id="kprintf_8c_1ac554d985a0e870553a095f47dfe65239" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="include_2sys_2types_8h_1a289ae7cf9c95157e99202b0057d4935c" kindref="member">u_quad_t</ref></type>
        <definition>u_quad_t __umoddi3</definition>
        <argsstring>(u_quad_t a, u_quad_t b)</argsstring>
        <name>__umoddi3</name>
        <param>
          <type><ref refid="include_2sys_2types_8h_1a289ae7cf9c95157e99202b0057d4935c" kindref="member">u_quad_t</ref></type>
          <declname>a</declname>
        </param>
        <param>
          <type><ref refid="include_2sys_2types_8h_1a289ae7cf9c95157e99202b0057d4935c" kindref="member">u_quad_t</ref></type>
          <declname>b</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/lib/kprintf.c" line="248" column="10" bodyfile="C:/Dev/git/UbixOS/sys/lib/kprintf.c" bodystart="248" bodyend="254"/>
        <references refid="kprintf_8c_1a19096e3df18062999062c914a569c7d6" compoundref="kprintf_8c" startline="56" endline="246">__qdivrem</references>
      </memberdef>
      <memberdef kind="function" id="kprintf_8c_1afb76aba0a60153df0cf7ffb3eb86e172" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="cdefs_8h_1a96deb7ba5a74848afb710cc4ee6d2c08" kindref="member">__inline</ref> int</type>
        <definition>static __inline int imax</definition>
        <argsstring>(int a, int b)</argsstring>
        <name>imax</name>
        <param>
          <type>int</type>
          <declname>a</declname>
        </param>
        <param>
          <type>int</type>
          <declname>b</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/lib/kprintf.c" line="36" column="21" bodyfile="C:/Dev/git/UbixOS/sys/lib/kprintf.c" bodystart="36" bodyend="38"/>
      </memberdef>
      <memberdef kind="function" id="kprintf_8c_1ab2761bdf0cca73ad0fb5880895210cd8" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int kprintf</definition>
        <argsstring>(const char *fmt,...)</argsstring>
        <name>kprintf</name>
        <param>
          <type><ref refid="cdefs_8h_1a2c212835823e3c54a8ab6d95c652660e" kindref="member">const</ref> char *</type>
          <declname>fmt</declname>
        </param>
        <param>
          <type>...</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/lib/kprintf.c" line="259" column="5" bodyfile="C:/Dev/git/UbixOS/sys/lib/kprintf.c" bodystart="259" bodyend="276"/>
        <references refid="video_8h_1a5429378b96a24fadfd2d1f8d777eb95a" compoundref="video_8c" startline="58" endline="106">kprint</references>
        <references refid="kprintf_8c_1a3093cdac4668a4ccffdd7f77270888b7" compoundref="kprintf_8c" startline="315" endline="660">kvprintf</references>
        <references refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="fat__string_8h" startline="17">NULL</references>
        <references refid="kprintf_8h_1a3b4a66bf1f6583e65660f281b6014aa1" compoundref="ogprintf_8cc" startline="40" endline="80">ogPrintf</references>
        <references refid="kprintf_8c_1a20b3409b318c04fbc25a13dc10d1c34f" compoundref="kprintf_8c" startline="257">ogprintOff</references>
        <references refid="kprintf_8c_1a813254cfe6d658ea82f1dcdf2d927fb8" compoundref="kprintf_8c" startline="256">printOff</references>
        <references refid="stdarg_8h_1acd9b3b9085ec072324c5fdac2b40304e" compoundref="stdarg_8h" startline="50">va_end</references>
        <references refid="stdarg_8h_1ade24ac546ea93fde2353ed2db8e89c66" compoundref="stdarg_8h" startline="41">va_start</references>
        <referencedby refid="assert_8c_1a05f6680808cf2d1b1aef3c9c86901f16" compoundref="assert_8c" startline="37" endline="44">__assert</referencedby>
        <referencedby refid="gen__calls_8c_1a5e545f93bf6f37890415be1fc90815dd" compoundref="gen__calls_8c" startline="130" endline="134">access</referencedby>
        <referencedby refid="include_2ubixfs_2ubixfs_8h_1a58993494728ce5af573cd51322735210" compoundref="directory_8c" startline="64" endline="89">addDirEntry</referencedby>
        <referencedby refid="smp_8c_1a70e557cb01aee676855cee05b0769288" compoundref="smp_8c" startline="231" endline="251">apicMagic</referencedby>
        <referencedby refid="arp_8c_1a57a25dd51cf73f048ad5364ecc2f040b" compoundref="arp_8c" startline="197" endline="257">arp_arp_input</referencedby>
        <referencedby refid="i386_2bioscall_8c_1a56a172d2268fc10811a0bb180d7c3f49" compoundref="i386_2bioscall_8c" startline="40" endline="91">biosCall</referencedby>
        <referencedby refid="descrip_8c_1aec14600d2aa9db1288f00704ba3a55d7" compoundref="descrip_8c" startline="162" endline="171">close</referencedby>
        <referencedby refid="device_8c_1a24bac04b529afec40daa960bd7e7b8ee" compoundref="device_8c" startline="49" endline="70">device_add</referencedby>
        <referencedby refid="trap_8h_1a62b4617f9a2800b1e9baf8d6f93835bd" compoundref="trap_8c" startline="59" endline="99">die_if_kernel</referencedby>
        <referencedby refid="descrip_8c_1a266f2b3582c66190ca585589f2938065" compoundref="descrip_8c" startline="348" endline="375">dup2</referencedby>
        <referencedby refid="exec_8c_1af80d4412d42ed1b5bf9a1b9774230f33" compoundref="exec_8c" startline="153" endline="330">execFile</referencedby>
        <referencedby refid="fat_8c_1a29aa9552ba9b567abcf938fe64d4ec95" compoundref="fat_8c" startline="56" endline="99">fat_initialize</referencedby>
        <referencedby refid="descrip_8c_1aa825d15d1f3691b7e31917e05ef9f3bc" compoundref="descrip_8c" startline="40" endline="90">fcntl</referencedby>
        <referencedby refid="descrip_8c_1ae7b881d8f4c6e81d8e10468783ce080f" compoundref="descrip_8c" startline="147" endline="160">fdestroy</referencedby>
        <referencedby refid="ffs_8c_1ae0611a10bf50ddb7c1ab4ce652c09307" compoundref="ffs_8c" startline="11" endline="23">ffs_read</referencedby>
        <referencedby refid="include_2vfs_2file_8h_1aa5a3a3f92ecea1381616825ba8646306" compoundref="file_8c" startline="388" endline="518">fopen</referencedby>
        <referencedby refid="i386_2fork_8c_1a193d99c9f4dbfbfaad8a1ef486582f2d" compoundref="i386_2fork_8c" startline="144" endline="204">fork_copyProcess</referencedby>
        <referencedby refid="vmm__mmap_8c_1ac6b3ef6da47d002e7ff528f9a8e75012" compoundref="vmm__mmap_8c" startline="75" endline="153">freebsd6_mmap</referencedby>
        <referencedby refid="descrip_8c_1aebab3bde2588cf74aad5b90cab9e7d30" compoundref="descrip_8c" startline="185" endline="197">fstat</referencedby>
        <referencedby refid="descrip_8c_1ac26938ed109edd82077382276bc8258c" compoundref="descrip_8c" startline="176" endline="182">getdtablesize</referencedby>
        <referencedby refid="descrip_8c_1a14e228d6e5391a882d3b20ff2466b2ac" compoundref="descrip_8c" startline="214" endline="227">getfd</referencedby>
        <referencedby refid="gen__calls_8c_1a2cbc84ec9b68d4c49474049bd74d1bb3" compoundref="gen__calls_8c" startline="70" endline="76">getgid</referencedby>
        <referencedby refid="gen__calls_8c_1a4f4fe0a75329898241b9c7acc0580561" compoundref="gen__calls_8c" startline="52" endline="58">getpid</referencedby>
        <referencedby refid="gen__calls_8c_1aff04064695f5ad2e284b51a24f351dc9" compoundref="gen__calls_8c" startline="93" endline="98">gettimeofday_new</referencedby>
        <referencedby refid="gen__calls_8c_1a5c560fabc59fcbcc62ce4827d10b222a" compoundref="gen__calls_8c" startline="61" endline="67">getuid</referencedby>
        <referencedby refid="hd_8c_1ab01b187dc277e089d0161315437fde41" compoundref="hd_8c" startline="221" endline="354">hdInit</referencedby>
        <referencedby refid="hd_8c_1ac285c40dfad18aac6ae2eaa77b4a06c8" compoundref="hd_8c" startline="423" endline="488">hdRead</referencedby>
        <referencedby refid="hd_8c_1a57d5cca1b1006db82038567edf6e6ac1" compoundref="hd_8c" startline="356" endline="421">hdWrite</referencedby>
        <referencedby refid="8259_8c_1a8045101c57cc1791817412b1016794b4" compoundref="8259_8c" startline="41" endline="59">i8259_init</referencedby>
        <referencedby refid="lnc_8c_1a0c06be8c0c0c046c5073f4cfae3eed7c" compoundref="lnc_8c" startline="94" endline="189">initLNC</referencedby>
        <referencedby refid="arch_2armv6_2syscall_8c_1a98fb463aa3c38a140b47e594bf9603d6" compoundref="arch_2armv6_2syscall_8c" startline="238" endline="241">invalidCall</referencedby>
        <referencedby refid="syscall__posix_8c_1a732bce33711189953191fb779fa98c3a" compoundref="syscall__posix_8c" startline="124" endline="135">invalidCall_posix</referencedby>
        <referencedby refid="arch_2armv6_2syscall_8c_1af7052cfb833f292be2fd73436e4c96b6" compoundref="arch_2armv6_2syscall_8c" startline="82" endline="85">InvalidSystemCall</referencedby>
        <referencedby refid="vfs__calls_8c_1ab35b14c33a5b03f7617b58b4c0667bd4" compoundref="vfs__calls_8c" startline="399" endline="448">kern_openat</referencedby>
        <referencedby refid="kmod_8c_1af2a085a786b2cf77d53da7f364948cd4" compoundref="kmod_8c" startline="45" endline="68">kmod_add</referencedby>
        <referencedby refid="kmod_8c_1a92b68dbf95bf5d651555a4c02ee1a74b" compoundref="kmod_8c" startline="70" endline="207">kmod_load</referencedby>
        <referencedby refid="kpanic_8h_1adb9a182aa071791a306163d50d653deb" compoundref="armv6_2kpanic_8c" startline="41" endline="61">kpanic</referencedby>
        <referencedby refid="ld_8c_1add6ca1fb619f0bc0f4addffbfc5577a7" compoundref="ld_8c" startline="40" endline="194">ldEnable</referencedby>
        <referencedby refid="lnc_8c_1a91848001b8f3004373121f03951d4c4c" compoundref="lnc_8c" startline="254" endline="276">lnc_INT</referencedby>
        <referencedby refid="lnc_8c_1a63b705fcc8bfad509be7dcb6bef7d821" compoundref="lnc_8c" startline="593" endline="609">lnc_switchDWord</referencedby>
        <referencedby refid="lnc_8c_1a86e977fd8113976b87da564f2b53a2d7" compoundref="lnc_8c" startline="419" endline="512">lncAttach</referencedby>
        <referencedby refid="lnc_8c_1a6fdabac3834c12782583e0a42f928295" compoundref="lnc_8c" startline="368" endline="392">lncInt</referencedby>
        <referencedby refid="mouse_8c_1adb1403c2c7c25ea9b2826c504f8eb502" compoundref="mouse_8c" startline="131" endline="138">mouseHandler</referencedby>
        <referencedby refid="fat_8c_1abcabf6d92d9d68a4dda0b0f8a8a803b5" compoundref="fat_8c" startline="131" endline="169">open_fat</referencedby>
        <referencedby refid="pci_8c_1a5c450b9e2534226b162a16de0ef6b434" compoundref="pci_8c" startline="244" endline="269">pci_init</referencedby>
        <referencedby refid="pci_8c_1a9a16d3ca1d4538415b752ab0c58e72ba" compoundref="pci_8c" startline="139" endline="242">pciProbe</referencedby>
        <referencedby refid="pit_8c_1ad7178bcaf8f93f5c16d41305f7338951" compoundref="pit_8c" startline="62" endline="72">pit_init</referencedby>
        <referencedby refid="i386_2fork_8c_1ad3bf5413ce6ffd3c191861969d8a1d74" compoundref="i386_2fork_8c" startline="206" endline="208">qT</referencedby>
        <referencedby refid="gen__calls_8c_1a5eff3a25d417fafce7c4f211db219ca2" compoundref="gen__calls_8c" startline="100" endline="119">read</referencedby>
        <referencedby refid="fat_8c_1afe837a4cad1bab6f8b8f293cd76059a0" compoundref="fat_8c" startline="101" endline="114">read_fat</referencedby>
        <referencedby refid="gen__calls_8c_1a111a32074b3f5f68a4fa5585fe8ab3a4" compoundref="gen__calls_8c" startline="83" endline="91">readlink</referencedby>
        <referencedby refid="main_8cc_1aa6c38d07b193857fbaebc1656b89136e" compoundref="main_8cc" startline="51" endline="143">sdeThread</referencedby>
        <referencedby refid="sem_8c_1a19bd6e9be9540104f4ab465624e9a579" compoundref="sem_8c" startline="56" endline="73">sem_init</referencedby>
        <referencedby refid="kernel_2syscall_8c_1ab47807607e76a25f1af877bff76e5cd3" compoundref="kernel_2syscall_8c" startline="43" endline="99">sys_call</referencedby>
        <referencedby refid="syscall__posix_8c_1a36e904a79ceddf1f6e28a7959ac55b99" compoundref="syscall__posix_8c" startline="42" endline="122">sys_call_posix</referencedby>
        <referencedby refid="vfs__calls_8c_1a3195389ea302c069fc2dbf8a08e4c841" compoundref="vfs__calls_8c" startline="99" endline="149">sys_close</referencedby>
        <referencedby refid="sysproto__posix_8h_1a8cc1e5a71a073900a358fb3f0ec343cd" compoundref="file_8c" startline="237" endline="250">sys_fopen</referencedby>
        <referencedby refid="sysproto__posix_8h_1a0b68b7964a860aa2c5acacf5a7d486e6" compoundref="file_8c" startline="119" endline="147">sys_fseek</referencedby>
        <referencedby refid="include_2vfs_2file_8h_1a6b6b8f061ddd1e9631f0858ff0d83ff0" compoundref="file_8c" startline="47" endline="62">sys_fwrite</referencedby>
        <referencedby refid="gen__calls_8c_1abe3341acee6fc13d0806e33bf4950cc0" compoundref="gen__calls_8c" startline="376" endline="448">sys_getrlimit</referencedby>
        <referencedby refid="gen__calls_8c_1a6d945e107f5f3d710b7b571eac2784b5" compoundref="gen__calls_8c" startline="141" endline="145">sys_invalid</referencedby>
        <referencedby refid="descrip_8c_1ae68dd7969c4aadba4fc099a3624e8aed" compoundref="descrip_8c" startline="229" endline="283">sys_ioctl</referencedby>
        <referencedby refid="sysproto__posix_8h_1a22d7ac2731d375722cb6fcfaa8b35996" compoundref="file_8c" startline="149" endline="184">sys_lseek</referencedby>
        <referencedby refid="mpi__syscalls_8c_1a680b099e0eb13af038eb9e34c5191dab" compoundref="mpi__syscalls_8c" startline="19" endline="23">sys_mpiPostMessage</referencedby>
        <referencedby refid="vfs__calls_8c_1a3cd45d74317da8167bac4518cf43f6c0" compoundref="vfs__calls_8c" startline="39" endline="43">sys_open</referencedby>
        <referencedby refid="vfs__calls_8c_1a61bacda2680307d7f33cd2efe52ba2b5" compoundref="vfs__calls_8c" startline="45" endline="97">sys_openat</referencedby>
        <referencedby refid="vfs__calls_8c_1a883455624440fedf2b1af73d313e0ade" compoundref="vfs__calls_8c" startline="239" endline="291">sys_pread</referencedby>
        <referencedby refid="vfs__calls_8c_1a7678726e58a6393050f3b26e0b9b3152" compoundref="vfs__calls_8c" startline="151" endline="237">sys_read</referencedby>
        <referencedby refid="vfs__calls_8c_1a35d9649c48f61f1511e9d5de290e4991" compoundref="vfs__calls_8c" startline="389" endline="397">sys_readlink</referencedby>
        <referencedby refid="group__sys__sem_1gadb68acad14b34550b9891bc11bbf4e63" compoundref="sys__arch_8c" startline="52" endline="72">sys_sem_new</referencedby>
        <referencedby refid="gen__calls_8c_1a77e27dec9ce3825037f7b1916f131765" compoundref="gen__calls_8c" startline="450" endline="520">sys_setrlimit</referencedby>
        <referencedby refid="sys__arch_8c_1afab8740b07db1e3546145e3835182324" compoundref="sys__arch_8c" startline="529" endline="538">sys_setsockopt</referencedby>
        <referencedby refid="gen__calls_8c_1adb0dc568dd674705e372495140616236" compoundref="gen__calls_8c" startline="243" endline="292">sys_sigprocmask</referencedby>
        <referencedby refid="sys__arch_8c_1ad76124831716632ba4c77d30d15817de" compoundref="sys__arch_8c" startline="502" endline="527">sys_socket</referencedby>
        <referencedby refid="gen__calls_8c_1a5df9e80cc5dda0f70fae4699168cf4b6" compoundref="gen__calls_8c" startline="186" endline="222">sys_sysarch</referencedby>
        <referencedby refid="vfs__calls_8c_1a159495d16f0ec154193733ad4fb1fc71" compoundref="vfs__calls_8c" startline="293" endline="364">sys_write</referencedby>
        <referencedby refid="arch_2armv6_2syscall_8c_1af53171b36a238440fc8e757c0d00a91f" compoundref="arch_2armv6_2syscall_8c" startline="97" endline="110">sysAuth</referencedby>
        <referencedby refid="exec_8c_1a219681612352232186a0f568457d851d" compoundref="exec_8c" startline="340" endline="545">sysExec</referencedby>
        <referencedby refid="file_8c_1a81e426f86ee3d066c32986948fe3f6fd" compoundref="file_8c" startline="576" endline="609">sysMkDir</referencedby>
        <referencedby refid="arch_2armv6_2syscall_8c_1a87ae7b6cdc0230fbdf65c167a776e9ad" compoundref="arch_2armv6_2syscall_8c" startline="112" endline="115">sysPasswd</referencedby>
        <referencedby refid="sde_8cc_1a769e7f0a3b5204fd1298d710f36cdfa6" compoundref="sde_8cc" startline="45" endline="145">sysSDE</referencedby>
        <referencedby refid="systemtask_8h_1ac7cc6a806237f8657fcdce169319fd7f" compoundref="armv6_2systemtask_8c" startline="47" endline="117">systemTask</referencedby>
        <referencedby refid="ubixfs_8c_1a32762e2563015d124909f3317c2a7423" compoundref="ubixfs_8c" startline="371" endline="437">ubixfs_initialize</referencedby>
        <referencedby refid="ubthread_8c_1aa13bf141cd3e9bf0921fbf61ffc637d8" compoundref="ubthread_8c" startline="88" endline="107">ubthread_mutex_lock</referencedby>
        <referencedby refid="ubthread_8c_1afea3530bab360f59c09a49f490d079dd" compoundref="ubthread_8c" startline="109" endline="127">ubthread_mutex_unlock</referencedby>
        <referencedby refid="ufs_8c_1a352e2c889644d8d992445b347d1ffe41" compoundref="ufs_8c" startline="295" endline="298">ufs_writeFile</referencedby>
        <referencedby refid="include_2vfs_2vfs_8h_1aca585ca14c08d6c1a07e1b886fc9749a" compoundref="vfs_8c" startline="46" endline="55">vfs_init</referencedby>
        <referencedby refid="mount_8h_1a1255ebfdcd5f7048ffe187e836f8eb28" compoundref="mount_8c" startline="45" endline="92">vfs_mount</referencedby>
        <referencedby refid="vitals_8c_1a34d7f48e003fe73f05d594c6c1f00d49" compoundref="vitals_8c" startline="47" endline="70">vitals_init</referencedby>
        <referencedby refid="pagefault_8c_1a046643b9b8c1ad9efffaaaeb5ff11431" compoundref="pagefault_8c" startline="53" endline="147">vmm_pageFault</referencedby>
        <referencedby refid="paging_8c_1af47a45e3f0802f5aac053808127aaaf1" compoundref="paging_8c" startline="58" endline="187">vmm_pagingInit</referencedby>
        <referencedby refid="fat_8c_1a22a997ae15aa6d91cf887f388ce46520" compoundref="fat_8c" startline="116" endline="129">write_fat</referencedby>
      </memberdef>
      <memberdef kind="function" id="kprintf_8c_1a009eed82434eef40e83ac5e748849884" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>char *</type>
        <definition>static char * ksprintn</definition>
        <argsstring>(char *nbuf, uintmax_t num, int base, int *lenp, int upper)</argsstring>
        <name>ksprintn</name>
        <param>
          <type>char *</type>
          <declname>nbuf</declname>
        </param>
        <param>
          <type><ref refid="include_2sys_2types_8h_1a7643e68e022fde0d947e8dc252f716d6" kindref="member">uintmax_t</ref></type>
          <declname>num</declname>
        </param>
        <param>
          <type>int</type>
          <declname>base</declname>
        </param>
        <param>
          <type>int *</type>
          <declname>lenp</declname>
        </param>
        <param>
          <type>int</type>
          <declname>upper</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/lib/kprintf.c" line="662" column="13" bodyfile="C:/Dev/git/UbixOS/sys/lib/kprintf.c" bodystart="662" bodyend="677" declfile="C:/Dev/git/UbixOS/sys/lib/kprintf.c" declline="34" declcolumn="13"/>
      </memberdef>
      <memberdef kind="function" id="kprintf_8c_1a3093cdac4668a4ccffdd7f77270888b7" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int kvprintf</definition>
        <argsstring>(const char *fmt, void(*func)(int, void *), void *arg, int radix, va_list ap)</argsstring>
        <name>kvprintf</name>
        <param>
          <type><ref refid="cdefs_8h_1a2c212835823e3c54a8ab6d95c652660e" kindref="member">const</ref> char *</type>
          <declname>fmt</declname>
        </param>
        <param>
          <type>void(*)(int, void *)</type>
          <declname>func</declname>
        </param>
        <param>
          <type>void *</type>
          <declname>arg</declname>
        </param>
        <param>
          <type>int</type>
          <declname>radix</declname>
        </param>
        <param>
          <type><ref refid="stdarg_8h_1abaefbc6cabb217bf0138d4f9c94d4775" kindref="member">va_list</ref></type>
          <declname>ap</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/lib/kprintf.c" line="315" column="5" bodyfile="C:/Dev/git/UbixOS/sys/lib/kprintf.c" bodystart="315" bodyend="660"/>
        <references refid="kprintf_8h_1a217f530a384d97fff0492492edab5222" compoundref="kprintf_8h" startline="35">MAXNBUF</references>
        <references refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="fat__string_8h" startline="17">NULL</references>
        <references refid="kprintf_8c_1a24f21637100d1f6ab4f21daccf7840fb">PCHAR</references>
        <references refid="unionuu_1a3ce40dca10fdac763f032c2062fcb310" compoundref="kprintf_8c" startline="41">uu::q</references>
        <references refid="stdarg_8h_1a81ebe6ea6253b0c6618e29de70fe10eb" compoundref="stdarg_8h" startline="44">va_arg</references>
        <referencedby refid="kprintf_8c_1ab2761bdf0cca73ad0fb5880895210cd8" compoundref="kprintf_8c" startline="259" endline="276">kprintf</referencedby>
        <referencedby refid="kprintf_8c_1ac38cd16373d98782e1465bd3d5aba470" compoundref="kprintf_8c" startline="278" endline="286">sprintf</referencedby>
      </memberdef>
      <memberdef kind="function" id="kprintf_8c_1ac38cd16373d98782e1465bd3d5aba470" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int sprintf</definition>
        <argsstring>(char *buf, const char *fmt,...)</argsstring>
        <name>sprintf</name>
        <param>
          <type>char *</type>
          <declname>buf</declname>
        </param>
        <param>
          <type><ref refid="cdefs_8h_1a2c212835823e3c54a8ab6d95c652660e" kindref="member">const</ref> char *</type>
          <declname>fmt</declname>
        </param>
        <param>
          <type>...</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/lib/kprintf.c" line="278" column="5" bodyfile="C:/Dev/git/UbixOS/sys/lib/kprintf.c" bodystart="278" bodyend="286"/>
        <references refid="kprintf_8c_1a3093cdac4668a4ccffdd7f77270888b7" compoundref="kprintf_8c" startline="315" endline="660">kvprintf</references>
        <references refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="fat__string_8h" startline="17">NULL</references>
        <references refid="stdarg_8h_1acd9b3b9085ec072324c5fdac2b40304e" compoundref="stdarg_8h" startline="50">va_end</references>
        <references refid="stdarg_8h_1ade24ac546ea93fde2353ed2db8e89c66" compoundref="stdarg_8h" startline="41">va_start</references>
        <referencedby refid="include_2vfs_2file_8h_1aa5a3a3f92ecea1381616825ba8646306" compoundref="file_8c" startline="388" endline="518">fopen</referencedby>
        <referencedby refid="sysproto__posix_8h_1a2eb9cc767595f53b3c580cd534a0a890" compoundref="file_8c" startline="186" endline="195">sys_chdir</referencedby>
        <referencedby refid="sysproto__posix_8h_1a5ad4ab96ec36d0f1763b9540edaf0128" compoundref="file_8c" startline="197" endline="218">sys_fchdir</referencedby>
        <referencedby refid="sysproto__posix_8h_1a1297282a70d9529054df62f0b8c1196b" compoundref="stat_8c" startline="182" endline="237">sys_fstatfs</referencedby>
        <referencedby refid="kernel_2syscall_8c_1a96b9eebf3580117ce76158b2d53f188f" compoundref="kernel_2syscall_8c" startline="204" endline="222">sys_getcwd</referencedby>
        <referencedby refid="sysproto__posix_8h_1a6194ac39a3ce5a21050d2a9a3117b433" compoundref="stat_8c" startline="239" endline="294">sys_statfs</referencedby>
        <referencedby refid="arch_2armv6_2syscall_8c_1aa1858601da45332a2cd7d43bb3bcb80d" compoundref="arch_2armv6_2syscall_8c" startline="216" endline="220">sysGetCwd</referencedby>
        <referencedby refid="file_8c_1a81e426f86ee3d066c32986948fe3f6fd" compoundref="file_8c" startline="576" endline="609">sysMkDir</referencedby>
        <referencedby refid="include_2ubixfs_2ubixfs_8h_1a3f7a88e7f709a200096c93c0deb13ec2" compoundref="directory_8c" startline="39" endline="61">ubixFSLoadDir</referencedby>
        <referencedby refid="include_2ubixfs_2ubixfs_8h_1a55ee126c39c4bb7e875cc82f317e5aee" compoundref="directory_8c" startline="92" endline="125">ubixFSmkDir</referencedby>
        <referencedby refid="mount_8h_1a1255ebfdcd5f7048ffe187e836f8eb28" compoundref="mount_8c" startline="45" endline="92">vfs_mount</referencedby>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="comment">/*-</highlight></codeline>
<codeline lineno="2"><highlight class="comment"><sp/>*<sp/>Copyright<sp/>(c)<sp/>2002-2018<sp/>The<sp/>UbixOS<sp/>Project.</highlight></codeline>
<codeline lineno="3"><highlight class="comment"><sp/>*<sp/>All<sp/>rights<sp/>reserved.</highlight></codeline>
<codeline lineno="4"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="5"><highlight class="comment"><sp/>*<sp/>This<sp/>was<sp/>developed<sp/>by<sp/>Christopher<sp/>W.<sp/>Olsen<sp/>for<sp/>the<sp/>UbixOS<sp/>Project.</highlight></codeline>
<codeline lineno="6"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="7"><highlight class="comment"><sp/>*<sp/>Redistribution<sp/>and<sp/>use<sp/>in<sp/>source<sp/>and<sp/>binary<sp/>forms,<sp/>with<sp/>or<sp/>without<sp/>modification,<sp/>are<sp/>permitted</highlight></codeline>
<codeline lineno="8"><highlight class="comment"><sp/>*<sp/>provided<sp/>that<sp/>the<sp/>following<sp/>conditions<sp/>are<sp/>met:</highlight></codeline>
<codeline lineno="9"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="10"><highlight class="comment"><sp/>*<sp/>1)<sp/>Redistributions<sp/>of<sp/>source<sp/>code<sp/>must<sp/>retain<sp/>the<sp/>above<sp/>copyright<sp/>notice,<sp/>this<sp/>list<sp/>of</highlight></codeline>
<codeline lineno="11"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>conditions,<sp/>the<sp/>following<sp/>disclaimer<sp/>and<sp/>the<sp/>list<sp/>of<sp/>authors.</highlight></codeline>
<codeline lineno="12"><highlight class="comment"><sp/>*<sp/>2)<sp/>Redistributions<sp/>in<sp/>binary<sp/>form<sp/>must<sp/>reproduce<sp/>the<sp/>above<sp/>copyright<sp/>notice,<sp/>this<sp/>list<sp/>of</highlight></codeline>
<codeline lineno="13"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>conditions,<sp/>the<sp/>following<sp/>disclaimer<sp/>and<sp/>the<sp/>list<sp/>of<sp/>authors<sp/>in<sp/>the<sp/>documentation<sp/>and/or</highlight></codeline>
<codeline lineno="14"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>other<sp/>materials<sp/>provided<sp/>with<sp/>the<sp/>distribution.</highlight></codeline>
<codeline lineno="15"><highlight class="comment"><sp/>*<sp/>3)<sp/>Neither<sp/>the<sp/>name<sp/>of<sp/>the<sp/>UbixOS<sp/>Project<sp/>nor<sp/>the<sp/>names<sp/>of<sp/>its<sp/>contributors<sp/>may<sp/>be<sp/>used<sp/>to</highlight></codeline>
<codeline lineno="16"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>endorse<sp/>or<sp/>promote<sp/>products<sp/>derived<sp/>from<sp/>this<sp/>software<sp/>without<sp/>specific<sp/>prior<sp/>written</highlight></codeline>
<codeline lineno="17"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>permission.</highlight></codeline>
<codeline lineno="18"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="19"><highlight class="comment"><sp/>*<sp/>THIS<sp/>SOFTWARE<sp/>IS<sp/>PROVIDED<sp/>BY<sp/>THE<sp/>AUTHOR<sp/>AND<sp/>CONTRIBUTORS<sp/>&quot;AS<sp/>IS&quot;<sp/>AND<sp/>ANY<sp/>EXPRESS<sp/>OR<sp/>IMPLIED</highlight></codeline>
<codeline lineno="20"><highlight class="comment"><sp/>*<sp/>WARRANTIES,<sp/>INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>THE<sp/>IMPLIED<sp/>WARRANTIES<sp/>OF<sp/>MERCHANTABILITY<sp/>AND<sp/>FITNESS</highlight></codeline>
<codeline lineno="21"><highlight class="comment"><sp/>*<sp/>FOR<sp/>A<sp/>PARTICULAR<sp/>PURPOSE<sp/>ARE<sp/>DISCLAIMED.<sp/>IN<sp/>NO<sp/>EVENT<sp/>SHALL<sp/>THE<sp/>COPYRIGHT<sp/>OWNER<sp/>OR<sp/>CONTRIBUTORS</highlight></codeline>
<codeline lineno="22"><highlight class="comment"><sp/>*<sp/>BE<sp/>LIABLE<sp/>FOR<sp/>ANY<sp/>DIRECT,<sp/>INDIRECT,<sp/>INCIDENTAL,<sp/>SPECIAL,<sp/>EXEMPLARY,<sp/>OR<sp/>CONSEQUENTIAL<sp/>DAMAGES</highlight></codeline>
<codeline lineno="23"><highlight class="comment"><sp/>*<sp/>(INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>PROCUREMENT<sp/>OF<sp/>SUBSTITUTE<sp/>GOODS<sp/>OR<sp/>SERVICES;<sp/>LOSS<sp/>OF<sp/>USE,<sp/>DATA,</highlight></codeline>
<codeline lineno="24"><highlight class="comment"><sp/>*<sp/>OR<sp/>PROFITS;<sp/>OR<sp/>BUSINESS<sp/>INTERRUPTION)<sp/>HOWEVER<sp/>CAUSED<sp/>AND<sp/>ON<sp/>ANY<sp/>THEORY<sp/>OF<sp/>LIABILITY,<sp/>WHETHER<sp/>IN</highlight></codeline>
<codeline lineno="25"><highlight class="comment"><sp/>*<sp/>CONTRACT,<sp/>STRICT<sp/>LIABILITY,<sp/>OR<sp/>TORT<sp/>(INCLUDING<sp/>NEGLIGENCE<sp/>OR<sp/>OTHERWISE)<sp/>ARISING<sp/>IN<sp/>ANY<sp/>WAY<sp/>OUT</highlight></codeline>
<codeline lineno="26"><highlight class="comment"><sp/>*<sp/>OF<sp/>THE<sp/>USE<sp/>OF<sp/>THIS<sp/>SOFTWARE,<sp/>EVEN<sp/>IF<sp/>ADVISED<sp/>OF<sp/>THE<sp/>POSSIBILITY<sp/>OF<sp/>SUCH<sp/>DAMAGE.</highlight></codeline>
<codeline lineno="27"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="28"><highlight class="normal"></highlight></codeline>
<codeline lineno="29"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="kprintf_8h" kindref="compound">lib/kprintf.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="30"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="string_8h" kindref="compound">string.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="31"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="video_8h" kindref="compound">sys/video.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="32"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="kpanic_8h" kindref="compound">ubixos/kpanic.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="33"><highlight class="normal"></highlight></codeline>
<codeline lineno="34"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*ksprintn(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*nbuf,<sp/><ref refid="include_2sys_2types_8h_1a7643e68e022fde0d947e8dc252f716d6" kindref="member">uintmax_t</ref><sp/>num,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>base,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*lenp,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>upper);</highlight></codeline>
<codeline lineno="35"><highlight class="normal"></highlight></codeline>
<codeline lineno="36"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/><ref refid="cdefs_8h_1a96deb7ba5a74848afb710cc4ee6d2c08" kindref="member">__inline</ref><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>imax(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>a,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>b)<sp/>{</highlight></codeline>
<codeline lineno="37"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(a<sp/>&gt;<sp/>b<sp/>?<sp/>a<sp/>:<sp/>b);</highlight></codeline>
<codeline lineno="38"><highlight class="normal">}</highlight></codeline>
<codeline lineno="39"><highlight class="normal"></highlight></codeline>
<codeline lineno="40" refid="unionuu" refkind="compound"><highlight class="normal"></highlight><highlight class="keyword">union<sp/></highlight><highlight class="normal"><ref refid="unionuu" kindref="compound">uu</ref><sp/>{</highlight></codeline>
<codeline lineno="41" refid="unionuu_1a3ce40dca10fdac763f032c2062fcb310" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="include_2sys_2types_8h_1aed1098ccbc33ac9e2fe61c0feed081bc" kindref="member">quad_t</ref><sp/><ref refid="unionuu_1a3ce40dca10fdac763f032c2062fcb310" kindref="member">q</ref>;<sp/></highlight><highlight class="comment">/*<sp/>as<sp/>a<sp/>(signed)<sp/>quad<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="42" refid="unionuu_1a1acb113b0a5af8871b5634516981d300" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="include_2sys_2types_8h_1aed1098ccbc33ac9e2fe61c0feed081bc" kindref="member">quad_t</ref><sp/><ref refid="unionuu_1a1acb113b0a5af8871b5634516981d300" kindref="member">uq</ref>;<sp/></highlight><highlight class="comment">/*<sp/>as<sp/>an<sp/>unsigned<sp/>quad<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="43" refid="unionuu_1a4bbc7e0aa9ab9f1880dd21e72d04843e" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/><ref refid="unionuu_1a4bbc7e0aa9ab9f1880dd21e72d04843e" kindref="member">sl</ref>[2];<sp/></highlight><highlight class="comment">/*<sp/>as<sp/>two<sp/>signed<sp/>longs<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="44" refid="unionuu_1a8f74169d11a6ab4a569ec546a1704313" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="include_2sys_2types_8h_1a8f25a50daf29ce2cee1ec038a4d744ea" kindref="member">u_long</ref><sp/><ref refid="unionuu_1a8f74169d11a6ab4a569ec546a1704313" kindref="member">ul</ref>[2];<sp/></highlight><highlight class="comment">/*<sp/>as<sp/>two<sp/>unsigned<sp/>longs<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="45"><highlight class="normal">};</highlight></codeline>
<codeline lineno="46"><highlight class="normal"></highlight></codeline>
<codeline lineno="47"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>__shl(</highlight><highlight class="keyword">register</highlight><highlight class="normal"><sp/><ref refid="include_2sys_2types_8h_1adac711321b4eea0f286581348e66108c" kindref="member">digit</ref><sp/>*p,<sp/></highlight><highlight class="keyword">register</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>len,<sp/></highlight><highlight class="keyword">register</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>sh)<sp/>{</highlight></codeline>
<codeline lineno="48"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">register</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="49"><highlight class="normal"></highlight></codeline>
<codeline lineno="50"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>len;<sp/>i++)</highlight></codeline>
<codeline lineno="51"><highlight class="normal"><sp/><sp/><sp/><sp/>p[i]<sp/>=<sp/><ref refid="include_2sys_2types_8h_1adf04943239a977f38017d6bbf53a4b36" kindref="member">LHALF</ref>(<sp/>p[i]<sp/>&lt;&lt;<sp/>sh<sp/>)<sp/>|<sp/>(p[i<sp/>+<sp/>1]<sp/>&gt;&gt;<sp/>(<ref refid="include_2sys_2types_8h_1a652f8dfd5ad718480293127346c8110f" kindref="member">HALF_BITS</ref><sp/>-<sp/>sh));</highlight></codeline>
<codeline lineno="52"><highlight class="normal"></highlight></codeline>
<codeline lineno="53"><highlight class="normal"><sp/><sp/>p[i]<sp/>=<sp/><ref refid="include_2sys_2types_8h_1adf04943239a977f38017d6bbf53a4b36" kindref="member">LHALF</ref>(p[i]<sp/>&lt;&lt;<sp/>sh);</highlight></codeline>
<codeline lineno="54"><highlight class="normal">}</highlight></codeline>
<codeline lineno="55"><highlight class="normal"></highlight></codeline>
<codeline lineno="56" refid="kprintf_8c_1a19096e3df18062999062c914a569c7d6" refkind="member"><highlight class="normal"><ref refid="include_2sys_2types_8h_1a289ae7cf9c95157e99202b0057d4935c" kindref="member">u_quad_t</ref><sp/><ref refid="kprintf_8c_1a19096e3df18062999062c914a569c7d6" kindref="member">__qdivrem</ref>(<ref refid="include_2sys_2types_8h_1a289ae7cf9c95157e99202b0057d4935c" kindref="member">u_quad_t</ref><sp/>uq,<sp/><ref refid="include_2sys_2types_8h_1a289ae7cf9c95157e99202b0057d4935c" kindref="member">u_quad_t</ref><sp/>vq,<sp/><ref refid="include_2sys_2types_8h_1a289ae7cf9c95157e99202b0057d4935c" kindref="member">u_quad_t</ref><sp/>*arq)<sp/>{</highlight></codeline>
<codeline lineno="57"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">union<sp/></highlight><highlight class="normal"><ref refid="unionuu" kindref="compound">uu</ref><sp/>tmp;</highlight></codeline>
<codeline lineno="58"><highlight class="normal"><sp/><sp/><ref refid="include_2sys_2types_8h_1adac711321b4eea0f286581348e66108c" kindref="member">digit</ref><sp/>*u,<sp/>*v,<sp/>*<ref refid="unionuu_1a3ce40dca10fdac763f032c2062fcb310" kindref="member">q</ref>;</highlight></codeline>
<codeline lineno="59"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">register</highlight><highlight class="normal"><sp/><ref refid="include_2sys_2types_8h_1adac711321b4eea0f286581348e66108c" kindref="member">digit</ref><sp/>v1,<sp/>v2;</highlight></codeline>
<codeline lineno="60"><highlight class="normal"><sp/><sp/><ref refid="include_2sys_2types_8h_1a8f25a50daf29ce2cee1ec038a4d744ea" kindref="member">u_long</ref><sp/>qhat,<sp/>rhat,<sp/>t;</highlight></codeline>
<codeline lineno="61"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>m,<sp/>n,<sp/>d,<sp/>j,<sp/>i;</highlight></codeline>
<codeline lineno="62"><highlight class="normal"><sp/><sp/><ref refid="include_2sys_2types_8h_1adac711321b4eea0f286581348e66108c" kindref="member">digit</ref><sp/>uspace[5],<sp/>vspace[5],<sp/>qspace[5];</highlight></codeline>
<codeline lineno="63"><highlight class="normal"></highlight></codeline>
<codeline lineno="64"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="65"><highlight class="comment"><sp/><sp/><sp/>*<sp/>Take<sp/>care<sp/>of<sp/>special<sp/>cases:<sp/>divide<sp/>by<sp/>zero,<sp/>and<sp/>u<sp/>&lt;<sp/>v.</highlight></codeline>
<codeline lineno="66"><highlight class="comment"><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="67"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(vq<sp/>==<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>divide<sp/>by<sp/>zero.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="69"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">volatile</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>zero<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="70"><highlight class="normal"></highlight></codeline>
<codeline lineno="71"><highlight class="normal"><sp/><sp/><sp/><sp/>tmp.<ref refid="unionuu_1a8f74169d11a6ab4a569ec546a1704313" kindref="member">ul</ref>[<ref refid="include_2sys_2types_8h_1abec92cc72a096640b821b8cd56a02495" kindref="member">H</ref>]<sp/>=<sp/>tmp.<ref refid="unionuu_1a8f74169d11a6ab4a569ec546a1704313" kindref="member">ul</ref>[<ref refid="include_2sys_2types_8h_1aa73214aa5f2f94f63d90bb4e3d99fe53" kindref="member">L</ref>]<sp/>=<sp/>1<sp/>/<sp/>zero;</highlight></codeline>
<codeline lineno="72"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(arq)</highlight></codeline>
<codeline lineno="73"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>*arq<sp/>=<sp/><ref refid="unionuu_1a1acb113b0a5af8871b5634516981d300" kindref="member">uq</ref>;</highlight></codeline>
<codeline lineno="74"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(tmp.<ref refid="unionuu_1a3ce40dca10fdac763f032c2062fcb310" kindref="member">q</ref>);</highlight></codeline>
<codeline lineno="75"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="76"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="unionuu_1a1acb113b0a5af8871b5634516981d300" kindref="member">uq</ref><sp/>&lt;<sp/>vq)<sp/>{</highlight></codeline>
<codeline lineno="77"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(arq)</highlight></codeline>
<codeline lineno="78"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>*arq<sp/>=<sp/><ref refid="unionuu_1a1acb113b0a5af8871b5634516981d300" kindref="member">uq</ref>;</highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0);</highlight></codeline>
<codeline lineno="80"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/>u<sp/>=<sp/>&amp;uspace[0];</highlight></codeline>
<codeline lineno="82"><highlight class="normal"><sp/><sp/>v<sp/>=<sp/>&amp;vspace[0];</highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/><ref refid="unionuu_1a3ce40dca10fdac763f032c2062fcb310" kindref="member">q</ref><sp/>=<sp/>&amp;qspace[0];</highlight></codeline>
<codeline lineno="84"><highlight class="normal"></highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="86"><highlight class="comment"><sp/><sp/><sp/>*<sp/>Break<sp/>dividend<sp/>and<sp/>divisor<sp/>into<sp/>digits<sp/>in<sp/>base<sp/>B,<sp/>then</highlight></codeline>
<codeline lineno="87"><highlight class="comment"><sp/><sp/><sp/>*<sp/>count<sp/>leading<sp/>zeros<sp/>to<sp/>determine<sp/>m<sp/>and<sp/>n.<sp/><sp/>When<sp/>done,<sp/>we</highlight></codeline>
<codeline lineno="88"><highlight class="comment"><sp/><sp/><sp/>*<sp/>will<sp/>have:</highlight></codeline>
<codeline lineno="89"><highlight class="comment"><sp/><sp/><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/>u<sp/>=<sp/>(u[1]u[2]...u[m+n])<sp/>sub<sp/>B</highlight></codeline>
<codeline lineno="90"><highlight class="comment"><sp/><sp/><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/>v<sp/>=<sp/>(v[1]v[2]...v[n])<sp/>sub<sp/>B</highlight></codeline>
<codeline lineno="91"><highlight class="comment"><sp/><sp/><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/>v[1]<sp/>!=<sp/>0</highlight></codeline>
<codeline lineno="92"><highlight class="comment"><sp/><sp/><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/>1<sp/>&lt;<sp/>n<sp/>&lt;=<sp/>4<sp/>(if<sp/>n<sp/>=<sp/>1,<sp/>we<sp/>use<sp/>a<sp/>different<sp/>division<sp/>algorithm)</highlight></codeline>
<codeline lineno="93"><highlight class="comment"><sp/><sp/><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/>m<sp/>&gt;=<sp/>0<sp/>(otherwise<sp/>u<sp/>&lt;<sp/>v,<sp/>which<sp/>we<sp/>already<sp/>checked)</highlight></codeline>
<codeline lineno="94"><highlight class="comment"><sp/><sp/><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/>m<sp/>+<sp/>n<sp/>=<sp/>4</highlight></codeline>
<codeline lineno="95"><highlight class="comment"><sp/><sp/><sp/>*<sp/>and<sp/>thus</highlight></codeline>
<codeline lineno="96"><highlight class="comment"><sp/><sp/><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/>m<sp/>=<sp/>4<sp/>-<sp/>n<sp/>&lt;=<sp/>2</highlight></codeline>
<codeline lineno="97"><highlight class="comment"><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="98"><highlight class="normal"><sp/><sp/>tmp.<ref refid="unionuu_1a1acb113b0a5af8871b5634516981d300" kindref="member">uq</ref><sp/>=<sp/><ref refid="unionuu_1a1acb113b0a5af8871b5634516981d300" kindref="member">uq</ref>;</highlight></codeline>
<codeline lineno="99"><highlight class="normal"><sp/><sp/>u[0]<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="100"><highlight class="normal"><sp/><sp/>u[1]<sp/>=<sp/><ref refid="include_2sys_2types_8h_1a92c7de42051862b2d44e2f0ccd9ca475" kindref="member">HHALF</ref>(tmp.<ref refid="unionuu_1a8f74169d11a6ab4a569ec546a1704313" kindref="member">ul</ref>[<ref refid="include_2sys_2types_8h_1abec92cc72a096640b821b8cd56a02495" kindref="member">H</ref>]);</highlight></codeline>
<codeline lineno="101"><highlight class="normal"><sp/><sp/>u[2]<sp/>=<sp/><ref refid="include_2sys_2types_8h_1adf04943239a977f38017d6bbf53a4b36" kindref="member">LHALF</ref>(tmp.<ref refid="unionuu_1a8f74169d11a6ab4a569ec546a1704313" kindref="member">ul</ref>[<ref refid="include_2sys_2types_8h_1abec92cc72a096640b821b8cd56a02495" kindref="member">H</ref>]);</highlight></codeline>
<codeline lineno="102"><highlight class="normal"><sp/><sp/>u[3]<sp/>=<sp/><ref refid="include_2sys_2types_8h_1a92c7de42051862b2d44e2f0ccd9ca475" kindref="member">HHALF</ref>(tmp.<ref refid="unionuu_1a8f74169d11a6ab4a569ec546a1704313" kindref="member">ul</ref>[<ref refid="include_2sys_2types_8h_1aa73214aa5f2f94f63d90bb4e3d99fe53" kindref="member">L</ref>]);</highlight></codeline>
<codeline lineno="103"><highlight class="normal"><sp/><sp/>u[4]<sp/>=<sp/><ref refid="include_2sys_2types_8h_1adf04943239a977f38017d6bbf53a4b36" kindref="member">LHALF</ref>(tmp.<ref refid="unionuu_1a8f74169d11a6ab4a569ec546a1704313" kindref="member">ul</ref>[<ref refid="include_2sys_2types_8h_1aa73214aa5f2f94f63d90bb4e3d99fe53" kindref="member">L</ref>]);</highlight></codeline>
<codeline lineno="104"><highlight class="normal"><sp/><sp/>tmp.<ref refid="unionuu_1a1acb113b0a5af8871b5634516981d300" kindref="member">uq</ref><sp/>=<sp/>vq;</highlight></codeline>
<codeline lineno="105"><highlight class="normal"><sp/><sp/>v[1]<sp/>=<sp/><ref refid="include_2sys_2types_8h_1a92c7de42051862b2d44e2f0ccd9ca475" kindref="member">HHALF</ref>(tmp.<ref refid="unionuu_1a8f74169d11a6ab4a569ec546a1704313" kindref="member">ul</ref>[<ref refid="include_2sys_2types_8h_1abec92cc72a096640b821b8cd56a02495" kindref="member">H</ref>]);</highlight></codeline>
<codeline lineno="106"><highlight class="normal"><sp/><sp/>v[2]<sp/>=<sp/><ref refid="include_2sys_2types_8h_1adf04943239a977f38017d6bbf53a4b36" kindref="member">LHALF</ref>(tmp.<ref refid="unionuu_1a8f74169d11a6ab4a569ec546a1704313" kindref="member">ul</ref>[<ref refid="include_2sys_2types_8h_1abec92cc72a096640b821b8cd56a02495" kindref="member">H</ref>]);</highlight></codeline>
<codeline lineno="107"><highlight class="normal"><sp/><sp/>v[3]<sp/>=<sp/><ref refid="include_2sys_2types_8h_1a92c7de42051862b2d44e2f0ccd9ca475" kindref="member">HHALF</ref>(tmp.<ref refid="unionuu_1a8f74169d11a6ab4a569ec546a1704313" kindref="member">ul</ref>[<ref refid="include_2sys_2types_8h_1aa73214aa5f2f94f63d90bb4e3d99fe53" kindref="member">L</ref>]);</highlight></codeline>
<codeline lineno="108"><highlight class="normal"><sp/><sp/>v[4]<sp/>=<sp/><ref refid="include_2sys_2types_8h_1adf04943239a977f38017d6bbf53a4b36" kindref="member">LHALF</ref>(tmp.<ref refid="unionuu_1a8f74169d11a6ab4a569ec546a1704313" kindref="member">ul</ref>[<ref refid="include_2sys_2types_8h_1aa73214aa5f2f94f63d90bb4e3d99fe53" kindref="member">L</ref>]);</highlight></codeline>
<codeline lineno="109"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(n<sp/>=<sp/>4;<sp/>v[1]<sp/>==<sp/>0;<sp/>v++)<sp/>{</highlight></codeline>
<codeline lineno="110"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(--n<sp/>==<sp/>1)<sp/>{</highlight></codeline>
<codeline lineno="111"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="include_2sys_2types_8h_1a8f25a50daf29ce2cee1ec038a4d744ea" kindref="member">u_long</ref><sp/>rbj;<sp/></highlight><highlight class="comment">/*<sp/>r*B+u[j]<sp/>(not<sp/>root<sp/>boy<sp/>jim)<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="112"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="include_2sys_2types_8h_1adac711321b4eea0f286581348e66108c" kindref="member">digit</ref><sp/>q1,<sp/>q2,<sp/>q3,<sp/>q4;</highlight></codeline>
<codeline lineno="113"><highlight class="normal"></highlight></codeline>
<codeline lineno="114"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="115"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>Change<sp/>of<sp/>plan,<sp/>per<sp/>exercise<sp/>16.</highlight></codeline>
<codeline lineno="116"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/>r<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="117"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/>for<sp/>j<sp/>=<sp/>1..4:</highlight></codeline>
<codeline lineno="118"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>q[j]<sp/>=<sp/>floor((r*B<sp/>+<sp/>u[j])<sp/>/<sp/>v),</highlight></codeline>
<codeline lineno="119"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>r<sp/>=<sp/>(r*B<sp/>+<sp/>u[j])<sp/>%<sp/>v;</highlight></codeline>
<codeline lineno="120"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>We<sp/>unroll<sp/>this<sp/>completely<sp/>here.</highlight></codeline>
<codeline lineno="121"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="122"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>t<sp/>=<sp/>v[2];<sp/></highlight><highlight class="comment">/*<sp/>nonzero,<sp/>by<sp/>definition<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="123"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>q1<sp/>=<sp/>u[1]<sp/>/<sp/>t;</highlight></codeline>
<codeline lineno="124"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>rbj<sp/>=<sp/><ref refid="include_2sys_2types_8h_1a152dd91c3a7a672cde53646a9cb62594" kindref="member">COMBINE</ref>(u[1]<sp/>%<sp/>t,<sp/>u[2]);</highlight></codeline>
<codeline lineno="125"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>q2<sp/>=<sp/>rbj<sp/>/<sp/>t;</highlight></codeline>
<codeline lineno="126"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>rbj<sp/>=<sp/><ref refid="include_2sys_2types_8h_1a152dd91c3a7a672cde53646a9cb62594" kindref="member">COMBINE</ref>(rbj<sp/>%<sp/>t,<sp/>u[3]);</highlight></codeline>
<codeline lineno="127"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>q3<sp/>=<sp/>rbj<sp/>/<sp/>t;</highlight></codeline>
<codeline lineno="128"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>rbj<sp/>=<sp/><ref refid="include_2sys_2types_8h_1a152dd91c3a7a672cde53646a9cb62594" kindref="member">COMBINE</ref>(rbj<sp/>%<sp/>t,<sp/>u[4]);</highlight></codeline>
<codeline lineno="129"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>q4<sp/>=<sp/>rbj<sp/>/<sp/>t;</highlight></codeline>
<codeline lineno="130"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(arq)</highlight></codeline>
<codeline lineno="131"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*arq<sp/>=<sp/>rbj<sp/>%<sp/>t;</highlight></codeline>
<codeline lineno="132"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>tmp.<ref refid="unionuu_1a8f74169d11a6ab4a569ec546a1704313" kindref="member">ul</ref>[<ref refid="include_2sys_2types_8h_1abec92cc72a096640b821b8cd56a02495" kindref="member">H</ref>]<sp/>=<sp/><ref refid="include_2sys_2types_8h_1a152dd91c3a7a672cde53646a9cb62594" kindref="member">COMBINE</ref>(q1,<sp/>q2);</highlight></codeline>
<codeline lineno="133"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>tmp.<ref refid="unionuu_1a8f74169d11a6ab4a569ec546a1704313" kindref="member">ul</ref>[<ref refid="include_2sys_2types_8h_1aa73214aa5f2f94f63d90bb4e3d99fe53" kindref="member">L</ref>]<sp/>=<sp/><ref refid="include_2sys_2types_8h_1a152dd91c3a7a672cde53646a9cb62594" kindref="member">COMBINE</ref>(q3,<sp/>q4);</highlight></codeline>
<codeline lineno="134"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(tmp.<ref refid="unionuu_1a3ce40dca10fdac763f032c2062fcb310" kindref="member">q</ref>);</highlight></codeline>
<codeline lineno="135"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="136"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="137"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="138"><highlight class="comment"><sp/><sp/><sp/>*<sp/>By<sp/>adjusting<sp/>q<sp/>once<sp/>we<sp/>determine<sp/>m,<sp/>we<sp/>can<sp/>guarantee<sp/>that</highlight></codeline>
<codeline lineno="139"><highlight class="comment"><sp/><sp/><sp/>*<sp/>there<sp/>is<sp/>a<sp/>complete<sp/>four-digit<sp/>quotient<sp/>at<sp/>&amp;qspace[1]<sp/>when</highlight></codeline>
<codeline lineno="140"><highlight class="comment"><sp/><sp/><sp/>*<sp/>we<sp/>finally<sp/>stop.</highlight></codeline>
<codeline lineno="141"><highlight class="comment"><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="142"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(m<sp/>=<sp/>4<sp/>-<sp/>n;<sp/>u[1]<sp/>==<sp/>0;<sp/>u++)</highlight></codeline>
<codeline lineno="143"><highlight class="normal"><sp/><sp/><sp/><sp/>m--;</highlight></codeline>
<codeline lineno="144"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>4<sp/>-<sp/>m;<sp/>--i<sp/>&gt;=<sp/>0;)</highlight></codeline>
<codeline lineno="145"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="unionuu_1a3ce40dca10fdac763f032c2062fcb310" kindref="member">q</ref>[i]<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="146"><highlight class="normal"><sp/><sp/><ref refid="unionuu_1a3ce40dca10fdac763f032c2062fcb310" kindref="member">q</ref><sp/>+=<sp/>4<sp/>-<sp/>m;</highlight></codeline>
<codeline lineno="147"><highlight class="normal"></highlight></codeline>
<codeline lineno="148"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="149"><highlight class="comment"><sp/><sp/><sp/>*<sp/>Here<sp/>we<sp/>run<sp/>Program<sp/>D,<sp/>translated<sp/>from<sp/>MIX<sp/>to<sp/>C<sp/>and<sp/>acquiring</highlight></codeline>
<codeline lineno="150"><highlight class="comment"><sp/><sp/><sp/>*<sp/>a<sp/>few<sp/>minor<sp/>changes.</highlight></codeline>
<codeline lineno="151"><highlight class="comment"><sp/><sp/><sp/>*</highlight></codeline>
<codeline lineno="152"><highlight class="comment"><sp/><sp/><sp/>*<sp/>D1:<sp/>choose<sp/>multiplier<sp/>1<sp/>&lt;&lt;<sp/>d<sp/>to<sp/>ensure<sp/>v[1]<sp/>&gt;=<sp/>B/2.</highlight></codeline>
<codeline lineno="153"><highlight class="comment"><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="154"><highlight class="normal"><sp/><sp/>d<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="155"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(t<sp/>=<sp/>v[1];<sp/>t<sp/>&lt;<sp/><ref refid="include_2sys_2types_8h_1a111da81ae5883147168bbb8366377b10" kindref="member">B</ref><sp/>/<sp/>2;<sp/>t<sp/>&lt;&lt;=<sp/>1)</highlight></codeline>
<codeline lineno="156"><highlight class="normal"><sp/><sp/><sp/><sp/>d++;</highlight></codeline>
<codeline lineno="157"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(d<sp/>&gt;<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="158"><highlight class="normal"><sp/><sp/><sp/><sp/>__shl(&amp;u[0],<sp/>m<sp/>+<sp/>n,<sp/>d);<sp/></highlight><highlight class="comment">/*<sp/>u<sp/>&lt;&lt;=<sp/>d<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="159"><highlight class="normal"><sp/><sp/><sp/><sp/>__shl(&amp;v[1],<sp/>n<sp/>-<sp/>1,<sp/>d);<sp/></highlight><highlight class="comment">/*<sp/>v<sp/>&lt;&lt;=<sp/>d<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="160"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="161"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="162"><highlight class="comment"><sp/><sp/><sp/>*<sp/>D2:<sp/>j<sp/>=<sp/>0.</highlight></codeline>
<codeline lineno="163"><highlight class="comment"><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="164"><highlight class="normal"><sp/><sp/>j<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="165"><highlight class="normal"><sp/><sp/>v1<sp/>=<sp/>v[1];<sp/></highlight><highlight class="comment">/*<sp/>for<sp/>D3<sp/>--<sp/>note<sp/>that<sp/>v[1..n]<sp/>are<sp/>constant<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="166"><highlight class="normal"><sp/><sp/>v2<sp/>=<sp/>v[2];<sp/></highlight><highlight class="comment">/*<sp/>for<sp/>D3<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="167"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">do</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="168"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">register</highlight><highlight class="normal"><sp/><ref refid="include_2sys_2types_8h_1adac711321b4eea0f286581348e66108c" kindref="member">digit</ref><sp/>uj0,<sp/>uj1,<sp/>uj2;</highlight></codeline>
<codeline lineno="169"><highlight class="normal"></highlight></codeline>
<codeline lineno="170"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="171"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*<sp/>D3:<sp/>Calculate<sp/>qhat<sp/>(\^q,<sp/>in<sp/>TeX<sp/>notation).</highlight></codeline>
<codeline lineno="172"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*<sp/>Let<sp/>qhat<sp/>=<sp/>min((u[j]*B<sp/>+<sp/>u[j+1])/v[1],<sp/>B-1),<sp/>and</highlight></codeline>
<codeline lineno="173"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*<sp/>let<sp/>rhat<sp/>=<sp/>(u[j]*B<sp/>+<sp/>u[j+1])<sp/>mod<sp/>v[1].</highlight></codeline>
<codeline lineno="174"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*<sp/>While<sp/>rhat<sp/>&lt;<sp/>B<sp/>and<sp/>v[2]*qhat<sp/>&gt;<sp/>rhat*B+u[j+2],</highlight></codeline>
<codeline lineno="175"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*<sp/>decrement<sp/>qhat<sp/>and<sp/>increase<sp/>rhat<sp/>correspondingly.</highlight></codeline>
<codeline lineno="176"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*<sp/>Note<sp/>that<sp/>if<sp/>rhat<sp/>&gt;=<sp/>B,<sp/>v[2]*qhat<sp/>&lt;<sp/>rhat*B.</highlight></codeline>
<codeline lineno="177"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="178"><highlight class="normal"><sp/><sp/><sp/><sp/>uj0<sp/>=<sp/>u[j<sp/>+<sp/>0];<sp/></highlight><highlight class="comment">/*<sp/>for<sp/>D3<sp/>only<sp/>--<sp/>note<sp/>that<sp/>u[j+...]<sp/>change<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="179"><highlight class="normal"><sp/><sp/><sp/><sp/>uj1<sp/>=<sp/>u[j<sp/>+<sp/>1];<sp/></highlight><highlight class="comment">/*<sp/>for<sp/>D3<sp/>only<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="180"><highlight class="normal"><sp/><sp/><sp/><sp/>uj2<sp/>=<sp/>u[j<sp/>+<sp/>2];<sp/></highlight><highlight class="comment">/*<sp/>for<sp/>D3<sp/>only<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="181"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(uj0<sp/>==<sp/>v1)<sp/>{</highlight></codeline>
<codeline lineno="182"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>qhat<sp/>=<sp/><ref refid="include_2sys_2types_8h_1a111da81ae5883147168bbb8366377b10" kindref="member">B</ref>;</highlight></codeline>
<codeline lineno="183"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>rhat<sp/>=<sp/>uj1;</highlight></codeline>
<codeline lineno="184"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>qhat_too_big;</highlight></codeline>
<codeline lineno="185"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="186"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="187"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="include_2sys_2types_8h_1a8f25a50daf29ce2cee1ec038a4d744ea" kindref="member">u_long</ref><sp/>nn<sp/>=<sp/><ref refid="include_2sys_2types_8h_1a152dd91c3a7a672cde53646a9cb62594" kindref="member">COMBINE</ref>(uj0,<sp/>uj1);</highlight></codeline>
<codeline lineno="188"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>qhat<sp/>=<sp/>nn<sp/>/<sp/>v1;</highlight></codeline>
<codeline lineno="189"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>rhat<sp/>=<sp/>nn<sp/>%<sp/>v1;</highlight></codeline>
<codeline lineno="190"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="191"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(v2<sp/>*<sp/>qhat<sp/>&gt;<sp/><ref refid="include_2sys_2types_8h_1a152dd91c3a7a672cde53646a9cb62594" kindref="member">COMBINE</ref>(rhat,<sp/>uj2))<sp/>{</highlight></codeline>
<codeline lineno="192"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>qhat_too_big:<sp/>qhat--;</highlight></codeline>
<codeline lineno="193"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((rhat<sp/>+=<sp/>v1)<sp/>&gt;=<sp/><ref refid="include_2sys_2types_8h_1a111da81ae5883147168bbb8366377b10" kindref="member">B</ref>)</highlight></codeline>
<codeline lineno="194"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="195"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="196"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="197"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*<sp/>D4:<sp/>Multiply<sp/>and<sp/>subtract.</highlight></codeline>
<codeline lineno="198"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*<sp/>The<sp/>variable<sp/>`t&apos;<sp/>holds<sp/>any<sp/>borrows<sp/>across<sp/>the<sp/>loop.</highlight></codeline>
<codeline lineno="199"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*<sp/>We<sp/>split<sp/>this<sp/>up<sp/>so<sp/>that<sp/>we<sp/>do<sp/>not<sp/>require<sp/>v[0]<sp/>=<sp/>0,</highlight></codeline>
<codeline lineno="200"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*<sp/>and<sp/>to<sp/>eliminate<sp/>a<sp/>final<sp/>special<sp/>case.</highlight></codeline>
<codeline lineno="201"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="202"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(t<sp/>=<sp/>0,<sp/>i<sp/>=<sp/>n;<sp/>i<sp/>&gt;<sp/>0;<sp/>i--)<sp/>{</highlight></codeline>
<codeline lineno="203"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>t<sp/>=<sp/>u[i<sp/>+<sp/>j]<sp/>-<sp/>v[i]<sp/>*<sp/>qhat<sp/>-<sp/>t;</highlight></codeline>
<codeline lineno="204"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>u[i<sp/>+<sp/>j]<sp/>=<sp/><ref refid="include_2sys_2types_8h_1adf04943239a977f38017d6bbf53a4b36" kindref="member">LHALF</ref>(t);</highlight></codeline>
<codeline lineno="205"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>t<sp/>=<sp/>(<ref refid="include_2sys_2types_8h_1a111da81ae5883147168bbb8366377b10" kindref="member">B</ref><sp/>-<sp/><ref refid="include_2sys_2types_8h_1a92c7de42051862b2d44e2f0ccd9ca475" kindref="member">HHALF</ref>(t))<sp/>&amp;<sp/>(<ref refid="include_2sys_2types_8h_1a111da81ae5883147168bbb8366377b10" kindref="member">B</ref><sp/>-<sp/>1);</highlight></codeline>
<codeline lineno="206"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="207"><highlight class="normal"><sp/><sp/><sp/><sp/>t<sp/>=<sp/>u[j]<sp/>-<sp/>t;</highlight></codeline>
<codeline lineno="208"><highlight class="normal"><sp/><sp/><sp/><sp/>u[j]<sp/>=<sp/><ref refid="include_2sys_2types_8h_1adf04943239a977f38017d6bbf53a4b36" kindref="member">LHALF</ref>(t);</highlight></codeline>
<codeline lineno="209"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="210"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*<sp/>D5:<sp/>test<sp/>remainder.</highlight></codeline>
<codeline lineno="211"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*<sp/>There<sp/>is<sp/>a<sp/>borrow<sp/>if<sp/>and<sp/>only<sp/>if<sp/>HHALF(t)<sp/>is<sp/>nonzero;</highlight></codeline>
<codeline lineno="212"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*<sp/>in<sp/>that<sp/>(rare)<sp/>case,<sp/>qhat<sp/>was<sp/>too<sp/>large<sp/>(by<sp/>exactly<sp/>1).</highlight></codeline>
<codeline lineno="213"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*<sp/>Fix<sp/>it<sp/>by<sp/>adding<sp/>v[1..n]<sp/>to<sp/>u[j..j+n].</highlight></codeline>
<codeline lineno="214"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="215"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="include_2sys_2types_8h_1a92c7de42051862b2d44e2f0ccd9ca475" kindref="member">HHALF</ref>(t))<sp/>{</highlight></codeline>
<codeline lineno="216"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>qhat--;</highlight></codeline>
<codeline lineno="217"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(t<sp/>=<sp/>0,<sp/>i<sp/>=<sp/>n;<sp/>i<sp/>&gt;<sp/>0;<sp/>i--)<sp/>{<sp/></highlight><highlight class="comment">/*<sp/>D6:<sp/>add<sp/>back.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="218"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>t<sp/>+=<sp/>u[i<sp/>+<sp/>j]<sp/>+<sp/>v[i];</highlight></codeline>
<codeline lineno="219"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>u[i<sp/>+<sp/>j]<sp/>=<sp/><ref refid="include_2sys_2types_8h_1adf04943239a977f38017d6bbf53a4b36" kindref="member">LHALF</ref>(t);</highlight></codeline>
<codeline lineno="220"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>t<sp/>=<sp/><ref refid="include_2sys_2types_8h_1a92c7de42051862b2d44e2f0ccd9ca475" kindref="member">HHALF</ref>(t);</highlight></codeline>
<codeline lineno="221"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="222"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>u[j]<sp/>=<sp/><ref refid="include_2sys_2types_8h_1adf04943239a977f38017d6bbf53a4b36" kindref="member">LHALF</ref>(u[j]<sp/>+<sp/>t);</highlight></codeline>
<codeline lineno="223"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="224"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="unionuu_1a3ce40dca10fdac763f032c2062fcb310" kindref="member">q</ref>[j]<sp/>=<sp/>qhat;</highlight></codeline>
<codeline lineno="225"><highlight class="normal"><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(++j<sp/>&lt;=<sp/>m);<sp/></highlight><highlight class="comment">/*<sp/>D7:<sp/>loop<sp/>on<sp/>j.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="226"><highlight class="normal"></highlight></codeline>
<codeline lineno="227"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="228"><highlight class="comment"><sp/><sp/><sp/>*<sp/>If<sp/>caller<sp/>wants<sp/>the<sp/>remainder,<sp/>we<sp/>have<sp/>to<sp/>calculate<sp/>it<sp/>as</highlight></codeline>
<codeline lineno="229"><highlight class="comment"><sp/><sp/><sp/>*<sp/>u[m..m+n]<sp/>&gt;&gt;<sp/>d<sp/>(this<sp/>is<sp/>at<sp/>most<sp/>n<sp/>digits<sp/>and<sp/>thus<sp/>fits<sp/>in</highlight></codeline>
<codeline lineno="230"><highlight class="comment"><sp/><sp/><sp/>*<sp/>u[m+1..m+n],<sp/>but<sp/>we<sp/>may<sp/>need<sp/>more<sp/>source<sp/>digits).</highlight></codeline>
<codeline lineno="231"><highlight class="comment"><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="232"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(arq)<sp/>{</highlight></codeline>
<codeline lineno="233"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(d)<sp/>{</highlight></codeline>
<codeline lineno="234"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>m<sp/>+<sp/>n;<sp/>i<sp/>&gt;<sp/>m;<sp/>--i)</highlight></codeline>
<codeline lineno="235"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>u[i]<sp/>=<sp/>(u[i]<sp/>&gt;&gt;<sp/>d)<sp/>|<sp/><ref refid="include_2sys_2types_8h_1adf04943239a977f38017d6bbf53a4b36" kindref="member">LHALF</ref>(u[i<sp/>-<sp/>1]<sp/>&lt;&lt;<sp/>(<ref refid="include_2sys_2types_8h_1a652f8dfd5ad718480293127346c8110f" kindref="member">HALF_BITS</ref><sp/>-<sp/>d));</highlight></codeline>
<codeline lineno="236"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>u[i]<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="237"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="238"><highlight class="normal"><sp/><sp/><sp/><sp/>tmp.<ref refid="unionuu_1a8f74169d11a6ab4a569ec546a1704313" kindref="member">ul</ref>[<ref refid="include_2sys_2types_8h_1abec92cc72a096640b821b8cd56a02495" kindref="member">H</ref>]<sp/>=<sp/><ref refid="include_2sys_2types_8h_1a152dd91c3a7a672cde53646a9cb62594" kindref="member">COMBINE</ref>(uspace[1],<sp/>uspace[2]);</highlight></codeline>
<codeline lineno="239"><highlight class="normal"><sp/><sp/><sp/><sp/>tmp.<ref refid="unionuu_1a8f74169d11a6ab4a569ec546a1704313" kindref="member">ul</ref>[<ref refid="include_2sys_2types_8h_1aa73214aa5f2f94f63d90bb4e3d99fe53" kindref="member">L</ref>]<sp/>=<sp/><ref refid="include_2sys_2types_8h_1a152dd91c3a7a672cde53646a9cb62594" kindref="member">COMBINE</ref>(uspace[3],<sp/>uspace[4]);</highlight></codeline>
<codeline lineno="240"><highlight class="normal"><sp/><sp/><sp/><sp/>*arq<sp/>=<sp/>tmp.<ref refid="unionuu_1a3ce40dca10fdac763f032c2062fcb310" kindref="member">q</ref>;</highlight></codeline>
<codeline lineno="241"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="242"><highlight class="normal"></highlight></codeline>
<codeline lineno="243"><highlight class="normal"><sp/><sp/>tmp.<ref refid="unionuu_1a8f74169d11a6ab4a569ec546a1704313" kindref="member">ul</ref>[<ref refid="include_2sys_2types_8h_1abec92cc72a096640b821b8cd56a02495" kindref="member">H</ref>]<sp/>=<sp/><ref refid="include_2sys_2types_8h_1a152dd91c3a7a672cde53646a9cb62594" kindref="member">COMBINE</ref>(qspace[1],<sp/>qspace[2]);</highlight></codeline>
<codeline lineno="244"><highlight class="normal"><sp/><sp/>tmp.<ref refid="unionuu_1a8f74169d11a6ab4a569ec546a1704313" kindref="member">ul</ref>[<ref refid="include_2sys_2types_8h_1aa73214aa5f2f94f63d90bb4e3d99fe53" kindref="member">L</ref>]<sp/>=<sp/><ref refid="include_2sys_2types_8h_1a152dd91c3a7a672cde53646a9cb62594" kindref="member">COMBINE</ref>(qspace[3],<sp/>qspace[4]);</highlight></codeline>
<codeline lineno="245"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(tmp.<ref refid="unionuu_1a3ce40dca10fdac763f032c2062fcb310" kindref="member">q</ref>);</highlight></codeline>
<codeline lineno="246"><highlight class="normal">}</highlight></codeline>
<codeline lineno="247"><highlight class="normal"></highlight></codeline>
<codeline lineno="248" refid="kprintf_8c_1ac554d985a0e870553a095f47dfe65239" refkind="member"><highlight class="normal"><ref refid="include_2sys_2types_8h_1a289ae7cf9c95157e99202b0057d4935c" kindref="member">u_quad_t</ref><sp/><ref refid="kprintf_8c_1ac554d985a0e870553a095f47dfe65239" kindref="member">__umoddi3</ref>(a,<sp/>b)</highlight></codeline>
<codeline lineno="249"><highlight class="normal"><sp/><sp/><ref refid="include_2sys_2types_8h_1a289ae7cf9c95157e99202b0057d4935c" kindref="member">u_quad_t</ref><sp/>a,<sp/>b;<sp/>{</highlight></codeline>
<codeline lineno="250"><highlight class="normal"><sp/><sp/><ref refid="include_2sys_2types_8h_1a289ae7cf9c95157e99202b0057d4935c" kindref="member">u_quad_t</ref><sp/>r;</highlight></codeline>
<codeline lineno="251"><highlight class="normal"></highlight></codeline>
<codeline lineno="252"><highlight class="normal"><sp/><sp/>(void)<sp/><ref refid="kprintf_8c_1a19096e3df18062999062c914a569c7d6" kindref="member">__qdivrem</ref>(a,<sp/>b,<sp/>&amp;r);</highlight></codeline>
<codeline lineno="253"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(r);</highlight></codeline>
<codeline lineno="254"><highlight class="normal">}</highlight></codeline>
<codeline lineno="255"><highlight class="normal"></highlight></codeline>
<codeline lineno="256" refid="kprintf_8c_1a813254cfe6d658ea82f1dcdf2d927fb8" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="kprintf_8c_1a813254cfe6d658ea82f1dcdf2d927fb8" kindref="member">printOff</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="257" refid="kprintf_8c_1a20b3409b318c04fbc25a13dc10d1c34f" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="kprintf_8c_1a20b3409b318c04fbc25a13dc10d1c34f" kindref="member">ogprintOff</ref><sp/>=<sp/>0x1;</highlight></codeline>
<codeline lineno="258"><highlight class="normal"></highlight></codeline>
<codeline lineno="259" refid="kprintf_8c_1ab2761bdf0cca73ad0fb5880895210cd8" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="kprintf_8c_1ab2761bdf0cca73ad0fb5880895210cd8" kindref="member">kprintf</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*fmt,<sp/>...)<sp/>{</highlight></codeline>
<codeline lineno="260"><highlight class="normal"><sp/><sp/><ref refid="stdarg_8h_1abaefbc6cabb217bf0138d4f9c94d4775" kindref="member">va_list</ref><sp/>ap;</highlight></codeline>
<codeline lineno="261"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>retval;</highlight></codeline>
<codeline lineno="262"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/><ref refid="structbuf" kindref="compound">buf</ref>[512];</highlight></codeline>
<codeline lineno="263"><highlight class="normal"></highlight></codeline>
<codeline lineno="264"><highlight class="normal"><sp/><sp/><ref refid="stdarg_8h_1ade24ac546ea93fde2353ed2db8e89c66" kindref="member">va_start</ref>(ap,<sp/>fmt);</highlight></codeline>
<codeline lineno="265"><highlight class="normal"></highlight></codeline>
<codeline lineno="266"><highlight class="normal"><sp/><sp/>retval<sp/>=<sp/><ref refid="kprintf_8c_1a3093cdac4668a4ccffdd7f77270888b7" kindref="member">kvprintf</ref>(fmt,<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>,<sp/>&amp;<ref refid="structbuf" kindref="compound">buf</ref>,<sp/>10,<sp/>ap);</highlight></codeline>
<codeline lineno="267"><highlight class="normal"><sp/><sp/><ref refid="structbuf" kindref="compound">buf</ref>[retval]<sp/>=<sp/></highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="268"><highlight class="normal"><sp/><sp/><ref refid="stdarg_8h_1acd9b3b9085ec072324c5fdac2b40304e" kindref="member">va_end</ref>(ap);</highlight></codeline>
<codeline lineno="269"><highlight class="normal"></highlight></codeline>
<codeline lineno="270"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="kprintf_8c_1a813254cfe6d658ea82f1dcdf2d927fb8" kindref="member">printOff</ref><sp/>==<sp/>0x0)</highlight></codeline>
<codeline lineno="271"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="video_8h_1a5429378b96a24fadfd2d1f8d777eb95a" kindref="member">kprint</ref>(<ref refid="structbuf" kindref="compound">buf</ref>);</highlight></codeline>
<codeline lineno="272"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="kprintf_8c_1a20b3409b318c04fbc25a13dc10d1c34f" kindref="member">ogprintOff</ref><sp/>==<sp/>0x0)</highlight></codeline>
<codeline lineno="273"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a3b4a66bf1f6583e65660f281b6014aa1" kindref="member">ogPrintf</ref>(<ref refid="structbuf" kindref="compound">buf</ref>);</highlight></codeline>
<codeline lineno="274"><highlight class="normal"></highlight></codeline>
<codeline lineno="275"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(retval);</highlight></codeline>
<codeline lineno="276"><highlight class="normal">}</highlight></codeline>
<codeline lineno="277"><highlight class="normal"></highlight></codeline>
<codeline lineno="278" refid="kprintf_8c_1ac38cd16373d98782e1465bd3d5aba470" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="kprintf_8c_1ac38cd16373d98782e1465bd3d5aba470" kindref="member">sprintf</ref>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*<ref refid="structbuf" kindref="compound">buf</ref>,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*fmt,<sp/>...)<sp/>{</highlight></codeline>
<codeline lineno="279"><highlight class="normal"><sp/><sp/><ref refid="stdarg_8h_1abaefbc6cabb217bf0138d4f9c94d4775" kindref="member">va_list</ref><sp/>args;</highlight></codeline>
<codeline lineno="280"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="281"><highlight class="normal"><sp/><sp/><ref refid="stdarg_8h_1ade24ac546ea93fde2353ed2db8e89c66" kindref="member">va_start</ref>(args,<sp/>fmt);</highlight></codeline>
<codeline lineno="282"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>i<sp/>=<sp/>vsprintf(<sp/>buf,<sp/>fmt,<sp/>args<sp/>);<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="283"><highlight class="normal"><sp/><sp/>i<sp/>=<sp/><ref refid="kprintf_8c_1a3093cdac4668a4ccffdd7f77270888b7" kindref="member">kvprintf</ref>(fmt,<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>,<sp/><ref refid="structbuf" kindref="compound">buf</ref>,<sp/>10,<sp/>args);</highlight></codeline>
<codeline lineno="284"><highlight class="normal"><sp/><sp/><ref refid="stdarg_8h_1acd9b3b9085ec072324c5fdac2b40304e" kindref="member">va_end</ref>(args);</highlight></codeline>
<codeline lineno="285"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(i);</highlight></codeline>
<codeline lineno="286"><highlight class="normal">}</highlight></codeline>
<codeline lineno="287"><highlight class="normal"></highlight></codeline>
<codeline lineno="288"><highlight class="normal"></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="289"><highlight class="comment"><sp/>*<sp/>Scaled<sp/>down<sp/>version<sp/>of<sp/>printf(3).</highlight></codeline>
<codeline lineno="290"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="291"><highlight class="comment"><sp/>*<sp/>Two<sp/>additional<sp/>formats:</highlight></codeline>
<codeline lineno="292"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="293"><highlight class="comment"><sp/>*<sp/>The<sp/>format<sp/>%b<sp/>is<sp/>supported<sp/>to<sp/>decode<sp/>error<sp/>registers.</highlight></codeline>
<codeline lineno="294"><highlight class="comment"><sp/>*<sp/>Its<sp/>usage<sp/>is:</highlight></codeline>
<codeline lineno="295"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="296"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/>printf(&quot;reg=%b\n&quot;,<sp/>regval,<sp/>&quot;&lt;base&gt;&lt;arg&gt;*&quot;);</highlight></codeline>
<codeline lineno="297"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="298"><highlight class="comment"><sp/>*<sp/>where<sp/>&lt;base&gt;<sp/>is<sp/>the<sp/>output<sp/>base<sp/>expressed<sp/>as<sp/>a<sp/>control<sp/>character,<sp/>e.g.</highlight></codeline>
<codeline lineno="299"><highlight class="comment"><sp/>*<sp/>\10<sp/>gives<sp/>octal;<sp/>\20<sp/>gives<sp/>hex.<sp/><sp/>Each<sp/>arg<sp/>is<sp/>a<sp/>sequence<sp/>of<sp/>characters,</highlight></codeline>
<codeline lineno="300"><highlight class="comment"><sp/>*<sp/>the<sp/>first<sp/>of<sp/>which<sp/>gives<sp/>the<sp/>bit<sp/>number<sp/>to<sp/>be<sp/>inspected<sp/>(origin<sp/>1),<sp/>and</highlight></codeline>
<codeline lineno="301"><highlight class="comment"><sp/>*<sp/>the<sp/>next<sp/>characters<sp/>(up<sp/>to<sp/>a<sp/>control<sp/>character,<sp/>i.e.<sp/>a<sp/>character<sp/>&lt;=<sp/>32),</highlight></codeline>
<codeline lineno="302"><highlight class="comment"><sp/>*<sp/>give<sp/>the<sp/>name<sp/>of<sp/>the<sp/>register.<sp/><sp/>Thus:</highlight></codeline>
<codeline lineno="303"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="304"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/>kvprintf(&quot;reg=%b\n&quot;,<sp/>3,<sp/>&quot;\10\2BITTWO\1BITONE\n&quot;);</highlight></codeline>
<codeline lineno="305"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="306"><highlight class="comment"><sp/>*<sp/>would<sp/>produce<sp/>output:</highlight></codeline>
<codeline lineno="307"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="308"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/>reg=3&lt;BITTWO,BITONE&gt;</highlight></codeline>
<codeline lineno="309"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="310"><highlight class="comment"><sp/>*<sp/>XXX:<sp/><sp/>%D<sp/><sp/>--<sp/>Hexdump,<sp/>takes<sp/>pointer<sp/>and<sp/>separator<sp/>string:</highlight></codeline>
<codeline lineno="311"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(&quot;%6D&quot;,<sp/>ptr,<sp/>&quot;:&quot;)<sp/><sp/><sp/>-&gt;<sp/>XX:XX:XX:XX:XX:XX</highlight></codeline>
<codeline lineno="312"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(&quot;%*D&quot;,<sp/>len,<sp/>ptr,<sp/>&quot;<sp/>&quot;<sp/>-&gt;<sp/>XX<sp/>XX<sp/>XX<sp/>XX<sp/>...</highlight></codeline>
<codeline lineno="313"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="314"><highlight class="normal"></highlight></codeline>
<codeline lineno="315" refid="kprintf_8c_1a3093cdac4668a4ccffdd7f77270888b7" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="kprintf_8c_1a3093cdac4668a4ccffdd7f77270888b7" kindref="member">kvprintf</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*fmt,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>(*func)(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal">,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*),<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*arg,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>radix,<sp/><ref refid="stdarg_8h_1abaefbc6cabb217bf0138d4f9c94d4775" kindref="member">va_list</ref><sp/>ap)<sp/>{</highlight></codeline>
<codeline lineno="316"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>PCHAR(c)<sp/>{int<sp/>cc=(c);<sp/>if<sp/>(func)<sp/>(*func)(cc,arg);<sp/>else<sp/>*d++<sp/>=<sp/>cc;<sp/>retval++;<sp/>}</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="317"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>nbuf[<ref refid="kprintf_8h_1a217f530a384d97fff0492492edab5222" kindref="member">MAXNBUF</ref>];</highlight></codeline>
<codeline lineno="318"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*d;</highlight></codeline>
<codeline lineno="319"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*p,<sp/>*percent,<sp/>*<ref refid="unionuu_1a3ce40dca10fdac763f032c2062fcb310" kindref="member">q</ref>;</highlight></codeline>
<codeline lineno="320"><highlight class="normal"><sp/><sp/><ref refid="include_2sys_2types_8h_1ae2b02ed168fc99cff3851603910b1fb6" kindref="member">u_char</ref><sp/>*up;</highlight></codeline>
<codeline lineno="321"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ch,<sp/>n;</highlight></codeline>
<codeline lineno="322"><highlight class="normal"><sp/><sp/><ref refid="include_2sys_2types_8h_1a7643e68e022fde0d947e8dc252f716d6" kindref="member">uintmax_t</ref><sp/>num;</highlight></codeline>
<codeline lineno="323"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>base,<sp/>lflag,<sp/>qflag,<sp/>tmp,<sp/>width,<sp/>ladjust,<sp/>sharpflag,<sp/>neg,<sp/>sign,<sp/>dot;</highlight></codeline>
<codeline lineno="324"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>cflag,<sp/>hflag,<sp/>jflag,<sp/>tflag,<sp/>zflag;</highlight></codeline>
<codeline lineno="325"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>dwidth,<sp/>upper;</highlight></codeline>
<codeline lineno="326"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>padc;</highlight></codeline>
<codeline lineno="327"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>stop<sp/>=<sp/>0,<sp/>retval<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="328"><highlight class="normal"></highlight></codeline>
<codeline lineno="329"><highlight class="normal"><sp/><sp/>num<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="330"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!func)</highlight></codeline>
<codeline lineno="331"><highlight class="normal"><sp/><sp/><sp/><sp/>d<sp/>=<sp/>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*)<sp/>arg;</highlight></codeline>
<codeline lineno="332"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="333"><highlight class="normal"><sp/><sp/><sp/><sp/>d<sp/>=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="334"><highlight class="normal"></highlight></codeline>
<codeline lineno="335"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(fmt<sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)</highlight></codeline>
<codeline lineno="336"><highlight class="normal"><sp/><sp/><sp/><sp/>fmt<sp/>=<sp/></highlight><highlight class="stringliteral">&quot;(fmt<sp/>null)\n&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="337"><highlight class="normal"></highlight></codeline>
<codeline lineno="338"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(radix<sp/>&lt;<sp/>2<sp/>||<sp/>radix<sp/>&gt;<sp/>36)</highlight></codeline>
<codeline lineno="339"><highlight class="normal"><sp/><sp/><sp/><sp/>radix<sp/>=<sp/>10;</highlight></codeline>
<codeline lineno="340"><highlight class="normal"></highlight></codeline>
<codeline lineno="341"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(;;)<sp/>{</highlight></codeline>
<codeline lineno="342"><highlight class="normal"><sp/><sp/><sp/><sp/>padc<sp/>=<sp/></highlight><highlight class="charliteral">&apos;<sp/>&apos;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="343"><highlight class="normal"><sp/><sp/><sp/><sp/>width<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="344"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>((ch<sp/>=<sp/>(<ref refid="include_2sys_2types_8h_1ae2b02ed168fc99cff3851603910b1fb6" kindref="member">u_char</ref>)<sp/>*fmt++)<sp/>!=<sp/></highlight><highlight class="charliteral">&apos;%&apos;</highlight><highlight class="normal"><sp/>||<sp/>stop)<sp/>{</highlight></codeline>
<codeline lineno="345"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ch<sp/>==<sp/></highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="346"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(retval);</highlight></codeline>
<codeline lineno="347"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8c_1a24f21637100d1f6ab4f21daccf7840fb" kindref="member">PCHAR</ref>(ch);</highlight></codeline>
<codeline lineno="348"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="349"><highlight class="normal"><sp/><sp/><sp/><sp/>percent<sp/>=<sp/>fmt<sp/>-<sp/>1;</highlight></codeline>
<codeline lineno="350"><highlight class="normal"><sp/><sp/><sp/><sp/>qflag<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="351"><highlight class="normal"><sp/><sp/><sp/><sp/>lflag<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="352"><highlight class="normal"><sp/><sp/><sp/><sp/>ladjust<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="353"><highlight class="normal"><sp/><sp/><sp/><sp/>sharpflag<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="354"><highlight class="normal"><sp/><sp/><sp/><sp/>neg<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="355"><highlight class="normal"><sp/><sp/><sp/><sp/>sign<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="356"><highlight class="normal"><sp/><sp/><sp/><sp/>dot<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="357"><highlight class="normal"><sp/><sp/><sp/><sp/>dwidth<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="358"><highlight class="normal"><sp/><sp/><sp/><sp/>upper<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="359"><highlight class="normal"><sp/><sp/><sp/><sp/>cflag<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="360"><highlight class="normal"><sp/><sp/><sp/><sp/>hflag<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="361"><highlight class="normal"><sp/><sp/><sp/><sp/>jflag<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="362"><highlight class="normal"><sp/><sp/><sp/><sp/>tflag<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="363"><highlight class="normal"><sp/><sp/><sp/><sp/>zflag<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="364"><highlight class="normal"><sp/><sp/><sp/><sp/>reswitch:<sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal"><sp/>(ch<sp/>=<sp/>(<ref refid="include_2sys_2types_8h_1ae2b02ed168fc99cff3851603910b1fb6" kindref="member">u_char</ref>)<sp/>*fmt++)<sp/>{</highlight></codeline>
<codeline lineno="365"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;.&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="366"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dot<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="367"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>reswitch;</highlight></codeline>
<codeline lineno="368"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;#&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="369"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sharpflag<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="370"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>reswitch;</highlight></codeline>
<codeline lineno="371"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;+&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="372"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sign<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="373"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>reswitch;</highlight></codeline>
<codeline lineno="374"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;-&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="375"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ladjust<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="376"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>reswitch;</highlight></codeline>
<codeline lineno="377"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;%&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="378"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8c_1a24f21637100d1f6ab4f21daccf7840fb" kindref="member">PCHAR</ref>(ch)</highlight></codeline>
<codeline lineno="379"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>;</highlight></codeline>
<codeline lineno="380"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="381"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;*&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="382"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!dot)<sp/>{</highlight></codeline>
<codeline lineno="383"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>width<sp/>=<sp/><ref refid="stdarg_8h_1a81ebe6ea6253b0c6618e29de70fe10eb" kindref="member">va_arg</ref>(ap,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="384"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(width<sp/>&lt;<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="385"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ladjust<sp/>=<sp/>!ladjust;</highlight></codeline>
<codeline lineno="386"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>width<sp/>=<sp/>-width;</highlight></codeline>
<codeline lineno="387"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="388"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="389"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="390"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dwidth<sp/>=<sp/><ref refid="stdarg_8h_1a81ebe6ea6253b0c6618e29de70fe10eb" kindref="member">va_arg</ref>(ap,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="391"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="392"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>reswitch;</highlight></codeline>
<codeline lineno="393"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;0&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="394"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!dot)<sp/>{</highlight></codeline>
<codeline lineno="395"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>padc<sp/>=<sp/></highlight><highlight class="charliteral">&apos;0&apos;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="396"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>reswitch;</highlight></codeline>
<codeline lineno="397"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="398"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;1&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="399"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;2&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="400"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;3&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="401"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;4&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="402"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;5&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="403"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;6&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="404"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;7&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="405"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;8&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="406"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;9&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="407"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(n<sp/>=<sp/>0;;<sp/>++fmt)<sp/>{</highlight></codeline>
<codeline lineno="408"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n<sp/>=<sp/>n<sp/>*<sp/>10<sp/>+<sp/>ch<sp/>-<sp/></highlight><highlight class="charliteral">&apos;0&apos;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="409"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ch<sp/>=<sp/>*fmt;</highlight></codeline>
<codeline lineno="410"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ch<sp/>&lt;<sp/>&apos;0&apos;<sp/>||<sp/>ch<sp/>&gt;<sp/></highlight><highlight class="charliteral">&apos;9&apos;</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="411"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="412"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="413"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(dot)</highlight></codeline>
<codeline lineno="414"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dwidth<sp/>=<sp/>n;</highlight></codeline>
<codeline lineno="415"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="416"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>width<sp/>=<sp/>n;</highlight></codeline>
<codeline lineno="417"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>reswitch;</highlight></codeline>
<codeline lineno="418"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;b&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="419"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>num<sp/>=<sp/>(<ref refid="include_2sys_2types_8h_1ac319c165d52643e43249fe003e18bdf3" kindref="member">u_int</ref>)<sp/><ref refid="stdarg_8h_1a81ebe6ea6253b0c6618e29de70fe10eb" kindref="member">va_arg</ref>(ap,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="420"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>p<sp/>=<sp/><ref refid="stdarg_8h_1a81ebe6ea6253b0c6618e29de70fe10eb" kindref="member">va_arg</ref>(ap,<sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*);</highlight></codeline>
<codeline lineno="421"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(<ref refid="unionuu_1a3ce40dca10fdac763f032c2062fcb310" kindref="member">q</ref><sp/>=<sp/>ksprintn(nbuf,<sp/>num,<sp/>*p++,<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>,<sp/>0);<sp/>*<ref refid="unionuu_1a3ce40dca10fdac763f032c2062fcb310" kindref="member">q</ref>;)</highlight></codeline>
<codeline lineno="422"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8c_1a24f21637100d1f6ab4f21daccf7840fb" kindref="member">PCHAR</ref>(*<ref refid="unionuu_1a3ce40dca10fdac763f032c2062fcb310" kindref="member">q</ref>--)</highlight></codeline>
<codeline lineno="423"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>;</highlight></codeline>
<codeline lineno="424"><highlight class="normal"></highlight></codeline>
<codeline lineno="425"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(num<sp/>==<sp/>0)</highlight></codeline>
<codeline lineno="426"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="427"><highlight class="normal"></highlight></codeline>
<codeline lineno="428"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(tmp<sp/>=<sp/>0;<sp/>*p;)<sp/>{</highlight></codeline>
<codeline lineno="429"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n<sp/>=<sp/>*p++;</highlight></codeline>
<codeline lineno="430"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(num<sp/>&amp;<sp/>(1<sp/>&lt;&lt;<sp/>(n<sp/>-<sp/>1)))<sp/>{</highlight></codeline>
<codeline lineno="431"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8c_1a24f21637100d1f6ab4f21daccf7840fb" kindref="member">PCHAR</ref>(tmp<sp/>?<sp/></highlight><highlight class="charliteral">&apos;,&apos;</highlight><highlight class="normal"><sp/>:<sp/></highlight><highlight class="charliteral">&apos;&lt;&apos;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="432"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(;<sp/>(n<sp/>=<sp/>*p)<sp/>&gt;<sp/></highlight><highlight class="charliteral">&apos;<sp/>&apos;</highlight><highlight class="normal">;<sp/>++p)</highlight></codeline>
<codeline lineno="433"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8c_1a24f21637100d1f6ab4f21daccf7840fb" kindref="member">PCHAR</ref>(n);</highlight></codeline>
<codeline lineno="434"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmp<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="435"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="436"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="437"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(;<sp/>*p<sp/>&gt;<sp/></highlight><highlight class="charliteral">&apos;<sp/>&apos;</highlight><highlight class="normal">;<sp/>++p)</highlight></codeline>
<codeline lineno="438"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">continue</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="439"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="440"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmp)</highlight></codeline>
<codeline lineno="441"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8c_1a24f21637100d1f6ab4f21daccf7840fb" kindref="member">PCHAR</ref>(</highlight><highlight class="charliteral">&apos;&gt;&apos;</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="442"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>;</highlight></codeline>
<codeline lineno="443"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="444"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;c&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="445"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8c_1a24f21637100d1f6ab4f21daccf7840fb" kindref="member">PCHAR</ref>(<ref refid="stdarg_8h_1a81ebe6ea6253b0c6618e29de70fe10eb" kindref="member">va_arg</ref>(ap,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal">))</highlight></codeline>
<codeline lineno="446"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>;</highlight></codeline>
<codeline lineno="447"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="448"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;D&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="449"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>up<sp/>=<sp/><ref refid="stdarg_8h_1a81ebe6ea6253b0c6618e29de70fe10eb" kindref="member">va_arg</ref>(ap,<sp/><ref refid="include_2sys_2types_8h_1ae2b02ed168fc99cff3851603910b1fb6" kindref="member">u_char</ref><sp/>*);</highlight></codeline>
<codeline lineno="450"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>p<sp/>=<sp/><ref refid="stdarg_8h_1a81ebe6ea6253b0c6618e29de70fe10eb" kindref="member">va_arg</ref>(ap,<sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*);</highlight></codeline>
<codeline lineno="451"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!width)</highlight></codeline>
<codeline lineno="452"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>width<sp/>=<sp/>16;</highlight></codeline>
<codeline lineno="453"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(width--)<sp/>{</highlight></codeline>
<codeline lineno="454"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8c_1a24f21637100d1f6ab4f21daccf7840fb" kindref="member">PCHAR</ref>(<ref refid="string_8h_1a7e312016bd63b21a97110c5d4164388c" kindref="member">hex2ascii</ref>(<sp/>*up<sp/>&gt;&gt;<sp/>4<sp/>));</highlight></codeline>
<codeline lineno="455"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8c_1a24f21637100d1f6ab4f21daccf7840fb" kindref="member">PCHAR</ref>(<ref refid="string_8h_1a7e312016bd63b21a97110c5d4164388c" kindref="member">hex2ascii</ref>(<sp/>*up<sp/>&amp;<sp/>0x0f<sp/>));</highlight></codeline>
<codeline lineno="456"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>up++;</highlight></codeline>
<codeline lineno="457"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(width)</highlight></codeline>
<codeline lineno="458"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(<ref refid="unionuu_1a3ce40dca10fdac763f032c2062fcb310" kindref="member">q</ref><sp/>=<sp/>p;<sp/>*<ref refid="unionuu_1a3ce40dca10fdac763f032c2062fcb310" kindref="member">q</ref>;<sp/><ref refid="unionuu_1a3ce40dca10fdac763f032c2062fcb310" kindref="member">q</ref>++)</highlight></codeline>
<codeline lineno="459"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8c_1a24f21637100d1f6ab4f21daccf7840fb" kindref="member">PCHAR</ref>(*<ref refid="unionuu_1a3ce40dca10fdac763f032c2062fcb310" kindref="member">q</ref>);</highlight></codeline>
<codeline lineno="460"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="461"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="462"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;d&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="463"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;i&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="464"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>base<sp/>=<sp/>10;</highlight></codeline>
<codeline lineno="465"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sign<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="466"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>handle_sign;</highlight></codeline>
<codeline lineno="467"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;h&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="468"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(hflag)<sp/>{</highlight></codeline>
<codeline lineno="469"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>hflag<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="470"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cflag<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="471"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="472"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="473"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>hflag<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="474"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>reswitch;</highlight></codeline>
<codeline lineno="475"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;j&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="476"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>jflag<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="477"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>reswitch;</highlight></codeline>
<codeline lineno="478"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;l&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="479"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lflag)<sp/>{</highlight></codeline>
<codeline lineno="480"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lflag<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="481"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>qflag<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="482"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="483"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="484"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lflag<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="485"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>reswitch;</highlight></codeline>
<codeline lineno="486"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;n&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="487"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(jflag)</highlight></codeline>
<codeline lineno="488"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*(<ref refid="stdarg_8h_1a81ebe6ea6253b0c6618e29de70fe10eb" kindref="member">va_arg</ref>(ap,<sp/><ref refid="include_2sys_2types_8h_1a1a3f3321a0166a004bde0a1e72553f2b" kindref="member">intmax_t</ref><sp/>*))<sp/>=<sp/>retval;</highlight></codeline>
<codeline lineno="489"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(qflag)</highlight></codeline>
<codeline lineno="490"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*(<ref refid="stdarg_8h_1a81ebe6ea6253b0c6618e29de70fe10eb" kindref="member">va_arg</ref>(ap,<sp/><ref refid="include_2sys_2types_8h_1aed1098ccbc33ac9e2fe61c0feed081bc" kindref="member">quad_t</ref><sp/>*))<sp/>=<sp/>retval;</highlight></codeline>
<codeline lineno="491"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lflag)</highlight></codeline>
<codeline lineno="492"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*(<ref refid="stdarg_8h_1a81ebe6ea6253b0c6618e29de70fe10eb" kindref="member">va_arg</ref>(ap,<sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/>*))<sp/>=<sp/>retval;</highlight></codeline>
<codeline lineno="493"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(zflag)</highlight></codeline>
<codeline lineno="494"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*(<ref refid="stdarg_8h_1a81ebe6ea6253b0c6618e29de70fe10eb" kindref="member">va_arg</ref>(ap,<sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>*))<sp/>=<sp/>retval;</highlight></codeline>
<codeline lineno="495"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(hflag)</highlight></codeline>
<codeline lineno="496"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*(<ref refid="stdarg_8h_1a81ebe6ea6253b0c6618e29de70fe10eb" kindref="member">va_arg</ref>(ap,<sp/></highlight><highlight class="keywordtype">short</highlight><highlight class="normal"><sp/>*))<sp/>=<sp/>retval;</highlight></codeline>
<codeline lineno="497"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(cflag)</highlight></codeline>
<codeline lineno="498"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*(<ref refid="stdarg_8h_1a81ebe6ea6253b0c6618e29de70fe10eb" kindref="member">va_arg</ref>(ap,<sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*))<sp/>=<sp/>retval;</highlight></codeline>
<codeline lineno="499"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="500"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*(<ref refid="stdarg_8h_1a81ebe6ea6253b0c6618e29de70fe10eb" kindref="member">va_arg</ref>(ap,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*))<sp/>=<sp/>retval;</highlight></codeline>
<codeline lineno="501"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="502"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;o&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="503"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>base<sp/>=<sp/>8;</highlight></codeline>
<codeline lineno="504"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>handle_nosign;</highlight></codeline>
<codeline lineno="505"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;p&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="506"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>base<sp/>=<sp/>16;</highlight></codeline>
<codeline lineno="507"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sharpflag<sp/>=<sp/>(width<sp/>==<sp/>0);</highlight></codeline>
<codeline lineno="508"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sign<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="509"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>num<sp/>=<sp/>(<ref refid="include_2sys_2types_8h_1a09674b9e56fd7a93a2169aa9210deec7" kindref="member">uintptr_t</ref>)<sp/><ref refid="stdarg_8h_1a81ebe6ea6253b0c6618e29de70fe10eb" kindref="member">va_arg</ref>(ap,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*);</highlight></codeline>
<codeline lineno="510"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>number;</highlight></codeline>
<codeline lineno="511"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;q&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="512"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>qflag<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="513"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>reswitch;</highlight></codeline>
<codeline lineno="514"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;r&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="515"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>base<sp/>=<sp/>radix;</highlight></codeline>
<codeline lineno="516"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(sign)</highlight></codeline>
<codeline lineno="517"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>handle_sign;</highlight></codeline>
<codeline lineno="518"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>handle_nosign;</highlight></codeline>
<codeline lineno="519"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;s&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="520"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>p<sp/>=<sp/><ref refid="stdarg_8h_1a81ebe6ea6253b0c6618e29de70fe10eb" kindref="member">va_arg</ref>(ap,<sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*);</highlight></codeline>
<codeline lineno="521"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(p<sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)</highlight></codeline>
<codeline lineno="522"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>p<sp/>=<sp/></highlight><highlight class="stringliteral">&quot;(null)&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="523"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!dot)</highlight></codeline>
<codeline lineno="524"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n<sp/>=<sp/><ref refid="lib_8h_1ae6c8de953239811a34eeeab09458e55e" kindref="member">strlen</ref>(p);</highlight></codeline>
<codeline lineno="525"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="526"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(n<sp/>=<sp/>0;<sp/>n<sp/>&lt;<sp/>dwidth<sp/>&amp;&amp;<sp/>p[n];<sp/>n++)</highlight></codeline>
<codeline lineno="527"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">continue</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="528"><highlight class="normal"></highlight></codeline>
<codeline lineno="529"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>width<sp/>-=<sp/>n;</highlight></codeline>
<codeline lineno="530"><highlight class="normal"></highlight></codeline>
<codeline lineno="531"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!ladjust<sp/>&amp;&amp;<sp/>width<sp/>&gt;<sp/>0)</highlight></codeline>
<codeline lineno="532"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(width--)</highlight></codeline>
<codeline lineno="533"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8c_1a24f21637100d1f6ab4f21daccf7840fb" kindref="member">PCHAR</ref>(padc)</highlight></codeline>
<codeline lineno="534"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>;</highlight></codeline>
<codeline lineno="535"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(n--)</highlight></codeline>
<codeline lineno="536"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8c_1a24f21637100d1f6ab4f21daccf7840fb" kindref="member">PCHAR</ref>(*p++)</highlight></codeline>
<codeline lineno="537"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>;</highlight></codeline>
<codeline lineno="538"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ladjust<sp/>&amp;&amp;<sp/>width<sp/>&gt;<sp/>0)</highlight></codeline>
<codeline lineno="539"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(width--)</highlight></codeline>
<codeline lineno="540"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8c_1a24f21637100d1f6ab4f21daccf7840fb" kindref="member">PCHAR</ref>(padc)</highlight></codeline>
<codeline lineno="541"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>;</highlight></codeline>
<codeline lineno="542"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="543"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;t&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="544"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tflag<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="545"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>reswitch;</highlight></codeline>
<codeline lineno="546"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;u&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="547"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>base<sp/>=<sp/>10;</highlight></codeline>
<codeline lineno="548"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>handle_nosign;</highlight></codeline>
<codeline lineno="549"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;X&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="550"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>upper<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="551"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;x&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="552"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>base<sp/>=<sp/>16;</highlight></codeline>
<codeline lineno="553"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>handle_nosign;</highlight></codeline>
<codeline lineno="554"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;y&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="555"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>base<sp/>=<sp/>16;</highlight></codeline>
<codeline lineno="556"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sign<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="557"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>handle_sign;</highlight></codeline>
<codeline lineno="558"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;z&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="559"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>zflag<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="560"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>reswitch;</highlight></codeline>
<codeline lineno="561"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>handle_nosign:<sp/>sign<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="562"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(jflag)</highlight></codeline>
<codeline lineno="563"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>num<sp/>=<sp/><ref refid="stdarg_8h_1a81ebe6ea6253b0c6618e29de70fe10eb" kindref="member">va_arg</ref>(ap,<sp/><ref refid="include_2sys_2types_8h_1a7643e68e022fde0d947e8dc252f716d6" kindref="member">uintmax_t</ref>);</highlight></codeline>
<codeline lineno="564"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(qflag)</highlight></codeline>
<codeline lineno="565"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>num<sp/>=<sp/><ref refid="stdarg_8h_1a81ebe6ea6253b0c6618e29de70fe10eb" kindref="member">va_arg</ref>(ap,<sp/><ref refid="include_2sys_2types_8h_1a289ae7cf9c95157e99202b0057d4935c" kindref="member">u_quad_t</ref>);</highlight></codeline>
<codeline lineno="566"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tflag)</highlight></codeline>
<codeline lineno="567"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>num<sp/>=<sp/><ref refid="stdarg_8h_1a81ebe6ea6253b0c6618e29de70fe10eb" kindref="member">va_arg</ref>(ap,<sp/><ref refid="include_2sys_2types_8h_1a34b856b1e3c67b5e5c1da0ef877b8157" kindref="member">ptrdiff_t</ref>);</highlight></codeline>
<codeline lineno="568"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lflag)</highlight></codeline>
<codeline lineno="569"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>num<sp/>=<sp/><ref refid="stdarg_8h_1a81ebe6ea6253b0c6618e29de70fe10eb" kindref="member">va_arg</ref>(ap,<sp/><ref refid="include_2sys_2types_8h_1a8f25a50daf29ce2cee1ec038a4d744ea" kindref="member">u_long</ref>);</highlight></codeline>
<codeline lineno="570"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(zflag)</highlight></codeline>
<codeline lineno="571"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>num<sp/>=<sp/><ref refid="stdarg_8h_1a81ebe6ea6253b0c6618e29de70fe10eb" kindref="member">va_arg</ref>(ap,<sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="572"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(hflag)</highlight></codeline>
<codeline lineno="573"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>num<sp/>=<sp/>(<ref refid="include_2sys_2types_8h_1aa1a19deefc008737e6397f44d983cfd4" kindref="member">u_short</ref>)<sp/><ref refid="stdarg_8h_1a81ebe6ea6253b0c6618e29de70fe10eb" kindref="member">va_arg</ref>(ap,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="574"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(cflag)</highlight></codeline>
<codeline lineno="575"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>num<sp/>=<sp/>(<ref refid="include_2sys_2types_8h_1ae2b02ed168fc99cff3851603910b1fb6" kindref="member">u_char</ref>)<sp/><ref refid="stdarg_8h_1a81ebe6ea6253b0c6618e29de70fe10eb" kindref="member">va_arg</ref>(ap,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="576"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="577"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>num<sp/>=<sp/><ref refid="stdarg_8h_1a81ebe6ea6253b0c6618e29de70fe10eb" kindref="member">va_arg</ref>(ap,<sp/><ref refid="include_2sys_2types_8h_1ac319c165d52643e43249fe003e18bdf3" kindref="member">u_int</ref>);</highlight></codeline>
<codeline lineno="578"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>number;</highlight></codeline>
<codeline lineno="579"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>handle_sign:<sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(jflag)</highlight></codeline>
<codeline lineno="580"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>num<sp/>=<sp/><ref refid="stdarg_8h_1a81ebe6ea6253b0c6618e29de70fe10eb" kindref="member">va_arg</ref>(ap,<sp/><ref refid="include_2sys_2types_8h_1a1a3f3321a0166a004bde0a1e72553f2b" kindref="member">intmax_t</ref>);</highlight></codeline>
<codeline lineno="581"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(qflag)</highlight></codeline>
<codeline lineno="582"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>num<sp/>=<sp/><ref refid="stdarg_8h_1a81ebe6ea6253b0c6618e29de70fe10eb" kindref="member">va_arg</ref>(ap,<sp/><ref refid="include_2sys_2types_8h_1aed1098ccbc33ac9e2fe61c0feed081bc" kindref="member">quad_t</ref>);</highlight></codeline>
<codeline lineno="583"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tflag)</highlight></codeline>
<codeline lineno="584"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>num<sp/>=<sp/><ref refid="stdarg_8h_1a81ebe6ea6253b0c6618e29de70fe10eb" kindref="member">va_arg</ref>(ap,<sp/><ref refid="include_2sys_2types_8h_1a34b856b1e3c67b5e5c1da0ef877b8157" kindref="member">ptrdiff_t</ref>);</highlight></codeline>
<codeline lineno="585"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lflag)</highlight></codeline>
<codeline lineno="586"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>num<sp/>=<sp/><ref refid="stdarg_8h_1a81ebe6ea6253b0c6618e29de70fe10eb" kindref="member">va_arg</ref>(ap,<sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="587"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(zflag)</highlight></codeline>
<codeline lineno="588"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>num<sp/>=<sp/><ref refid="stdarg_8h_1a81ebe6ea6253b0c6618e29de70fe10eb" kindref="member">va_arg</ref>(ap,<sp/><ref refid="include_2sys_2types_8h_1a87bd983bf349d8b86901f3200d559e8e" kindref="member">ssize_t</ref>);</highlight></codeline>
<codeline lineno="589"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(hflag)</highlight></codeline>
<codeline lineno="590"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>num<sp/>=<sp/>(short)<sp/><ref refid="stdarg_8h_1a81ebe6ea6253b0c6618e29de70fe10eb" kindref="member">va_arg</ref>(ap,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="591"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(cflag)</highlight></codeline>
<codeline lineno="592"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>num<sp/>=<sp/>(char)<sp/><ref refid="stdarg_8h_1a81ebe6ea6253b0c6618e29de70fe10eb" kindref="member">va_arg</ref>(ap,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="593"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="594"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>num<sp/>=<sp/><ref refid="stdarg_8h_1a81ebe6ea6253b0c6618e29de70fe10eb" kindref="member">va_arg</ref>(ap,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="595"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>number:<sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(sign<sp/>&amp;&amp;<sp/>(<ref refid="include_2sys_2types_8h_1a1a3f3321a0166a004bde0a1e72553f2b" kindref="member">intmax_t</ref>)<sp/>num<sp/>&lt;<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="596"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>neg<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="597"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>num<sp/>=<sp/>-(<ref refid="include_2sys_2types_8h_1a1a3f3321a0166a004bde0a1e72553f2b" kindref="member">intmax_t</ref>)<sp/>num;</highlight></codeline>
<codeline lineno="598"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="599"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>p<sp/>=<sp/>ksprintn(nbuf,<sp/>num,<sp/>base,<sp/>&amp;n,<sp/>upper);</highlight></codeline>
<codeline lineno="600"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmp<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="601"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(sharpflag<sp/>&amp;&amp;<sp/>num<sp/>!=<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="602"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(base<sp/>==<sp/>8)</highlight></codeline>
<codeline lineno="603"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmp++;</highlight></codeline>
<codeline lineno="604"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(base<sp/>==<sp/>16)</highlight></codeline>
<codeline lineno="605"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmp<sp/>+=<sp/>2;</highlight></codeline>
<codeline lineno="606"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="607"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(neg)</highlight></codeline>
<codeline lineno="608"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmp++;</highlight></codeline>
<codeline lineno="609"><highlight class="normal"></highlight></codeline>
<codeline lineno="610"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!ladjust<sp/>&amp;&amp;<sp/>padc<sp/>==<sp/></highlight><highlight class="charliteral">&apos;0&apos;</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="611"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dwidth<sp/>=<sp/>width<sp/>-<sp/>tmp;</highlight></codeline>
<codeline lineno="612"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>width<sp/>-=<sp/>tmp<sp/>+<sp/>imax(dwidth,<sp/>n);</highlight></codeline>
<codeline lineno="613"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dwidth<sp/>-=<sp/>n;</highlight></codeline>
<codeline lineno="614"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!ladjust)</highlight></codeline>
<codeline lineno="615"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(width--<sp/>&gt;<sp/>0)</highlight></codeline>
<codeline lineno="616"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8c_1a24f21637100d1f6ab4f21daccf7840fb" kindref="member">PCHAR</ref>(</highlight><highlight class="charliteral">&apos;<sp/>&apos;</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="617"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>;</highlight></codeline>
<codeline lineno="618"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(neg)</highlight></codeline>
<codeline lineno="619"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8c_1a24f21637100d1f6ab4f21daccf7840fb" kindref="member">PCHAR</ref>(</highlight><highlight class="charliteral">&apos;-&apos;</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="620"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>;</highlight></codeline>
<codeline lineno="621"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(sharpflag<sp/>&amp;&amp;<sp/>num<sp/>!=<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="622"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(base<sp/>==<sp/>8)<sp/>{</highlight></codeline>
<codeline lineno="623"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8c_1a24f21637100d1f6ab4f21daccf7840fb" kindref="member">PCHAR</ref>(</highlight><highlight class="charliteral">&apos;0&apos;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="624"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="625"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(base<sp/>==<sp/>16)<sp/>{</highlight></codeline>
<codeline lineno="626"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8c_1a24f21637100d1f6ab4f21daccf7840fb" kindref="member">PCHAR</ref>(</highlight><highlight class="charliteral">&apos;0&apos;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="627"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8c_1a24f21637100d1f6ab4f21daccf7840fb" kindref="member">PCHAR</ref>(</highlight><highlight class="charliteral">&apos;x&apos;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="628"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="629"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="630"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(dwidth--<sp/>&gt;<sp/>0)</highlight></codeline>
<codeline lineno="631"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8c_1a24f21637100d1f6ab4f21daccf7840fb" kindref="member">PCHAR</ref>(</highlight><highlight class="charliteral">&apos;0&apos;</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="632"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>;</highlight></codeline>
<codeline lineno="633"><highlight class="normal"></highlight></codeline>
<codeline lineno="634"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(*p)</highlight></codeline>
<codeline lineno="635"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8c_1a24f21637100d1f6ab4f21daccf7840fb" kindref="member">PCHAR</ref>(*p--)</highlight></codeline>
<codeline lineno="636"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>;</highlight></codeline>
<codeline lineno="637"><highlight class="normal"></highlight></codeline>
<codeline lineno="638"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ladjust)</highlight></codeline>
<codeline lineno="639"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(width--<sp/>&gt;<sp/>0)</highlight></codeline>
<codeline lineno="640"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8c_1a24f21637100d1f6ab4f21daccf7840fb" kindref="member">PCHAR</ref>(</highlight><highlight class="charliteral">&apos;<sp/>&apos;</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="641"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>;</highlight></codeline>
<codeline lineno="642"><highlight class="normal"></highlight></codeline>
<codeline lineno="643"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="644"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="645"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(percent<sp/>&lt;<sp/>fmt)</highlight></codeline>
<codeline lineno="646"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8c_1a24f21637100d1f6ab4f21daccf7840fb" kindref="member">PCHAR</ref>(*percent++)</highlight></codeline>
<codeline lineno="647"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>;</highlight></codeline>
<codeline lineno="648"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="649"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>Since<sp/>we<sp/>ignore<sp/>a<sp/>formatting<sp/>argument<sp/>it<sp/>is<sp/>no</highlight></codeline>
<codeline lineno="650"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>longer<sp/>safe<sp/>to<sp/>obey<sp/>the<sp/>remaining<sp/>formatting</highlight></codeline>
<codeline lineno="651"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>arguments<sp/>as<sp/>the<sp/>arguments<sp/>will<sp/>no<sp/>longer<sp/>match</highlight></codeline>
<codeline lineno="652"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>the<sp/>format<sp/>specs.</highlight></codeline>
<codeline lineno="653"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="654"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>stop<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="655"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="656"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="657"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="658"><highlight class="normal"></highlight><highlight class="preprocessor">#undef<sp/>PCHAR</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="659"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0);</highlight></codeline>
<codeline lineno="660"><highlight class="normal">}</highlight></codeline>
<codeline lineno="661"><highlight class="normal"></highlight></codeline>
<codeline lineno="662"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*ksprintn(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*nbuf,<sp/><ref refid="include_2sys_2types_8h_1a7643e68e022fde0d947e8dc252f716d6" kindref="member">uintmax_t</ref><sp/>num,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>base,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*lenp,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>upper)<sp/>{</highlight></codeline>
<codeline lineno="663"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*p,<sp/>c;</highlight></codeline>
<codeline lineno="664"><highlight class="normal"></highlight></codeline>
<codeline lineno="665"><highlight class="normal"><sp/><sp/>p<sp/>=<sp/>nbuf;</highlight></codeline>
<codeline lineno="666"><highlight class="normal"><sp/><sp/>*p<sp/>=<sp/></highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="667"><highlight class="normal"></highlight></codeline>
<codeline lineno="668"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">do</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="669"><highlight class="normal"><sp/><sp/><sp/><sp/>c<sp/>=<sp/><ref refid="string_8h_1a7e312016bd63b21a97110c5d4164388c" kindref="member">hex2ascii</ref>(num<sp/>%<sp/>base);</highlight></codeline>
<codeline lineno="670"><highlight class="normal"><sp/><sp/><sp/><sp/>*++p<sp/>=<sp/>upper<sp/>?<sp/><ref refid="string_8h_1adda03014c30b02d7b496fce96f37951b" kindref="member">toupper</ref>(c)<sp/>:<sp/>c;</highlight></codeline>
<codeline lineno="671"><highlight class="normal"><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(num<sp/>/=<sp/>base);</highlight></codeline>
<codeline lineno="672"><highlight class="normal"></highlight></codeline>
<codeline lineno="673"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lenp)</highlight></codeline>
<codeline lineno="674"><highlight class="normal"><sp/><sp/><sp/><sp/>*lenp<sp/>=<sp/>p<sp/>-<sp/>nbuf;</highlight></codeline>
<codeline lineno="675"><highlight class="normal"></highlight></codeline>
<codeline lineno="676"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(p);</highlight></codeline>
<codeline lineno="677"><highlight class="normal">}</highlight></codeline>
<codeline lineno="678"><highlight class="normal"></highlight></codeline>
<codeline lineno="679"><highlight class="normal"></highlight><highlight class="comment">/***</highlight></codeline>
<codeline lineno="680"><highlight class="comment"><sp/>END</highlight></codeline>
<codeline lineno="681"><highlight class="comment"><sp/>***/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="682"><highlight class="normal"></highlight></codeline>
    </programlisting>
    <location file="C:/Dev/git/UbixOS/sys/lib/kprintf.c"/>
  </compounddef>
</doxygen>
